Repository: kelseyhightower/confd Branch: master Commit: 919444eb6cf7 Files: 1542 Total size: 25.0 MB Directory structure: gitextract_r312ub76/ ├── .dockerignore ├── .gitignore ├── .travis.yml ├── CHANGELOG ├── CONTRIBUTING.md ├── Dockerfile.build.alpine ├── LICENSE ├── MAINTAINERS ├── Makefile ├── README.md ├── backends/ │ ├── client.go │ ├── config.go │ ├── consul/ │ │ └── client.go │ ├── dynamodb/ │ │ └── client.go │ ├── env/ │ │ └── client.go │ ├── etcd/ │ │ └── client.go │ ├── etcdv3/ │ │ └── client.go │ ├── file/ │ │ └── client.go │ ├── rancher/ │ │ └── client.go │ ├── redis/ │ │ └── client.go │ ├── ssm/ │ │ └── client.go │ ├── vault/ │ │ └── client.go │ └── zookeeper/ │ └── client.go ├── confd.go ├── config.go ├── config_test.go ├── contrib/ │ ├── etcd/ │ │ └── Procfile │ └── generate-changelog.sh ├── docs/ │ ├── command-line-flags.md │ ├── configuration-guide.md │ ├── data_encryption.md │ ├── dns-srv-records.md │ ├── installation.md │ ├── logging.md │ ├── noop-mode.md │ ├── quick-start-guide.md │ ├── release-checklist.md │ ├── template-resources.md │ ├── templates.md │ ├── tomcat-sample.md │ └── vault-kubernetes-auth.md ├── go.mod ├── go.sum ├── integration/ │ ├── confdir/ │ │ ├── conf.d/ │ │ │ ├── basic.toml │ │ │ ├── exists.toml │ │ │ ├── iteration.toml │ │ │ ├── manykeys.toml │ │ │ └── nested.toml │ │ └── templates/ │ │ ├── basic.conf.tmpl │ │ ├── exists-test.conf.tmpl │ │ ├── iteration.conf.tmpl │ │ └── nested.conf.tmpl │ ├── consul/ │ │ └── test.sh │ ├── dynamodb/ │ │ └── test.sh │ ├── env/ │ │ └── test.sh │ ├── etcd/ │ │ └── test.sh │ ├── etcdv3/ │ │ └── test.sh │ ├── expect/ │ │ ├── basic.conf │ │ ├── check.sh │ │ ├── exists-test.conf │ │ └── iteration.conf │ ├── file/ │ │ └── test.sh │ ├── rancher/ │ │ └── test.sh │ ├── redis/ │ │ └── test.sh │ ├── ssm/ │ │ ├── main.go │ │ └── test.sh │ ├── vault/ │ │ └── test.sh │ ├── vault-path/ │ │ └── test.sh │ └── zookeeper/ │ ├── main.go │ ├── test.json │ ├── test.sh │ └── zoo.cfg ├── log/ │ └── log.go ├── resource/ │ └── template/ │ ├── processor.go │ ├── resource.go │ ├── resource_test.go │ ├── template_funcs.go │ └── template_test.go ├── util/ │ ├── filestat_posix.go │ ├── filestat_windows.go │ ├── util.go │ └── util_test.go ├── vendor/ │ ├── github.com/ │ │ ├── BurntSushi/ │ │ │ └── toml/ │ │ │ ├── .gitignore │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ ├── decode.go │ │ │ ├── decode_go116.go │ │ │ ├── deprecated.go │ │ │ ├── doc.go │ │ │ ├── encode.go │ │ │ ├── error.go │ │ │ ├── internal/ │ │ │ │ └── tz.go │ │ │ ├── lex.go │ │ │ ├── meta.go │ │ │ ├── parse.go │ │ │ ├── type_fields.go │ │ │ └── type_toml.go │ │ ├── armon/ │ │ │ └── go-metrics/ │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── const_unix.go │ │ │ ├── const_windows.go │ │ │ ├── inmem.go │ │ │ ├── inmem_endpoint.go │ │ │ ├── inmem_signal.go │ │ │ ├── metrics.go │ │ │ ├── sink.go │ │ │ ├── start.go │ │ │ ├── statsd.go │ │ │ └── statsite.go │ │ ├── aws/ │ │ │ └── aws-sdk-go/ │ │ │ ├── LICENSE.txt │ │ │ ├── NOTICE.txt │ │ │ ├── aws/ │ │ │ │ ├── auth/ │ │ │ │ │ └── bearer/ │ │ │ │ │ └── token.go │ │ │ │ ├── awserr/ │ │ │ │ │ ├── error.go │ │ │ │ │ └── types.go │ │ │ │ ├── awsutil/ │ │ │ │ │ ├── copy.go │ │ │ │ │ ├── equal.go │ │ │ │ │ ├── path_value.go │ │ │ │ │ ├── prettify.go │ │ │ │ │ └── string_value.go │ │ │ │ ├── client/ │ │ │ │ │ ├── client.go │ │ │ │ │ ├── default_retryer.go │ │ │ │ │ ├── logger.go │ │ │ │ │ ├── metadata/ │ │ │ │ │ │ └── client_info.go │ │ │ │ │ └── no_op_retryer.go │ │ │ │ ├── config.go │ │ │ │ ├── context_1_5.go │ │ │ │ ├── context_1_9.go │ │ │ │ ├── context_background_1_5.go │ │ │ │ ├── context_background_1_7.go │ │ │ │ ├── context_sleep.go │ │ │ │ ├── convert_types.go │ │ │ │ ├── corehandlers/ │ │ │ │ │ ├── awsinternal.go │ │ │ │ │ ├── handlers.go │ │ │ │ │ ├── param_validator.go │ │ │ │ │ └── user_agent.go │ │ │ │ ├── credentials/ │ │ │ │ │ ├── chain_provider.go │ │ │ │ │ ├── context_background_go1.5.go │ │ │ │ │ ├── context_background_go1.7.go │ │ │ │ │ ├── context_go1.5.go │ │ │ │ │ ├── context_go1.9.go │ │ │ │ │ ├── credentials.go │ │ │ │ │ ├── ec2rolecreds/ │ │ │ │ │ │ └── ec2_role_provider.go │ │ │ │ │ ├── endpointcreds/ │ │ │ │ │ │ └── provider.go │ │ │ │ │ ├── env_provider.go │ │ │ │ │ ├── example.ini │ │ │ │ │ ├── processcreds/ │ │ │ │ │ │ └── provider.go │ │ │ │ │ ├── shared_credentials_provider.go │ │ │ │ │ ├── ssocreds/ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── os.go │ │ │ │ │ │ ├── os_windows.go │ │ │ │ │ │ ├── provider.go │ │ │ │ │ │ ├── sso_cached_token.go │ │ │ │ │ │ └── token_provider.go │ │ │ │ │ ├── static_provider.go │ │ │ │ │ └── stscreds/ │ │ │ │ │ ├── assume_role_provider.go │ │ │ │ │ └── web_identity_provider.go │ │ │ │ ├── crr/ │ │ │ │ │ ├── cache.go │ │ │ │ │ ├── endpoint.go │ │ │ │ │ ├── sync_map.go │ │ │ │ │ └── sync_map_1_8.go │ │ │ │ ├── csm/ │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── enable.go │ │ │ │ │ ├── metric.go │ │ │ │ │ ├── metric_chan.go │ │ │ │ │ ├── metric_exception.go │ │ │ │ │ └── reporter.go │ │ │ │ ├── defaults/ │ │ │ │ │ ├── defaults.go │ │ │ │ │ └── shared_config.go │ │ │ │ ├── doc.go │ │ │ │ ├── ec2metadata/ │ │ │ │ │ ├── api.go │ │ │ │ │ ├── service.go │ │ │ │ │ └── token_provider.go │ │ │ │ ├── endpoints/ │ │ │ │ │ ├── decode.go │ │ │ │ │ ├── defaults.go │ │ │ │ │ ├── dep_service_ids.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── endpoints.go │ │ │ │ │ ├── legacy_regions.go │ │ │ │ │ ├── v3model.go │ │ │ │ │ └── v3model_codegen.go │ │ │ │ ├── errors.go │ │ │ │ ├── jsonvalue.go │ │ │ │ ├── logger.go │ │ │ │ ├── request/ │ │ │ │ │ ├── connection_reset_error.go │ │ │ │ │ ├── handlers.go │ │ │ │ │ ├── http_request.go │ │ │ │ │ ├── offset_reader.go │ │ │ │ │ ├── request.go │ │ │ │ │ ├── request_1_7.go │ │ │ │ │ ├── request_1_8.go │ │ │ │ │ ├── request_context.go │ │ │ │ │ ├── request_context_1_6.go │ │ │ │ │ ├── request_pagination.go │ │ │ │ │ ├── retryer.go │ │ │ │ │ ├── timeout_read_closer.go │ │ │ │ │ ├── validation.go │ │ │ │ │ └── waiter.go │ │ │ │ ├── session/ │ │ │ │ │ ├── credentials.go │ │ │ │ │ ├── custom_transport.go │ │ │ │ │ ├── custom_transport_go1.12.go │ │ │ │ │ ├── custom_transport_go1.5.go │ │ │ │ │ ├── custom_transport_go1.6.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── env_config.go │ │ │ │ │ ├── session.go │ │ │ │ │ └── shared_config.go │ │ │ │ ├── signer/ │ │ │ │ │ └── v4/ │ │ │ │ │ ├── header_rules.go │ │ │ │ │ ├── options.go │ │ │ │ │ ├── request_context_go1.5.go │ │ │ │ │ ├── request_context_go1.7.go │ │ │ │ │ ├── stream.go │ │ │ │ │ ├── uri_path.go │ │ │ │ │ └── v4.go │ │ │ │ ├── types.go │ │ │ │ ├── url.go │ │ │ │ ├── url_1_7.go │ │ │ │ └── version.go │ │ │ ├── internal/ │ │ │ │ ├── context/ │ │ │ │ │ └── background_go1.5.go │ │ │ │ ├── ini/ │ │ │ │ │ ├── ast.go │ │ │ │ │ ├── comma_token.go │ │ │ │ │ ├── comment_token.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── empty_token.go │ │ │ │ │ ├── expression.go │ │ │ │ │ ├── fuzz.go │ │ │ │ │ ├── ini.go │ │ │ │ │ ├── ini_lexer.go │ │ │ │ │ ├── ini_parser.go │ │ │ │ │ ├── literal_tokens.go │ │ │ │ │ ├── newline_token.go │ │ │ │ │ ├── number_helper.go │ │ │ │ │ ├── op_tokens.go │ │ │ │ │ ├── parse_error.go │ │ │ │ │ ├── parse_stack.go │ │ │ │ │ ├── sep_tokens.go │ │ │ │ │ ├── skipper.go │ │ │ │ │ ├── statement.go │ │ │ │ │ ├── value_util.go │ │ │ │ │ ├── visitor.go │ │ │ │ │ ├── walker.go │ │ │ │ │ └── ws_token.go │ │ │ │ ├── sdkio/ │ │ │ │ │ ├── byte.go │ │ │ │ │ ├── io_go1.6.go │ │ │ │ │ └── io_go1.7.go │ │ │ │ ├── sdkmath/ │ │ │ │ │ ├── floor.go │ │ │ │ │ └── floor_go1.9.go │ │ │ │ ├── sdkrand/ │ │ │ │ │ ├── locked_source.go │ │ │ │ │ ├── read.go │ │ │ │ │ └── read_1_5.go │ │ │ │ ├── sdkuri/ │ │ │ │ │ └── path.go │ │ │ │ ├── shareddefaults/ │ │ │ │ │ ├── ecs_container.go │ │ │ │ │ ├── shared_config.go │ │ │ │ │ ├── shared_config_resolve_home.go │ │ │ │ │ └── shared_config_resolve_home_go1.12.go │ │ │ │ ├── strings/ │ │ │ │ │ └── strings.go │ │ │ │ └── sync/ │ │ │ │ └── singleflight/ │ │ │ │ ├── LICENSE │ │ │ │ └── singleflight.go │ │ │ ├── private/ │ │ │ │ └── protocol/ │ │ │ │ ├── host.go │ │ │ │ ├── host_prefix.go │ │ │ │ ├── idempotency.go │ │ │ │ ├── json/ │ │ │ │ │ └── jsonutil/ │ │ │ │ │ ├── build.go │ │ │ │ │ └── unmarshal.go │ │ │ │ ├── jsonrpc/ │ │ │ │ │ ├── jsonrpc.go │ │ │ │ │ └── unmarshal_error.go │ │ │ │ ├── jsonvalue.go │ │ │ │ ├── payload.go │ │ │ │ ├── protocol.go │ │ │ │ ├── query/ │ │ │ │ │ ├── build.go │ │ │ │ │ ├── queryutil/ │ │ │ │ │ │ └── queryutil.go │ │ │ │ │ ├── unmarshal.go │ │ │ │ │ └── unmarshal_error.go │ │ │ │ ├── rest/ │ │ │ │ │ ├── build.go │ │ │ │ │ ├── payload.go │ │ │ │ │ └── unmarshal.go │ │ │ │ ├── restjson/ │ │ │ │ │ ├── restjson.go │ │ │ │ │ └── unmarshal_error.go │ │ │ │ ├── timestamp.go │ │ │ │ ├── unmarshal.go │ │ │ │ ├── unmarshal_error.go │ │ │ │ └── xml/ │ │ │ │ └── xmlutil/ │ │ │ │ ├── build.go │ │ │ │ ├── sort.go │ │ │ │ ├── unmarshal.go │ │ │ │ └── xml_to_struct.go │ │ │ └── service/ │ │ │ ├── dynamodb/ │ │ │ │ ├── api.go │ │ │ │ ├── customizations.go │ │ │ │ ├── doc.go │ │ │ │ ├── doc_custom.go │ │ │ │ ├── errors.go │ │ │ │ ├── service.go │ │ │ │ └── waiters.go │ │ │ ├── ssm/ │ │ │ │ ├── api.go │ │ │ │ ├── doc.go │ │ │ │ ├── errors.go │ │ │ │ ├── service.go │ │ │ │ └── waiters.go │ │ │ ├── sso/ │ │ │ │ ├── api.go │ │ │ │ ├── doc.go │ │ │ │ ├── errors.go │ │ │ │ ├── service.go │ │ │ │ └── ssoiface/ │ │ │ │ └── interface.go │ │ │ ├── ssooidc/ │ │ │ │ ├── api.go │ │ │ │ ├── doc.go │ │ │ │ ├── errors.go │ │ │ │ └── service.go │ │ │ └── sts/ │ │ │ ├── api.go │ │ │ ├── customizations.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── service.go │ │ │ └── stsiface/ │ │ │ └── interface.go │ │ ├── cenkalti/ │ │ │ └── backoff/ │ │ │ └── v3/ │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backoff.go │ │ │ ├── context.go │ │ │ ├── exponential.go │ │ │ ├── retry.go │ │ │ ├── ticker.go │ │ │ ├── timer.go │ │ │ └── tries.go │ │ ├── coreos/ │ │ │ ├── go-semver/ │ │ │ │ ├── LICENSE │ │ │ │ ├── NOTICE │ │ │ │ └── semver/ │ │ │ │ ├── semver.go │ │ │ │ └── sort.go │ │ │ └── go-systemd/ │ │ │ └── v22/ │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ └── journal/ │ │ │ ├── journal.go │ │ │ ├── journal_unix.go │ │ │ └── journal_windows.go │ │ ├── fatih/ │ │ │ └── color/ │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── color.go │ │ │ ├── color_windows.go │ │ │ └── doc.go │ │ ├── fsnotify/ │ │ │ └── fsnotify/ │ │ │ ├── .cirrus.yml │ │ │ ├── .editorconfig │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── .mailmap │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backend_fen.go │ │ │ ├── backend_inotify.go │ │ │ ├── backend_kqueue.go │ │ │ ├── backend_other.go │ │ │ ├── backend_windows.go │ │ │ ├── fsnotify.go │ │ │ ├── mkdoc.zsh │ │ │ ├── system_bsd.go │ │ │ └── system_darwin.go │ │ ├── garyburd/ │ │ │ └── redigo/ │ │ │ ├── LICENSE │ │ │ ├── internal/ │ │ │ │ └── commandinfo.go │ │ │ └── redis/ │ │ │ ├── conn.go │ │ │ ├── doc.go │ │ │ ├── go16.go │ │ │ ├── go17.go │ │ │ ├── go18.go │ │ │ ├── log.go │ │ │ ├── pool.go │ │ │ ├── pool17.go │ │ │ ├── pubsub.go │ │ │ ├── redis.go │ │ │ ├── reply.go │ │ │ ├── scan.go │ │ │ └── script.go │ │ ├── go-jose/ │ │ │ └── go-jose/ │ │ │ └── v3/ │ │ │ ├── .gitignore │ │ │ ├── .golangci.yml │ │ │ ├── .travis.yml │ │ │ ├── BUG-BOUNTY.md │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── asymmetric.go │ │ │ ├── cipher/ │ │ │ │ ├── cbc_hmac.go │ │ │ │ ├── concat_kdf.go │ │ │ │ ├── ecdh_es.go │ │ │ │ └── key_wrap.go │ │ │ ├── crypter.go │ │ │ ├── doc.go │ │ │ ├── encoding.go │ │ │ ├── json/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── decode.go │ │ │ │ ├── encode.go │ │ │ │ ├── indent.go │ │ │ │ ├── scanner.go │ │ │ │ ├── stream.go │ │ │ │ └── tags.go │ │ │ ├── jwe.go │ │ │ ├── jwk.go │ │ │ ├── jws.go │ │ │ ├── jwt/ │ │ │ │ ├── builder.go │ │ │ │ ├── claims.go │ │ │ │ ├── doc.go │ │ │ │ ├── errors.go │ │ │ │ ├── jwt.go │ │ │ │ └── validation.go │ │ │ ├── opaque.go │ │ │ ├── shared.go │ │ │ ├── signing.go │ │ │ └── symmetric.go │ │ ├── gogo/ │ │ │ └── protobuf/ │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ ├── gogoproto/ │ │ │ │ ├── Makefile │ │ │ │ ├── doc.go │ │ │ │ ├── gogo.pb.go │ │ │ │ ├── gogo.pb.golden │ │ │ │ ├── gogo.proto │ │ │ │ └── helper.go │ │ │ ├── proto/ │ │ │ │ ├── Makefile │ │ │ │ ├── clone.go │ │ │ │ ├── custom_gogo.go │ │ │ │ ├── decode.go │ │ │ │ ├── deprecated.go │ │ │ │ ├── discard.go │ │ │ │ ├── duration.go │ │ │ │ ├── duration_gogo.go │ │ │ │ ├── encode.go │ │ │ │ ├── encode_gogo.go │ │ │ │ ├── equal.go │ │ │ │ ├── extensions.go │ │ │ │ ├── extensions_gogo.go │ │ │ │ ├── lib.go │ │ │ │ ├── lib_gogo.go │ │ │ │ ├── message_set.go │ │ │ │ ├── pointer_reflect.go │ │ │ │ ├── pointer_reflect_gogo.go │ │ │ │ ├── pointer_unsafe.go │ │ │ │ ├── pointer_unsafe_gogo.go │ │ │ │ ├── properties.go │ │ │ │ ├── properties_gogo.go │ │ │ │ ├── skip_gogo.go │ │ │ │ ├── table_marshal.go │ │ │ │ ├── table_marshal_gogo.go │ │ │ │ ├── table_merge.go │ │ │ │ ├── table_unmarshal.go │ │ │ │ ├── table_unmarshal_gogo.go │ │ │ │ ├── text.go │ │ │ │ ├── text_gogo.go │ │ │ │ ├── text_parser.go │ │ │ │ ├── timestamp.go │ │ │ │ ├── timestamp_gogo.go │ │ │ │ ├── wrappers.go │ │ │ │ └── wrappers_gogo.go │ │ │ └── protoc-gen-gogo/ │ │ │ └── descriptor/ │ │ │ ├── Makefile │ │ │ ├── descriptor.go │ │ │ ├── descriptor.pb.go │ │ │ ├── descriptor_gostring.gen.go │ │ │ └── helper.go │ │ ├── golang/ │ │ │ └── protobuf/ │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ ├── jsonpb/ │ │ │ │ ├── decode.go │ │ │ │ ├── encode.go │ │ │ │ └── json.go │ │ │ ├── proto/ │ │ │ │ ├── buffer.go │ │ │ │ ├── defaults.go │ │ │ │ ├── deprecated.go │ │ │ │ ├── discard.go │ │ │ │ ├── extensions.go │ │ │ │ ├── properties.go │ │ │ │ ├── proto.go │ │ │ │ ├── registry.go │ │ │ │ ├── text_decode.go │ │ │ │ ├── text_encode.go │ │ │ │ ├── wire.go │ │ │ │ └── wrappers.go │ │ │ └── ptypes/ │ │ │ ├── any/ │ │ │ │ └── any.pb.go │ │ │ ├── any.go │ │ │ ├── doc.go │ │ │ ├── duration/ │ │ │ │ └── duration.pb.go │ │ │ ├── duration.go │ │ │ ├── timestamp/ │ │ │ │ └── timestamp.pb.go │ │ │ └── timestamp.go │ │ ├── hashicorp/ │ │ │ ├── consul/ │ │ │ │ └── api/ │ │ │ │ ├── .copywrite.hcl │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── acl.go │ │ │ │ ├── agent.go │ │ │ │ ├── api.go │ │ │ │ ├── catalog.go │ │ │ │ ├── config_entry.go │ │ │ │ ├── config_entry_discoverychain.go │ │ │ │ ├── config_entry_exports.go │ │ │ │ ├── config_entry_gateways.go │ │ │ │ ├── config_entry_inline_certificate.go │ │ │ │ ├── config_entry_intentions.go │ │ │ │ ├── config_entry_jwt_provider.go │ │ │ │ ├── config_entry_mesh.go │ │ │ │ ├── config_entry_rate_limit_ip.go │ │ │ │ ├── config_entry_routes.go │ │ │ │ ├── config_entry_sameness_group.go │ │ │ │ ├── config_entry_status.go │ │ │ │ ├── connect.go │ │ │ │ ├── connect_ca.go │ │ │ │ ├── connect_intention.go │ │ │ │ ├── coordinate.go │ │ │ │ ├── debug.go │ │ │ │ ├── discovery_chain.go │ │ │ │ ├── event.go │ │ │ │ ├── health.go │ │ │ │ ├── internal.go │ │ │ │ ├── kv.go │ │ │ │ ├── lock.go │ │ │ │ ├── namespace.go │ │ │ │ ├── operator.go │ │ │ │ ├── operator_area.go │ │ │ │ ├── operator_audit.go │ │ │ │ ├── operator_autopilot.go │ │ │ │ ├── operator_keyring.go │ │ │ │ ├── operator_license.go │ │ │ │ ├── operator_raft.go │ │ │ │ ├── operator_segment.go │ │ │ │ ├── operator_usage.go │ │ │ │ ├── partition.go │ │ │ │ ├── peering.go │ │ │ │ ├── prepared_query.go │ │ │ │ ├── raw.go │ │ │ │ ├── semaphore.go │ │ │ │ ├── session.go │ │ │ │ ├── snapshot.go │ │ │ │ ├── status.go │ │ │ │ └── txn.go │ │ │ ├── errwrap/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ └── errwrap.go │ │ │ ├── go-cleanhttp/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── cleanhttp.go │ │ │ │ ├── doc.go │ │ │ │ └── handlers.go │ │ │ ├── go-hclog/ │ │ │ │ ├── .gitignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── colorize_unix.go │ │ │ │ ├── colorize_windows.go │ │ │ │ ├── context.go │ │ │ │ ├── exclude.go │ │ │ │ ├── global.go │ │ │ │ ├── interceptlogger.go │ │ │ │ ├── intlogger.go │ │ │ │ ├── logger.go │ │ │ │ ├── nulllogger.go │ │ │ │ ├── stacktrace.go │ │ │ │ ├── stdlog.go │ │ │ │ └── writer.go │ │ │ ├── go-immutable-radix/ │ │ │ │ ├── .gitignore │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── edges.go │ │ │ │ ├── iradix.go │ │ │ │ ├── iter.go │ │ │ │ ├── node.go │ │ │ │ ├── raw_iter.go │ │ │ │ └── reverse_iter.go │ │ │ ├── go-multierror/ │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── append.go │ │ │ │ ├── flatten.go │ │ │ │ ├── format.go │ │ │ │ ├── group.go │ │ │ │ ├── multierror.go │ │ │ │ ├── prefix.go │ │ │ │ └── sort.go │ │ │ ├── go-retryablehttp/ │ │ │ │ ├── .gitignore │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── CODEOWNERS │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── client.go │ │ │ │ └── roundtripper.go │ │ │ ├── go-rootcerts/ │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── doc.go │ │ │ │ ├── rootcerts.go │ │ │ │ ├── rootcerts_base.go │ │ │ │ └── rootcerts_darwin.go │ │ │ ├── go-secure-stdlib/ │ │ │ │ ├── parseutil/ │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── parsepath.go │ │ │ │ │ └── parseutil.go │ │ │ │ └── strutil/ │ │ │ │ ├── LICENSE │ │ │ │ └── strutil.go │ │ │ ├── go-sockaddr/ │ │ │ │ ├── .gitignore │ │ │ │ ├── GNUmakefile │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── doc.go │ │ │ │ ├── ifaddr.go │ │ │ │ ├── ifaddrs.go │ │ │ │ ├── ifattr.go │ │ │ │ ├── ipaddr.go │ │ │ │ ├── ipaddrs.go │ │ │ │ ├── ipv4addr.go │ │ │ │ ├── ipv6addr.go │ │ │ │ ├── rfc.go │ │ │ │ ├── route_info.go │ │ │ │ ├── route_info_android.go │ │ │ │ ├── route_info_bsd.go │ │ │ │ ├── route_info_default.go │ │ │ │ ├── route_info_linux.go │ │ │ │ ├── route_info_solaris.go │ │ │ │ ├── route_info_test_windows.go │ │ │ │ ├── route_info_windows.go │ │ │ │ ├── sockaddr.go │ │ │ │ ├── sockaddrs.go │ │ │ │ └── unixsock.go │ │ │ ├── golang-lru/ │ │ │ │ ├── LICENSE │ │ │ │ └── simplelru/ │ │ │ │ ├── lru.go │ │ │ │ └── lru_interface.go │ │ │ ├── hcl/ │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── appveyor.yml │ │ │ │ ├── decoder.go │ │ │ │ ├── hcl/ │ │ │ │ │ ├── ast/ │ │ │ │ │ │ ├── ast.go │ │ │ │ │ │ └── walk.go │ │ │ │ │ ├── parser/ │ │ │ │ │ │ ├── error.go │ │ │ │ │ │ └── parser.go │ │ │ │ │ ├── scanner/ │ │ │ │ │ │ └── scanner.go │ │ │ │ │ ├── strconv/ │ │ │ │ │ │ └── quote.go │ │ │ │ │ └── token/ │ │ │ │ │ ├── position.go │ │ │ │ │ └── token.go │ │ │ │ ├── hcl.go │ │ │ │ ├── json/ │ │ │ │ │ ├── parser/ │ │ │ │ │ │ ├── flatten.go │ │ │ │ │ │ └── parser.go │ │ │ │ │ ├── scanner/ │ │ │ │ │ │ └── scanner.go │ │ │ │ │ └── token/ │ │ │ │ │ ├── position.go │ │ │ │ │ └── token.go │ │ │ │ ├── lex.go │ │ │ │ └── parse.go │ │ │ ├── serf/ │ │ │ │ ├── LICENSE │ │ │ │ └── coordinate/ │ │ │ │ ├── client.go │ │ │ │ ├── config.go │ │ │ │ ├── coordinate.go │ │ │ │ └── phantom.go │ │ │ └── vault/ │ │ │ └── api/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── auth.go │ │ │ ├── auth_token.go │ │ │ ├── client.go │ │ │ ├── help.go │ │ │ ├── kv.go │ │ │ ├── kv_v1.go │ │ │ ├── kv_v2.go │ │ │ ├── lifetime_watcher.go │ │ │ ├── logical.go │ │ │ ├── output_policy.go │ │ │ ├── output_string.go │ │ │ ├── plugin_helpers.go │ │ │ ├── plugin_runtime_types.go │ │ │ ├── plugin_types.go │ │ │ ├── replication_status.go │ │ │ ├── request.go │ │ │ ├── response.go │ │ │ ├── secret.go │ │ │ ├── ssh.go │ │ │ ├── ssh_agent.go │ │ │ ├── sudo_paths.go │ │ │ ├── sys.go │ │ │ ├── sys_audit.go │ │ │ ├── sys_auth.go │ │ │ ├── sys_capabilities.go │ │ │ ├── sys_config_cors.go │ │ │ ├── sys_generate_root.go │ │ │ ├── sys_hastatus.go │ │ │ ├── sys_health.go │ │ │ ├── sys_init.go │ │ │ ├── sys_leader.go │ │ │ ├── sys_leases.go │ │ │ ├── sys_mfa.go │ │ │ ├── sys_monitor.go │ │ │ ├── sys_mounts.go │ │ │ ├── sys_plugins.go │ │ │ ├── sys_plugins_runtimes.go │ │ │ ├── sys_policy.go │ │ │ ├── sys_raft.go │ │ │ ├── sys_rekey.go │ │ │ ├── sys_rotate.go │ │ │ ├── sys_seal.go │ │ │ └── sys_stepdown.go │ │ ├── jmespath/ │ │ │ └── go-jmespath/ │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── api.go │ │ │ ├── astnodetype_string.go │ │ │ ├── functions.go │ │ │ ├── interpreter.go │ │ │ ├── lexer.go │ │ │ ├── parser.go │ │ │ ├── toktype_string.go │ │ │ └── util.go │ │ ├── kelseyhightower/ │ │ │ └── memkv/ │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── kvpair.go │ │ │ └── store.go │ │ ├── mattn/ │ │ │ ├── go-colorable/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── colorable_appengine.go │ │ │ │ ├── colorable_others.go │ │ │ │ ├── colorable_windows.go │ │ │ │ ├── go.test.sh │ │ │ │ └── noncolorable.go │ │ │ └── go-isatty/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── go.test.sh │ │ │ ├── isatty_bsd.go │ │ │ ├── isatty_others.go │ │ │ ├── isatty_plan9.go │ │ │ ├── isatty_solaris.go │ │ │ ├── isatty_tcgets.go │ │ │ └── isatty_windows.go │ │ ├── mitchellh/ │ │ │ ├── go-homedir/ │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ └── homedir.go │ │ │ └── mapstructure/ │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── decode_hooks.go │ │ │ ├── error.go │ │ │ └── mapstructure.go │ │ ├── ryanuber/ │ │ │ └── go-glob/ │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── glob.go │ │ └── samuel/ │ │ └── go-zookeeper/ │ │ ├── LICENSE │ │ └── zk/ │ │ ├── conn.go │ │ ├── constants.go │ │ ├── dnshostprovider.go │ │ ├── flw.go │ │ ├── lock.go │ │ ├── structs.go │ │ └── util.go │ ├── go.etcd.io/ │ │ └── etcd/ │ │ ├── api/ │ │ │ └── v3/ │ │ │ ├── LICENSE │ │ │ ├── authpb/ │ │ │ │ ├── auth.pb.go │ │ │ │ └── auth.proto │ │ │ ├── etcdserverpb/ │ │ │ │ ├── etcdserver.pb.go │ │ │ │ ├── etcdserver.proto │ │ │ │ ├── raft_internal.pb.go │ │ │ │ ├── raft_internal.proto │ │ │ │ ├── raft_internal_stringer.go │ │ │ │ ├── rpc.pb.go │ │ │ │ └── rpc.proto │ │ │ ├── membershippb/ │ │ │ │ ├── membership.pb.go │ │ │ │ └── membership.proto │ │ │ ├── mvccpb/ │ │ │ │ ├── kv.pb.go │ │ │ │ └── kv.proto │ │ │ ├── v3rpc/ │ │ │ │ └── rpctypes/ │ │ │ │ ├── doc.go │ │ │ │ ├── error.go │ │ │ │ ├── md.go │ │ │ │ └── metadatafields.go │ │ │ └── version/ │ │ │ └── version.go │ │ └── client/ │ │ ├── pkg/ │ │ │ └── v3/ │ │ │ ├── LICENSE │ │ │ ├── logutil/ │ │ │ │ ├── doc.go │ │ │ │ ├── log_level.go │ │ │ │ ├── zap.go │ │ │ │ └── zap_journal.go │ │ │ ├── systemd/ │ │ │ │ ├── doc.go │ │ │ │ └── journal.go │ │ │ └── types/ │ │ │ ├── doc.go │ │ │ ├── id.go │ │ │ ├── set.go │ │ │ ├── slice.go │ │ │ ├── urls.go │ │ │ └── urlsmap.go │ │ └── v3/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── auth.go │ │ ├── client.go │ │ ├── cluster.go │ │ ├── compact_op.go │ │ ├── compare.go │ │ ├── config.go │ │ ├── credentials/ │ │ │ └── credentials.go │ │ ├── ctx.go │ │ ├── doc.go │ │ ├── internal/ │ │ │ ├── endpoint/ │ │ │ │ └── endpoint.go │ │ │ └── resolver/ │ │ │ └── resolver.go │ │ ├── kv.go │ │ ├── lease.go │ │ ├── logger.go │ │ ├── maintenance.go │ │ ├── op.go │ │ ├── options.go │ │ ├── retry.go │ │ ├── retry_interceptor.go │ │ ├── sort.go │ │ ├── txn.go │ │ ├── utils.go │ │ └── watch.go │ ├── golang.org/ │ │ └── x/ │ │ ├── crypto/ │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ └── pbkdf2/ │ │ │ └── pbkdf2.go │ │ ├── exp/ │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ ├── constraints/ │ │ │ │ └── constraints.go │ │ │ └── slices/ │ │ │ ├── cmp.go │ │ │ ├── slices.go │ │ │ ├── sort.go │ │ │ ├── zsortanyfunc.go │ │ │ └── zsortordered.go │ │ ├── net/ │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ ├── http/ │ │ │ │ └── httpguts/ │ │ │ │ ├── guts.go │ │ │ │ └── httplex.go │ │ │ ├── http2/ │ │ │ │ ├── .gitignore │ │ │ │ ├── ascii.go │ │ │ │ ├── ciphers.go │ │ │ │ ├── client_conn_pool.go │ │ │ │ ├── databuffer.go │ │ │ │ ├── errors.go │ │ │ │ ├── flow.go │ │ │ │ ├── frame.go │ │ │ │ ├── gotrack.go │ │ │ │ ├── headermap.go │ │ │ │ ├── hpack/ │ │ │ │ │ ├── encode.go │ │ │ │ │ ├── hpack.go │ │ │ │ │ ├── huffman.go │ │ │ │ │ ├── static_table.go │ │ │ │ │ └── tables.go │ │ │ │ ├── http2.go │ │ │ │ ├── pipe.go │ │ │ │ ├── server.go │ │ │ │ ├── transport.go │ │ │ │ ├── write.go │ │ │ │ ├── writesched.go │ │ │ │ ├── writesched_priority.go │ │ │ │ ├── writesched_random.go │ │ │ │ └── writesched_roundrobin.go │ │ │ ├── idna/ │ │ │ │ ├── go118.go │ │ │ │ ├── idna10.0.0.go │ │ │ │ ├── idna9.0.0.go │ │ │ │ ├── pre_go118.go │ │ │ │ ├── punycode.go │ │ │ │ ├── tables10.0.0.go │ │ │ │ ├── tables11.0.0.go │ │ │ │ ├── tables12.0.0.go │ │ │ │ ├── tables13.0.0.go │ │ │ │ ├── tables15.0.0.go │ │ │ │ ├── tables9.0.0.go │ │ │ │ ├── trie.go │ │ │ │ ├── trie12.0.0.go │ │ │ │ ├── trie13.0.0.go │ │ │ │ └── trieval.go │ │ │ ├── internal/ │ │ │ │ └── timeseries/ │ │ │ │ └── timeseries.go │ │ │ └── trace/ │ │ │ ├── events.go │ │ │ ├── histogram.go │ │ │ └── trace.go │ │ ├── sys/ │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ ├── unix/ │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── affinity_linux.go │ │ │ │ ├── aliases.go │ │ │ │ ├── asm_aix_ppc64.s │ │ │ │ ├── asm_bsd_386.s │ │ │ │ ├── asm_bsd_amd64.s │ │ │ │ ├── asm_bsd_arm.s │ │ │ │ ├── asm_bsd_arm64.s │ │ │ │ ├── asm_bsd_ppc64.s │ │ │ │ ├── asm_bsd_riscv64.s │ │ │ │ ├── asm_linux_386.s │ │ │ │ ├── asm_linux_amd64.s │ │ │ │ ├── asm_linux_arm.s │ │ │ │ ├── asm_linux_arm64.s │ │ │ │ ├── asm_linux_loong64.s │ │ │ │ ├── asm_linux_mips64x.s │ │ │ │ ├── asm_linux_mipsx.s │ │ │ │ ├── asm_linux_ppc64x.s │ │ │ │ ├── asm_linux_riscv64.s │ │ │ │ ├── asm_linux_s390x.s │ │ │ │ ├── asm_openbsd_mips64.s │ │ │ │ ├── asm_solaris_amd64.s │ │ │ │ ├── asm_zos_s390x.s │ │ │ │ ├── bluetooth_linux.go │ │ │ │ ├── cap_freebsd.go │ │ │ │ ├── constants.go │ │ │ │ ├── dev_aix_ppc.go │ │ │ │ ├── dev_aix_ppc64.go │ │ │ │ ├── dev_darwin.go │ │ │ │ ├── dev_dragonfly.go │ │ │ │ ├── dev_freebsd.go │ │ │ │ ├── dev_linux.go │ │ │ │ ├── dev_netbsd.go │ │ │ │ ├── dev_openbsd.go │ │ │ │ ├── dev_zos.go │ │ │ │ ├── dirent.go │ │ │ │ ├── endian_big.go │ │ │ │ ├── endian_little.go │ │ │ │ ├── env_unix.go │ │ │ │ ├── epoll_zos.go │ │ │ │ ├── fcntl.go │ │ │ │ ├── fcntl_darwin.go │ │ │ │ ├── fcntl_linux_32bit.go │ │ │ │ ├── fdset.go │ │ │ │ ├── fstatfs_zos.go │ │ │ │ ├── gccgo.go │ │ │ │ ├── gccgo_c.c │ │ │ │ ├── gccgo_linux_amd64.go │ │ │ │ ├── ifreq_linux.go │ │ │ │ ├── ioctl_linux.go │ │ │ │ ├── ioctl_signed.go │ │ │ │ ├── ioctl_unsigned.go │ │ │ │ ├── ioctl_zos.go │ │ │ │ ├── mkall.sh │ │ │ │ ├── mkerrors.sh │ │ │ │ ├── mmap_nomremap.go │ │ │ │ ├── mremap.go │ │ │ │ ├── pagesize_unix.go │ │ │ │ ├── pledge_openbsd.go │ │ │ │ ├── ptrace_darwin.go │ │ │ │ ├── ptrace_ios.go │ │ │ │ ├── race.go │ │ │ │ ├── race0.go │ │ │ │ ├── readdirent_getdents.go │ │ │ │ ├── readdirent_getdirentries.go │ │ │ │ ├── sockcmsg_dragonfly.go │ │ │ │ ├── sockcmsg_linux.go │ │ │ │ ├── sockcmsg_unix.go │ │ │ │ ├── sockcmsg_unix_other.go │ │ │ │ ├── syscall.go │ │ │ │ ├── syscall_aix.go │ │ │ │ ├── syscall_aix_ppc.go │ │ │ │ ├── syscall_aix_ppc64.go │ │ │ │ ├── syscall_bsd.go │ │ │ │ ├── syscall_darwin.go │ │ │ │ ├── syscall_darwin_amd64.go │ │ │ │ ├── syscall_darwin_arm64.go │ │ │ │ ├── syscall_darwin_libSystem.go │ │ │ │ ├── syscall_dragonfly.go │ │ │ │ ├── syscall_dragonfly_amd64.go │ │ │ │ ├── syscall_freebsd.go │ │ │ │ ├── syscall_freebsd_386.go │ │ │ │ ├── syscall_freebsd_amd64.go │ │ │ │ ├── syscall_freebsd_arm.go │ │ │ │ ├── syscall_freebsd_arm64.go │ │ │ │ ├── syscall_freebsd_riscv64.go │ │ │ │ ├── syscall_hurd.go │ │ │ │ ├── syscall_hurd_386.go │ │ │ │ ├── syscall_illumos.go │ │ │ │ ├── syscall_linux.go │ │ │ │ ├── syscall_linux_386.go │ │ │ │ ├── syscall_linux_alarm.go │ │ │ │ ├── syscall_linux_amd64.go │ │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ │ ├── syscall_linux_arm.go │ │ │ │ ├── syscall_linux_arm64.go │ │ │ │ ├── syscall_linux_gc.go │ │ │ │ ├── syscall_linux_gc_386.go │ │ │ │ ├── syscall_linux_gc_arm.go │ │ │ │ ├── syscall_linux_gccgo_386.go │ │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ │ ├── syscall_linux_loong64.go │ │ │ │ ├── syscall_linux_mips64x.go │ │ │ │ ├── syscall_linux_mipsx.go │ │ │ │ ├── syscall_linux_ppc.go │ │ │ │ ├── syscall_linux_ppc64x.go │ │ │ │ ├── syscall_linux_riscv64.go │ │ │ │ ├── syscall_linux_s390x.go │ │ │ │ ├── syscall_linux_sparc64.go │ │ │ │ ├── syscall_netbsd.go │ │ │ │ ├── syscall_netbsd_386.go │ │ │ │ ├── syscall_netbsd_amd64.go │ │ │ │ ├── syscall_netbsd_arm.go │ │ │ │ ├── syscall_netbsd_arm64.go │ │ │ │ ├── syscall_openbsd.go │ │ │ │ ├── syscall_openbsd_386.go │ │ │ │ ├── syscall_openbsd_amd64.go │ │ │ │ ├── syscall_openbsd_arm.go │ │ │ │ ├── syscall_openbsd_arm64.go │ │ │ │ ├── syscall_openbsd_libc.go │ │ │ │ ├── syscall_openbsd_mips64.go │ │ │ │ ├── syscall_openbsd_ppc64.go │ │ │ │ ├── syscall_openbsd_riscv64.go │ │ │ │ ├── syscall_solaris.go │ │ │ │ ├── syscall_solaris_amd64.go │ │ │ │ ├── syscall_unix.go │ │ │ │ ├── syscall_unix_gc.go │ │ │ │ ├── syscall_unix_gc_ppc64x.go │ │ │ │ ├── syscall_zos_s390x.go │ │ │ │ ├── sysvshm_linux.go │ │ │ │ ├── sysvshm_unix.go │ │ │ │ ├── sysvshm_unix_other.go │ │ │ │ ├── timestruct.go │ │ │ │ ├── unveil_openbsd.go │ │ │ │ ├── xattr_bsd.go │ │ │ │ ├── zerrors_aix_ppc.go │ │ │ │ ├── zerrors_aix_ppc64.go │ │ │ │ ├── zerrors_darwin_amd64.go │ │ │ │ ├── zerrors_darwin_arm64.go │ │ │ │ ├── zerrors_dragonfly_amd64.go │ │ │ │ ├── zerrors_freebsd_386.go │ │ │ │ ├── zerrors_freebsd_amd64.go │ │ │ │ ├── zerrors_freebsd_arm.go │ │ │ │ ├── zerrors_freebsd_arm64.go │ │ │ │ ├── zerrors_freebsd_riscv64.go │ │ │ │ ├── zerrors_linux.go │ │ │ │ ├── zerrors_linux_386.go │ │ │ │ ├── zerrors_linux_amd64.go │ │ │ │ ├── zerrors_linux_arm.go │ │ │ │ ├── zerrors_linux_arm64.go │ │ │ │ ├── zerrors_linux_loong64.go │ │ │ │ ├── zerrors_linux_mips.go │ │ │ │ ├── zerrors_linux_mips64.go │ │ │ │ ├── zerrors_linux_mips64le.go │ │ │ │ ├── zerrors_linux_mipsle.go │ │ │ │ ├── zerrors_linux_ppc.go │ │ │ │ ├── zerrors_linux_ppc64.go │ │ │ │ ├── zerrors_linux_ppc64le.go │ │ │ │ ├── zerrors_linux_riscv64.go │ │ │ │ ├── zerrors_linux_s390x.go │ │ │ │ ├── zerrors_linux_sparc64.go │ │ │ │ ├── zerrors_netbsd_386.go │ │ │ │ ├── zerrors_netbsd_amd64.go │ │ │ │ ├── zerrors_netbsd_arm.go │ │ │ │ ├── zerrors_netbsd_arm64.go │ │ │ │ ├── zerrors_openbsd_386.go │ │ │ │ ├── zerrors_openbsd_amd64.go │ │ │ │ ├── zerrors_openbsd_arm.go │ │ │ │ ├── zerrors_openbsd_arm64.go │ │ │ │ ├── zerrors_openbsd_mips64.go │ │ │ │ ├── zerrors_openbsd_ppc64.go │ │ │ │ ├── zerrors_openbsd_riscv64.go │ │ │ │ ├── zerrors_solaris_amd64.go │ │ │ │ ├── zerrors_zos_s390x.go │ │ │ │ ├── zptrace_armnn_linux.go │ │ │ │ ├── zptrace_linux_arm64.go │ │ │ │ ├── zptrace_mipsnn_linux.go │ │ │ │ ├── zptrace_mipsnnle_linux.go │ │ │ │ ├── zptrace_x86_linux.go │ │ │ │ ├── zsyscall_aix_ppc.go │ │ │ │ ├── zsyscall_aix_ppc64.go │ │ │ │ ├── zsyscall_aix_ppc64_gc.go │ │ │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ │ ├── zsyscall_darwin_amd64.s │ │ │ │ ├── zsyscall_darwin_arm64.go │ │ │ │ ├── zsyscall_darwin_arm64.s │ │ │ │ ├── zsyscall_dragonfly_amd64.go │ │ │ │ ├── zsyscall_freebsd_386.go │ │ │ │ ├── zsyscall_freebsd_amd64.go │ │ │ │ ├── zsyscall_freebsd_arm.go │ │ │ │ ├── zsyscall_freebsd_arm64.go │ │ │ │ ├── zsyscall_freebsd_riscv64.go │ │ │ │ ├── zsyscall_illumos_amd64.go │ │ │ │ ├── zsyscall_linux.go │ │ │ │ ├── zsyscall_linux_386.go │ │ │ │ ├── zsyscall_linux_amd64.go │ │ │ │ ├── zsyscall_linux_arm.go │ │ │ │ ├── zsyscall_linux_arm64.go │ │ │ │ ├── zsyscall_linux_loong64.go │ │ │ │ ├── zsyscall_linux_mips.go │ │ │ │ ├── zsyscall_linux_mips64.go │ │ │ │ ├── zsyscall_linux_mips64le.go │ │ │ │ ├── zsyscall_linux_mipsle.go │ │ │ │ ├── zsyscall_linux_ppc.go │ │ │ │ ├── zsyscall_linux_ppc64.go │ │ │ │ ├── zsyscall_linux_ppc64le.go │ │ │ │ ├── zsyscall_linux_riscv64.go │ │ │ │ ├── zsyscall_linux_s390x.go │ │ │ │ ├── zsyscall_linux_sparc64.go │ │ │ │ ├── zsyscall_netbsd_386.go │ │ │ │ ├── zsyscall_netbsd_amd64.go │ │ │ │ ├── zsyscall_netbsd_arm.go │ │ │ │ ├── zsyscall_netbsd_arm64.go │ │ │ │ ├── zsyscall_openbsd_386.go │ │ │ │ ├── zsyscall_openbsd_386.s │ │ │ │ ├── zsyscall_openbsd_amd64.go │ │ │ │ ├── zsyscall_openbsd_amd64.s │ │ │ │ ├── zsyscall_openbsd_arm.go │ │ │ │ ├── zsyscall_openbsd_arm.s │ │ │ │ ├── zsyscall_openbsd_arm64.go │ │ │ │ ├── zsyscall_openbsd_arm64.s │ │ │ │ ├── zsyscall_openbsd_mips64.go │ │ │ │ ├── zsyscall_openbsd_mips64.s │ │ │ │ ├── zsyscall_openbsd_ppc64.go │ │ │ │ ├── zsyscall_openbsd_ppc64.s │ │ │ │ ├── zsyscall_openbsd_riscv64.go │ │ │ │ ├── zsyscall_openbsd_riscv64.s │ │ │ │ ├── zsyscall_solaris_amd64.go │ │ │ │ ├── zsyscall_zos_s390x.go │ │ │ │ ├── zsysctl_openbsd_386.go │ │ │ │ ├── zsysctl_openbsd_amd64.go │ │ │ │ ├── zsysctl_openbsd_arm.go │ │ │ │ ├── zsysctl_openbsd_arm64.go │ │ │ │ ├── zsysctl_openbsd_mips64.go │ │ │ │ ├── zsysctl_openbsd_ppc64.go │ │ │ │ ├── zsysctl_openbsd_riscv64.go │ │ │ │ ├── zsysnum_darwin_amd64.go │ │ │ │ ├── zsysnum_darwin_arm64.go │ │ │ │ ├── zsysnum_dragonfly_amd64.go │ │ │ │ ├── zsysnum_freebsd_386.go │ │ │ │ ├── zsysnum_freebsd_amd64.go │ │ │ │ ├── zsysnum_freebsd_arm.go │ │ │ │ ├── zsysnum_freebsd_arm64.go │ │ │ │ ├── zsysnum_freebsd_riscv64.go │ │ │ │ ├── zsysnum_linux_386.go │ │ │ │ ├── zsysnum_linux_amd64.go │ │ │ │ ├── zsysnum_linux_arm.go │ │ │ │ ├── zsysnum_linux_arm64.go │ │ │ │ ├── zsysnum_linux_loong64.go │ │ │ │ ├── zsysnum_linux_mips.go │ │ │ │ ├── zsysnum_linux_mips64.go │ │ │ │ ├── zsysnum_linux_mips64le.go │ │ │ │ ├── zsysnum_linux_mipsle.go │ │ │ │ ├── zsysnum_linux_ppc.go │ │ │ │ ├── zsysnum_linux_ppc64.go │ │ │ │ ├── zsysnum_linux_ppc64le.go │ │ │ │ ├── zsysnum_linux_riscv64.go │ │ │ │ ├── zsysnum_linux_s390x.go │ │ │ │ ├── zsysnum_linux_sparc64.go │ │ │ │ ├── zsysnum_netbsd_386.go │ │ │ │ ├── zsysnum_netbsd_amd64.go │ │ │ │ ├── zsysnum_netbsd_arm.go │ │ │ │ ├── zsysnum_netbsd_arm64.go │ │ │ │ ├── zsysnum_openbsd_386.go │ │ │ │ ├── zsysnum_openbsd_amd64.go │ │ │ │ ├── zsysnum_openbsd_arm.go │ │ │ │ ├── zsysnum_openbsd_arm64.go │ │ │ │ ├── zsysnum_openbsd_mips64.go │ │ │ │ ├── zsysnum_openbsd_ppc64.go │ │ │ │ ├── zsysnum_openbsd_riscv64.go │ │ │ │ ├── zsysnum_zos_s390x.go │ │ │ │ ├── ztypes_aix_ppc.go │ │ │ │ ├── ztypes_aix_ppc64.go │ │ │ │ ├── ztypes_darwin_amd64.go │ │ │ │ ├── ztypes_darwin_arm64.go │ │ │ │ ├── ztypes_dragonfly_amd64.go │ │ │ │ ├── ztypes_freebsd_386.go │ │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ │ ├── ztypes_freebsd_arm.go │ │ │ │ ├── ztypes_freebsd_arm64.go │ │ │ │ ├── ztypes_freebsd_riscv64.go │ │ │ │ ├── ztypes_linux.go │ │ │ │ ├── ztypes_linux_386.go │ │ │ │ ├── ztypes_linux_amd64.go │ │ │ │ ├── ztypes_linux_arm.go │ │ │ │ ├── ztypes_linux_arm64.go │ │ │ │ ├── ztypes_linux_loong64.go │ │ │ │ ├── ztypes_linux_mips.go │ │ │ │ ├── ztypes_linux_mips64.go │ │ │ │ ├── ztypes_linux_mips64le.go │ │ │ │ ├── ztypes_linux_mipsle.go │ │ │ │ ├── ztypes_linux_ppc.go │ │ │ │ ├── ztypes_linux_ppc64.go │ │ │ │ ├── ztypes_linux_ppc64le.go │ │ │ │ ├── ztypes_linux_riscv64.go │ │ │ │ ├── ztypes_linux_s390x.go │ │ │ │ ├── ztypes_linux_sparc64.go │ │ │ │ ├── ztypes_netbsd_386.go │ │ │ │ ├── ztypes_netbsd_amd64.go │ │ │ │ ├── ztypes_netbsd_arm.go │ │ │ │ ├── ztypes_netbsd_arm64.go │ │ │ │ ├── ztypes_openbsd_386.go │ │ │ │ ├── ztypes_openbsd_amd64.go │ │ │ │ ├── ztypes_openbsd_arm.go │ │ │ │ ├── ztypes_openbsd_arm64.go │ │ │ │ ├── ztypes_openbsd_mips64.go │ │ │ │ ├── ztypes_openbsd_ppc64.go │ │ │ │ ├── ztypes_openbsd_riscv64.go │ │ │ │ ├── ztypes_solaris_amd64.go │ │ │ │ └── ztypes_zos_s390x.go │ │ │ └── windows/ │ │ │ ├── aliases.go │ │ │ ├── dll_windows.go │ │ │ ├── empty.s │ │ │ ├── env_windows.go │ │ │ ├── eventlog.go │ │ │ ├── exec_windows.go │ │ │ ├── memory_windows.go │ │ │ ├── mkerrors.bash │ │ │ ├── mkknownfolderids.bash │ │ │ ├── mksyscall.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── security_windows.go │ │ │ ├── service.go │ │ │ ├── setupapi_windows.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_windows.go │ │ │ ├── types_windows.go │ │ │ ├── types_windows_386.go │ │ │ ├── types_windows_amd64.go │ │ │ ├── types_windows_arm.go │ │ │ ├── types_windows_arm64.go │ │ │ ├── zerrors_windows.go │ │ │ ├── zknownfolderids_windows.go │ │ │ └── zsyscall_windows.go │ │ ├── text/ │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ ├── secure/ │ │ │ │ └── bidirule/ │ │ │ │ ├── bidirule.go │ │ │ │ ├── bidirule10.0.0.go │ │ │ │ └── bidirule9.0.0.go │ │ │ ├── transform/ │ │ │ │ └── transform.go │ │ │ └── unicode/ │ │ │ ├── bidi/ │ │ │ │ ├── bidi.go │ │ │ │ ├── bracket.go │ │ │ │ ├── core.go │ │ │ │ ├── prop.go │ │ │ │ ├── tables10.0.0.go │ │ │ │ ├── tables11.0.0.go │ │ │ │ ├── tables12.0.0.go │ │ │ │ ├── tables13.0.0.go │ │ │ │ ├── tables15.0.0.go │ │ │ │ ├── tables9.0.0.go │ │ │ │ └── trieval.go │ │ │ └── norm/ │ │ │ ├── composition.go │ │ │ ├── forminfo.go │ │ │ ├── input.go │ │ │ ├── iter.go │ │ │ ├── normalize.go │ │ │ ├── readwriter.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.0.0.go │ │ │ ├── tables13.0.0.go │ │ │ ├── tables15.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ ├── transform.go │ │ │ └── trie.go │ │ └── time/ │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── rate/ │ │ ├── rate.go │ │ └── sometimes.go │ ├── google.golang.org/ │ │ ├── genproto/ │ │ │ ├── LICENSE │ │ │ ├── googleapis/ │ │ │ │ ├── api/ │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── annotations/ │ │ │ │ │ │ ├── annotations.pb.go │ │ │ │ │ │ ├── client.pb.go │ │ │ │ │ │ ├── field_behavior.pb.go │ │ │ │ │ │ ├── field_info.pb.go │ │ │ │ │ │ ├── http.pb.go │ │ │ │ │ │ ├── resource.pb.go │ │ │ │ │ │ └── routing.pb.go │ │ │ │ │ ├── launch_stage.pb.go │ │ │ │ │ └── tidyfix.go │ │ │ │ └── rpc/ │ │ │ │ ├── LICENSE │ │ │ │ └── status/ │ │ │ │ └── status.pb.go │ │ │ └── internal/ │ │ │ └── doc.go │ │ ├── grpc/ │ │ │ ├── AUTHORS │ │ │ ├── CODE-OF-CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── GOVERNANCE.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS.md │ │ │ ├── Makefile │ │ │ ├── NOTICE.txt │ │ │ ├── README.md │ │ │ ├── SECURITY.md │ │ │ ├── attributes/ │ │ │ │ └── attributes.go │ │ │ ├── backoff/ │ │ │ │ └── backoff.go │ │ │ ├── backoff.go │ │ │ ├── balancer/ │ │ │ │ ├── balancer.go │ │ │ │ ├── base/ │ │ │ │ │ ├── balancer.go │ │ │ │ │ └── base.go │ │ │ │ ├── conn_state_evaluator.go │ │ │ │ ├── grpclb/ │ │ │ │ │ └── state/ │ │ │ │ │ └── state.go │ │ │ │ └── roundrobin/ │ │ │ │ └── roundrobin.go │ │ │ ├── balancer_conn_wrappers.go │ │ │ ├── binarylog/ │ │ │ │ └── grpc_binarylog_v1/ │ │ │ │ └── binarylog.pb.go │ │ │ ├── call.go │ │ │ ├── channelz/ │ │ │ │ └── channelz.go │ │ │ ├── clientconn.go │ │ │ ├── codec.go │ │ │ ├── codegen.sh │ │ │ ├── codes/ │ │ │ │ ├── code_string.go │ │ │ │ └── codes.go │ │ │ ├── connectivity/ │ │ │ │ └── connectivity.go │ │ │ ├── credentials/ │ │ │ │ ├── credentials.go │ │ │ │ ├── insecure/ │ │ │ │ │ └── insecure.go │ │ │ │ └── tls.go │ │ │ ├── dialoptions.go │ │ │ ├── doc.go │ │ │ ├── encoding/ │ │ │ │ ├── encoding.go │ │ │ │ └── proto/ │ │ │ │ └── proto.go │ │ │ ├── grpclog/ │ │ │ │ ├── component.go │ │ │ │ ├── grpclog.go │ │ │ │ ├── logger.go │ │ │ │ └── loggerv2.go │ │ │ ├── interceptor.go │ │ │ ├── internal/ │ │ │ │ ├── backoff/ │ │ │ │ │ └── backoff.go │ │ │ │ ├── balancer/ │ │ │ │ │ └── gracefulswitch/ │ │ │ │ │ └── gracefulswitch.go │ │ │ │ ├── balancerload/ │ │ │ │ │ └── load.go │ │ │ │ ├── binarylog/ │ │ │ │ │ ├── binarylog.go │ │ │ │ │ ├── binarylog_testutil.go │ │ │ │ │ ├── env_config.go │ │ │ │ │ ├── method_logger.go │ │ │ │ │ └── sink.go │ │ │ │ ├── buffer/ │ │ │ │ │ └── unbounded.go │ │ │ │ ├── channelz/ │ │ │ │ │ ├── funcs.go │ │ │ │ │ ├── id.go │ │ │ │ │ ├── logging.go │ │ │ │ │ ├── types.go │ │ │ │ │ ├── types_linux.go │ │ │ │ │ ├── types_nonlinux.go │ │ │ │ │ ├── util_linux.go │ │ │ │ │ └── util_nonlinux.go │ │ │ │ ├── credentials/ │ │ │ │ │ ├── credentials.go │ │ │ │ │ ├── spiffe.go │ │ │ │ │ ├── syscallconn.go │ │ │ │ │ └── util.go │ │ │ │ ├── envconfig/ │ │ │ │ │ ├── envconfig.go │ │ │ │ │ ├── observability.go │ │ │ │ │ └── xds.go │ │ │ │ ├── grpclog/ │ │ │ │ │ ├── grpclog.go │ │ │ │ │ └── prefixLogger.go │ │ │ │ ├── grpcrand/ │ │ │ │ │ └── grpcrand.go │ │ │ │ ├── grpcsync/ │ │ │ │ │ ├── callback_serializer.go │ │ │ │ │ ├── event.go │ │ │ │ │ ├── oncefunc.go │ │ │ │ │ └── pubsub.go │ │ │ │ ├── grpcutil/ │ │ │ │ │ ├── compressor.go │ │ │ │ │ ├── encode_duration.go │ │ │ │ │ ├── grpcutil.go │ │ │ │ │ ├── metadata.go │ │ │ │ │ ├── method.go │ │ │ │ │ └── regex.go │ │ │ │ ├── idle/ │ │ │ │ │ └── idle.go │ │ │ │ ├── internal.go │ │ │ │ ├── metadata/ │ │ │ │ │ └── metadata.go │ │ │ │ ├── pretty/ │ │ │ │ │ └── pretty.go │ │ │ │ ├── resolver/ │ │ │ │ │ ├── config_selector.go │ │ │ │ │ ├── dns/ │ │ │ │ │ │ └── dns_resolver.go │ │ │ │ │ ├── passthrough/ │ │ │ │ │ │ └── passthrough.go │ │ │ │ │ └── unix/ │ │ │ │ │ └── unix.go │ │ │ │ ├── serviceconfig/ │ │ │ │ │ ├── duration.go │ │ │ │ │ └── serviceconfig.go │ │ │ │ ├── status/ │ │ │ │ │ └── status.go │ │ │ │ ├── syscall/ │ │ │ │ │ ├── syscall_linux.go │ │ │ │ │ └── syscall_nonlinux.go │ │ │ │ ├── transport/ │ │ │ │ │ ├── bdp_estimator.go │ │ │ │ │ ├── controlbuf.go │ │ │ │ │ ├── defaults.go │ │ │ │ │ ├── flowcontrol.go │ │ │ │ │ ├── handler_server.go │ │ │ │ │ ├── http2_client.go │ │ │ │ │ ├── http2_server.go │ │ │ │ │ ├── http_util.go │ │ │ │ │ ├── logging.go │ │ │ │ │ ├── networktype/ │ │ │ │ │ │ └── networktype.go │ │ │ │ │ ├── proxy.go │ │ │ │ │ └── transport.go │ │ │ │ └── xds_handshake_cluster.go │ │ │ ├── keepalive/ │ │ │ │ └── keepalive.go │ │ │ ├── metadata/ │ │ │ │ └── metadata.go │ │ │ ├── peer/ │ │ │ │ └── peer.go │ │ │ ├── picker_wrapper.go │ │ │ ├── pickfirst.go │ │ │ ├── preloader.go │ │ │ ├── regenerate.sh │ │ │ ├── resolver/ │ │ │ │ ├── manual/ │ │ │ │ │ └── manual.go │ │ │ │ ├── map.go │ │ │ │ └── resolver.go │ │ │ ├── resolver_conn_wrapper.go │ │ │ ├── rpc_util.go │ │ │ ├── server.go │ │ │ ├── service_config.go │ │ │ ├── serviceconfig/ │ │ │ │ └── serviceconfig.go │ │ │ ├── shared_buffer_pool.go │ │ │ ├── stats/ │ │ │ │ ├── handlers.go │ │ │ │ └── stats.go │ │ │ ├── status/ │ │ │ │ └── status.go │ │ │ ├── stream.go │ │ │ ├── tap/ │ │ │ │ └── tap.go │ │ │ ├── trace.go │ │ │ ├── version.go │ │ │ └── vet.sh │ │ └── protobuf/ │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── encoding/ │ │ │ ├── protojson/ │ │ │ │ ├── decode.go │ │ │ │ ├── doc.go │ │ │ │ ├── encode.go │ │ │ │ └── well_known_types.go │ │ │ ├── prototext/ │ │ │ │ ├── decode.go │ │ │ │ ├── doc.go │ │ │ │ └── encode.go │ │ │ └── protowire/ │ │ │ └── wire.go │ │ ├── internal/ │ │ │ ├── descfmt/ │ │ │ │ └── stringer.go │ │ │ ├── descopts/ │ │ │ │ └── options.go │ │ │ ├── detrand/ │ │ │ │ └── rand.go │ │ │ ├── encoding/ │ │ │ │ ├── defval/ │ │ │ │ │ └── default.go │ │ │ │ ├── json/ │ │ │ │ │ ├── decode.go │ │ │ │ │ ├── decode_number.go │ │ │ │ │ ├── decode_string.go │ │ │ │ │ ├── decode_token.go │ │ │ │ │ └── encode.go │ │ │ │ ├── messageset/ │ │ │ │ │ └── messageset.go │ │ │ │ ├── tag/ │ │ │ │ │ └── tag.go │ │ │ │ └── text/ │ │ │ │ ├── decode.go │ │ │ │ ├── decode_number.go │ │ │ │ ├── decode_string.go │ │ │ │ ├── decode_token.go │ │ │ │ ├── doc.go │ │ │ │ └── encode.go │ │ │ ├── errors/ │ │ │ │ ├── errors.go │ │ │ │ ├── is_go112.go │ │ │ │ └── is_go113.go │ │ │ ├── filedesc/ │ │ │ │ ├── build.go │ │ │ │ ├── desc.go │ │ │ │ ├── desc_init.go │ │ │ │ ├── desc_lazy.go │ │ │ │ ├── desc_list.go │ │ │ │ ├── desc_list_gen.go │ │ │ │ └── placeholder.go │ │ │ ├── filetype/ │ │ │ │ └── build.go │ │ │ ├── flags/ │ │ │ │ ├── flags.go │ │ │ │ ├── proto_legacy_disable.go │ │ │ │ └── proto_legacy_enable.go │ │ │ ├── genid/ │ │ │ │ ├── any_gen.go │ │ │ │ ├── api_gen.go │ │ │ │ ├── descriptor_gen.go │ │ │ │ ├── doc.go │ │ │ │ ├── duration_gen.go │ │ │ │ ├── empty_gen.go │ │ │ │ ├── field_mask_gen.go │ │ │ │ ├── goname.go │ │ │ │ ├── map_entry.go │ │ │ │ ├── source_context_gen.go │ │ │ │ ├── struct_gen.go │ │ │ │ ├── timestamp_gen.go │ │ │ │ ├── type_gen.go │ │ │ │ ├── wrappers.go │ │ │ │ └── wrappers_gen.go │ │ │ ├── impl/ │ │ │ │ ├── api_export.go │ │ │ │ ├── checkinit.go │ │ │ │ ├── codec_extension.go │ │ │ │ ├── codec_field.go │ │ │ │ ├── codec_gen.go │ │ │ │ ├── codec_map.go │ │ │ │ ├── codec_map_go111.go │ │ │ │ ├── codec_map_go112.go │ │ │ │ ├── codec_message.go │ │ │ │ ├── codec_messageset.go │ │ │ │ ├── codec_reflect.go │ │ │ │ ├── codec_tables.go │ │ │ │ ├── codec_unsafe.go │ │ │ │ ├── convert.go │ │ │ │ ├── convert_list.go │ │ │ │ ├── convert_map.go │ │ │ │ ├── decode.go │ │ │ │ ├── encode.go │ │ │ │ ├── enum.go │ │ │ │ ├── extension.go │ │ │ │ ├── legacy_enum.go │ │ │ │ ├── legacy_export.go │ │ │ │ ├── legacy_extension.go │ │ │ │ ├── legacy_file.go │ │ │ │ ├── legacy_message.go │ │ │ │ ├── merge.go │ │ │ │ ├── merge_gen.go │ │ │ │ ├── message.go │ │ │ │ ├── message_reflect.go │ │ │ │ ├── message_reflect_field.go │ │ │ │ ├── message_reflect_gen.go │ │ │ │ ├── pointer_reflect.go │ │ │ │ ├── pointer_unsafe.go │ │ │ │ ├── validate.go │ │ │ │ └── weak.go │ │ │ ├── order/ │ │ │ │ ├── order.go │ │ │ │ └── range.go │ │ │ ├── pragma/ │ │ │ │ └── pragma.go │ │ │ ├── set/ │ │ │ │ └── ints.go │ │ │ ├── strs/ │ │ │ │ ├── strings.go │ │ │ │ ├── strings_pure.go │ │ │ │ └── strings_unsafe.go │ │ │ └── version/ │ │ │ └── version.go │ │ ├── proto/ │ │ │ ├── checkinit.go │ │ │ ├── decode.go │ │ │ ├── decode_gen.go │ │ │ ├── doc.go │ │ │ ├── encode.go │ │ │ ├── encode_gen.go │ │ │ ├── equal.go │ │ │ ├── extension.go │ │ │ ├── merge.go │ │ │ ├── messageset.go │ │ │ ├── proto.go │ │ │ ├── proto_methods.go │ │ │ ├── proto_reflect.go │ │ │ ├── reset.go │ │ │ ├── size.go │ │ │ ├── size_gen.go │ │ │ └── wrappers.go │ │ ├── reflect/ │ │ │ ├── protodesc/ │ │ │ │ ├── desc.go │ │ │ │ ├── desc_init.go │ │ │ │ ├── desc_resolve.go │ │ │ │ ├── desc_validate.go │ │ │ │ └── proto.go │ │ │ ├── protoreflect/ │ │ │ │ ├── methods.go │ │ │ │ ├── proto.go │ │ │ │ ├── source.go │ │ │ │ ├── source_gen.go │ │ │ │ ├── type.go │ │ │ │ ├── value.go │ │ │ │ ├── value_equal.go │ │ │ │ ├── value_pure.go │ │ │ │ ├── value_union.go │ │ │ │ └── value_unsafe.go │ │ │ └── protoregistry/ │ │ │ └── registry.go │ │ ├── runtime/ │ │ │ ├── protoiface/ │ │ │ │ ├── legacy.go │ │ │ │ └── methods.go │ │ │ └── protoimpl/ │ │ │ ├── impl.go │ │ │ └── version.go │ │ └── types/ │ │ ├── descriptorpb/ │ │ │ └── descriptor.pb.go │ │ └── known/ │ │ ├── anypb/ │ │ │ └── any.pb.go │ │ ├── durationpb/ │ │ │ └── duration.pb.go │ │ └── timestamppb/ │ │ └── timestamp.pb.go │ ├── gopkg.in/ │ │ └── yaml.v2/ │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── LICENSE.libyaml │ │ ├── NOTICE │ │ ├── README.md │ │ ├── apic.go │ │ ├── decode.go │ │ ├── emitterc.go │ │ ├── encode.go │ │ ├── parserc.go │ │ ├── readerc.go │ │ ├── resolve.go │ │ ├── scannerc.go │ │ ├── sorter.go │ │ ├── writerc.go │ │ ├── yaml.go │ │ ├── yamlh.go │ │ └── yamlprivateh.go │ └── modules.txt └── version.go ================================================ FILE CONTENTS ================================================ ================================================ FILE: .dockerignore ================================================ bin vendor pkg ================================================ FILE: .gitignore ================================================ bin/ .idea/ ================================================ FILE: .travis.yml ================================================ language: go go: - 1.x - tip env: - VAULT_ADDR='http://127.0.0.1:8200' CONSUL_VERSION=0.9.3 ETCD_VERSION=3.3.1 DYNAMODB_VERSION=2017-02-16 VAULT_VERSION=0.10.1 ZOOKEEPER_VERSION=3.4.10 RANCHER_VERSION=0.6.0 services: - redis before_install: # install consul - wget https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip - unzip consul_${CONSUL_VERSION}_linux_amd64.zip - sudo mv consul /bin/ - consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul -bind 127.0.0.1 & # install etcd - wget https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz - tar xzf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz - sudo mv etcd-v${ETCD_VERSION}-linux-amd64/etcd /bin/ - sudo mv etcd-v${ETCD_VERSION}-linux-amd64/etcdctl /bin/ - unset ETCD_VERSION - etcd & # install DynamoDB - sudo pip install awscli - mkdir /tmp/dynamodb - wget -O - https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_${DYNAMODB_VERSION}.tar.gz | tar xz --directory /tmp/dynamodb - java -Djava.library.path=/tmp/dynamodb/DynamoDBLocal_lib -jar /tmp/dynamodb/DynamoDBLocal.jar -inMemory & # Install rancher metadata - wget https://github.com/rancher/rancher-metadata/releases/download/v${RANCHER_VERSION}/rancher-metadata.tar.gz - mkdir -p ./rancher-metadata - tar xzf rancher-metadata.tar.gz --strip-components=1 -C ./rancher-metadata - sudo mv ./rancher-metadata/bin/rancher-metadata /bin/ # Install vault - wget https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip - unzip vault_${VAULT_VERSION}_linux_amd64.zip - sudo mv vault /bin/ - vault server -dev & # Install zookeeper - wget http://www.eu.apache.org/dist/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/zookeeper-${ZOOKEEPER_VERSION}.tar.gz - tar xzf zookeeper-${ZOOKEEPER_VERSION}.tar.gz - mkdir /tmp/zookeeper && cp integration/zookeeper/zoo.cfg zookeeper-${ZOOKEEPER_VERSION}/conf/zoo.cfg - zookeeper-${ZOOKEEPER_VERSION}/bin/zkServer.sh start # Run AWS SSM mocking server - go run ./integration/ssm/main.go & install: - make build - sudo make install script: - make test - make integration ================================================ FILE: CHANGELOG ================================================ ### v0.16.0 28f72608 Release arm64 binaries 4528af01 Add option to specify auth backend mount path in Vault b51998d6 new etcdv3 implementation fa37c993 isFileExist() was not defined in windows a23aa1c7 Update Vault Kubernetes authentication doc 9b0ce8e6 Fix vendor name for logrus ccc17eb5 fix fileStat close when open failed on windows e3864219 add parseBool to template_funcs 94bf80e7 Add Kubernetes auth for Vault backend 304efb5a Add AppRole authN for Vault backend fb208461 Redis Backend Updates: WatchPrefix Support, Hash Support, Standard Redis Key Naming Convention 36d874f5 Fix bug with multiple watches for etcdv3 1fd12493 backend/etcd: add scheme to srv discovered endpoints a88c922a Vault TLS certificates auth method b77b9232 Add atoi function to template funcs and test ### v0.15.0 0c4cb29e Don't pass empty prefix to zookeeper nodeWalk 5d6e2790 Update template.md - added forgotten verb 19d6514d remove fmt.Println 802e6a11 Added windows cmd support 59001ca3 Fix handling of absent parameters for ssm backend 8419c708 AWS SSM - don't treat "ParameterNotFound" as a fatal error 0a09632a Add support for consul BasicAuth adf8d486 Fix panic during Consul client creation 027be91f Update docker Multi-Stage build 376d3f99 fix etcdv3 client watch: reuse previous watch to avoid memory leak f711530d fix(confd): etcd curl err when make integration ### v0.14.0 95ba861f Replace godep with dep cb53644c Template integration with https://github.com/xordataexchange/crypt provided values 6da43945 add go version and git commit sha1 to version string 8f052819 yaml/json file backend 61652a2c Add AWS SSM Parameter Store backend ### v0.13.0 181e3e3 Update dependencies 509268d Remove StackEngine backend 3a61969 Add further installation instructions dd47bbb Introducing WaitPrefix for the Rancher backend 35ffe8f Adding nested key support to Vault backend v2 f1833a6 ETCD V3 support 89c59d4 Feature new template func add 2b080af added some additional text/template sorting methods fbea3b9 Fixes #562 by not adding the URL scheme to the node at DNS lookup time ab93ff1 Windows support 695e62e add trimSuffix template function 3049df8 Add base64 encode/decode template helpers 485b31c improved etcd watch support 8528d3c added support to specify a redis database (in the connection string) ### v0.12.0 5f3f79d Change etcd node port because the official port of etcd is 2379 9073dae Fix typo in docs 0ea1edb Remove unnecessary loop in Consul backend. dbbee0a Fix travis configuration to use latest dynamoDB binary ad5f74f Fix typo in quick-start-guide.md 7ac1091 Upgrade Dockerfile to use latest stable Alpine which has Go 1.6 20b3d37 add env backend integration tests c6622ed updated template docs 9d57489 Specify default Vault backend node b34d223 Add simple redis example since one was missing from quickstart 32d46e5 Fix typo in template-resources.md 7c89004 Fix up Rancher metadata service description and links 2a54c58 Fix missing braces and extra parenthesis on formatted datatime example 6e198db Fix DynamoDB credentials handling 705f2ee Fix dynamodb nil pointers e48e48f Use SVG for the build image 6bb3c21 Add file exists function to template functions 57b649d zookeeper watch support 59da585 extended getenv & map template functions d423123 updated README for vault e60c2e2 Add support for redis password authentication f3a02e7 Adding example goreman Procfile for etcd aae4190 updated Dockerfile.build.alpine cf62311 update some docs 54f715c Add lookupSRV function. 7afb8d6 fixed broken etcd watch support 5a5af59 switched to new etcd client 5d2955a Remove gb install 1577855 Fix typos in docs/tomcat-sample.md d133c25 Added support for Vault backend 071e6ab IP dns resolving function for templates ccf2486 redis: try to recover from closed connections 66a31bf Add support for etcd BasicAuth d9ea46c Added documentation for stackengine as a backend a1dee21 add -sync-only flag c615c18 update checklist 233ac99 Add more debugging output for onetime and env. d7f835d Create tomcat-sample.md ### v0.11.0 46d3c69 load template resources every interval 6b01b27 Add Rancher Metadata backend bec0b60 link to the right command-line-flags doc be20ca7 Fix typo in templates.md 745cf2b add default node for zookeeper backend 0dd4c53 Add StackEngine backend support f446ce4 Load AWS credentials through a provider chain f206b47 Add strings.Replace support ### v0.10.0 70cf76a move contrib to root dir 34a0ff7 Updating README.md to include new backends fee8361 Fix broken links to documentation d9d4cb1 Use the gb tool for dep management and building. 1ef34cb template: don't crash on template error 7531530 Log command output on error fed32fe Draft: Support for DynamoDB 7f59d50 Use correct application name for ZooKeeper example 03a7c7e feat: add strings.Contains support 6307c26 change opdemand emails to engine yard 5350113 client cert config from environment variables b6f414e Adding better support for Consul, enabling SSL/TLS client config e94151b update release checklist ce4eb5c bump to v1.0.0-dev 503d745 remove --quiet, --debug and --verbose c9cefaf random doc fixes ### v0.9.0 8888b7a Add maintainers file 431e31b add release checklist document f782957 bump etcd to v2.0.9 for integration tests 1b2d669 *feature) add recursive get toml files. 94fc0a6 allow override of BIN_DIR 7cce514 log that we're skipping config file to debug 6e0cbfc Enable watch from the config file 0410cbd bump version to 0.8.0 c7f53e1 add go 1.4 to travis.ci version matrix 7a2e2f4 Add toUpper, toLower support 4a8e079 Fix "The event in requested index is outdated and cleared" error 211a5cb add --log-level flag 0a0858c fix godeps 821cd61 properly format error messages 2ad79d6 general integration test nitpicks 913eb2e hook up etcd integration tests 2ad2fd4 Improved docs for how to use go templates to traverse json 7b4f06a hook up consul integration tests to travis ae640bf hook up redis integration tests 828d568 remove unused service templates 7d374e6 remove unused log_test 68eb9ad Add simple redis support b4c103c Revert "Added jsonGet support to template_funcs" 1e08562 Added jsonGet support to template_funcs f84b57d add scripts for building, installing and testing confd ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to Confd Want to hack on Confd? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete. # Who are the Maintainers? ## BDFL Confd follows the timeless, highly efficient and totally unfair system known as [Benevolent dictator for life](http://en.wikipedia.org/wiki/Benevolent_Dictator_for_Life). Kelsey Hightower - the creator of Confd - serves as the project's BDFL. Kelsey serves as the final arbiter of any disputes and has the final say on project direction. ## Core Maintainers Core maintainers are exceptionally knowledgeable about Confd. Core maintainers are responsible for the following: - respond to github issues, review and merge pull requests - help shape confd's roadmap - actively participate in feature development and general maintenance - answer and help users in #confd - interview and recruit new members as contributing maintainers Pull requests which are considered minor or "showstoppers" can be merged with at least one core maintainer's LGTM, otherwise they need approval from the BDFL. ### Who assigns maintainers? Kelsey. ### How can I become a maintainer? - make yourself useful by contributing code, bugfixes, support etc. - volunteer on the irc channel Don't forget: being a maintainer is a time investment. Make sure you will have time to make yourself available. You don't have to be a maintainer to make a difference on the project! ================================================ FILE: Dockerfile.build.alpine ================================================ FROM golang:1.10.2-alpine RUN apk add --no-cache make git RUN mkdir -p /go/src/github.com/kelseyhightower/confd && \ ln -s /go/src/github.com/kelseyhightower/confd /app WORKDIR /app ================================================ FILE: LICENSE ================================================ Copyright (c) 2013 Kelsey Hightower Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: MAINTAINERS ================================================ Chris Armstrong (@carmstrong) Gabriel Monroy (@gabrtv) Kelsey Hightower (@kelseyhightower) Matthew Fisher (@bacongobbler) Oleksandr Kushchenko (@okushchenko) ================================================ FILE: Makefile ================================================ .PHONY: build install clean test integration dep release VERSION=`egrep -o '[0-9]+\.[0-9a-z.\-]+' version.go` GIT_SHA=`git rev-parse --short HEAD || echo` build: @echo "Building confd..." @mkdir -p bin @go build -ldflags "-X main.GitSHA=${GIT_SHA}" -o bin/confd . install: @echo "Installing confd..." @install -c bin/confd /usr/local/bin/confd clean: @rm -f bin/* test: @echo "Running tests..." @go test `go list ./... | grep -v vendor/` integration: @echo "Running integration tests..." @for i in `find ./integration -name test.sh`; do \ echo "Running $$i"; \ bash $$i || exit 1; \ bash integration/expect/check.sh || exit 1; \ rm /tmp/confd-*; \ done dep: @dep ensure release: @docker build -q -t confd_builder -f Dockerfile.build.alpine . @for platform in darwin linux windows; do \ if [ $$platform == windows ]; then extension=.exe; fi; \ docker run -it --rm -v ${PWD}:/app -e "GOOS=$$platform" -e "GOARCH=amd64" -e "CGO_ENABLED=0" confd_builder go build -ldflags="-s -w -X main.GitSHA=${GIT_SHA}" -o bin/confd-${VERSION}-$$platform-amd64$$extension; \ done @docker run -it --rm -v ${PWD}:/app -e "GOOS=linux" -e "GOARCH=arm64" -e "CGO_ENABLED=0" confd_builder go build -ldflags="-s -w -X main.GitSHA=${GIT_SHA}" -o bin/confd-${VERSION}-linux-arm64; @upx bin/confd-${VERSION}-* ================================================ FILE: README.md ================================================ # confd [![Build Status](https://travis-ci.org/kelseyhightower/confd.svg?branch=master)](https://travis-ci.org/kelseyhightower/confd) `confd` is a lightweight configuration management tool focused on: * keeping local configuration files up-to-date using data stored in [etcd](https://github.com/coreos/etcd), [consul](http://consul.io), [dynamodb](http://aws.amazon.com/dynamodb/), [redis](http://redis.io), [vault](https://vaultproject.io), [zookeeper](https://zookeeper.apache.org), [aws ssm parameter store](https://aws.amazon.com/ec2/systems-manager/) or env vars and processing [template resources](docs/template-resources.md). * reloading applications to pick up new config file changes ## Project Status `confd` is currently being cleaned up to build on later versions of Go and moving to adopt native support for [Go modules](https://go.dev/blog/using-go-modules). As part of this work the following major changes are being made: * The `etcd` and `etcdv3` backend are going to be merged. etcd v2 has been deprecated and both backend will now use etcdv3 client libraries. * The `cget`, `cgets`, `cgetv`, and `cgetvs` templates function have been removed due to an unmaintained dependency `github.com/xordataexchange/crypt/encoding/secconf`. We need to rethink encryption in the core project and rely only on the standard library going forward. In the meanwhile these template function will not work and if support is required you will need to stick with an older version of confd. ## Community * IRC: `#confd` on Freenode * Mailing list: [Google Groups](https://groups.google.com/forum/#!forum/confd-users) * Website: [www.confd.io](http://www.confd.io) ## Building Go 1.10 is required to build confd, which uses the new vendor directory. ``` $ mkdir -p $GOPATH/src/github.com/kelseyhightower $ git clone https://github.com/kelseyhightower/confd.git $GOPATH/src/github.com/kelseyhightower/confd $ cd $GOPATH/src/github.com/kelseyhightower/confd $ make ``` You should now have confd in your `bin/` directory: ``` $ ls bin/ confd ``` ## Getting Started Before we begin be sure to [download and install confd](docs/installation.md). * [quick start guide](docs/quick-start-guide.md) ## Next steps Check out the [docs directory](docs) for more docs. ================================================ FILE: backends/client.go ================================================ package backends import ( "errors" "strings" "github.com/kelseyhightower/confd/backends/consul" "github.com/kelseyhightower/confd/backends/dynamodb" "github.com/kelseyhightower/confd/backends/env" "github.com/kelseyhightower/confd/backends/etcdv3" "github.com/kelseyhightower/confd/backends/file" "github.com/kelseyhightower/confd/backends/rancher" "github.com/kelseyhightower/confd/backends/redis" "github.com/kelseyhightower/confd/backends/ssm" "github.com/kelseyhightower/confd/backends/vault" "github.com/kelseyhightower/confd/backends/zookeeper" "github.com/kelseyhightower/confd/log" ) // The StoreClient interface is implemented by objects that can retrieve // key/value pairs from a backend store. type StoreClient interface { GetValues(keys []string) (map[string]string, error) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) } // New is used to create a storage client based on our configuration. func New(config Config) (StoreClient, error) { if config.Backend == "" { config.Backend = "etcd" } backendNodes := config.BackendNodes if config.Backend == "file" { log.Info("Backend source(s) set to " + strings.Join(config.YAMLFile, ", ")) } else { log.Info("Backend source(s) set to " + strings.Join(backendNodes, ", ")) } switch config.Backend { case "consul": return consul.New(config.BackendNodes, config.Scheme, config.ClientCert, config.ClientKey, config.ClientCaKeys, config.BasicAuth, config.Username, config.Password, ) case "etcd": // etcd v2 has been deprecated and etcdv3 is now the client for both the etcd and etcdv3 backends. return etcdv3.NewEtcdClient(backendNodes, config.ClientCert, config.ClientKey, config.ClientCaKeys, config.BasicAuth, config.Username, config.Password) case "etcdv3": return etcdv3.NewEtcdClient(backendNodes, config.ClientCert, config.ClientKey, config.ClientCaKeys, config.BasicAuth, config.Username, config.Password) case "zookeeper": return zookeeper.NewZookeeperClient(backendNodes) case "rancher": return rancher.NewRancherClient(backendNodes) case "redis": return redis.NewRedisClient(backendNodes, config.ClientKey, config.Separator) case "env": return env.NewEnvClient() case "file": return file.NewFileClient(config.YAMLFile, config.Filter) case "vault": vaultConfig := map[string]string{ "app-id": config.AppID, "user-id": config.UserID, "role-id": config.RoleID, "secret-id": config.SecretID, "username": config.Username, "password": config.Password, "token": config.AuthToken, "cert": config.ClientCert, "key": config.ClientKey, "caCert": config.ClientCaKeys, "path": config.Path, } return vault.New(backendNodes[0], config.AuthType, vaultConfig) case "dynamodb": table := config.Table log.Info("DynamoDB table set to " + table) return dynamodb.NewDynamoDBClient(table) case "ssm": return ssm.New() } return nil, errors.New("Invalid backend") } ================================================ FILE: backends/config.go ================================================ package backends import ( util "github.com/kelseyhightower/confd/util" ) type Config struct { AuthToken string `toml:"auth_token"` AuthType string `toml:"auth_type"` Backend string `toml:"backend"` BasicAuth bool `toml:"basic_auth"` ClientCaKeys string `toml:"client_cakeys"` ClientCert string `toml:"client_cert"` ClientKey string `toml:"client_key"` ClientInsecure bool `toml:"client_insecure"` BackendNodes util.Nodes `toml:"nodes"` Password string `toml:"password"` Scheme string `toml:"scheme"` Table string `toml:"table"` Separator string `toml:"separator"` Username string `toml:"username"` AppID string `toml:"app_id"` UserID string `toml:"user_id"` RoleID string `toml:"role_id"` SecretID string `toml:"secret_id"` YAMLFile util.Nodes `toml:"file"` Filter string `toml:"filter"` Path string `toml:"path"` Role string } ================================================ FILE: backends/consul/client.go ================================================ package consul import ( "path" "strings" "github.com/hashicorp/consul/api" ) // Client provides a wrapper around the consulkv client type ConsulClient struct { client *api.KV } // NewConsulClient returns a new client to Consul for the given address func New(nodes []string, scheme, cert, key, caCert string, basicAuth bool, username string, password string) (*ConsulClient, error) { conf := api.DefaultConfig() conf.Scheme = scheme if len(nodes) > 0 { conf.Address = nodes[0] } if basicAuth { conf.HttpAuth = &api.HttpBasicAuth{ Username: username, Password: password, } } if cert != "" && key != "" { conf.TLSConfig.CertFile = cert conf.TLSConfig.KeyFile = key } if caCert != "" { conf.TLSConfig.CAFile = caCert } client, err := api.NewClient(conf) if err != nil { return nil, err } return &ConsulClient{client.KV()}, nil } // GetValues queries Consul for keys func (c *ConsulClient) GetValues(keys []string) (map[string]string, error) { vars := make(map[string]string) for _, key := range keys { key := strings.TrimPrefix(key, "/") pairs, _, err := c.client.List(key, nil) if err != nil { return vars, err } for _, p := range pairs { vars[path.Join("/", p.Key)] = string(p.Value) } } return vars, nil } type watchResponse struct { waitIndex uint64 err error } func (c *ConsulClient) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { respChan := make(chan watchResponse) go func() { opts := api.QueryOptions{ WaitIndex: waitIndex, } _, meta, err := c.client.List(prefix, &opts) if err != nil { respChan <- watchResponse{waitIndex, err} return } respChan <- watchResponse{meta.LastIndex, err} }() select { case <-stopChan: return waitIndex, nil case r := <-respChan: return r.waitIndex, r.err } } ================================================ FILE: backends/dynamodb/client.go ================================================ package dynamodb import ( "os" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/kelseyhightower/confd/log" ) // Client is a wrapper around the DynamoDB client // and also holds the table to lookup key value pairs from type Client struct { client *dynamodb.DynamoDB table string } // NewDynamoDBClient returns an *dynamodb.Client with a connection to the region // configured via the AWS_REGION environment variable. // It returns an error if the connection cannot be made or the table does not exist. func NewDynamoDBClient(table string) (*Client, error) { var c *aws.Config if os.Getenv("DYNAMODB_LOCAL") != "" { log.Debug("DYNAMODB_LOCAL is set") endpoint := "http://localhost:8000" c = &aws.Config{ Endpoint: &endpoint, } } else { c = nil } session := session.New(c) // Fail early, if no credentials can be found _, err := session.Config.Credentials.Get() if err != nil { return nil, err } d := dynamodb.New(session) // Check if the table exists _, err = d.DescribeTable(&dynamodb.DescribeTableInput{TableName: &table}) if err != nil { return nil, err } return &Client{d, table}, nil } // GetValues retrieves the values for the given keys from DynamoDB func (c *Client) GetValues(keys []string) (map[string]string, error) { vars := make(map[string]string) for _, key := range keys { // Check if we can find the single item m := make(map[string]*dynamodb.AttributeValue) m["key"] = &dynamodb.AttributeValue{S: aws.String(key)} g, err := c.client.GetItem(&dynamodb.GetItemInput{Key: m, TableName: &c.table}) if err != nil { return vars, err } if g.Item != nil { if val, ok := g.Item["value"]; ok { if val.S != nil { vars[key] = *val.S } else { log.Warning("Skipping key '%s'. 'value' is not of type 'string'.", key) } continue } } // Check for nested keys q, err := c.client.Scan( &dynamodb.ScanInput{ ScanFilter: map[string]*dynamodb.Condition{ "key": &dynamodb.Condition{ AttributeValueList: []*dynamodb.AttributeValue{ &dynamodb.AttributeValue{S: aws.String(key)}}, ComparisonOperator: aws.String("BEGINS_WITH")}}, AttributesToGet: []*string{aws.String("key"), aws.String("value")}, TableName: aws.String(c.table), Select: aws.String("SPECIFIC_ATTRIBUTES"), }) if err != nil { return vars, err } for _, i := range q.Items { item := i if val, ok := item["value"]; ok { if val.S != nil { vars[*item["key"].S] = *val.S } else { log.Warning("Skipping key '%s'. 'value' is not of type 'string'.", *item["key"].S) } continue } } } return vars, nil } // WatchPrefix is not implemented func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { <-stopChan return 0, nil } ================================================ FILE: backends/env/client.go ================================================ package env import ( "fmt" "os" "strings" "github.com/kelseyhightower/confd/log" ) var replacer = strings.NewReplacer("/", "_") // Client provides a shell for the env client type Client struct{} // NewEnvClient returns a new client func NewEnvClient() (*Client, error) { return &Client{}, nil } // GetValues queries the environment for keys func (c *Client) GetValues(keys []string) (map[string]string, error) { allEnvVars := os.Environ() envMap := make(map[string]string) for _, e := range allEnvVars { index := strings.Index(e, "=") envMap[e[:index]] = e[index+1:] } vars := make(map[string]string) for _, key := range keys { k := transform(key) for envKey, envValue := range envMap { if strings.HasPrefix(envKey, k) { vars[clean(envKey)] = envValue } } } log.Debug(fmt.Sprintf("Key Map: %#v", vars)) return vars, nil } func transform(key string) string { k := strings.TrimPrefix(key, "/") return strings.ToUpper(replacer.Replace(k)) } var cleanReplacer = strings.NewReplacer("_", "/") func clean(key string) string { newKey := "/" + key return cleanReplacer.Replace(strings.ToLower(newKey)) } func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { <-stopChan return 0, nil } ================================================ FILE: backends/etcd/client.go ================================================ package etcd import ( "context" "crypto/tls" "crypto/x509" "io/ioutil" "strings" "time" "github.com/kelseyhightower/confd/log" clientv3 "go.etcd.io/etcd/client/v3" "sync" ) // A watch only tells the latest revision type Watch struct { // Last seen revision revision int64 // A channel to wait, will be closed after revision changes cond chan struct{} // Use RWMutex to protect cond variable rwl sync.RWMutex } // Wait until revision is greater than lastRevision func (w *Watch) WaitNext(ctx context.Context, lastRevision int64, notify chan<- int64) { for { w.rwl.RLock() if w.revision > lastRevision { w.rwl.RUnlock() break } cond := w.cond w.rwl.RUnlock() select { case <-cond: case <-ctx.Done(): return } } // We accept larger revision, so do not need to use RLock select { case notify <- w.revision: case <-ctx.Done(): } } // Update revision func (w *Watch) update(newRevision int64) { w.rwl.Lock() defer w.rwl.Unlock() w.revision = newRevision close(w.cond) w.cond = make(chan struct{}) } func createWatch(client *clientv3.Client, prefix string) (*Watch, error) { w := &Watch{0, make(chan struct{}), sync.RWMutex{}} go func() { rch := client.Watch(context.Background(), prefix, clientv3.WithPrefix(), clientv3.WithCreatedNotify()) log.Debug("Watch created on %s", prefix) for { for wresp := range rch { if wresp.CompactRevision > w.revision { // respect CompactRevision w.update(wresp.CompactRevision) log.Debug("Watch to '%s' updated to %d by CompactRevision", prefix, wresp.CompactRevision) } else if wresp.Header.GetRevision() > w.revision { // Watch created or updated w.update(wresp.Header.GetRevision()) log.Debug("Watch to '%s' updated to %d by header revision", prefix, wresp.Header.GetRevision()) } if err := wresp.Err(); err != nil { log.Error("Watch error: %s", err.Error()) } } log.Warning("Watch to '%s' stopped at revision %d", prefix, w.revision) // Disconnected or cancelled // Wait for a moment to avoid reconnecting // too quickly time.Sleep(time.Duration(1) * time.Second) // Start from next revision so we are not missing anything if w.revision > 0 { rch = client.Watch(context.Background(), prefix, clientv3.WithPrefix(), clientv3.WithRev(w.revision+1)) } else { // Start from the latest revision rch = client.Watch(context.Background(), prefix, clientv3.WithPrefix(), clientv3.WithCreatedNotify()) } } }() return w, nil } // Client is a wrapper around the etcd client type Client struct { client *clientv3.Client watches map[string]*Watch // Protect watch wm sync.Mutex } // NewEtcdClient returns an *etcdv3.Client with a connection to named machines. func NewEtcdClient(machines []string, cert, key, caCert string, basicAuth bool, username string, password string) (*Client, error) { cfg := clientv3.Config{ Endpoints: machines, DialTimeout: 5 * time.Second, DialKeepAliveTime: 10 * time.Second, DialKeepAliveTimeout: 3 * time.Second, } if basicAuth { cfg.Username = username cfg.Password = password } tlsEnabled := false tlsConfig := &tls.Config{ InsecureSkipVerify: false, } if caCert != "" { certBytes, err := ioutil.ReadFile(caCert) if err != nil { return &Client{}, err } caCertPool := x509.NewCertPool() ok := caCertPool.AppendCertsFromPEM(certBytes) if ok { tlsConfig.RootCAs = caCertPool } tlsEnabled = true } if cert != "" && key != "" { tlsCert, err := tls.LoadX509KeyPair(cert, key) if err != nil { return &Client{}, err } tlsConfig.Certificates = []tls.Certificate{tlsCert} tlsEnabled = true } if tlsEnabled { cfg.TLS = tlsConfig } client, err := clientv3.New(cfg) if err != nil { return &Client{}, err } return &Client{client, make(map[string]*Watch), sync.Mutex{}}, nil } // GetValues queries etcd for keys prefixed by prefix. func (c *Client) GetValues(keys []string) (map[string]string, error) { // Use all operations on the same revision var first_rev int64 = 0 vars := make(map[string]string) // Default ETCDv3 TXN limitation. Since it is configurable from v3.3, // maybe an option should be added (also set max-txn=0 can disable Txn?) maxTxnOps := 128 getOps := make([]string, 0, maxTxnOps) doTxn := func(ops []string) error { ctx, cancel := context.WithTimeout(context.Background(), time.Duration(3)*time.Second) defer cancel() txnOps := make([]clientv3.Op, 0, maxTxnOps) for _, k := range ops { txnOps = append(txnOps, clientv3.OpGet(k, clientv3.WithPrefix(), clientv3.WithSort(clientv3.SortByKey, clientv3.SortDescend), clientv3.WithRev(first_rev))) } result, err := c.client.Txn(ctx).Then(txnOps...).Commit() if err != nil { return err } for i, r := range result.Responses { originKey := ops[i] // append a '/' if not already exists originKeyFixed := originKey if !strings.HasSuffix(originKeyFixed, "/") { originKeyFixed = originKey + "/" } for _, ev := range r.GetResponseRange().Kvs { k := string(ev.Key) if k == originKey || strings.HasPrefix(k, originKeyFixed) { vars[string(ev.Key)] = string(ev.Value) } } } if first_rev == 0 { // Save the revison of the first request first_rev = result.Header.GetRevision() } return nil } for _, key := range keys { getOps = append(getOps, key) if len(getOps) >= maxTxnOps { if err := doTxn(getOps); err != nil { return vars, err } getOps = getOps[:0] } } if len(getOps) > 0 { if err := doTxn(getOps); err != nil { return vars, err } } return vars, nil } func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { var err error // Create watch for each key watches := make(map[string]*Watch) c.wm.Lock() for _, k := range keys { watch, ok := c.watches[k] if !ok { watch, err = createWatch(c.client, k) if err != nil { c.wm.Unlock() return 0, err } c.watches[k] = watch } watches[k] = watch } c.wm.Unlock() ctx, cancel := context.WithCancel(context.Background()) cancelRoutine := make(chan struct{}) defer cancel() defer close(cancelRoutine) go func() { select { case <-stopChan: cancel() case <-cancelRoutine: return } }() notify := make(chan int64) // Wait for all watches for _, v := range watches { go v.WaitNext(ctx, int64(waitIndex), notify) } select { case nextRevision := <-notify: return uint64(nextRevision), err case <-ctx.Done(): return 0, ctx.Err() } return 0, err } ================================================ FILE: backends/etcdv3/client.go ================================================ package etcdv3 import ( "context" "crypto/tls" "crypto/x509" "io/ioutil" "strings" "time" "github.com/kelseyhightower/confd/log" clientv3 "go.etcd.io/etcd/client/v3" "sync" ) // A watch only tells the latest revision type Watch struct { // Last seen revision revision int64 // A channel to wait, will be closed after revision changes cond chan struct{} // Use RWMutex to protect cond variable rwl sync.RWMutex } // Wait until revision is greater than lastRevision func (w *Watch) WaitNext(ctx context.Context, lastRevision int64, notify chan<- int64) { for { w.rwl.RLock() if w.revision > lastRevision { w.rwl.RUnlock() break } cond := w.cond w.rwl.RUnlock() select { case <-cond: case <-ctx.Done(): return } } // We accept larger revision, so do not need to use RLock select { case notify <- w.revision: case <-ctx.Done(): } } // Update revision func (w *Watch) update(newRevision int64) { w.rwl.Lock() defer w.rwl.Unlock() w.revision = newRevision close(w.cond) w.cond = make(chan struct{}) } func createWatch(client *clientv3.Client, prefix string) (*Watch, error) { w := &Watch{0, make(chan struct{}), sync.RWMutex{}} go func() { rch := client.Watch(context.Background(), prefix, clientv3.WithPrefix(), clientv3.WithCreatedNotify()) log.Debug("Watch created on %s", prefix) for { for wresp := range rch { if wresp.CompactRevision > w.revision { // respect CompactRevision w.update(wresp.CompactRevision) log.Debug("Watch to '%s' updated to %d by CompactRevision", prefix, wresp.CompactRevision) } else if wresp.Header.GetRevision() > w.revision { // Watch created or updated w.update(wresp.Header.GetRevision()) log.Debug("Watch to '%s' updated to %d by header revision", prefix, wresp.Header.GetRevision()) } if err := wresp.Err(); err != nil { log.Error("Watch error: %s", err.Error()) } } log.Warning("Watch to '%s' stopped at revision %d", prefix, w.revision) // Disconnected or cancelled // Wait for a moment to avoid reconnecting // too quickly time.Sleep(time.Duration(1) * time.Second) // Start from next revision so we are not missing anything if w.revision > 0 { rch = client.Watch(context.Background(), prefix, clientv3.WithPrefix(), clientv3.WithRev(w.revision+1)) } else { // Start from the latest revision rch = client.Watch(context.Background(), prefix, clientv3.WithPrefix(), clientv3.WithCreatedNotify()) } } }() return w, nil } // Client is a wrapper around the etcd client type Client struct { client *clientv3.Client watches map[string]*Watch // Protect watch wm sync.Mutex } // NewEtcdClient returns an *etcdv3.Client with a connection to named machines. func NewEtcdClient(machines []string, cert, key, caCert string, basicAuth bool, username string, password string) (*Client, error) { cfg := clientv3.Config{ Endpoints: machines, DialTimeout: 5 * time.Second, DialKeepAliveTime: 10 * time.Second, DialKeepAliveTimeout: 3 * time.Second, } if basicAuth { cfg.Username = username cfg.Password = password } tlsEnabled := false tlsConfig := &tls.Config{ InsecureSkipVerify: false, } if caCert != "" { certBytes, err := ioutil.ReadFile(caCert) if err != nil { return &Client{}, err } caCertPool := x509.NewCertPool() ok := caCertPool.AppendCertsFromPEM(certBytes) if ok { tlsConfig.RootCAs = caCertPool } tlsEnabled = true } if cert != "" && key != "" { tlsCert, err := tls.LoadX509KeyPair(cert, key) if err != nil { return &Client{}, err } tlsConfig.Certificates = []tls.Certificate{tlsCert} tlsEnabled = true } if tlsEnabled { cfg.TLS = tlsConfig } client, err := clientv3.New(cfg) if err != nil { return &Client{}, err } return &Client{client, make(map[string]*Watch), sync.Mutex{}}, nil } // GetValues queries etcd for keys prefixed by prefix. func (c *Client) GetValues(keys []string) (map[string]string, error) { // Use all operations on the same revision var first_rev int64 = 0 vars := make(map[string]string) // Default ETCDv3 TXN limitation. Since it is configurable from v3.3, // maybe an option should be added (also set max-txn=0 can disable Txn?) maxTxnOps := 128 getOps := make([]string, 0, maxTxnOps) doTxn := func(ops []string) error { ctx, cancel := context.WithTimeout(context.Background(), time.Duration(3)*time.Second) defer cancel() txnOps := make([]clientv3.Op, 0, maxTxnOps) for _, k := range ops { txnOps = append(txnOps, clientv3.OpGet(k, clientv3.WithPrefix(), clientv3.WithSort(clientv3.SortByKey, clientv3.SortDescend), clientv3.WithRev(first_rev))) } result, err := c.client.Txn(ctx).Then(txnOps...).Commit() if err != nil { return err } for i, r := range result.Responses { originKey := ops[i] // append a '/' if not already exists originKeyFixed := originKey if !strings.HasSuffix(originKeyFixed, "/") { originKeyFixed = originKey + "/" } for _, ev := range r.GetResponseRange().Kvs { k := string(ev.Key) if k == originKey || strings.HasPrefix(k, originKeyFixed) { vars[string(ev.Key)] = string(ev.Value) } } } if first_rev == 0 { // Save the revison of the first request first_rev = result.Header.GetRevision() } return nil } for _, key := range keys { getOps = append(getOps, key) if len(getOps) >= maxTxnOps { if err := doTxn(getOps); err != nil { return vars, err } getOps = getOps[:0] } } if len(getOps) > 0 { if err := doTxn(getOps); err != nil { return vars, err } } return vars, nil } func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { var err error // Create watch for each key watches := make(map[string]*Watch) c.wm.Lock() for _, k := range keys { watch, ok := c.watches[k] if !ok { watch, err = createWatch(c.client, k) if err != nil { c.wm.Unlock() return 0, err } c.watches[k] = watch } watches[k] = watch } c.wm.Unlock() ctx, cancel := context.WithCancel(context.Background()) cancelRoutine := make(chan struct{}) defer cancel() defer close(cancelRoutine) go func() { select { case <-stopChan: cancel() case <-cancelRoutine: return } }() notify := make(chan int64) // Wait for all watches for _, v := range watches { go v.WaitNext(ctx, int64(waitIndex), notify) } select { case nextRevision := <-notify: return uint64(nextRevision), err case <-ctx.Done(): return 0, ctx.Err() } return 0, err } ================================================ FILE: backends/file/client.go ================================================ package file import ( "fmt" "io/ioutil" "path" "strconv" "strings" "github.com/fsnotify/fsnotify" "github.com/kelseyhightower/confd/log" util "github.com/kelseyhightower/confd/util" "gopkg.in/yaml.v2" ) var replacer = strings.NewReplacer("/", "_") // Client provides a shell for the yaml client type Client struct { filepath []string filter string } type ResultError struct { response uint64 err error } func NewFileClient(filepath []string, filter string) (*Client, error) { return &Client{filepath: filepath, filter: filter}, nil } func readFile(path string, vars map[string]string) error { yamlMap := make(map[interface{}]interface{}) data, err := ioutil.ReadFile(path) if err != nil { return err } err = yaml.Unmarshal(data, &yamlMap) if err != nil { return err } err = nodeWalk(yamlMap, "/", vars) if err != nil { return err } return nil } func (c *Client) GetValues(keys []string) (map[string]string, error) { vars := make(map[string]string) var filePaths []string for _, path := range c.filepath { p, err := util.RecursiveFilesLookup(path, c.filter) if err != nil { return nil, err } filePaths = append(filePaths, p...) } for _, path := range filePaths { err := readFile(path, vars) if err != nil { return nil, err } } VarsLoop: for k, _ := range vars { for _, key := range keys { if strings.HasPrefix(k, key) { continue VarsLoop } } delete(vars, k) } log.Debug(fmt.Sprintf("Key Map: %#v", vars)) return vars, nil } // nodeWalk recursively descends nodes, updating vars. func nodeWalk(node interface{}, key string, vars map[string]string) error { switch node.(type) { case []interface{}: for i, j := range node.([]interface{}) { key := path.Join(key, strconv.Itoa(i)) nodeWalk(j, key, vars) } case map[interface{}]interface{}: for k, v := range node.(map[interface{}]interface{}) { key := path.Join(key, k.(string)) nodeWalk(v, key, vars) } case string: vars[key] = node.(string) case int: vars[key] = strconv.Itoa(node.(int)) case bool: vars[key] = strconv.FormatBool(node.(bool)) case float64: vars[key] = strconv.FormatFloat(node.(float64), 'f', -1, 64) } return nil } func (c *Client) watchChanges(watcher *fsnotify.Watcher, stopChan chan bool) ResultError { outputChannel := make(chan ResultError) go func() error { defer close(outputChannel) for { select { case event := <-watcher.Events: log.Debug(fmt.Sprintf("Event: %s", event)) if event.Op&fsnotify.Write == fsnotify.Write || event.Op&fsnotify.Remove == fsnotify.Remove || event.Op&fsnotify.Create == fsnotify.Create { outputChannel <- ResultError{response: 1, err: nil} } case err := <-watcher.Errors: outputChannel <- ResultError{response: 0, err: err} case <-stopChan: outputChannel <- ResultError{response: 1, err: nil} } } }() return <-outputChannel } func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { if waitIndex == 0 { return 1, nil } watcher, err := fsnotify.NewWatcher() if err != nil { return 0, err } defer watcher.Close() for _, path := range c.filepath { isDir, err := util.IsDirectory(path) if err != nil { return 0, err } if isDir { dirs, err := util.RecursiveDirsLookup(path, "*") if err != nil { return 0, err } for _, dir := range dirs { err = watcher.Add(dir) if err != nil { return 0, err } } } else { err = watcher.Add(path) if err != nil { return 0, err } } } output := c.watchChanges(watcher, stopChan) if output.response != 2 { return output.response, output.err } return waitIndex, nil } ================================================ FILE: backends/rancher/client.go ================================================ package rancher import ( "encoding/json" "fmt" "io/ioutil" "net/http" "reflect" "strconv" "strings" "time" log "github.com/kelseyhightower/confd/log" ) const ( MetaDataURL = "http://rancher-metadata" ) type Client struct { url string httpClient *http.Client } func NewRancherClient(backendNodes []string) (*Client, error) { url := MetaDataURL if len(backendNodes) > 0 { url = "http://" + backendNodes[0] } log.Info("Using Rancher Metadata URL: " + url) client := &Client{ url: url, httpClient: &http.Client{}, } err := client.testConnection() return client, err } func (c *Client) GetValues(keys []string) (map[string]string, error) { vars := map[string]string{} for _, key := range keys { body, err := c.makeMetaDataRequest(key) if err != nil { return vars, err } var jsonResponse interface{} if err = json.Unmarshal(body, &jsonResponse); err != nil { return vars, err } if err = treeWalk(key, jsonResponse, vars); err != nil { return vars, err } } return vars, nil } func treeWalk(root string, val interface{}, vars map[string]string) error { switch val.(type) { case map[string]interface{}: for k := range val.(map[string]interface{}) { treeWalk(strings.Join([]string{root, k}, "/"), val.(map[string]interface{})[k], vars) } case []interface{}: for i, item := range val.([]interface{}) { idx := strconv.Itoa(i) if i, isMap := item.(map[string]interface{}); isMap { if name, exists := i["name"]; exists { idx = name.(string) } } treeWalk(strings.Join([]string{root, idx}, "/"), item, vars) } case bool: vars[root] = strconv.FormatBool(val.(bool)) case string: vars[root] = val.(string) case float64: vars[root] = strconv.FormatFloat(val.(float64), 'f', -1, 64) case nil: vars[root] = "null" default: log.Error("Unknown type: " + reflect.TypeOf(val).Name()) } return nil } func (c *Client) makeMetaDataRequest(path string) ([]byte, error) { req, _ := http.NewRequest("GET", strings.Join([]string{c.url, path}, ""), nil) req.Header.Set("Accept", "application/json") resp, err := c.httpClient.Do(req) if err != nil { return nil, err } defer resp.Body.Close() return ioutil.ReadAll(resp.Body) } func (c *Client) testConnection() error { var err error maxTime := 20 * time.Second for i := 1 * time.Second; i < maxTime; i *= time.Duration(2) { if _, err = c.makeMetaDataRequest("/"); err != nil { time.Sleep(i) } else { return nil } } return err } type watchResponse struct { waitIndex uint64 err error } type timeout interface { Timeout() bool } func (c *Client) waitVersion(prefix string, version string) (string, error) { // Long poll for 10 seconds path := fmt.Sprintf("%s/version?wait=true&value=%s&maxWait=10", prefix, version) for { resp, err := c.makeMetaDataRequest(path) if err != nil { t, ok := err.(timeout) if ok && t.Timeout() { continue } return "", err } err = json.Unmarshal(resp, &version) return version, err } } func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { // return something > 0 to trigger an initial retrieval from the store if waitIndex == 0 { return 1, nil } respChan := make(chan watchResponse) go func() { version := "init" for { newVersion, err := c.waitVersion(prefix, version) if err != nil { respChan <- watchResponse{0, err} return } if version != newVersion && version != "init" { respChan <- watchResponse{1, nil} return } version = newVersion } }() for { select { case <-stopChan: return waitIndex, nil case r := <-respChan: return r.waitIndex, r.err } } } ================================================ FILE: backends/redis/client.go ================================================ package redis import ( "fmt" "os" "strconv" "strings" "time" "github.com/garyburd/redigo/redis" "github.com/kelseyhightower/confd/log" ) type watchResponse struct { waitIndex uint64 err error } // Client is a wrapper around the redis client type Client struct { client redis.Conn machines []string password string separator string psc redis.PubSubConn pscChan chan watchResponse } // Iterate through `machines`, trying to connect to each in turn. // Returns the first successful connection or the last error encountered. // Assumes that `machines` is non-empty. func tryConnect(machines []string, password string, timeout bool) (redis.Conn, int, error) { var err error for _, address := range machines { var conn redis.Conn var db int idx := strings.Index(address, "/") if idx != -1 { // a database is provided db, err = strconv.Atoi(address[idx+1:]) if err == nil { address = address[:idx] } } network := "tcp" if _, err = os.Stat(address); err == nil { network = "unix" } log.Debug(fmt.Sprintf("Trying to connect to redis node %s", address)) var dialops []redis.DialOption if timeout { dialops = []redis.DialOption{ redis.DialConnectTimeout(time.Second), redis.DialReadTimeout(time.Second), redis.DialWriteTimeout(time.Second), redis.DialDatabase(db), } } else { dialops = []redis.DialOption{ redis.DialConnectTimeout(time.Second), redis.DialWriteTimeout(time.Second), redis.DialDatabase(db), } } if password != "" { dialops = append(dialops, redis.DialPassword(password)) } conn, err = redis.Dial(network, address, dialops...) if err != nil { continue } return conn, db, nil } return nil, 0, err } // Retrieves a connected redis client from the client wrapper. // Existing connections will be tested with a PING command before being returned. Tries to reconnect once if necessary. // Returns the established redis connection or the error encountered. func (c *Client) connectedClient() (redis.Conn, error) { if c.client != nil { log.Debug("Testing existing redis connection.") resp, err := c.client.Do("PING") if (err != nil && err == redis.ErrNil) || resp != "PONG" { log.Error(fmt.Sprintf("Existing redis connection no longer usable. "+ "Will try to re-establish. Error: %s", err.Error())) c.client = nil } } // Existing client could have been deleted by previous block if c.client == nil { var err error c.client, _, err = tryConnect(c.machines, c.password, true) if err != nil { return nil, err } } return c.client, nil } // NewRedisClient returns an *redis.Client with a connection to named machines. // It returns an error if a connection to the cluster cannot be made. func NewRedisClient(machines []string, password string, separator string) (*Client, error) { if separator == "" { separator = "/" } log.Debug(fmt.Sprintf("Redis Separator: %#v", separator)) var err error clientWrapper := &Client{machines: machines, password: password, separator: separator, client: nil, pscChan: make(chan watchResponse), psc: redis.PubSubConn{Conn: nil} } clientWrapper.client, _, err = tryConnect(machines, password, true) return clientWrapper, err } func (c *Client) transform(key string) string { if c.separator == "/" { return key; } k := strings.TrimPrefix(key, "/") return strings.Replace(k, "/", c.separator, -1); } func (c *Client) clean(key string) string { k := key if !strings.HasPrefix(k, "/") { k = "/" + k } return strings.Replace(k, c.separator, "/", -1); } // GetValues queries redis for keys prefixed by prefix. func (c *Client) GetValues(keys []string) (map[string]string, error) { // Ensure we have a connected redis client rClient, err := c.connectedClient() if err != nil && err != redis.ErrNil { return nil, err } vars := make(map[string]string) for _, key := range keys { key = strings.Replace(key, "/*", "", -1) k := c.transform(key) t, err := redis.String(rClient.Do("TYPE", k)) if err == nil && err != redis.ErrNil { if t == "string" { value, err := redis.String(rClient.Do("GET", k)) if err == nil { vars[key] = value continue } if err != redis.ErrNil { return vars, err } } else if t == "hash" { idx := 0 for { values, err := redis.Values(rClient.Do("HSCAN", k, idx, "MATCH", "*", "COUNT", "1000")) if err != nil && err != redis.ErrNil { return vars, err } idx, _ = redis.Int(values[0], nil) items, _ := redis.Strings(values[1], nil) for i := 0; i < len(items); i+=2 { var newKey, value string if newKey, err = redis.String(items[i], nil); err != nil { return vars, err } if value, err = redis.String(items[i+1], nil); err != nil { return vars, err } vars[c.clean(k + "/" + newKey)] = value } if idx == 0 { break } } } else { if key == "/" { k = "*" } else { k = fmt.Sprintf(c.transform("%s/*"), k) } idx := 0 for { values, err := redis.Values(rClient.Do("SCAN", idx, "MATCH", k, "COUNT", "1000")) if err != nil && err != redis.ErrNil { return vars, err } idx, _ = redis.Int(values[0], nil) items, _ := redis.Strings(values[1], nil) for _, item := range items { var newKey string if newKey, err = redis.String(item, nil); err != nil { return vars, err } if value, err := redis.String(rClient.Do("GET", newKey)); err == nil { vars[c.clean(newKey)] = value } } if idx == 0 { break } } } } else { return vars, err } } log.Debug(fmt.Sprintf("Key Map: %#v", vars)) return vars, nil } func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { if waitIndex == 0 { return 1, nil } if len(c.pscChan) > 0 { var respChan watchResponse for len(c.pscChan) > 0 { respChan = <-c.pscChan } return respChan.waitIndex, respChan.err } go func() { if c.psc.Conn == nil { rClient, db, err := tryConnect(c.machines, c.password, false); if err != nil { c.psc = redis.PubSubConn{Conn: nil} c.pscChan <- watchResponse{0, err} return } c.psc = redis.PubSubConn{Conn: rClient} go func() { defer func() { c.psc.Close() c.psc = redis.PubSubConn{Conn: nil} }() for { switch n := c.psc.Receive().(type) { case redis.PMessage: log.Debug(fmt.Sprintf("Redis Message: %s %s\n", n.Channel, n.Data)) data := string(n.Data) commands := [12]string{"del", "append", "rename_from", "rename_to", "expire", "set", "incrby", "incrbyfloat", "hset", "hincrby", "hincrbyfloat", "hdel"} for _, command := range commands { if command == data { c.pscChan <- watchResponse{1, nil} break } } case redis.Subscription: log.Debug(fmt.Sprintf("Redis Subscription: %s %s %d\n", n.Kind, n.Channel, n.Count)) if n.Count == 0 { c.pscChan <- watchResponse{0, nil} return } case error: log.Debug(fmt.Sprintf("Redis error: %v\n", n)) c.pscChan <- watchResponse{0, n} return } } }() c.psc.PSubscribe("__keyspace@" + strconv.Itoa(db) + "__:" + c.transform(prefix) + "*") } }() select { case <-stopChan: c.psc.PUnsubscribe() return waitIndex, nil case r := <- c.pscChan: return r.waitIndex, r.err } } ================================================ FILE: backends/ssm/client.go ================================================ package ssm import ( "os" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ssm" "github.com/kelseyhightower/confd/log" ) type Client struct { client *ssm.SSM } func New() (*Client, error) { // Create a session to share configuration, and load external configuration. sess := session.Must(session.NewSession()) // Fail early, if no credentials can be found _, err := sess.Config.Credentials.Get() if err != nil { return nil, err } var c *aws.Config if os.Getenv("SSM_LOCAL") != "" { log.Debug("SSM_LOCAL is set") endpoint := "http://localhost:8001" c = &aws.Config{ Endpoint: &endpoint, } } else { c = nil } // Create the service's client with the session. svc := ssm.New(sess, c) return &Client{svc}, nil } // GetValues retrieves the values for the given keys from AWS SSM Parameter Store func (c *Client) GetValues(keys []string) (map[string]string, error) { vars := make(map[string]string) var err error for _, key := range keys { log.Debug("Processing key=%s", key) var resp map[string]string resp, err = c.getParametersWithPrefix(key) if err != nil { return vars, err } if len(resp) == 0 { resp, err = c.getParameter(key) if err != nil && err.(awserr.Error).Code() != ssm.ErrCodeParameterNotFound { return vars, err } } for k, v := range resp { vars[k] = v } } return vars, nil } func (c *Client) getParametersWithPrefix(prefix string) (map[string]string, error) { var err error parameters := make(map[string]string) params := &ssm.GetParametersByPathInput{ Path: aws.String(prefix), Recursive: aws.Bool(true), WithDecryption: aws.Bool(true), } c.client.GetParametersByPathPages(params, func(page *ssm.GetParametersByPathOutput, lastPage bool) bool { for _, p := range page.Parameters { parameters[*p.Name] = *p.Value } return !lastPage }) return parameters, err } func (c *Client) getParameter(name string) (map[string]string, error) { parameters := make(map[string]string) params := &ssm.GetParameterInput{ Name: aws.String(name), WithDecryption: aws.Bool(true), } resp, err := c.client.GetParameter(params) if err != nil { return parameters, err } parameters[*resp.Parameter.Name] = *resp.Parameter.Value return parameters, nil } // WatchPrefix is not implemented func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { <-stopChan return 0, nil } ================================================ FILE: backends/vault/client.go ================================================ package vault import ( "crypto/tls" "crypto/x509" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "path" vaultapi "github.com/hashicorp/vault/api" "github.com/kelseyhightower/confd/log" ) // Client is a wrapper around the vault client type Client struct { client *vaultapi.Client } // get a func getParameter(key string, parameters map[string]string) string { value := parameters[key] if value == "" { // panic if a configuration is missing panic(fmt.Sprintf("%s is missing from configuration", key)) } return value } // panicToError converts a panic to an error func panicToError(err *error) { if r := recover(); r != nil { switch t := r.(type) { case string: *err = errors.New(t) case error: *err = t default: // panic again if we don't know how to handle panic(r) } } } // authenticate with the remote client func authenticate(c *vaultapi.Client, authType string, params map[string]string) (err error) { var secret *vaultapi.Secret // handle panics gracefully by creating an error // this would happen when we get a parameter that is missing defer panicToError(&err) path := params["path"] if path == "" { path = authType if authType == "app-role" { path = "approle" } } url := fmt.Sprintf("/auth/%s/login", path) switch authType { case "app-role": secret, err = c.Logical().Write(url, map[string]interface{}{ "role_id": getParameter("role-id", params), "secret_id": getParameter("secret-id", params), }) case "app-id": secret, err = c.Logical().Write(url, map[string]interface{}{ "app_id": getParameter("app-id", params), "user_id": getParameter("user-id", params), }) case "github": secret, err = c.Logical().Write(url, map[string]interface{}{ "token": getParameter("token", params), }) case "token": c.SetToken(getParameter("token", params)) secret, err = c.Logical().Read("/auth/token/lookup-self") case "userpass": username, password := getParameter("username", params), getParameter("password", params) secret, err = c.Logical().Write(fmt.Sprintf("%s/%s", url, username), map[string]interface{}{ "password": password, }) case "kubernetes": jwt, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/token") if err != nil { return err } secret, err = c.Logical().Write(url, map[string]interface{}{ "jwt": string(jwt[:]), "role": getParameter("role-id", params), }) case "cert": secret, err = c.Logical().Write(url, map[string]interface{}{}) } if err != nil { return err } // if the token has already been set if c.Token() != "" { return nil } if secret == nil || secret.Auth == nil { return errors.New("Unable to authenticate") } log.Debug("client authenticated with auth backend: %s", authType) // the default place for a token is in the auth section // otherwise, the backend will set the token itself c.SetToken(secret.Auth.ClientToken) return nil } func getConfig(address, cert, key, caCert string) (*vaultapi.Config, error) { conf := vaultapi.DefaultConfig() conf.Address = address tlsConfig := &tls.Config{} if cert != "" && key != "" { clientCert, err := tls.LoadX509KeyPair(cert, key) if err != nil { return nil, err } tlsConfig.Certificates = []tls.Certificate{clientCert} tlsConfig.BuildNameToCertificate() } if caCert != "" { ca, err := ioutil.ReadFile(caCert) if err != nil { return nil, err } caCertPool := x509.NewCertPool() caCertPool.AppendCertsFromPEM(ca) tlsConfig.RootCAs = caCertPool } conf.HttpClient.Transport = &http.Transport{ TLSClientConfig: tlsConfig, } return conf, nil } // New returns an *vault.Client with a connection to named machines. // It returns an error if a connection to the cluster cannot be made. func New(address, authType string, params map[string]string) (*Client, error) { if authType == "" { return nil, errors.New("you have to set the auth type when using the vault backend") } log.Info("Vault authentication backend set to %s", authType) conf, err := getConfig(address, params["cert"], params["key"], params["caCert"]) if err != nil { return nil, err } c, err := vaultapi.NewClient(conf) if err != nil { return nil, err } if err := authenticate(c, authType, params); err != nil { return nil, err } return &Client{c}, nil } // GetValues queries etcd for keys prefixed by prefix. func (c *Client) GetValues(keys []string) (map[string]string, error) { branches := make(map[string]bool) for _, key := range keys { walkTree(c, key, branches) } vars := make(map[string]string) for key := range branches { log.Debug("getting %s from vault", key) resp, err := c.client.Logical().Read(key) if err != nil { log.Debug("there was an error extracting %s", key) return nil, err } if resp == nil || resp.Data == nil { continue } // if the key has only one string value // treat it as a string and not a map of values if val, ok := isKV(resp.Data); ok { vars[key] = val } else { // save the json encoded response // and flatten it to allow usage of gets & getvs js, _ := json.Marshal(resp.Data) vars[key] = string(js) flatten(key, resp.Data, vars) } } return vars, nil } // isKV checks if a given map has only one key of type string // if so, returns the value of that key func isKV(data map[string]interface{}) (string, bool) { if len(data) == 1 { if value, ok := data["value"]; ok { if text, ok := value.(string); ok { return text, true } } } return "", false } // recursively walks on all the values of a specific key and set them in the variables map func flatten(key string, value interface{}, vars map[string]string) { switch value.(type) { case string: log.Debug("setting key %s to: %s", key, value) vars[key] = value.(string) case map[string]interface{}: inner := value.(map[string]interface{}) for innerKey, innerValue := range inner { innerKey = path.Join(key, "/", innerKey) flatten(innerKey, innerValue, vars) } default: // we don't know how to handle non string or maps of strings log.Warning("type of '%s' is not supported (%T)", key, value) } } // recursively walk the branches in the Vault, adding to branches map func walkTree(c *Client, key string, branches map[string]bool) error { log.Debug("listing %s from vault", key) // strip trailing slash as long as it's not the only character if last := len(key) - 1; last > 0 && key[last] == '/' { key = key[:last] } if branches[key] { // already processed this branch return nil } branches[key] = true resp, err := c.client.Logical().List(key) if err != nil { log.Debug("there was an error extracting %s", key) return err } if resp == nil || resp.Data == nil || resp.Data["keys"] == nil { return nil } switch resp.Data["keys"].(type) { case []interface{}: // expected default: log.Warning("key list type of '%s' is not supported (%T)", key, resp.Data["keys"]) return nil } keyList := resp.Data["keys"].([]interface{}) for _, innerKey := range keyList { switch innerKey.(type) { case string: innerKey = path.Join(key, "/", innerKey.(string)) walkTree(c, innerKey.(string), branches) default: // we don't know how to handle other data types log.Warning("type of '%s' is not supported (%T)", key, keyList) } } return nil } // WatchPrefix - not implemented at the moment func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { <-stopChan return 0, nil } ================================================ FILE: backends/zookeeper/client.go ================================================ package zookeeper import ( "path/filepath" "strings" "time" "github.com/kelseyhightower/confd/log" zk "github.com/samuel/go-zookeeper/zk" ) // Client provides a wrapper around the zookeeper client type Client struct { client *zk.Conn } func NewZookeeperClient(machines []string) (*Client, error) { c, _, err := zk.Connect(machines, time.Second) //*10) if err != nil { panic(err) } return &Client{c}, nil } func nodeWalk(prefix string, c *Client, vars map[string]string) error { var s string l, stat, err := c.client.Children(prefix) if err != nil { return err } if stat.NumChildren == 0 { b, _, err := c.client.Get(prefix) if err != nil { return err } vars[prefix] = string(b) } else { for _, key := range l { if prefix == "/" { s = "/" + key } else { s = prefix + "/" + key } _, stat, err := c.client.Exists(s) if err != nil { return err } if stat.NumChildren == 0 { b, _, err := c.client.Get(s) if err != nil { return err } vars[s] = string(b) } else { nodeWalk(s, c, vars) } } } return nil } func (c *Client) GetValues(keys []string) (map[string]string, error) { vars := make(map[string]string) for _, v := range keys { v = strings.Replace(v, "/*", "", -1) _, _, err := c.client.Exists(v) if err != nil { return vars, err } err = nodeWalk(v, c, vars) if err != nil { return vars, err } } return vars, nil } type watchResponse struct { waitIndex uint64 err error } func (c *Client) watch(key string, respChan chan watchResponse, cancelRoutine chan bool) { _, _, keyEventCh, err := c.client.GetW(key) if err != nil { respChan <- watchResponse{0, err} } _, _, childEventCh, err := c.client.ChildrenW(key) if err != nil { respChan <- watchResponse{0, err} } for { select { case e := <-keyEventCh: if e.Type == zk.EventNodeDataChanged { respChan <- watchResponse{1, e.Err} } case e := <-childEventCh: if e.Type == zk.EventNodeChildrenChanged { respChan <- watchResponse{1, e.Err} } case <-cancelRoutine: log.Debug("Stop watching: " + key) // There is no way to stop GetW/ChildrenW so just quit return } } } func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error) { // return something > 0 to trigger a key retrieval from the store if waitIndex == 0 { return 1, nil } // List the childrens first entries, err := c.GetValues([]string{prefix}) if err != nil { return 0, err } respChan := make(chan watchResponse) cancelRoutine := make(chan bool) defer close(cancelRoutine) //watch all subfolders for changes watchMap := make(map[string]string) for k, _ := range entries { for _, v := range keys { if strings.HasPrefix(k, v) { for dir := filepath.Dir(k); dir != "/"; dir = filepath.Dir(dir) { if _, ok := watchMap[dir]; !ok { watchMap[dir] = "" log.Debug("Watching: " + dir) go c.watch(dir, respChan, cancelRoutine) } } break } } } //watch all keys in prefix for changes for k, _ := range entries { for _, v := range keys { if strings.HasPrefix(k, v) { log.Debug("Watching: " + k) go c.watch(k, respChan, cancelRoutine) break } } } for { select { case <-stopChan: return waitIndex, nil case r := <-respChan: return r.waitIndex, r.err } } } ================================================ FILE: confd.go ================================================ package main import ( "flag" "fmt" "os" "os/signal" "runtime" "syscall" "github.com/kelseyhightower/confd/backends" "github.com/kelseyhightower/confd/log" "github.com/kelseyhightower/confd/resource/template" ) func main() { flag.Parse() if config.PrintVersion { fmt.Printf("confd %s (Git SHA: %s, Go Version: %s)\n", Version, GitSHA, runtime.Version()) os.Exit(0) } if err := initConfig(); err != nil { log.Fatal(err.Error()) } log.Info("Starting confd") storeClient, err := backends.New(config.BackendsConfig) if err != nil { log.Fatal(err.Error()) } config.TemplateConfig.StoreClient = storeClient if config.OneTime { if err := template.Process(config.TemplateConfig); err != nil { log.Fatal(err.Error()) } os.Exit(0) } stopChan := make(chan bool) doneChan := make(chan bool) errChan := make(chan error, 10) var processor template.Processor switch { case config.Watch: processor = template.WatchProcessor(config.TemplateConfig, stopChan, doneChan, errChan) default: processor = template.IntervalProcessor(config.TemplateConfig, stopChan, doneChan, errChan, config.Interval) } go processor.Process() signalChan := make(chan os.Signal, 1) signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM) for { select { case err := <-errChan: log.Error(err.Error()) case s := <-signalChan: log.Info(fmt.Sprintf("Captured %v. Exiting...", s)) close(doneChan) case <-doneChan: os.Exit(0) } } } ================================================ FILE: config.go ================================================ package main import ( "errors" "flag" "fmt" "net" "os" "path/filepath" "strconv" "strings" "github.com/BurntSushi/toml" "github.com/kelseyhightower/confd/backends" "github.com/kelseyhightower/confd/log" "github.com/kelseyhightower/confd/resource/template" ) type TemplateConfig = template.Config type BackendsConfig = backends.Config // A Config structure is used to configure confd. type Config struct { TemplateConfig BackendsConfig Interval int `toml:"interval"` SRVDomain string `toml:"srv_domain"` SRVRecord string `toml:"srv_record"` LogLevel string `toml:"log-level"` Watch bool `toml:"watch"` PrintVersion bool ConfigFile string OneTime bool } var config Config func init() { flag.StringVar(&config.AuthToken, "auth-token", "", "Auth bearer token to use") flag.StringVar(&config.Backend, "backend", "etcd", "backend to use") flag.BoolVar(&config.BasicAuth, "basic-auth", false, "Use Basic Auth to authenticate (only used with -backend=consul and -backend=etcd)") flag.StringVar(&config.ClientCaKeys, "client-ca-keys", "", "client ca keys") flag.StringVar(&config.ClientCert, "client-cert", "", "the client cert") flag.StringVar(&config.ClientKey, "client-key", "", "the client key") flag.BoolVar(&config.ClientInsecure, "client-insecure", false, "Allow connections to SSL sites without certs (only used with -backend=etcd)") flag.StringVar(&config.ConfDir, "confdir", "/etc/confd", "confd conf directory") flag.StringVar(&config.ConfigFile, "config-file", "/etc/confd/confd.toml", "the confd config file") flag.Var(&config.YAMLFile, "file", "the YAML file to watch for changes (only used with -backend=file)") flag.StringVar(&config.Filter, "filter", "*", "files filter (only used with -backend=file)") flag.IntVar(&config.Interval, "interval", 600, "backend polling interval") flag.BoolVar(&config.KeepStageFile, "keep-stage-file", false, "keep staged files") flag.StringVar(&config.LogLevel, "log-level", "", "level which confd should log messages") flag.Var(&config.BackendNodes, "node", "list of backend nodes") flag.BoolVar(&config.Noop, "noop", false, "only show pending changes") flag.BoolVar(&config.OneTime, "onetime", false, "run once and exit") flag.StringVar(&config.Prefix, "prefix", "", "key path prefix") flag.BoolVar(&config.PrintVersion, "version", false, "print version and exit") flag.StringVar(&config.Scheme, "scheme", "http", "the backend URI scheme for nodes retrieved from DNS SRV records (http or https)") flag.StringVar(&config.SRVDomain, "srv-domain", "", "the name of the resource record") flag.StringVar(&config.SRVRecord, "srv-record", "", "the SRV record to search for backends nodes. Example: _etcd-client._tcp.example.com") flag.BoolVar(&config.SyncOnly, "sync-only", false, "sync without check_cmd and reload_cmd") flag.StringVar(&config.AuthType, "auth-type", "", "Vault auth backend type to use (only used with -backend=vault)") flag.StringVar(&config.AppID, "app-id", "", "Vault app-id to use with the app-id backend (only used with -backend=vault and auth-type=app-id)") flag.StringVar(&config.UserID, "user-id", "", "Vault user-id to use with the app-id backend (only used with -backend=value and auth-type=app-id)") flag.StringVar(&config.RoleID, "role-id", "", "Vault role-id to use with the AppRole, Kubernetes backends (only used with -backend=vault and either auth-type=app-role or auth-type=kubernetes)") flag.StringVar(&config.SecretID, "secret-id", "", "Vault secret-id to use with the AppRole backend (only used with -backend=vault and auth-type=app-role)") flag.StringVar(&config.Path, "path", "", "Vault mount path of the auth method (only used with -backend=vault)") flag.StringVar(&config.Table, "table", "", "the name of the DynamoDB table (only used with -backend=dynamodb)") flag.StringVar(&config.Separator, "separator", "", "the separator to replace '/' with when looking up keys in the backend, prefixed '/' will also be removed (only used with -backend=redis)") flag.StringVar(&config.Username, "username", "", "the username to authenticate as (only used with vault and etcd backends)") flag.StringVar(&config.Password, "password", "", "the password to authenticate with (only used with vault and etcd backends)") flag.BoolVar(&config.Watch, "watch", false, "enable watch support") } // initConfig initializes the confd configuration by first setting defaults, // then overriding settings from the confd config file, then overriding // settings from environment variables, and finally overriding // settings from flags set on the command line. // It returns an error if any. func initConfig() error { _, err := os.Stat(config.ConfigFile) if os.IsNotExist(err) { log.Debug("Skipping confd config file.") } else { log.Debug("Loading " + config.ConfigFile) configBytes, err := os.ReadFile(config.ConfigFile) if err != nil { return err } _, err = toml.Decode(string(configBytes), &config) if err != nil { return err } } // Update config from environment variables. processEnv() if config.LogLevel != "" { log.SetLevel(config.LogLevel) } if config.SRVDomain != "" && config.SRVRecord == "" { config.SRVRecord = fmt.Sprintf("_%s._tcp.%s.", config.Backend, config.SRVDomain) } // Update BackendNodes from SRV records. if config.Backend != "env" && config.SRVRecord != "" { log.Info("SRV record set to " + config.SRVRecord) srvNodes, err := getBackendNodesFromSRV(config.SRVRecord) if err != nil { return errors.New("Cannot get nodes from SRV records " + err.Error()) } switch config.Backend { case "etcd": vsm := make([]string, len(srvNodes)) for i, v := range srvNodes { vsm[i] = config.Scheme + "://" + v } srvNodes = vsm } config.BackendNodes = srvNodes } if len(config.BackendNodes) == 0 { switch config.Backend { case "consul": config.BackendNodes = []string{"127.0.0.1:8500"} case "etcd": peerstr := os.Getenv("ETCDCTL_PEERS") if len(peerstr) > 0 { config.BackendNodes = strings.Split(peerstr, ",") } else { config.BackendNodes = []string{"http://127.0.0.1:4001"} } case "etcdv3": config.BackendNodes = []string{"127.0.0.1:2379"} case "redis": config.BackendNodes = []string{"127.0.0.1:6379"} case "vault": config.BackendNodes = []string{"http://127.0.0.1:8200"} case "zookeeper": config.BackendNodes = []string{"127.0.0.1:2181"} } } // Initialize the storage client log.Info("Backend set to " + config.Backend) if config.Watch { unsupportedBackends := map[string]bool{ "dynamodb": true, "ssm": true, } if unsupportedBackends[config.Backend] { log.Info(fmt.Sprintf("Watch is not supported for backend %s. Exiting...", config.Backend)) os.Exit(1) } } if config.Backend == "dynamodb" && config.Table == "" { return errors.New("no DynamoDB table configured") } config.ConfigDir = filepath.Join(config.ConfDir, "conf.d") config.TemplateDir = filepath.Join(config.ConfDir, "templates") return nil } func getBackendNodesFromSRV(record string) ([]string, error) { nodes := make([]string, 0) // Ignore the CNAME as we don't need it. _, addrs, err := net.LookupSRV("", "", record) if err != nil { return nodes, err } for _, srv := range addrs { host := strings.TrimRight(srv.Target, ".") port := strconv.FormatUint(uint64(srv.Port), 10) nodes = append(nodes, net.JoinHostPort(host, port)) } return nodes, nil } func processEnv() { cakeys := os.Getenv("CONFD_CLIENT_CAKEYS") if len(cakeys) > 0 && config.ClientCaKeys == "" { config.ClientCaKeys = cakeys } cert := os.Getenv("CONFD_CLIENT_CERT") if len(cert) > 0 && config.ClientCert == "" { config.ClientCert = cert } key := os.Getenv("CONFD_CLIENT_KEY") if len(key) > 0 && config.ClientKey == "" { config.ClientKey = key } } ================================================ FILE: config_test.go ================================================ package main import ( "reflect" "testing" "github.com/kelseyhightower/confd/log" ) func TestInitConfigDefaultConfig(t *testing.T) { log.SetLevel("warn") want := Config{ BackendsConfig: BackendsConfig{ Backend: "etcd", BackendNodes: []string{"http://127.0.0.1:4001"}, Scheme: "http", Filter: "*", }, TemplateConfig: TemplateConfig{ ConfDir: "/etc/confd", ConfigDir: "/etc/confd/conf.d", TemplateDir: "/etc/confd/templates", Noop: false, }, ConfigFile: "/etc/confd/confd.toml", Interval: 600, } if err := initConfig(); err != nil { t.Errorf(err.Error()) } if !reflect.DeepEqual(want, config) { t.Errorf("initConfig() = %v, want %v", config, want) } } ================================================ FILE: contrib/etcd/Procfile ================================================ # Use goreman to run `go get github.com/mattn/goreman` etcd0: /usr/local/bin/etcd --name etcd0 --listen-client-urls http://127.0.0.1:2379 --advertise-client-urls http://127.0.0.1:2379 --listen-peer-urls http://127.0.0.1:2380 --initial-advertise-peer-urls http://127.0.0.1:2380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'etcd0=http://127.0.0.1:2380,etcd1=http://127.0.0.1:12380,etcd2=http://127.0.0.1:22380,etcd3=http://127.0.0.1:32380,etcd4=http://127.0.0.1:42380' --initial-cluster-state new --data-dir=/tmp/etcd0 etcd1: /usr/local/bin/etcd --name etcd1 --listen-client-urls http://127.0.0.1:12379 --advertise-client-urls http://127.0.0.1:12379 --listen-peer-urls http://127.0.0.1:12380 --initial-advertise-peer-urls http://127.0.0.1:12380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'etcd0=http://127.0.0.1:2380,etcd1=http://127.0.0.1:12380,etcd2=http://127.0.0.1:22380,etcd3=http://127.0.0.1:32380,etcd4=http://127.0.0.1:42380' --initial-cluster-state new --data-dir=/tmp/etcd1 etcd2: /usr/local/bin/etcd --name etcd2 --listen-client-urls http://127.0.0.1:22379 --advertise-client-urls http://127.0.0.1:22379 --listen-peer-urls http://127.0.0.1:22380 --initial-advertise-peer-urls http://127.0.0.1:22380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'etcd0=http://127.0.0.1:2380,etcd1=http://127.0.0.1:12380,etcd2=http://127.0.0.1:22380,etcd3=http://127.0.0.1:32380,etcd4=http://127.0.0.1:42380' --initial-cluster-state new --data-dir=/tmp/etcd2 etcd3: /usr/local/bin/etcd --name etcd3 --listen-client-urls http://127.0.0.1:32379 --advertise-client-urls http://127.0.0.1:32379 --listen-peer-urls http://127.0.0.1:32380 --initial-advertise-peer-urls http://127.0.0.1:32380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'etcd0=http://127.0.0.1:2380,etcd1=http://127.0.0.1:12380,etcd2=http://127.0.0.1:22380,etcd3=http://127.0.0.1:32380,etcd4=http://127.0.0.1:42380' --initial-cluster-state new --data-dir=/tmp/etcd3 etcd4: /usr/local/bin/etcd --name etcd4 --listen-client-urls http://127.0.0.1:42379 --advertise-client-urls http://127.0.0.1:42379 --listen-peer-urls http://127.0.0.1:42380 --initial-advertise-peer-urls http://127.0.0.1:42380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'etcd0=http://127.0.0.1:2380,etcd1=http://127.0.0.1:12380,etcd2=http://127.0.0.1:22380,etcd3=http://127.0.0.1:32380,etcd4=http://127.0.0.1:42380' --initial-cluster-state new --data-dir=/tmp/etcd4 ================================================ FILE: contrib/generate-changelog.sh ================================================ #!/usr/bin/env bash # Generates a changelog of all merges from a given release all the way to HEAD. REPO=https://github.com/kelseyhightower/confd usage() { echo "Usage: $0 [TO]" } # Print usage summary if user didn't specify a beginning if [ -z "$1" ]; then usage exit 1 fi FROM=$1 TO=${2:-HEAD} printf "### $TO\n\n" git --no-pager log --merges --format="%h %b" $FROM..$TO ================================================ FILE: docs/command-line-flags.md ================================================ # Command Line Flags Command line flags override the confd [configuration file](configuration-guide.md). ``` confd -h ``` ```Text Usage of confd: -app-id string Vault app-id to use with the app-id backend (only used with -backend=vault and auth-type=app-id) -auth-token string Auth bearer token to use -auth-type string Vault auth backend type to use (only used with -backend=vault) -backend string backend to use (default "etcd") -basic-auth Use Basic Auth to authenticate (only used with -backend=consul and -backend=etcd) -client-ca-keys string client ca keys -client-cert string the client cert -client-key string the client key -confdir string confd conf directory (default "/etc/confd") -config-file string the confd config file (default "/etc/confd/confd.toml") -file value the YAML file to watch for changes (only used with -backend=file) -filter string files filter (only used with -backend=file) (default "*") -interval int backend polling interval (default 600) -keep-stage-file keep staged files -log-level string level which confd should log messages -node value list of backend nodes -noop only show pending changes -onetime run once and exit -password string the password to authenticate with (only used with vault and etcd backends) -path string Vault mount path of the auth method (only used with -backend=vault) -prefix string key path prefix -role-id string Vault role-id to use with the AppRole, Kubernetes backends (only used with -backend=vault and either auth-type=app-role or auth-type=kubernetes) -scheme string the backend URI scheme for nodes retrieved from DNS SRV records (http or https) (default "http") -secret-id string Vault secret-id to use with the AppRole backend (only used with -backend=vault and auth-type=app-role) -secret-keyring string path to armored PGP secret keyring (for use with crypt functions) -separator string the separator to replace '/' with when looking up keys in the backend, prefixed '/' will also be removed (only used with -backend=redis) -srv-domain string the name of the resource record -srv-record string the SRV record to search for backends nodes. Example: _etcd-client._tcp.example.com -sync-only sync without check_cmd and reload_cmd -table string the name of the DynamoDB table (only used with -backend=dynamodb) -user-id string Vault user-id to use with the app-id backend (only used with -backend=value and auth-type=app-id) -username string the username to authenticate as (only used with vault and etcd backends) -version print version and exit -watch enable watch support ``` > The -scheme flag is only used to set the URL scheme for nodes retrieved from DNS SRV records. ================================================ FILE: docs/configuration-guide.md ================================================ # Configuration Guide The confd configuration file is written in [TOML](https://github.com/mojombo/toml) and loaded from `/etc/confd/confd.toml` by default. You can specify the config file via the `-config-file` command line flag. > Note: You can use confd without a configuration file. See [Command Line Flags](https://github.com/kelseyhightower/confd/blob/master/docs/command-line-flags.md). Optional: * `backend` (string) - The backend to use. ("etcd") * `client_cakeys` (string) - The client CA key file. * `client_cert` (string) - The client cert file. * `client_key` (string) - The client key file. * `confdir` (string) - The path to confd configs. ("/etc/confd") * `interval` (int) - The backend polling interval in seconds. (600) * `log-level` (string) - level which confd should log messages ("info") * `nodes` (array of strings) - List of backend nodes. (["http://127.0.0.1:4001"]) * `noop` (bool) - Enable noop mode. Process all template resources; skip target update. * `prefix` (string) - The string to prefix to keys. ("/") * `scheme` (string) - The backend URI scheme. ("http" or "https") * `srv_domain` (string) - The name of the resource record. * `srv_record` (string) - The SRV record to search for backends nodes. * `sync-only` (bool) - sync without check_cmd and reload_cmd. * `watch` (bool) - Enable watch support. * `auth_token` (string) - Auth bearer token to use. * `auth_type` (string) - Vault auth backend type to use. * `basic_auth` (bool) - Use Basic Auth to authenticate (only used with -backend=consul and -backend=etcd). * `table` (string) - The name of the DynamoDB table (only used with -backend=dynamodb). * `separator` (string) - The separator to replace '/' with when looking up keys in the backend, prefixed '/' will also be removed (only used with -backend=redis) * `username` (string) - The username to authenticate as (only used with vault and etcd backends). * `password` (string) - The password to authenticate with (only used with vault and etcd backends). * `app_id` (string) - Vault app-id to use with the app-id backend (only used with -backend=vault and auth-type=app-id). * `user_id` (string) - Vault user-id to use with the app-id backend (only used with -backend=value and auth-type=app-id). * `role_id` (string) - Vault role-id to use with the AppRole, Kubernetes backends (only used with -backend=vault and either auth-type=app-role or auth-type=kubernetes). * `secret_id` (string) - Vault secret-id to use with the AppRole backend (only used with -backend=vault and auth-type=app-role). * `file` (array of strings) - The YAML file to watch for changes (only used with -backend=file). * `filter` (string) - Files filter (only used with -backend=file) (default "*"). * `path` (string) - Vault mount path of the auth method (only used with -backend=vault). Example: ```TOML backend = "etcd" client_cert = "/etc/confd/ssl/client.crt" client_key = "/etc/confd/ssl/client.key" confdir = "/etc/confd" log-level = "debug" interval = 600 nodes = [ "http://127.0.0.1:4001", ] noop = false prefix = "/production" scheme = "https" srv_domain = "etcd.example.com" ``` ================================================ FILE: docs/data_encryption.md ================================================ Encrypting your data ==================== This example is shown using etcd, but any of the supported backends *should* work. ## Creating PGP keys [`crypt`](https://github.com/xordataexchange/crypt), unlike gpg, requires your keypair to be in ASCII armor format. For the purpose of this example you can use [the pair provided below](#local-testing-keypair-sample), or you can [create your own](#local-testing-keypair-generating). ### Using my sample key pair (unsafe for anything other than local testing) save the following as `.pubring.gpg` ```no-highlight -----BEGIN PGP PUBLIC KEY BLOCK----- mQENBFUbhEMBCADHqlGZuIDSyw7ZXngMJYltREr8llsfdSR8kmEaoCp2ts3rqzZ2 hRX6xLrRnV0gB8+H1y+1Ly5IqR5guAG2Gs5j4ds6R4xtwHN9OnXXqTfqlXroUg55 /1RjEIxaso5GPY6+DO7GVYMY1hXgiLhlkvpdUAcZeZNS/HR/ytw7dDPaM51DTREm XZ1+IHaNgIFtHtbHx44TZ4a0CvFSefRJXV6/o7ik9GLE6CyBsb80vXN1KiRLL5kl ItPWqlF1mH2SvKAxfn0xQuGWenoiILq7Nj79XVcrKOVdrQ7m/oXiW/Rp8pzMcFNo a2KuQkHI3+PPQnCR0qPXNSPQM0bF8hXLHMQpABEBAAG0LWFwcCAoYXBwIGNvbmZp Z3VyYXRpb24ga2V5KSA8YXBwQGV4YW1wbGUuY29tPokBNwQTAQoAIQUCVRuEQwIb AwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRCvl84Mdvp1vzfqB/9YNCDixrE5 AfJTsK9qzhyENHpssd0z0zKNTKCKSU/Qe86tTE6OixFHJPquSJNvz74pY/6skC5C 1fAMBMSzTiie4jsKS5jj0OpXbMTCgRChN+p0zHXOmVkP80mE3+YifCruhhMriJO5 obhk81e6QiwKqiiijwpDKH/hT2oWTrKjxEC11pVtZ4GGwQlttfWr1csGWfK7ge5M BH/RAKL4YBPWw5HPud5rXV8GItId1TQZsGYrW3lsDOytDAzIPypvkvX5+ZcyHgVs HmpjjVj1zWfVLq0xKwkDYsf+W5k3wedmbCGbZWIfE2U1iBr3mSvJWpqSYw5VhgJ4 xOQTNPE2I+3GuQENBFUbhEMBCACfnBVTyoHtRe/D3ie7plkxBmzMfHlKbw4E7JPR 7/KIXARYSfUPdxgtekGZSTJ+I+CLqaGQncpcGGoTPe7gV/EH1j3VJNKh9z3pdXYP TgWM+BhLCdoE58eBDnoSIoNkZDbwxTt+bCHXz2Nl4nCXDZWW23WE3gbr+sNPL3e2 /A4lGeCJYgS1ZMxRn74HkXNV6BnR/pgHnuZkN+Psz0XAqACPHIlYmWjI9WA5hTFA hT7pvsYbGZKTFu1nGqdL2S7vT5cRt6s61nolJ9zm2fjRKZAHBGIh/+ha9KqMqABy DD+vgkWRubcshSXJuhbbKSt8VICKFtkYqRxyJ5YRX4hIh73TABEBAAGJAR8EGAEK AAkFAlUbhEMCGwwACgkQr5fODHb6db8dYwgAjtaNFTRswtRfK6O/M9utcZNgkXrY 9jO5KqrRCIFRNpjqpH9ELVVzqsyCjhYGjV9nQmcKe6t6ngbN/NvZElylJNxzI5S1 X2zJEjiFR30CMH1iV4YDA4uymRXRk5E/MtChv/2jZkoLNNZjIAgWpbfsKBI/iyWW 3plHWaquDB+q10kf9YY0t4L8t50Q11vUsTlaeQW96OzdwCJwopmFzb1DWWv89lJm nqa+WVcyIIcWzb5yk7BaAVEcBAazSQRIVKL1CbF3CT5B+bCxrSZW/J1ujss6NbkO Wkuw67YL468ms6fPlLihzyCcxFE1S5c6k4PKXuixcFF4/tvn+7i40vL9yw== =oNlb -----END PGP PUBLIC KEY BLOCK----- ``` save the following as `.secring.gpg` ```no-highlight -----BEGIN PGP PRIVATE KEY BLOCK----- lQOYBFUbhEMBCADHqlGZuIDSyw7ZXngMJYltREr8llsfdSR8kmEaoCp2ts3rqzZ2 hRX6xLrRnV0gB8+H1y+1Ly5IqR5guAG2Gs5j4ds6R4xtwHN9OnXXqTfqlXroUg55 /1RjEIxaso5GPY6+DO7GVYMY1hXgiLhlkvpdUAcZeZNS/HR/ytw7dDPaM51DTREm XZ1+IHaNgIFtHtbHx44TZ4a0CvFSefRJXV6/o7ik9GLE6CyBsb80vXN1KiRLL5kl ItPWqlF1mH2SvKAxfn0xQuGWenoiILq7Nj79XVcrKOVdrQ7m/oXiW/Rp8pzMcFNo a2KuQkHI3+PPQnCR0qPXNSPQM0bF8hXLHMQpABEBAAEAB/0UKGlZnCuBXJfQsT1s eIOx4OGzM5jaibCX1Q1xqzbuSlFq2BvFBnWsHh2AWSNUPwWgQMTjxXImStCy0hD2 KimpIt3Huf5+/B2MyJCqJ77p85J3jwVAItuJrtuEsp8zjzZwkIywwGReZwrJYvQ+ 6QJW1mQJGeGaULuQRVJLvFUZ08tUg73RIdHaiLauBu+jjcWL0HrpA7sK+EiMcSgJ PqgD2myHy7e3+7Cp+gGn5dvA4l6eVLvujg55b79kcae/N7lV1I/+nvNCkx7bWubg OlTu4I8MzH7KEI0CF3hHD0Oo8qGQH4P0fxAhCyHxrq342JEdx4HD2iJVwFdP4ZzG yFwBBADN516627Ijgz5NJFBTDtZMDTaJbXwzWJGBDz2sisVMjC2XUyBnxa0i45/N vzGhqa+IgBg0HJtuohyUq6dukzpcWv8h/N+3VzXRSYY3XUxWlQzat+TFKfLxlCAW yS2syJywjLE3r0OCR7M7XgDNp8hOoynzbZlzA/jUC8WyJUZRKQQA+D5jNdC6uKpT a/0yXFpl+2TiR70g5CuoqQ1yZAMgwcMCCrcrf9Dh1FVS+letEZZQAm7lZUEYhlM/ GrRF0tGkQMxsIi+mW1hiJRWXFH4J5jGp2J47G3q7QMxIVjMQRC2yJI3cZPwIYIql vLzBp+wQuE+1/0VDANW4XbWXZyJSOwEEAPMPb9S7s94RRvDUXWAWhDi3U9Ak4A3Z ovdFZNMR6hQ5fS0LObwGWbGpu9d11yoOOpM7VK6+0y7BfZLDaDKdTEVArCZ1SoRY 6gbwUTSAm/JYFSFMHgFcSMrHH35cEL08SFGRJzpSt72M0IsQfj29IhXfBMOUe0rD eXZEIafzrIYbOLC0LWFwcCAoYXBwIGNvbmZpZ3VyYXRpb24ga2V5KSA8YXBwQGV4 YW1wbGUuY29tPokBNwQTAQoAIQUCVRuEQwIbAwULCQgHAwUVCgkICwUWAgMBAAIe AQIXgAAKCRCvl84Mdvp1vzfqB/9YNCDixrE5AfJTsK9qzhyENHpssd0z0zKNTKCK SU/Qe86tTE6OixFHJPquSJNvz74pY/6skC5C1fAMBMSzTiie4jsKS5jj0OpXbMTC gRChN+p0zHXOmVkP80mE3+YifCruhhMriJO5obhk81e6QiwKqiiijwpDKH/hT2oW TrKjxEC11pVtZ4GGwQlttfWr1csGWfK7ge5MBH/RAKL4YBPWw5HPud5rXV8GItId 1TQZsGYrW3lsDOytDAzIPypvkvX5+ZcyHgVsHmpjjVj1zWfVLq0xKwkDYsf+W5k3 wedmbCGbZWIfE2U1iBr3mSvJWpqSYw5VhgJ4xOQTNPE2I+3GnQOYBFUbhEMBCACf nBVTyoHtRe/D3ie7plkxBmzMfHlKbw4E7JPR7/KIXARYSfUPdxgtekGZSTJ+I+CL qaGQncpcGGoTPe7gV/EH1j3VJNKh9z3pdXYPTgWM+BhLCdoE58eBDnoSIoNkZDbw xTt+bCHXz2Nl4nCXDZWW23WE3gbr+sNPL3e2/A4lGeCJYgS1ZMxRn74HkXNV6BnR /pgHnuZkN+Psz0XAqACPHIlYmWjI9WA5hTFAhT7pvsYbGZKTFu1nGqdL2S7vT5cR t6s61nolJ9zm2fjRKZAHBGIh/+ha9KqMqAByDD+vgkWRubcshSXJuhbbKSt8VICK FtkYqRxyJ5YRX4hIh73TABEBAAEAB/4g9azrzDZPZrFQC8i9tejWOGLwSUYMymkl OCuAX2IAqavWBZO/GVNbVNNGEbkFFmiQvrtX71Wx9fK1vYTePBrQiPvkz4FVpAZb dv+lwnFf/n2ZxVOJzslCi9hGdW0XpqA30SrrfO3yMGfwyrWAY/Q/nlsi0Gyyf2qk qAM7PMq4+08CwuOwHOorS+ibLARX778ug5JKqiJhAt5s+sXQFId7cnozU24MDrOc JvBgsCaPO1NbPYE+whIsWTigmc4YCAiIlKjPghxAS8kFOaO2FnGAzeS0S8o02R+f /JNL24+z7kpY7JxUe9c1+n5DD88fRllBCmWr0HtSFFMgsQ0ZZ6E9BADFpse6Jm/i q6qb9WJKHJAg+w3klBHwB+P18oGtinzCvnaSSayJRjUDmmJMURvR1FUZHNsxhm4D 3yGlr3XAAES6ijaajRRzl2q7yG63quN72FGH/sBE57KatXtI30hds62HJlZks16I QxaFpaqRSYIPf5yQFseLn7YboXqSR2QgzQQAzrpZ7jECITDxCiQHdyitSl9IOqYw sti73WkBYFr5GApJQ6mW9XthAMI762vGUWlm8NMi/S1lwI+A1VAcXyHsk16TYL9B uQcyqHjkKrrPE5AePPrTPXsVQoFIXfDk3JfBhRclcWsG3HGtFj6LZUKsmXncoCZD YL7tu9RYM4oC2R8D/Rai2XkEnmJkxbdogm4k8ZHYWbxPemZtaa/nBdlB9WEmFKDv 86rkS+JHJouc+h7fIT4WaL/e2589w7RimdUw+5b4zA5mvFdqT2zYWBEKbmZwoGOM pYGIYa2v01mCgO/fy55lrZFQdVGP0nz5ob1R3Eaoh5rTClxiWe6KYjgr1UmgP9uJ AR8EGAEKAAkFAlUbhEMCGwwACgkQr5fODHb6db8dYwgAjtaNFTRswtRfK6O/M9ut cZNgkXrY9jO5KqrRCIFRNpjqpH9ELVVzqsyCjhYGjV9nQmcKe6t6ngbN/NvZElyl JNxzI5S1X2zJEjiFR30CMH1iV4YDA4uymRXRk5E/MtChv/2jZkoLNNZjIAgWpbfs KBI/iyWW3plHWaquDB+q10kf9YY0t4L8t50Q11vUsTlaeQW96OzdwCJwopmFzb1D WWv89lJmnqa+WVcyIIcWzb5yk7BaAVEcBAazSQRIVKL1CbF3CT5B+bCxrSZW/J1u jss6NbkOWkuw67YL468ms6fPlLihzyCcxFE1S5c6k4PKXuixcFF4/tvn+7i40vL9 yw== =DPU+ -----END PGP PRIVATE KEY BLOCK----- ``` ### Generating your own key pair ```shell $ cat << EOF > app.batch %echo Generating a configuration OpenPGP key Key-Type: default Subkey-Type: default Name-Real: app Name-Comment: app configuration key Name-Email: app@example.com Expire-Date: 0 %pubring .pubring.gpg %secring .secring.gpg %commit %echo done EOF $ gpg2 --batch --armor --gen-key app.batch ``` ## Encrypting and storing your data There are many ways of doing this as long as the input data follows the following format, `base64(gpg(gzip(data)))`. Below are two ways to get you going quickly, the first using plain old [gpg](https://gnupg.org/) and second using the [crypt cli utility](https://github.com/xordataexchange/crypt/tree/master/bin/crypt) (which is not the same as [`man 3 crypt`](http://linux.die.net/man/3/crypt)). ### Storing data using gpg(2) ```shell $ mkdir -p ~/tmp/gpg # so we don't interfere with any current pgp keys $ chmod 700 ~/tmp/gpg $ gpg2 --homedir ~/tmp/gpg --import .pubring.gpg $ export TEST_RECIPIENT=76FA75BF # if you used my key from above $ export TEST_RECIPIENT="$(gpg2 --homedir ~/tmp/gpg --list-keys\ | grep 'pub '\ | cut -f2 -d/\ | cut -f1 -d' ')" # if you generated your own keypair $ curl\ --location\ --request PUT\ --data-urlencode value="$(echo 'secret text'\ | gzip -c\ | gpg2 --homedir ~/tmp/gpg\ --compress-level 0\ --encrypt\ --default-recipient ${TEST_RECIPIENT}\ | base64)"\ http://127.0.0.1:4001/v2/keys/secret/test1 # - or if you have etcdctl - $ echo 'secret text'\ | gzip -c\ | gpg2 --homedir ~/tmp/gpg\ --compress-level 0\ --encrypt\ --default-recipient ${TEST_RECIPIENT}\ | base64\ | etcdctl set /secret/test1 ``` ### Storing data using [`crypt`](https://github.com/xordataexchange/crypt) ```shell $ go get github.com/xordataexchange/crypt/bin/crypt $ crypt set /secret/test1 /path/to/secret-file.txt # - or - $ crypt set /secret/test1 <(echo "secret text") ``` ## Verify your encrypted data You should see your base64 encrypted data here ```shell $ curl http://127.0.0.1:4001/v2/keys/secret/test1 # - or - $ etcdctl get /secret/test1 ``` Get [`crypt`](https://github.com/xordataexchange/crypt) if you haven't done so already. ```shell $ go get github.com/xordataexchange/crypt/bin/crypt ``` The following will print your decrypted text to stdout. ```shell $ crypt get /secret/test1 ``` ## Putting it all together, using with confd Now that we've verified we can put encrypted data in your datastore, lets have confd extract it into a template. ``` $ mkdir ~/tmp/confd-config/{conf.d,templates} $ cat << EOF > ~/tmp/confd-config/conf.d/secret.toml [template] prefix = "/secret" src = "secret.tmpl" dest = "/tmp/secret.txt" keys = [ "/test1" ] EOF $ cat << EOF > ~/tmp/confd-config/templates/secret.tmpl your secret value is: {{ cgetv "/test1" }} and again with the key here: {{with cget "/test1"}} key: {{.Key}} value: {{.Value}} {{end}} and here again in a loop: {{range cgets "/*"}} key: {{.Key}} value: {{.Value}} {{end}} and again in another loop: {{range cgetvs "/*"}} value: {{.}} {{end}} EOF $ confd -node=http://127.0.0.1:4001 -secret-keyring=/path/to/.secring.gpg -confdir ~/tmp/confd-config -interval 2 ``` Now take a look at `/tmp/secret.txt`. ================================================ FILE: docs/dns-srv-records.md ================================================ # DNS SRV Records SRV records can be used to declare the backend nodes; just use the `-srv-domain` flag. ## Examples ### etcd ``` dig SRV _etcd._tcp.confd.io ``` ``` ... ;; ANSWER SECTION: _etcd._tcp.confd.io. 300 IN SRV 1 100 4001 etcd.confd.io. ``` - ``` confd -backend etcd -srv-domain confd.io ``` ### consul ``` dig SRV _consul._tcp.confd.io ``` ``` ... ;; ANSWER SECTION: _consul._tcp.confd.io. 300 IN SRV 1 100 8500 consul.confd.io. ``` - ``` confd -backend consul -srv-domain confd.io ``` ## The backend scheme By default the `scheme` is set to http; change it with the `-scheme` flag. ``` confd -scheme https -srv-domain confd.io ``` Both the SRV domain and scheme can be configured in the confd configuration file. See the [Configuration Guide](configuration-guide.md) for more details. ================================================ FILE: docs/installation.md ================================================ # Installation ### Binary Download Currently confd ships binaries for OS X and Linux 64bit systems. You can download the latest release from [GitHub](https://github.com/kelseyhightower/confd/releases) #### OS X ``` $ wget https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-darwin-amd64 ``` #### Linux Download the binary ``` $ wget https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-amd64 ``` Move the binary to an installation path, make it executable, and add to path ``` mkdir -p /opt/confd/bin mv confd-0.16.0-linux-amd64 /opt/confd/bin/confd chmod +x /opt/confd/bin/confd export PATH="$PATH:/opt/confd/bin" ``` #### Building from Source ``` $ make build $ make install ``` #### Building from Source for Alpine Linux Since many people are using Alpine Linux as their base images for Docker there's support to build Alpine package also. Naturally by using Docker itself. :) ``` $ docker build -t confd_builder -f Dockerfile.build.alpine . $ docker run -ti --rm -v $(pwd):/app confd_builder make build ``` The above docker commands will produce binary in the local bin directory. #### Build for your Image using Multi-Stage build With multi-stage builds you can keep the whole process contained in your Dockerfile using: ``` FROM golang:1.9-alpine as confd ARG CONFD_VERSION=0.16.0 ADD https://github.com/kelseyhightower/confd/archive/v${CONFD_VERSION}.tar.gz /tmp/ RUN apk add --no-cache \ bzip2 \ make && \ mkdir -p /go/src/github.com/kelseyhightower/confd && \ cd /go/src/github.com/kelseyhightower/confd && \ tar --strip-components=1 -zxf /tmp/v${CONFD_VERSION}.tar.gz && \ go install github.com/kelseyhightower/confd && \ rm -rf /tmp/v${CONFD_VERSION}.tar.gz FROM tomcat:8.5.15-jre8-alpine COPY --from=confd /go/bin/confd /usr/local/bin/confd # Then do other useful things... ``` ### Next Steps Get up and running with the [Quick Start Guide](quick-start-guide.md). ================================================ FILE: docs/logging.md ================================================ # Logging confd logs everything to stdout. You can control the types of messages that get printed by using the `-log-level` flag and corresponding configuration file settings. See the [Configuration Guide](configuration-guide.md) for more details. Example log messages: ```Bash 2013-11-03T19:04:53-08:00 confd[21356]: INFO SRV domain set to confd.io 2013-11-03T19:04:53-08:00 confd[21356]: INFO Starting confd 2013-11-03T19:04:53-08:00 confd[21356]: INFO etcd nodes set to http://etcd0.confd.io:4001, http://etcd1.confd.io:4001 2013-11-03T19:04:54-08:00 confd[21356]: INFO /tmp/myconf2.conf has md5sum ae5c061f41de8895b6ef70803de9a455 should be 50d4ce679e1cf13e10cd9de90d258996 2013-11-03T19:04:54-08:00 confd[21356]: INFO Target config /tmp/myconf2.conf out of sync 2013-11-03T19:04:54-08:00 confd[21356]: INFO Target config /tmp/myconf2.conf has been updated ``` ================================================ FILE: docs/noop-mode.md ================================================ # Noop Mode When in noop mode target configuration files will not be modified. ## Usage ### commandline flag ``` confd -noop ``` ### configuration file ``` noop = true ``` ### Example ``` confd -onetime -noop ``` - ``` 2014-07-08T22:30:10-07:00 confd[16397]: INFO /tmp/myconfig.conf has md5sum c1924fc5c5f2698e2019080b7c043b7a should be 8e76340b541b8ee29023c001a5e4da18 2014-07-08T22:30:10-07:00 confd[16397]: WARNING Noop mode enabled /tmp/myconfig.conf will not be modified ``` ================================================ FILE: docs/quick-start-guide.md ================================================ # Quick Start Guide Before we begin be sure to [download and install confd](installation.md). ## Select a backend confd supports the following backends: * etcd * consul * vault * environment variables * file * redis * zookeeper * dynamodb * rancher * ssm (AWS Simple Systems Manager Parameter Store) ### Add keys This guide assumes you have a working [etcd](https://github.com/coreos/etcd#getting-started), or [consul](http://www.consul.io/intro/getting-started/install.html) server up and running and the ability to add new keys. #### etcd ``` etcdctl set /myapp/database/url db.example.com etcdctl set /myapp/database/user rob ``` #### consul ``` curl -X PUT -d 'db.example.com' http://localhost:8500/v1/kv/myapp/database/url curl -X PUT -d 'rob' http://localhost:8500/v1/kv/myapp/database/user ``` #### vault ``` vault mount -path myapp generic vault write myapp/database url=db.example.com user=rob ``` #### environment variables ``` export MYAPP_DATABASE_URL=db.example.com export MYAPP_DATABASE_USER=rob ``` #### file myapp.yaml ``` myapp: database: url: db.example.com user: rob ``` #### redis ``` redis-cli set /myapp/database/url db.example.com redis-cli set /myapp/database/user rob ``` #### zookeeper ``` [zk: localhost:2181(CONNECTED) 1] create /myapp "" [zk: localhost:2181(CONNECTED) 2] create /myapp/database "" [zk: localhost:2181(CONNECTED) 3] create /myapp/database/url "db.example.com" [zk: localhost:2181(CONNECTED) 4] create /myapp/database/user "rob" ``` #### dynamodb First create a table with the following schema: ``` aws dynamodb create-table \ --region --table-name \ --attribute-definitions AttributeName=key,AttributeType=S \ --key-schema AttributeName=key,KeyType=HASH \ --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 ``` Now create the items. The attribute value `value` must be of type [string](http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html): ``` aws dynamodb put-item --table-name --region \ --item '{ "key": { "S": "/myapp/database/url" }, "value": {"S": "db.example.com"}}' aws dynamodb put-item --table-name --region \ --item '{ "key": { "S": "/myapp/database/user" }, "value": {"S": "rob"}}' ``` #### Rancher This backend consumes the [Rancher](https://www.rancher.com) metadata service. For available keys, see the [Rancher Metadata Service docs](http://docs.rancher.com/rancher/rancher-services/metadata-service/). #### ssm ``` aws ssm put-parameter --name "/myapp/database/url" --type "String" --value "db.example.com" aws ssm put-parameter --name "/myapp/database/user" --type "SecureString" --value "rob" ``` ### Create the confdir The confdir is where template resource configs and source templates are stored. ``` sudo mkdir -p /etc/confd/{conf.d,templates} ``` ### Create a template resource config Template resources are defined in [TOML](https://github.com/mojombo/toml) config files under the `confdir`. /etc/confd/conf.d/myconfig.toml ``` [template] src = "myconfig.conf.tmpl" dest = "/tmp/myconfig.conf" keys = [ "/myapp/database/url", "/myapp/database/user", ] ``` ### Create the source template Source templates are [Golang text templates](http://golang.org/pkg/text/template/#pkg-overview). /etc/confd/templates/myconfig.conf.tmpl ``` [myconfig] database_url = {{getv "/myapp/database/url"}} database_user = {{getv "/myapp/database/user"}} ``` ### Process the template confd supports two modes of operation daemon and onetime. In daemon mode confd polls a backend for changes and updates destination configuration files if necessary. #### etcd ``` confd -onetime -backend etcd -node http://127.0.0.1:2379 ``` #### consul ``` confd -onetime -backend consul -node 127.0.0.1:8500 ``` #### vault ``` ROOT_TOKEN=$(vault read -field id auth/token/lookup-self) confd -onetime -backend vault -node http://127.0.0.1:8200 \ -auth-type token -auth-token $ROOT_TOKEN ``` #### dynamodb ``` confd -onetime -backend dynamodb -table ``` #### env ``` confd -onetime -backend env ``` #### file ``` confd -onetime -backend file -file myapp.yaml ``` #### redis ``` confd -onetime -backend redis -node 192.168.255.210:6379 ``` or if you want to connect to a specific redis database (4 in this example): ``` confd -onetime -backend redis -node 192.168.255.210:6379/4 ``` #### rancher ``` confd -onetime -backend rancher -prefix /2015-07-25 ``` *Note*: The metadata api prefix can be defined on the cli, or as part of your keys in the template toml file. Output: ``` 2014-07-08T20:38:36-07:00 confd[16252]: INFO Target config /tmp/myconfig.conf out of sync 2014-07-08T20:38:36-07:00 confd[16252]: INFO Target config /tmp/myconfig.conf has been updated ``` The `dest` configuration file should now be in sync. ``` cat /tmp/myconfig.conf ``` Output: ``` # This a comment [myconfig] database_url = db.example.com database_user = rob ``` #### ssm ``` confd -onetime -backend ssm ``` ## Advanced Example In this example we will use confd to manage two nginx config files using a single template. ### Add keys #### etcd ``` etcdctl set /myapp/subdomain myapp etcdctl set /myapp/upstream/app2 "10.0.1.100:80" etcdctl set /myapp/upstream/app1 "10.0.1.101:80" etcdctl set /yourapp/subdomain yourapp etcdctl set /yourapp/upstream/app2 "10.0.1.102:80" etcdctl set /yourapp/upstream/app1 "10.0.1.103:80" ``` #### consul ``` curl -X PUT -d 'myapp' http://localhost:8500/v1/kv/myapp/subdomain curl -X PUT -d '10.0.1.100:80' http://localhost:8500/v1/kv/myapp/upstream/app1 curl -X PUT -d '10.0.1.101:80' http://localhost:8500/v1/kv/myapp/upstream/app2 curl -X PUT -d 'yourapp' http://localhost:8500/v1/kv/yourapp/subdomain curl -X PUT -d '10.0.1.102:80' http://localhost:8500/v1/kv/yourapp/upstream/app1 curl -X PUT -d '10.0.1.103:80' http://localhost:8500/v1/kv/yourapp/upstream/app2 ``` ### Create template resources /etc/confd/conf.d/myapp-nginx.toml ``` [template] prefix = "/myapp" src = "nginx.tmpl" dest = "/tmp/myapp.conf" owner = "nginx" mode = "0644" keys = [ "/subdomain", "/upstream", ] check_cmd = "/usr/sbin/nginx -t -c {{.src}}" reload_cmd = "/usr/sbin/service nginx reload" ``` /etc/confd/conf.d/yourapp-nginx.toml ``` [template] prefix = "/yourapp" src = "nginx.tmpl" dest = "/tmp/yourapp.conf" owner = "nginx" mode = "0644" keys = [ "/subdomain", "/upstream", ] check_cmd = "/usr/sbin/nginx -t -c {{.src}}" reload_cmd = "/usr/sbin/service nginx reload" ``` ### Create the source template /etc/confd/templates/nginx.tmpl ``` upstream {{getv "/subdomain"}} { {{range getvs "/upstream/*"}} server {{.}}; {{end}} } server { server_name {{getv "/subdomain"}}.example.com; location / { proxy_pass http://{{getv "/subdomain"}}; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ``` ================================================ FILE: docs/release-checklist.md ================================================ # Release Checklist In order to cut a new release, a few things must be done: 1. auto-generate the CHANGELOG using the provided script 2. bump version.go and docs/installation.md to the new release 3. push a tag for the new release 4. draft a [new release](https://github.com/kelseyhightower/confd/releases/new) 5. bump version.go to the next release, appending `-dev` For the former, you can use the following script: $ echo -e "$(./contrib/generate-changelog.sh v$LATEST_RELEASE)\n" | cat - CHANGELOG | sponge CHANGELOG You can find `sponge` in the `moreutils` package on Ubuntu. This script will generate all merged changes since $LATEST_RELEASE and append it to the top of the CHANGELOG. However, this will show up as "HEAD" at the top: $ ./contrib/generate-changelog.sh v$LATEST_RELEASE ### HEAD abc123 Some merged PR summary ... You'll need to manually modify "HEAD" to show up as the latest release. When drafting a new release, you must make sure that a `darwin`, `linux` and `windows` build of confd have been uploaded. You must have Docker installed to build release binaries: $ make release You can then drag and drop these binaries into the release draft. ================================================ FILE: docs/template-resources.md ================================================ # Template Resources Template resources are written in TOML and define a single template resource. Template resources are stored under the `/etc/confd/conf.d` directory by default. ### Required * `dest` (string) - The target file. * `keys` (array of strings) - An array of keys. * `src` (string) - The relative path of a [configuration template](templates.md). ### Optional * `gid` (int) - The gid that should own the file. Defaults to the effective gid. * `mode` (string) - The permission mode of the file. * `uid` (int) - The uid that should own the file. Defaults to the effective uid. * `reload_cmd` (string) - The command to reload config. * `check_cmd` (string) - The command to check config. Use `{{.src}}` to reference the rendered source template. * `prefix` (string) - The string to prefix to keys. ### Notes When using the `reload_cmd` feature it's important that the command exits on its own. The reload command is not managed by confd, and will block the configuration run until it exits. ## Example ```TOML [template] src = "nginx.conf.tmpl" dest = "/etc/nginx/nginx.conf" uid = 0 gid = 0 mode = "0644" keys = [ "/nginx", ] check_cmd = "/usr/sbin/nginx -t -c {{.src}}" reload_cmd = "/usr/sbin/service nginx restart" ``` ================================================ FILE: docs/templates.md ================================================ # Templates Templates define a single application configuration template. Templates are stored under the `/etc/confd/templates` directory by default. Templates are written in Go's [`text/template`](http://golang.org/pkg/text/template/). ## Template Functions ### map creates a key-value map of string -> interface{} ``` {{$endpoint := map "name" "elasticsearch" "private_port" 9200 "public_port" 443}} name: {{index $endpoint "name"}} private-port: {{index $endpoint "private_port"}} public-port: {{index $endpoint "public_port"}} ``` specifically useful if you use a sub-template and you want to pass multiple values to it. ### base Alias for the [path.Base](https://golang.org/pkg/path/#Base) function. ``` {{with get "/key"}} key: {{base .Key}} value: {{.Value}} {{end}} ``` ### exists Checks if the key exists. Return false if key is not found. ``` {{if exists "/key"}} value: {{getv "/key"}} {{end}} ``` ### get Returns the KVPair where key matches its argument. Returns an error if key is not found. ``` {{with get "/key"}} key: {{.Key}} value: {{.Value}} {{end}} ``` ### cget Returns the KVPair where key matches its argument and the value has been *encrypted*. Returns an error if key is not found. ``` {{with cget "/key"}} key: {{.Key}} value: {{.Value}} {{end}} ``` ### gets Returns all KVPair, []KVPair, where key matches its argument. Returns an error if key is not found. ``` {{range gets "/*"}} key: {{.Key}} value: {{.Value}} {{end}} ``` ### cgets Returns all KVPair, []KVPair, where key matches its argument and the values have been *encrypted*. Returns an error if key is not found. ``` {{range cgets "/*"}} key: {{.Key}} value: {{.Value}} {{end}} ``` ### getv Returns the value as a string where key matches its argument or an optional default value. Returns an error if key is not found and no default value given. ``` value: {{getv "/key"}} ``` #### With a default value ``` value: {{getv "/key" "default_value"}} ``` ### cgetv Returns the *encrypted* value as a string where key matches its argument. Returns an error if key is not found. ``` value: {{cgetv "/key"}} ``` ### getvs Returns all values, []string, where key matches its argument. Returns an error if key is not found. ``` {{range getvs "/*"}} value: {{.}} {{end}} ``` ### cgetvs Returns all *encrypted* values, []string, where key matches its argument. Returns an error if key is not found. ``` {{range cgetvs "/*"}} value: {{.}} {{end}} ``` ### getenv Wrapper for [os.Getenv](https://golang.org/pkg/os/#Getenv). Retrieves the value of the environment variable named by the key. It returns the value, which will be empty if the variable is not present. Optionally, you can give a default value that will be returned if the key is not present. ``` export HOSTNAME=`hostname` ``` ``` hostname: {{getenv "HOSTNAME"}} ``` #### With a default value ``` ipaddr: {{getenv "HOST_IP" "127.0.0.1"}} ``` ### datetime Alias for [time.Now](https://golang.org/pkg/time/#Now) ``` # Generated by confd {{datetime}} ``` Outputs: ``` # Generated by confd 2015-01-23 13:34:56.093250283 -0800 PST ``` ``` # Generated by confd {{datetime.Format "Jan 2, 2006 at 3:04pm (MST)"}} ``` Outputs: ``` # Generated by confd Jan 23, 2015 at 1:34pm (EST) ``` See the time package for more usage: http://golang.org/pkg/time/ ### split Wrapper for [strings.Split](http://golang.org/pkg/strings/#Split). Splits the input string on the separating string and returns a slice of substrings. ``` {{ $url := split (getv "/deis/service") ":" }} host: {{index $url 0}} port: {{index $url 1}} ``` ### toUpper Alias for [strings.ToUpper](http://golang.org/pkg/strings/#ToUpper) Returns uppercased string. ``` key: {{toUpper "value"}} ``` ### toLower Alias for [strings.ToLower](http://golang.org/pkg/strings/#ToLower). Returns lowercased string. ``` key: {{toLower "Value"}} ``` ### json Returns an map[string]interface{} of the json value. ### lookupSRV Wrapper for [net.LookupSRV](https://golang.org/pkg/net/#LookupSRV). The wrapper also sorts the SRV records alphabetically by combining all the fields of the net.SRV struct to reduce unnecessary config reloads. ``` {{range lookupSRV "mail" "tcp" "example.com"}} target: {{.Target}} port: {{.Port}} priority: {{.Priority}} weight: {{.Weight}} {{end}} ``` ### base64Encode Returns a base64 encoded string of the value. ``` key: {{base64Encode "Value"}} ``` ### base64Decode Returns the string representing the decoded base64 value. ``` key: {{base64Decode "VmFsdWU="}} ``` #### Add keys to etcd ``` etcdctl set /services/zookeeper/host1 '{"Id":"host1", "IP":"192.168.10.11"}' etcdctl set /services/zookeeper/host2 '{"Id":"host2", "IP":"192.168.10.12"}' ``` #### Create the template resource ``` [template] src = "services.conf.tmpl" dest = "/tmp/services.conf" keys = [ "/services/zookeeper/" ] ``` #### Create the template ``` {{range gets "/services/zookeeper/*"}} {{$data := json .Value}} id: {{$data.Id}} ip: {{$data.IP}} {{end}} ``` #### Advanced Map Traversals Once you have parsed the JSON, it is possible to traverse it with normal Go template functions such as `index`. A more advanced structure, like this: ``` { "animals": [ {"type": "dog", "name": "Fido"}, {"type": "cat", "name": "Misse"} ] } ``` It can be traversed like this: ``` {{$data := json (getv "/test/data/")}} type: {{ (index $data.animals 1).type }} name: {{ (index $data.animals 1).name }} {{range $data.animals}} {{.name}} {{end}} ``` ### jsonArray Returns a []interface{} from a json array such as `["a", "b", "c"]`. ``` {{range jsonArray (getv "/services/data/")}} val: {{.}} {{end}} ``` ### ls Returns all subkeys, []string, where path matches its argument. Returns an empty list if path is not found. ``` {{range ls "/deis/services"}} value: {{.}} {{end}} ``` ### lsdir Returns all subkeys, []string, where path matches its argument. It only returns subkeys that also have subkeys. Returns an empty list if path is not found. ``` {{range lsdir "/deis/services"}} value: {{.}} {{end}} ``` ### dir Returns the parent directory of a given key. ``` {{with dir "/services/data/url"}} dir: {{.}} {{end}} ``` ### join Alias for the [strings.Join](https://golang.org/pkg/strings/#Join) function. ``` {{$services := getvs "/services/elasticsearch/*"}} services: {{join $services ","}} ``` ### replace Alias for the [strings.Replace](https://golang.org/pkg/strings/#Replace) function. ``` {{$backend := getv "/services/backend/nginx"}} backend = {{replace $backend "-" "_" -1}} ``` ### lookupIP Wrapper for [net.LookupIP](https://golang.org/pkg/net/#LookupIP) function. The wrapper also sorts (alphabeticaly) the IP addresses. This is crucial since in dynamic environments DNS servers typically shuffle the addresses linked to domain name. And that would cause unnecessary config reloads. ``` {{range lookupIP "some.host.local"}} server {{.}}; {{end}} ``` ### atoi Alias for the [strconv.Atoi](https://golang.org/pkg/strconv/#Atoi) function. ``` {{seq 1 (atoi (getv "/count"))}} ``` ## Example Usage ```Bash etcdctl set /nginx/domain 'example.com' etcdctl set /nginx/root '/var/www/example_dotcom' etcdctl set /nginx/worker_processes '2' etcdctl set /app/upstream/app1 "10.0.1.100:80" etcdctl set /app/upstream/app2 "10.0.1.101:80" ``` `/etc/confd/templates/nginx.conf.tmpl` ```Text worker_processes {{getv "/nginx/worker_processes"}}; upstream app { {{range getvs "/app/upstream/*"}} server {{.}}; {{end}} } server { listen 80; server_name www.{{getv "/nginx/domain"}}; access_log /var/log/nginx/{{getv "/nginx/domain"}}.access.log; error_log /var/log/nginx/{{getv "/nginx/domain"}}.log; location / { root {{getv "/nginx/root"}}; index index.html index.htm; proxy_pass http://app; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ``` Output: `/etc/nginx/nginx.conf` ```Text worker_processes 2; upstream app { server 10.0.1.100:80; server 10.0.1.101:80; } server { listen 80; server_name www.example.com; access_log /var/log/nginx/example.com.access.log; error_log /var/log/nginx/example.com.error.log; location / { root /var/www/example_dotcom; index index.html index.htm; proxy_pass http://app; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ``` ### Complex example This examples show how to use a combination of the templates functions to do nested iteration. #### Add keys to etcd ``` etcdctl mkdir /services/web/cust1/ etcdctl mkdir /services/web/cust2/ etcdctl set /services/web/cust1/2 '{"IP": "10.0.0.2"}' etcdctl set /services/web/cust2/2 '{"IP": "10.0.0.4"}' etcdctl set /services/web/cust2/1 '{"IP": "10.0.0.3"}' etcdctl set /services/web/cust1/1 '{"IP": "10.0.0.1"}' ``` #### Create the template resource ``` [template] src = "services.conf.tmpl" dest = "/tmp/services.conf" keys = [ "/services/web" ] ``` #### Create the template ``` {{range $dir := lsdir "/services/web"}} upstream {{base $dir}} { {{$custdir := printf "/services/web/%s/*" $dir}}{{range gets $custdir}} server {{$data := json .Value}}{{$data.IP}}:80; {{end}} } server { server_name {{base $dir}}.example.com; location / { proxy_pass {{base $dir}}; } } {{end}} ``` Output:`/tmp/services.conf` ```Text upstream cust1 { server 10.0.0.1:80; server 10.0.0.2:80; } server { server_name cust1.example.com; location / { proxy_pass cust1; } } upstream cust2 { server 10.0.0.3:80; server 10.0.0.4:80; } server { server_name cust2.example.com; location / { proxy_pass cust2; } } ``` Go's [`text/template`](http://golang.org/pkg/text/template/) package is very powerful. For more details on it's capabilities see its [documentation.](http://golang.org/pkg/text/template/) ================================================ FILE: docs/tomcat-sample.md ================================================ # confd for Apache Tomcat If you administrate an [Apache Tomcat](http://tomcat.apache.org/) you usually need to edit multiple config files and set some environment variables. [confd](https://github.com/kelseyhightower/confd) can help here especially if you have multiple Tomcats in a cluster. Configuring Tomcat is an interesting sample, because it needs multiple config files and some environment variables. Important configuration files of Tomcat are - server.xml: e.g. configure here jvmRoute for load balancing, ports etc. - tomcat-users.xml: configure access rights for manager webapp A frequently used environment variable is CATALINA_OPTS: Here you can define memory settings ## server.xml In this case we simply want to use the hostname for jvmRoute. Because it is not possible to execute a Unix command within a toml template, we use an environment variable "HOSTNAME" instead. Copy the file conf/server.xml from your Tomcat installation to /etc/confd/templates/server.xml.tmpl and edit "Engine tag" and add jvmRoute ``` ``` Create /etc/confd/conf.d/server.xml.toml ``` [template] src = "server.xml.tmpl" dest = "/usr/local/tomcat/conf/server.xml" check_cmd = "/usr/local/tomcat/bin/catalina.sh configtest" reload_cmd = "/usr/local/tomcat/bin/catalina.sh stop -force && /usr/local/tomcat/bin/catalina.sh start" ``` ## tomcat-users.xml We want to get the Tomcat-manager's credentials from a central configuration repository. Copy the file conf/tomcat-users.xml from your Tomcat installation to /etc/confd/templates/tomcat-users.xml.tmpl Add the following lines: ``` ``` Create a /etc/confd/conf.d/tomcat-users.xml.toml ``` [template] prefix = "tomcat" keys = [ "user", "password" ] src = "tomcat-users.xml.tmpl" dest = "/usr/local/tomcat/conf/tomcat-users.xml" reload_cmd = "/usr/local/tomcat/bin/catalina.sh stop -force && /usr/local/tomcat/bin/catalina.sh start" ``` ## catalina.sh File catalina.sh is the startscript for Tomcat. If confd should set memory settings like Xmx or Xms, we could either create a catalina.sh.tmpl and proceed like above or we can try to use environment variables and leave catalina.sh untouched. Leaving catalina.sh untouched is preferred here. Because it is not possible to use environment variables within toml files, we need to write a minimal shell script that passes CATALINA_OPTS variable. Create the file /etc/confd/conf.d/catalina_start.sh.tmpl ``` #!/bin/sh CATALINA_OPTS="-Xms{{getv "/Xms"}} -Xmx{{getv "/Xmx"}}" /usr/local/tomcat/bin/catalina.sh start ``` Create the file /etc/confd/conf.d/catalina_start.sh.toml ``` [template] prefix = "tomcat" keys = [ "Xmx", "Xms" ] src = "catalina_start.sh.tmpl" dest = "/usr/local/tomcat/bin/catalina_start.sh" mode = "0775" reload_cmd = "/usr/local/tomcat/bin/catalina.sh stop -force && /usr/local/tomcat/bin/catalina_start.sh start" ``` Finally we need to replace in all above templates ```catalina.sh start``` by ```catalina_start.sh start``` ## test it Follow conf documentation and test it calling ```confd -onetime``` or you try the complete sample in a Docker and/or Vagrant environment [here](https://github.com/muenchhausen/tomcat-confd) ================================================ FILE: docs/vault-kubernetes-auth.md ================================================ These are steps to get vault with Kubernetes auth working on minikube. *Do not use default service account in prod instead create dedicated acount for Vault auth.* - Deploy Helm ``` # Install Helm Use the correct method for your OS from https://docs.helm.sh/using_helm/#installing-the-helm-client # Deploy tiller into the cluster helm init - Install Vault in dev mode ``` # Add Vault chart helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator # Install Vault # We need at least Vault 0.8.3 helm install incubator/vault --name vault --set vault.dev=true --set image.tag="0.9.5" ``` - Enable Kubernetes backend ``` # Get Vault pod name export POD_NAME=$(kubectl get pods --namespace default -l "app=vault" -o jsonpath="{.items[0].metadata.name}") # Get inside pod kubectl exec -i -t ${POD_NAME} sh # Set env vars for Vault client export VAULT_TOKEN=$(cat /root/.vault-token) # Set Vault host URL (do this everytime you exec back into container) export VAULT_ADDR=http://127.0.0.1:8200 # Enable Kube auth backend vault auth enable kubernetes # Configure Kube auth backend vault write auth/kubernetes/config \ kubernetes_host=https://kubernetes \ kubernetes_ca_cert=@/var/run/secrets/kubernetes.io/serviceaccount/ca.crt # Create Vault policy for testing vault policy write test -< /etc/confd/conf.d/test.toml # And template echo '{{getv "/secret/foo"}}' > /etc/confd/templates/test.conf.tmpl # and finally run confd confd -onetime -backend vault -auth-type kubernetes -role confd -node http://vault-vault:8200 -log-level debug ``` - Check `/tmp/test.conf`, it should contain your secret ``` cat /tmp/test.conf ``` ================================================ FILE: go.mod ================================================ module github.com/kelseyhightower/confd go 1.19 require ( github.com/BurntSushi/toml v1.3.2 github.com/aws/aws-sdk-go v1.48.16 github.com/fsnotify/fsnotify v1.7.0 github.com/garyburd/redigo v1.6.4 github.com/hashicorp/consul/api v1.26.1 github.com/hashicorp/vault/api v1.10.0 github.com/kelseyhightower/memkv v0.1.1 github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414 github.com/sirupsen/logrus v1.9.3 go.etcd.io/etcd/client/v3 v3.5.11 gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/armon/go-metrics v0.4.1 // indirect github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/fatih/color v1.16.0 // indirect github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/go-test/deep v1.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.6.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8 // indirect github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.6 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.1-vault-5 // indirect github.com/hashicorp/serf v0.10.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/ryanuber/go-glob v1.0.0 // indirect go.etcd.io/etcd/api/v3 v3.5.11 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.11 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/genproto v0.0.0-20231127180814-3a041ad873d4 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect ) ================================================ FILE: go.sum ================================================ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.48.16 h1:mcj2/9J/MJ55Dov+ocMevhR8Jv6jW/fAxbrn4a1JFc8= github.com/aws/aws-sdk-go v1.48.16/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/garyburd/redigo v1.6.4 h1:LFu2R3+ZOPgSMWMOL+saa/zXRjw0ID2G8FepO53BGlg= github.com/garyburd/redigo v1.6.4/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw= github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/hashicorp/consul/api v1.26.1 h1:5oSXOO5fboPZeW5SN+TdGFP/BILDgBm19OrPZ/pICIM= github.com/hashicorp/consul/api v1.26.1/go.mod h1:B4sQTeaSO16NtynqrAdwOlahJ7IUDZM9cj2420xYL8A= github.com/hashicorp/consul/sdk v0.15.0 h1:2qK9nDrr4tiJKRoxPGhm6B7xJjLVIQqkjiab2M4aKjU= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.6.1 h1:pa92nu9bPoAqI7p+uPDCIWGAibUdlCi6TYWJEQQkLf8= github.com/hashicorp/go-hclog v1.6.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8 h1:iBt4Ew4XEGLfh6/bPk4rSYmuZJGizr6/x/AEizP0CQc= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8/go.mod h1:aiJI+PIApBRQG7FZTEBx5GiiX+HbOHilUdNxUZi4eV0= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.6 h1:RSG8rKU28VTUTvEKghe5gIhIQpv8evvNpnDEyqO4u9I= github.com/hashicorp/go-sockaddr v1.0.6/go.mod h1:uoUUmtwU7n9Dv3O4SNLeFvg0SxQ3lyjsj6+CCykpaxI= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM= github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hashicorp/vault/api v1.10.0 h1:/US7sIjWN6Imp4o/Rj1Ce2Nr5bki/AXi9vAW3p2tOJQ= github.com/hashicorp/vault/api v1.10.0/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kelseyhightower/memkv v0.1.1 h1:O7n2MB8cdrwb4UmyyXS2tVETc2DR7KlJRihRgNh4zqc= github.com/kelseyhightower/memkv v0.1.1/go.mod h1:uIeINg0Dy2aioPWSdga9VnueJjfSvul2dW7o758NxO4= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414 h1:AJNDS0kP60X8wwWFvbLPwDuojxubj9pbfK7pjHw0vKg= github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/etcd/api/v3 v3.5.11 h1:B54KwXbWDHyD3XYAwprxNzTe7vlhR69LuBgZnMVvS7E= go.etcd.io/etcd/api/v3 v3.5.11/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= go.etcd.io/etcd/client/pkg/v3 v3.5.11 h1:bT2xVspdiCj2910T0V+/KHcVKjkUrCZVtk8J2JF2z1A= go.etcd.io/etcd/client/pkg/v3 v3.5.11/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4= go.etcd.io/etcd/client/v3 v3.5.11 h1:ajWtgoNSZJ1gmS8k+icvPtqsqEav+iUorF7b0qozgUU= go.etcd.io/etcd/client/v3 v3.5.11/go.mod h1:a6xQUEqFJ8vztO1agJh/KQKOMfFI8og52ZconzcDJwE= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20231127180814-3a041ad873d4 h1:W12Pwm4urIbRdGhMEg2NM9O3TWKjNcxQhs46V0ypf/k= google.golang.org/genproto v0.0.0-20231127180814-3a041ad873d4/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4 h1:ZcOkrmX74HbKFYnpPY8Qsw93fC29TbJXspYKaBkSXDQ= google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4/go.mod h1:k2dtGpRrbsSyKcNPKKI5sstZkrNCZwpU/ns96JoHbGg= google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= ================================================ FILE: integration/confdir/conf.d/basic.toml ================================================ [template] mode = "0644" src = "basic.conf.tmpl" dest = "/tmp/confd-basic-test.conf" keys = [ "/database/host", "/database/password", "/database/port", "/database/username", ] ================================================ FILE: integration/confdir/conf.d/exists.toml ================================================ [template] mode = "0644" src = "exists-test.conf.tmpl" dest = "/tmp/confd-exists-test.conf" keys = [ "/key", ] ================================================ FILE: integration/confdir/conf.d/iteration.toml ================================================ [template] mode = "0644" src = "iteration.conf.tmpl" dest = "/tmp/confd-iteration-test.conf" keys = [ "/upstream", ] ================================================ FILE: integration/confdir/conf.d/manykeys.toml ================================================ [template] mode = "0644" src = "basic.conf.tmpl" dest = "/tmp/confd-manykeys-test.conf" keys = [ "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username", "/database/host", "/database/password", "/database/port", "/database/username" ] ================================================ FILE: integration/confdir/conf.d/nested.toml ================================================ [template] mode = "0644" src = "nested.conf.tmpl" dest = "/tmp/confd-nested-test.conf" keys = [ "/nested", ] ================================================ FILE: integration/confdir/templates/basic.conf.tmpl ================================================ hostname: {{ getenv "HOSTNAME" }} [database] host={{ getv "/database/host" }} password={{ getv "/database/password" }} port={{ getv "/database/port" }} username={{ getv "/database/username" }} ================================================ FILE: integration/confdir/templates/exists-test.conf.tmpl ================================================ {{ if exists "/key" }}value: {{ getv "/key" }}{{ end }} {{- if exists "/doesnotexist" }}This line will not be printed value: {{ getv "/key" }}{{ end }} ================================================ FILE: integration/confdir/templates/iteration.conf.tmpl ================================================ upstream app { {{- range gets "/upstream/*" }} server {{ .Value }}; {{- end }} } server { server_name www.example.com; location / { proxy_pass http://app; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ================================================ FILE: integration/confdir/templates/nested.conf.tmpl ================================================ upstream app { {{ range gets "/nested/*" }} {{ range gets .Key }} server {{ .Value }}; {{ end }} {{ end }} } server { server_name www.example.com; location / { proxy_pass http://app; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ================================================ FILE: integration/consul/test.sh ================================================ #!/bin/bash export HOSTNAME="localhost" # Configure consul curl -X PUT http://127.0.0.1:8500/v1/kv/key -d 'foobar' curl -X PUT http://127.0.0.1:8500/v1/kv/database/host -d '127.0.0.1' curl -X PUT http://127.0.0.1:8500/v1/kv/database/password -d 'p@sSw0rd' curl -X PUT http://127.0.0.1:8500/v1/kv/database/port -d '3306' curl -X PUT http://127.0.0.1:8500/v1/kv/database/username -d 'confd' curl -X PUT http://127.0.0.1:8500/v1/kv/upstream/app1 -d '10.0.1.10:8080' curl -X PUT http://127.0.0.1:8500/v1/kv/upstream/app2 -d '10.0.1.11:8080' curl -X PUT http://127.0.0.1:8500/v1/kv/nested/east/app1 -d '10.0.1.10:8080' curl -X PUT http://127.0.0.1:8500/v1/kv/nested/west/app2 -d '10.0.1.11:8080' curl -X PUT http://127.0.0.1:8500/v1/kv/prefix/database/host -d '127.0.0.1' curl -X PUT http://127.0.0.1:8500/v1/kv/prefix/database/password -d 'p@sSw0rd' curl -X PUT http://127.0.0.1:8500/v1/kv/prefix/database/port -d '3306' curl -X PUT http://127.0.0.1:8500/v1/kv/prefix/database/username -d 'confd' curl -X PUT http://127.0.0.1:8500/v1/kv/prefix/upstream/app1 -d '10.0.1.10:8080' curl -X PUT http://127.0.0.1:8500/v1/kv/prefix/upstream/app2 -d '10.0.1.11:8080' curl -X PUT http://127.0.0.1:8500/v1/kv/prefix/nested/east/app1 -d '10.0.1.10:8080' curl -X PUT http://127.0.0.1:8500/v1/kv/prefix/nested/west/app2 -d '10.0.1.11:8080' # Run confd confd --onetime --log-level debug --confdir ./integration/confdir --backend consul --node 127.0.0.1:8500 ================================================ FILE: integration/dynamodb/test.sh ================================================ #!/bin/bash export HOSTNAME="localhost" export DYNAMODB_LOCAL="1" export AWS_ACCESS_KEY_ID="foo" export AWS_SECRET_ACCESS_KEY="bar" export AWS_REGION="eu-west-1" export AWS_DEFAULT_REGION="eu-west-1" aws dynamodb create-table \ --region eu-west-1 --table-name confd \ --attribute-definitions AttributeName=key,AttributeType=S \ --key-schema AttributeName=key,KeyType=HASH \ --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/key" }, "value": {"S": "foobar"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/database/host" }, "value": {"S": "127.0.0.1"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/database/password" }, "value": {"S": "p@sSw0rd"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/database/port" }, "value": {"S": "3306"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/database/username" }, "value": {"S": "confd"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/upstream/app1" }, "value": {"S": "10.0.1.10:8080"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/upstream/app2" }, "value": {"S": "10.0.1.11:8080"}}' \ --endpoint-url http://localhost:8000 # Add a broken value, to see if it is handled aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/upstream/broken" }, "value": {"N": "4711"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/prefix/database/host" }, "value": {"S": "127.0.0.1"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/prefix/database/password" }, "value": {"S": "p@sSw0rd"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/prefix/database/port" }, "value": {"S": "3306"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/prefix/database/username" }, "value": {"S": "confd"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/prefix/upstream/app1" }, "value": {"S": "10.0.1.10:8080"}}' \ --endpoint-url http://localhost:8000 aws dynamodb put-item --table-name confd --region eu-west-1 \ --item '{ "key": { "S": "/prefix/upstream/app2" }, "value": {"S": "10.0.1.11:8080"}}' \ --endpoint-url http://localhost:8000 # Run confd, expect it to work confd --onetime --log-level debug --confdir ./integration/confdir --interval 5 --backend dynamodb --table confd if [ $? -ne 0 ] then exit 1 fi # Run confd with --watch, expecting it to fail confd --onetime --log-level debug --confdir ./integration/confdir --interval 5 --backend dynamodb --table confd --watch if [ $? -eq 0 ] then exit 1 fi # Run confd without AWS credentials, expecting it to fail unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY confd --onetime --log-level debug --confdir ./integration/confdir --interval 5 --backend dynamodb --table confd if [ $? -eq 0 ] then exit 1 fi ================================================ FILE: integration/env/test.sh ================================================ #!/bin/bash export HOSTNAME="localhost" export KEY="foobar" export DATABASE_HOST="127.0.0.1" export DATABASE_PASSWORD="p@sSw0rd" export DATABASE_PORT="3306" export DATABASE_USERNAME="confd" export UPSTREAM_APP1="10.0.1.10:8080" export UPSTREAM_APP2="10.0.1.11:8080" export PREFIX_DATABASE_HOST="127.0.0.1" export PREFIX_DATABASE_PASSWORD="p@sSw0rd" export PREFIX_DATABASE_PORT="3306" export PREFIX_DATABASE_USERNAME="confd" export PREFIX_UPSTREAM_APP1="10.0.1.10:8080" export PREFIX_UPSTREAM_APP2="10.0.1.11:8080" confd --onetime --log-level debug --confdir ./integration/confdir --interval 5 --backend env ================================================ FILE: integration/etcd/test.sh ================================================ #!/bin/bash export HOSTNAME="localhost" curl -L -X PUT http://127.0.0.1:2379/v2/keys/key -d value=foobar curl -L -X PUT http://127.0.0.1:2379/v2/keys/database/host -d value=127.0.0.1 curl -L -X PUT http://127.0.0.1:2379/v2/keys/database/password -d value=p@sSw0rd curl -L -X PUT http://127.0.0.1:2379/v2/keys/database/port -d value=3306 curl -L -X PUT http://127.0.0.1:2379/v2/keys/database/username -d value=confd curl -L -X PUT http://127.0.0.1:2379/v2/keys/upstream/app1 -d value=10.0.1.10:8080 curl -L -X PUT http://127.0.0.1:2379/v2/keys/upstream/app2 -d value=10.0.1.11:8080 curl -L -X PUT http://127.0.0.1:2379/v2/keys/nested/east/app1 -d value=10.0.1.10:8080 curl -L -X PUT http://127.0.0.1:2379/v2/keys/nested/west/app2 -d value=10.0.1.11:8080 curl -L -X PUT http://127.0.0.1:2379/v2/keys/prefix/database/host -d value=127.0.0.1 curl -L -X PUT http://127.0.0.1:2379/v2/keys/prefix/database/password -d value=p@sSw0rd curl -L -X PUT http://127.0.0.1:2379/v2/keys/prefix/database/port -d value=3306 curl -L -X PUT http://127.0.0.1:2379/v2/keys/prefix/database/username -d value=confd curl -L -X PUT http://127.0.0.1:2379/v2/keys/prefix/upstream/app1 -d value=10.0.1.10:8080 curl -L -X PUT http://127.0.0.1:2379/v2/keys/prefix/upstream/app2 -d value=10.0.1.11:8080 curl -L -X PUT http://127.0.0.1:2379/v2/keys/prefix/nested/east/app1 -d value=10.0.1.10:8080 curl -L -X PUT http://127.0.0.1:2379/v2/keys/prefix/nested/west/app2 -d value=10.0.1.11:8080 # Run confd confd --onetime --log-level debug --confdir ./integration/confdir --backend etcd --node http://127.0.0.1:2379 --watch ================================================ FILE: integration/etcdv3/test.sh ================================================ #!/bin/bash export HOSTNAME="localhost" export ETCDCTL_API="3" etcdctl put /key foobar etcdctl put /database/host 127.0.0.1 etcdctl put /database/password p@sSw0rd etcdctl put /database/port 3306 etcdctl put /database/username confd etcdctl put /upstream/app1 10.0.1.10:8080 etcdctl put /upstream/app2 10.0.1.11:8080 etcdctl put /prefix/database/host 127.0.0.1 etcdctl put /prefix/database/password p@sSw0rd etcdctl put /prefix/database/port 3306 etcdctl put /prefix/database/username confd etcdctl put /prefix/upstream/app1 10.0.1.10:8080 etcdctl put /prefix/upstream/app2 10.0.1.11:8080 # Run confd confd --onetime --log-level debug --confdir ./integration/confdir --backend etcdv3 --node http://127.0.0.1:2379 --watch ================================================ FILE: integration/expect/basic.conf ================================================ hostname: localhost [database] host=127.0.0.1 password=p@sSw0rd port=3306 username=confd ================================================ FILE: integration/expect/check.sh ================================================ #!/bin/bash set -ex diff /tmp/confd-basic-test.conf integration/expect/basic.conf diff /tmp/confd-exists-test.conf integration/expect/exists-test.conf diff /tmp/confd-iteration-test.conf integration/expect/iteration.conf diff /tmp/confd-manykeys-test.conf integration/expect/basic.conf ================================================ FILE: integration/expect/exists-test.conf ================================================ value: foobar ================================================ FILE: integration/expect/iteration.conf ================================================ upstream app { server 10.0.1.10:8080; server 10.0.1.11:8080; } server { server_name www.example.com; location / { proxy_pass http://app; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ================================================ FILE: integration/file/test.sh ================================================ #!/bin/bash export HOSTNAME="localhost" mkdir backends1 backends2 cat <> backends1/1.yaml key: foobar database: host: 127.0.0.1 password: p@sSw0rd port: "3306" username: confd EOT cat <> backends1/2.yaml upstream: app1: 10.0.1.10:8080 app2: 10.0.1.11:8080 EOT cat <> backends2/1.yaml nested: app1: 10.0.1.10:8080 app2: 10.0.1.11:8080 EOT cat <> backends2/2.yaml prefix: database: host: 127.0.0.1 password: p@sSw0rd port: "3306" username: confd upstream: app1: 10.0.1.10:8080 app2: 10.0.1.11:8080 EOT # Run confd confd --onetime --log-level debug --confdir ./integration/confdir --backend file --file backends1/ --file backends2/ --watch ================================================ FILE: integration/rancher/test.sh ================================================ #!/bin/bash export HOSTNAME="localhost" cat > ./rancher-answers.json< my-policy.hcl vault write sys/policy/my-policy policy=@my-policy.hcl vault write auth/test/role/my-role secret_id_ttl=120m token_num_uses=1000 token_ttl=60m token_max_ttl=120m secret_id_num_uses=10000 policies=my-policy export ROLE_ID=$(vault read -field=role_id auth/test/role/my-role/role-id) export SECRET_ID=$(vault write -f -field=secret_id auth/test/role/my-role/secret-id) # Run confd confd --onetime --log-level debug \ --confdir ./integration/confdir \ --backend vault \ --auth-type app-role \ --role-id $ROLE_ID \ --secret-id $SECRET_ID \ --path=test \ --node http://127.0.0.1:8200 ================================================ FILE: integration/zookeeper/main.go ================================================ package main import ( "encoding/json" "fmt" "io/ioutil" "strconv" "time" zk "github.com/samuel/go-zookeeper/zk" ) func check(e error) { if e != nil { panic(e) } } func zk_write(k string, v string, c *zk.Conn) { e, stat, err := c.Exists(k) check(err) if e { stat, err = c.Set(k, []byte(v), stat.Version) check(err) } else { string, err := c.Create(k, []byte(v), int32(0), zk.WorldACL(zk.PermAll)) if string == "" { check(err) } } } func parsejson(prefix string, x interface{}, c *zk.Conn) { switch t := x.(type) { case map[string]interface{}: for k, v := range t { if prefix != "" { zk_write(prefix, "", c) } parsejson(prefix+"/"+k, v, c) } case []interface{}: for i, v := range t { parsejson(prefix+"["+strconv.Itoa(i)+"]", v, c) } case string: zk_write(prefix, t, c) fmt.Printf("%s = %q\n", prefix, t) default: fmt.Printf("Unhandled: %T\n", t) } } func main() { var pj interface{} dat, err := ioutil.ReadFile("test.json") check(err) err = json.Unmarshal(dat, &pj) check(err) c, _, err := zk.Connect([]string{"127.0.0.1"}, time.Second) //*10) check(err) parsejson("", pj, c) } ================================================ FILE: integration/zookeeper/test.json ================================================ { "key": "foobar", "database" : { "host": "127.0.0.1", "password": "p@sSw0rd", "port": "3306", "username": "confd" }, "upstream" : { "app1": "10.0.1.10:8080", "app2": "10.0.1.11:8080" }, "nested" : { "east": { "app1": "10.0.1.10:8080" }, "west": { "app2": "10.0.1.11:8080" } }, "prefix": { "database": { "host": "127.0.0.1", "password": "p@sSw0rd", "port": "3306", "username": "confd" }, "upstream" : { "app1": "10.0.1.10:8080", "app2": "10.0.1.11:8080" }, "nested" : { "east": { "app1": "10.0.1.10:8080" }, "west": { "app2": "10.0.1.11:8080" } } } } ================================================ FILE: integration/zookeeper/test.sh ================================================ #!/bin/bash export HOSTNAME="localhost" # feed zookeeper export ZK_PATH="`dirname \"$0\"`" sh -c "cd $ZK_PATH; go run main.go" # Run confd confd --onetime --log-level debug --confdir ./integration/confdir --interval 5 --backend zookeeper --node 127.0.0.1:2181 -watch ================================================ FILE: integration/zookeeper/zoo.cfg ================================================ tickTime=2000 dataDir=/tmp/zookeeper clientPort=2181 ================================================ FILE: log/log.go ================================================ /* Package log provides support for logging to stdout and stderr. Log entries will be logged in the following format: timestamp hostname tag[pid]: SEVERITY Message */ package log import ( "fmt" "os" "strings" "time" log "github.com/sirupsen/logrus" ) type ConfdFormatter struct { } func (c *ConfdFormatter) Format(entry *log.Entry) ([]byte, error) { timestamp := time.Now().Format(time.RFC3339) hostname, _ := os.Hostname() return []byte(fmt.Sprintf("%s %s %s[%d]: %s %s\n", timestamp, hostname, tag, os.Getpid(), strings.ToUpper(entry.Level.String()), entry.Message)), nil } // tag represents the application name generating the log message. The tag // string will appear in all log entires. var tag string func init() { tag = os.Args[0] log.SetFormatter(&ConfdFormatter{}) } // SetTag sets the tag. func SetTag(t string) { tag = t } // SetLevel sets the log level. Valid levels are panic, fatal, error, warn, info and debug. func SetLevel(level string) { lvl, err := log.ParseLevel(level) if err != nil { Fatal(fmt.Sprintf(`not a valid level: "%s"`, level)) } log.SetLevel(lvl) } // Debug logs a message with severity DEBUG. func Debug(format string, v ...interface{}) { log.Debug(fmt.Sprintf(format, v...)) } // Error logs a message with severity ERROR. func Error(format string, v ...interface{}) { log.Error(fmt.Sprintf(format, v...)) } // Fatal logs a message with severity ERROR followed by a call to os.Exit(). func Fatal(format string, v ...interface{}) { log.Fatal(fmt.Sprintf(format, v...)) } // Info logs a message with severity INFO. func Info(format string, v ...interface{}) { log.Info(fmt.Sprintf(format, v...)) } // Warning logs a message with severity WARNING. func Warning(format string, v ...interface{}) { log.Warning(fmt.Sprintf(format, v...)) } ================================================ FILE: resource/template/processor.go ================================================ package template import ( "fmt" "sync" "time" "github.com/kelseyhightower/confd/log" util "github.com/kelseyhightower/confd/util" ) type Processor interface { Process() } func Process(config Config) error { ts, err := getTemplateResources(config) if err != nil { return err } return process(ts) } func process(ts []*TemplateResource) error { var lastErr error for _, t := range ts { if err := t.process(); err != nil { log.Error(err.Error()) lastErr = err } } return lastErr } type intervalProcessor struct { config Config stopChan chan bool doneChan chan bool errChan chan error interval int } func IntervalProcessor(config Config, stopChan, doneChan chan bool, errChan chan error, interval int) Processor { return &intervalProcessor{config, stopChan, doneChan, errChan, interval} } func (p *intervalProcessor) Process() { defer close(p.doneChan) for { ts, err := getTemplateResources(p.config) if err != nil { log.Fatal(err.Error()) break } process(ts) select { case <-p.stopChan: break case <-time.After(time.Duration(p.interval) * time.Second): continue } } } type watchProcessor struct { config Config stopChan chan bool doneChan chan bool errChan chan error wg sync.WaitGroup } func WatchProcessor(config Config, stopChan, doneChan chan bool, errChan chan error) Processor { var wg sync.WaitGroup return &watchProcessor{config, stopChan, doneChan, errChan, wg} } func (p *watchProcessor) Process() { defer close(p.doneChan) ts, err := getTemplateResources(p.config) if err != nil { log.Fatal(err.Error()) return } for _, t := range ts { t := t p.wg.Add(1) go p.monitorPrefix(t) } p.wg.Wait() } func (p *watchProcessor) monitorPrefix(t *TemplateResource) { defer p.wg.Done() keys := util.AppendPrefix(t.Prefix, t.Keys) for { index, err := t.storeClient.WatchPrefix(t.Prefix, keys, t.lastIndex, p.stopChan) if err != nil { p.errChan <- err // Prevent backend errors from consuming all resources. time.Sleep(time.Second * 2) continue } t.lastIndex = index if err := t.process(); err != nil { p.errChan <- err } } } func getTemplateResources(config Config) ([]*TemplateResource, error) { var lastError error templates := make([]*TemplateResource, 0) log.Debug("Loading template resources from confdir " + config.ConfDir) if !util.IsFileExist(config.ConfDir) { log.Warning(fmt.Sprintf("Cannot load template resources: confdir '%s' does not exist", config.ConfDir)) return nil, nil } paths, err := util.RecursiveFilesLookup(config.ConfigDir, "*toml") if err != nil { return nil, err } if len(paths) < 1 { log.Warning("Found no templates") } for _, p := range paths { log.Debug(fmt.Sprintf("Found template: %s", p)) t, err := NewTemplateResource(p, config) if err != nil { lastError = err continue } templates = append(templates, t) } return templates, lastError } ================================================ FILE: resource/template/resource.go ================================================ package template import ( "bytes" "errors" "fmt" "io/ioutil" "os" "os/exec" "path" "path/filepath" "runtime" "strconv" "strings" "text/template" "github.com/BurntSushi/toml" "github.com/kelseyhightower/confd/backends" "github.com/kelseyhightower/confd/log" util "github.com/kelseyhightower/confd/util" "github.com/kelseyhightower/memkv" ) type Config struct { ConfDir string `toml:"confdir"` ConfigDir string KeepStageFile bool Noop bool `toml:"noop"` Prefix string `toml:"prefix"` StoreClient backends.StoreClient SyncOnly bool `toml:"sync-only"` TemplateDir string } // TemplateResourceConfig holds the parsed template resource. type TemplateResourceConfig struct { TemplateResource TemplateResource `toml:"template"` } // TemplateResource is the representation of a parsed template resource. type TemplateResource struct { CheckCmd string `toml:"check_cmd"` Dest string FileMode os.FileMode Gid int Keys []string Mode string Prefix string ReloadCmd string `toml:"reload_cmd"` Src string StageFile *os.File Uid int funcMap map[string]interface{} lastIndex uint64 keepStageFile bool noop bool store memkv.Store storeClient backends.StoreClient syncOnly bool PGPPrivateKey []byte } var ErrEmptySrc = errors.New("empty src template") // NewTemplateResource creates a TemplateResource. func NewTemplateResource(path string, config Config) (*TemplateResource, error) { if config.StoreClient == nil { return nil, errors.New("A valid StoreClient is required.") } // Set the default uid and gid so we can determine if it was // unset from configuration. tc := &TemplateResourceConfig{TemplateResource{Uid: -1, Gid: -1}} log.Debug("Loading template resource from " + path) _, err := toml.DecodeFile(path, &tc) if err != nil { return nil, fmt.Errorf("Cannot process template resource %s - %s", path, err.Error()) } tr := tc.TemplateResource tr.keepStageFile = config.KeepStageFile tr.noop = config.Noop tr.storeClient = config.StoreClient tr.funcMap = newFuncMap() tr.store = memkv.New() tr.syncOnly = config.SyncOnly addFuncs(tr.funcMap, tr.store.FuncMap) if config.Prefix != "" { tr.Prefix = config.Prefix } if !strings.HasPrefix(tr.Prefix, "/") { tr.Prefix = "/" + tr.Prefix } if tr.Src == "" { return nil, ErrEmptySrc } if tr.Uid == -1 { tr.Uid = os.Geteuid() } if tr.Gid == -1 { tr.Gid = os.Getegid() } tr.Src = filepath.Join(config.TemplateDir, tr.Src) return &tr, nil } // setVars sets the Vars for template resource. func (t *TemplateResource) setVars() error { var err error log.Debug("Retrieving keys from store") log.Debug("Key prefix set to " + t.Prefix) result, err := t.storeClient.GetValues(util.AppendPrefix(t.Prefix, t.Keys)) if err != nil { return err } log.Debug("Got the following map from store: %v", result) t.store.Purge() for k, v := range result { t.store.Set(path.Join("/", strings.TrimPrefix(k, t.Prefix)), v) } return nil } // createStageFile stages the src configuration file by processing the src // template and setting the desired owner, group, and mode. It also sets the // StageFile for the template resource. // It returns an error if any. func (t *TemplateResource) createStageFile() error { log.Debug("Using source template " + t.Src) if !util.IsFileExist(t.Src) { return errors.New("Missing template: " + t.Src) } log.Debug("Compiling source template " + t.Src) tmpl, err := template.New(filepath.Base(t.Src)).Funcs(t.funcMap).ParseFiles(t.Src) if err != nil { return fmt.Errorf("Unable to process template %s, %s", t.Src, err) } // create TempFile in Dest directory to avoid cross-filesystem issues temp, err := ioutil.TempFile(filepath.Dir(t.Dest), "."+filepath.Base(t.Dest)) if err != nil { return err } if err = tmpl.Execute(temp, nil); err != nil { temp.Close() os.Remove(temp.Name()) return err } defer temp.Close() // Set the owner, group, and mode on the stage file now to make it easier to // compare against the destination configuration file later. os.Chmod(temp.Name(), t.FileMode) os.Chown(temp.Name(), t.Uid, t.Gid) t.StageFile = temp return nil } // sync compares the staged and dest config files and attempts to sync them // if they differ. sync will run a config check command if set before // overwriting the target config file. Finally, sync will run a reload command // if set to have the application or service pick up the changes. // It returns an error if any. func (t *TemplateResource) sync() error { staged := t.StageFile.Name() if t.keepStageFile { log.Info("Keeping staged file: " + staged) } else { defer os.Remove(staged) } log.Debug("Comparing candidate config to " + t.Dest) ok, err := util.IsConfigChanged(staged, t.Dest) if err != nil { log.Error(err.Error()) } if t.noop { log.Warning("Noop mode enabled. " + t.Dest + " will not be modified") return nil } if ok { log.Info("Target config " + t.Dest + " out of sync") if !t.syncOnly && t.CheckCmd != "" { if err := t.check(); err != nil { return errors.New("Config check failed: " + err.Error()) } } log.Debug("Overwriting target config " + t.Dest) err := os.Rename(staged, t.Dest) if err != nil { if strings.Contains(err.Error(), "device or resource busy") { log.Debug("Rename failed - target is likely a mount. Trying to write instead") // try to open the file and write to it var contents []byte var rerr error contents, rerr = ioutil.ReadFile(staged) if rerr != nil { return rerr } err := ioutil.WriteFile(t.Dest, contents, t.FileMode) // make sure owner and group match the temp file, in case the file was created with WriteFile os.Chown(t.Dest, t.Uid, t.Gid) if err != nil { return err } } else { return err } } if !t.syncOnly && t.ReloadCmd != "" { if err := t.reload(); err != nil { return err } } log.Info("Target config " + t.Dest + " has been updated") } else { log.Debug("Target config " + t.Dest + " in sync") } return nil } // check executes the check command to validate the staged config file. The // command is modified so that any references to src template are substituted // with a string representing the full path of the staged file. This allows the // check to be run on the staged file before overwriting the destination config // file. // It returns nil if the check command returns 0 and there are no other errors. func (t *TemplateResource) check() error { var cmdBuffer bytes.Buffer data := make(map[string]string) data["src"] = t.StageFile.Name() tmpl, err := template.New("checkcmd").Parse(t.CheckCmd) if err != nil { return err } if err := tmpl.Execute(&cmdBuffer, data); err != nil { return err } return runCommand(cmdBuffer.String()) } // reload executes the reload command. // It returns nil if the reload command returns 0. func (t *TemplateResource) reload() error { return runCommand(t.ReloadCmd) } // runCommand is a shared function used by check and reload // to run the given command and log its output. // It returns nil if the given cmd returns 0. // The command can be run on unix and windows. func runCommand(cmd string) error { log.Debug("Running " + cmd) var c *exec.Cmd if runtime.GOOS == "windows" { c = exec.Command("cmd", "/C", cmd) } else { c = exec.Command("/bin/sh", "-c", cmd) } output, err := c.CombinedOutput() if err != nil { log.Error(fmt.Sprintf("%q", string(output))) return err } log.Debug(fmt.Sprintf("%q", string(output))) return nil } // process is a convenience function that wraps calls to the three main tasks // required to keep local configuration files in sync. First we gather vars // from the store, then we stage a candidate configuration file, and finally sync // things up. // It returns an error if any. func (t *TemplateResource) process() error { if err := t.setFileMode(); err != nil { return err } if err := t.setVars(); err != nil { return err } if err := t.createStageFile(); err != nil { return err } if err := t.sync(); err != nil { return err } return nil } // setFileMode sets the FileMode. func (t *TemplateResource) setFileMode() error { if t.Mode == "" { if !util.IsFileExist(t.Dest) { t.FileMode = 0644 } else { fi, err := os.Stat(t.Dest) if err != nil { return err } t.FileMode = fi.Mode() } } else { mode, err := strconv.ParseUint(t.Mode, 0, 32) if err != nil { return err } t.FileMode = os.FileMode(mode) } return nil } ================================================ FILE: resource/template/resource_test.go ================================================ package template import ( "io/ioutil" "os" "path/filepath" "testing" "text/template" "github.com/kelseyhightower/confd/backends/env" "github.com/kelseyhightower/confd/log" ) // createTempDirs is a helper function which creates temporary directories // required by confd. createTempDirs returns the path name representing the // confd confDir. // It returns an error if any. func createTempDirs() (string, error) { confDir, err := ioutil.TempDir("", "") if err != nil { return "", err } err = os.Mkdir(filepath.Join(confDir, "templates"), 0755) if err != nil { return "", err } err = os.Mkdir(filepath.Join(confDir, "conf.d"), 0755) if err != nil { return "", err } return confDir, nil } var templateResourceConfigTmpl = ` [template] src = "{{.src}}" dest = "{{.dest}}" keys = [ "foo", ] ` func TestProcessTemplateResources(t *testing.T) { log.SetLevel("warn") // Setup temporary conf, config, and template directories. tempConfDir, err := createTempDirs() if err != nil { t.Errorf("Failed to create temp dirs: %s", err.Error()) } defer os.RemoveAll(tempConfDir) // Create the src template. srcTemplateFile := filepath.Join(tempConfDir, "templates", "foo.tmpl") err = ioutil.WriteFile(srcTemplateFile, []byte(`foo = {{getv "/foo"}}`), 0644) if err != nil { t.Error(err.Error()) } // Create the dest. destFile, err := ioutil.TempFile("", "") if err != nil { t.Errorf("Failed to create destFile: %s", err.Error()) } defer os.Remove(destFile.Name()) // Create the template resource configuration file. templateResourcePath := filepath.Join(tempConfDir, "conf.d", "foo.toml") templateResourceFile, err := os.Create(templateResourcePath) if err != nil { t.Errorf(err.Error()) } tmpl, err := template.New("templateResourceConfig").Parse(templateResourceConfigTmpl) if err != nil { t.Errorf("Unable to parse template resource template: %s", err.Error()) } data := make(map[string]string) data["src"] = "foo.tmpl" data["dest"] = destFile.Name() err = tmpl.Execute(templateResourceFile, data) if err != nil { t.Errorf(err.Error()) } os.Setenv("FOO", "bar") storeClient, err := env.NewEnvClient() if err != nil { t.Errorf(err.Error()) } c := Config{ ConfDir: tempConfDir, ConfigDir: filepath.Join(tempConfDir, "conf.d"), StoreClient: storeClient, TemplateDir: filepath.Join(tempConfDir, "templates"), } // Process the test template resource. err = Process(c) if err != nil { t.Error(err.Error()) } // Verify the results. expected := "foo = bar" results, err := ioutil.ReadFile(destFile.Name()) if err != nil { t.Error(err.Error()) } if string(results) != expected { t.Errorf("Expected contents of dest == '%s', got %s", expected, string(results)) } } ================================================ FILE: resource/template/template_funcs.go ================================================ package template import ( "encoding/base64" "encoding/json" "errors" "fmt" "net" "os" "path" "sort" "strconv" "strings" "time" util "github.com/kelseyhightower/confd/util" "github.com/kelseyhightower/memkv" ) func newFuncMap() map[string]interface{} { m := make(map[string]interface{}) m["base"] = path.Base m["split"] = strings.Split m["json"] = UnmarshalJsonObject m["jsonArray"] = UnmarshalJsonArray m["dir"] = path.Dir m["map"] = CreateMap m["getenv"] = Getenv m["join"] = strings.Join m["datetime"] = time.Now m["toUpper"] = strings.ToUpper m["toLower"] = strings.ToLower m["contains"] = strings.Contains m["replace"] = strings.Replace m["trimSuffix"] = strings.TrimSuffix m["lookupIP"] = LookupIP m["lookupIPV4"] = LookupIPV4 m["lookupIPV6"] = LookupIPV6 m["lookupSRV"] = LookupSRV m["fileExists"] = util.IsFileExist m["base64Encode"] = Base64Encode m["base64Decode"] = Base64Decode m["parseBool"] = strconv.ParseBool m["reverse"] = Reverse m["sortByLength"] = SortByLength m["sortKVByLength"] = SortKVByLength m["add"] = func(a, b int) int { return a + b } m["sub"] = func(a, b int) int { return a - b } m["div"] = func(a, b int) int { return a / b } m["mod"] = func(a, b int) int { return a % b } m["mul"] = func(a, b int) int { return a * b } m["seq"] = Seq m["atoi"] = strconv.Atoi return m } func addFuncs(out, in map[string]interface{}) { for name, fn := range in { out[name] = fn } } // Seq creates a sequence of integers. It's named and used as GNU's seq. // Seq takes the first and the last element as arguments. So Seq(3, 5) will generate [3,4,5] func Seq(first, last int) []int { var arr []int for i := first; i <= last; i++ { arr = append(arr, i) } return arr } type byLengthKV []memkv.KVPair func (s byLengthKV) Len() int { return len(s) } func (s byLengthKV) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s byLengthKV) Less(i, j int) bool { return len(s[i].Key) < len(s[j].Key) } func SortKVByLength(values []memkv.KVPair) []memkv.KVPair { sort.Sort(byLengthKV(values)) return values } type byLength []string func (s byLength) Len() int { return len(s) } func (s byLength) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s byLength) Less(i, j int) bool { return len(s[i]) < len(s[j]) } func SortByLength(values []string) []string { sort.Sort(byLength(values)) return values } //Reverse returns the array in reversed order //works with []string and []KVPair func Reverse(values interface{}) interface{} { switch values.(type) { case []string: v := values.([]string) for left, right := 0, len(v)-1; left < right; left, right = left+1, right-1 { v[left], v[right] = v[right], v[left] } case []memkv.KVPair: v := values.([]memkv.KVPair) for left, right := 0, len(v)-1; left < right; left, right = left+1, right-1 { v[left], v[right] = v[right], v[left] } } return values } // Getenv retrieves the value of the environment variable named by the key. // It returns the value, which will the default value if the variable is not present. // If no default value was given - returns "". func Getenv(key string, v ...string) string { defaultValue := "" if len(v) > 0 { defaultValue = v[0] } value := os.Getenv(key) if value == "" { return defaultValue } return value } // CreateMap creates a key-value map of string -> interface{} // The i'th is the key and the i+1 is the value func CreateMap(values ...interface{}) (map[string]interface{}, error) { if len(values)%2 != 0 { return nil, errors.New("invalid map call") } dict := make(map[string]interface{}, len(values)/2) for i := 0; i < len(values); i += 2 { key, ok := values[i].(string) if !ok { return nil, errors.New("map keys must be strings") } dict[key] = values[i+1] } return dict, nil } func UnmarshalJsonObject(data string) (map[string]interface{}, error) { var ret map[string]interface{} err := json.Unmarshal([]byte(data), &ret) return ret, err } func UnmarshalJsonArray(data string) ([]interface{}, error) { var ret []interface{} err := json.Unmarshal([]byte(data), &ret) return ret, err } func LookupIP(data string) []string { ips, err := net.LookupIP(data) if err != nil { return nil } // "Cast" IPs into strings and sort the array ipStrings := make([]string, len(ips)) for i, ip := range ips { ipStrings[i] = ip.String() } sort.Strings(ipStrings) return ipStrings } func LookupIPV6(data string) []string { var addresses []string for _, ip := range LookupIP(data) { if strings.Contains(ip, ":") { addresses = append(addresses, ip) } } return addresses } func LookupIPV4(data string) []string { var addresses []string for _, ip := range LookupIP(data) { if strings.Contains(ip, ".") { addresses = append(addresses, ip) } } return addresses } type sortSRV []*net.SRV func (s sortSRV) Len() int { return len(s) } func (s sortSRV) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s sortSRV) Less(i, j int) bool { str1 := fmt.Sprintf("%s%d%d%d", s[i].Target, s[i].Port, s[i].Priority, s[i].Weight) str2 := fmt.Sprintf("%s%d%d%d", s[j].Target, s[j].Port, s[j].Priority, s[j].Weight) return str1 < str2 } func LookupSRV(service, proto, name string) []*net.SRV { _, addrs, err := net.LookupSRV(service, proto, name) if err != nil { return []*net.SRV{} } sort.Sort(sortSRV(addrs)) return addrs } func Base64Encode(data string) string { return base64.StdEncoding.EncodeToString([]byte(data)) } func Base64Decode(data string) (string, error) { s, err := base64.StdEncoding.DecodeString(data) return string(s), err } ================================================ FILE: resource/template/template_test.go ================================================ package template import ( "fmt" "io/ioutil" "os" "testing" "github.com/kelseyhightower/confd/backends" ) const ( tomlFilePath = "test/confd/config.toml" tmplFilePath = "test/templates/test.conf.tmpl" ) type templateTest struct { desc string // description of the test (for helpful errors) toml string // toml file contents tmpl string // template file contents expected interface{} // expected generated file contents updateStore func(*TemplateResource) // function for setting values in store } // templateTests is an array of templateTest structs, each representing a test of // some aspect of template processing. When the input tmpl and toml files are // processed, they should produce a config file matching expected. var templateTests = []templateTest{ templateTest{ desc: "base, get test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/key", ] `, tmpl: ` {{with get "/test/key"}} key: {{base .Key}} val: {{.Value}} {{end}} `, expected: ` key: key val: abc `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/key", "abc") }, }, templateTest{ desc: "gets test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/user", "/test/pass", "/nada/url", ] `, tmpl: ` {{range gets "/test/*"}} key: {{.Key}} val: {{.Value}} {{end}} `, expected: ` key: /test/pass val: abc key: /test/user val: mary `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/user", "mary") tr.store.Set("/test/pass", "abc") tr.store.Set("/nada/url", "url") }, }, templateTest{ desc: "getv test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/url", "/test/user", ] `, tmpl: ` url = {{getv "/test/url"}} user = {{getv "/test/user"}} `, expected: ` url = http://www.abc.com user = bob `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/url", "http://www.abc.com") tr.store.Set("/test/user", "bob") }, }, templateTest{ desc: "getvs test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/user", "/test/pass", "/nada/url", ] `, tmpl: ` {{range getvs "/test/*"}} val: {{.}} {{end}} `, expected: ` val: abc val: mary `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/user", "mary") tr.store.Set("/test/pass", "abc") tr.store.Set("/nada/url", "url") }, }, templateTest{ desc: "split test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data", ] `, tmpl: ` {{$data := split (getv "/test/data") ":"}} f: {{index $data 0}} br: {{index $data 1}} bz: {{index $data 2}} `, expected: ` f: foo br: bar bz: baz `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", "foo:bar:baz") }, }, templateTest{ desc: "toUpper test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data/", ] `, tmpl: ` {{$data := toUpper (getv "/test/data") }} key: {{$data}} `, expected: ` key: VALUE `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", `Value`) }, }, templateTest{ desc: "toLower test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data/", ] `, tmpl: ` {{$data := toLower (getv "/test/data") }} key: {{$data}} `, expected: ` key: value `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", `Value`) }, }, templateTest{ desc: "json test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data/", ] `, tmpl: ` {{range getvs "/test/data/*"}} {{$data := json .}} id: {{$data.Id}} ip: {{$data.IP}} {{end}} `, expected: ` id: host1 ip: 192.168.10.11 id: host2 ip: 192.168.10.12 `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data/1", `{"Id":"host1", "IP":"192.168.10.11"}`) tr.store.Set("/test/data/2", `{"Id":"host2", "IP":"192.168.10.12"}`) }, }, templateTest{ desc: "jsonArray test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data/", ] `, tmpl: ` {{range jsonArray (getv "/test/data/")}} num: {{.}} {{end}} `, expected: ` num: 1 num: 2 num: 3 `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data/", `["1", "2", "3"]`) }, }, templateTest{ desc: "ls test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data/abc", "/test/data/def", "/test/data/ghi", ] `, tmpl: ` {{range ls "/test/data"}} value: {{.}} {{end}} `, expected: ` value: abc value: def value: ghi `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data/abc", "123") tr.store.Set("/test/data/def", "456") tr.store.Set("/test/data/ghi", "789") }, }, templateTest{ desc: "lsdir test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data/abc", "/test/data/def/ghi", "/test/data/jkl/mno", ] `, tmpl: ` {{range lsdir "/test/data"}} value: {{.}} {{end}} `, expected: ` value: def value: jkl `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data/abc", "123") tr.store.Set("/test/data/def/ghi", "456") tr.store.Set("/test/data/jkl/mno", "789") }, }, templateTest{ desc: "dir test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data", "/test/data/abc", ] `, tmpl: ` {{with dir "/test/data/abc"}} dir: {{.}} {{end}} `, expected: ` dir: /test/data `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", "parent") tr.store.Set("/test/data/def", "child") }, }, templateTest{ desc: "ipv4 lookup test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data", "/test/data/abc", ] `, tmpl: ` {{range lookupIPV4 "localhost"}} ip: {{.}} {{end}} `, expected: ` ip: 127.0.0.1 `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", "parent") tr.store.Set("/test/data/def", "child") }, }, templateTest{ desc: "ipv6 lookup test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data", "/test/data/abc", ] `, tmpl: ` {{range lookupIPV6 "localhost"}} ip: {{.}} {{end}} `, expected: [...]string{ ` ip: ::1 `, ` `, }, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", "parent") tr.store.Set("/test/data/def", "child") }, }, templateTest{ desc: "ip lookup test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data", "/test/data/abc", ] `, tmpl: ` {{range lookupIP "localhost"}} ip: {{.}} {{end}} `, expected: [...]string{ ` ip: 127.0.0.1 `, ` ip: 127.0.0.1 ip: ::1 `, ` ip: ::1 `, }, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", "parent") tr.store.Set("/test/data/def", "child") }, }, templateTest{ desc: "base64Encode test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data/", ] `, tmpl: ` {{$data := base64Encode (getv "/test/data") }} key: {{$data}} `, expected: ` key: VmFsdWU= `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", `Value`) }, }, templateTest{ desc: "base64Decode test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/data/", ] `, tmpl: ` {{$data := base64Decode (getv "/test/data") }} key: {{$data}} `, expected: ` key: Value `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/data", `VmFsdWU=`) }, }, templateTest{ desc: "seq test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" `, tmpl: ` {{ seq 1 3 }} `, expected: ` [1 2 3] `, updateStore: func(tr *TemplateResource) {}, }, templateTest{ desc: "atoi test", toml: ` [template] src = "test.conf.tmpl" dest = "./tmp/test.conf" keys = [ "/test/count/", ] `, tmpl: ` {{ seq 1 (atoi (getv "/test/count")) }} `, expected: ` [1 2 3] `, updateStore: func(tr *TemplateResource) { tr.store.Set("/test/count", "3") }, }, } // TestTemplates runs all tests in templateTests func TestTemplates(t *testing.T) { for _, tt := range templateTests { ExecuteTestTemplate(tt, t) } } // ExectureTestTemplate builds a TemplateResource based on the toml and tmpl files described // in the templateTest, writes a config file, and compares the result against the expectation // in the templateTest. func ExecuteTestTemplate(tt templateTest, t *testing.T) { setupDirectoriesAndFiles(tt, t) defer os.RemoveAll("test") tr, err := templateResource() if err != nil { t.Errorf(tt.desc + ": failed to create TemplateResource: " + err.Error()) } tt.updateStore(tr) if err := tr.createStageFile(); err != nil { t.Errorf(tt.desc + ": failed createStageFile: " + err.Error()) } actual, err := ioutil.ReadFile(tr.StageFile.Name()) if err != nil { t.Errorf(tt.desc + ": failed to read StageFile: " + err.Error()) } switch tt.expected.(type) { case string: if string(actual) != tt.expected.(string) { t.Errorf(fmt.Sprintf("%v: invalid StageFile. Expected %v, actual %v", tt.desc, tt.expected, string(actual))) } case []string: for _, expected := range tt.expected.([]string) { if string(actual) == expected { break } } t.Errorf(fmt.Sprintf("%v: invalid StageFile. Possible expected values %v, actual %v", tt.desc, tt.expected, string(actual))) } } // setUpDirectoriesAndFiles creates folders for the toml, tmpl, and output files and // creates the toml and tmpl files as specified in the templateTest struct. func setupDirectoriesAndFiles(tt templateTest, t *testing.T) { // create confd directory and toml file if err := os.MkdirAll("./test/confd", os.ModePerm); err != nil { t.Errorf(tt.desc + ": failed to created confd directory: " + err.Error()) } if err := ioutil.WriteFile(tomlFilePath, []byte(tt.toml), os.ModePerm); err != nil { t.Errorf(tt.desc + ": failed to write toml file: " + err.Error()) } // create templates directory and tmpl file if err := os.MkdirAll("./test/templates", os.ModePerm); err != nil { t.Errorf(tt.desc + ": failed to create template directory: " + err.Error()) } if err := ioutil.WriteFile(tmplFilePath, []byte(tt.tmpl), os.ModePerm); err != nil { t.Errorf(tt.desc + ": failed to write toml file: " + err.Error()) } // create tmp directory for output if err := os.MkdirAll("./test/tmp", os.ModePerm); err != nil { t.Errorf(tt.desc + ": failed to create tmp directory: " + err.Error()) } } // templateResource creates a templateResource for creating a config file func templateResource() (*TemplateResource, error) { backendConf := backends.Config{ Backend: "env"} client, err := backends.New(backendConf) if err != nil { return nil, err } config := Config{ StoreClient: client, // not used but must be set TemplateDir: "./test/templates", } tr, err := NewTemplateResource(tomlFilePath, config) if err != nil { return nil, err } tr.Dest = "./test/tmp/test.conf" tr.FileMode = 0666 return tr, nil } ================================================ FILE: util/filestat_posix.go ================================================ // +build !windows package util import ( "crypto/md5" "errors" "fmt" "io" "os" "syscall" ) // filestat return a FileInfo describing the named file. func FileStat(name string) (fi FileInfo, err error) { if IsFileExist(name) { f, err := os.Open(name) if err != nil { return fi, err } defer f.Close() stats, _ := f.Stat() fi.Uid = stats.Sys().(*syscall.Stat_t).Uid fi.Gid = stats.Sys().(*syscall.Stat_t).Gid fi.Mode = stats.Mode() h := md5.New() io.Copy(h, f) fi.Md5 = fmt.Sprintf("%x", h.Sum(nil)) return fi, nil } return fi, errors.New("File not found") } ================================================ FILE: util/filestat_windows.go ================================================ package util import ( "crypto/md5" "errors" "fmt" "io" "os" ) // filestat return a FileInfo describing the named file. func FileStat(name string) (fi FileInfo, err error) { if IsFileExist(name) { f, err := os.Open(name) if err != nil { return fi, err } defer f.Close() stats, _ := f.Stat() fi.Mode = stats.Mode() h := md5.New() io.Copy(h, f) fi.Md5 = fmt.Sprintf("%x", h.Sum(nil)) return fi, nil } return fi, errors.New("File not found") } ================================================ FILE: util/util.go ================================================ package util import ( "fmt" "github.com/kelseyhightower/confd/log" "os" "path" "path/filepath" ) // Nodes is a custom flag Var representing a list of etcd nodes. type Nodes []string // String returns the string representation of a node var. func (n *Nodes) String() string { return fmt.Sprintf("%s", *n) } // Set appends the node to the etcd node list. func (n *Nodes) Set(node string) error { *n = append(*n, node) return nil } // fileInfo describes a configuration file and is returned by fileStat. type FileInfo struct { Uid uint32 Gid uint32 Mode os.FileMode Md5 string } func AppendPrefix(prefix string, keys []string) []string { s := make([]string, len(keys)) for i, k := range keys { s[i] = path.Join(prefix, k) } return s } // isFileExist reports whether path exits. func IsFileExist(fpath string) bool { if _, err := os.Stat(fpath); os.IsNotExist(err) { return false } return true } // IsConfigChanged reports whether src and dest config files are equal. // Two config files are equal when they have the same file contents and // Unix permissions. The owner, group, and mode must match. // It return false in other cases. func IsConfigChanged(src, dest string) (bool, error) { if !IsFileExist(dest) { return true, nil } d, err := FileStat(dest) if err != nil { return true, err } s, err := FileStat(src) if err != nil { return true, err } if d.Uid != s.Uid { log.Info(fmt.Sprintf("%s has UID %d should be %d", dest, d.Uid, s.Uid)) } if d.Gid != s.Gid { log.Info(fmt.Sprintf("%s has GID %d should be %d", dest, d.Gid, s.Gid)) } if d.Mode != s.Mode { log.Info(fmt.Sprintf("%s has mode %s should be %s", dest, os.FileMode(d.Mode), os.FileMode(s.Mode))) } if d.Md5 != s.Md5 { log.Info(fmt.Sprintf("%s has md5sum %s should be %s", dest, d.Md5, s.Md5)) } if d.Uid != s.Uid || d.Gid != s.Gid || d.Mode != s.Mode || d.Md5 != s.Md5 { return true, nil } return false, nil } func IsDirectory(path string) (bool, error) { f, err := os.Stat(path) if err != nil { return false, err } switch mode := f.Mode(); { case mode.IsDir(): return true, nil case mode.IsRegular(): return false, nil } return false, nil } func RecursiveFilesLookup(root string, pattern string) ([]string, error) { return recursiveLookup(root, pattern, false) } func RecursiveDirsLookup(root string, pattern string) ([]string, error) { return recursiveLookup(root, pattern, true) } func recursiveLookup(root string, pattern string, dirsLookup bool) ([]string, error) { var result []string isDir, err := IsDirectory(root) if err != nil { return nil, err } if isDir { err := filepath.Walk(root, func(root string, f os.FileInfo, err error) error { match, err := filepath.Match(pattern, f.Name()) if err != nil { return err } if match { isDir, err := IsDirectory(root) if err != nil { return err } if isDir && dirsLookup { result = append(result, root) } else if !isDir && !dirsLookup { result = append(result, root) } } return nil }) if err != nil { return nil, err } } else { if !dirsLookup { result = append(result, root) } } return result, nil } ================================================ FILE: util/util_test.go ================================================ package util import ( "io/ioutil" "os" "path/filepath" "sort" "testing" "github.com/kelseyhightower/confd/log" ) // createRecursiveDirs is a helper function which creates temporary directorie // has sub directories, and files with different extionname which will be used // fo function findrecursiveFindFiles's test case.The result looks like: // ├── root.other1 // ├── root.toml // ├── subDir1 // │   ├── sub1.other // │   ├── sub1.toml // │   └── sub12.toml // └── subDir2 // ├── sub2.other // ├── sub2.toml // ├── sub22.toml // └── subSubDir // ├── subsub.other // ├── subsub.toml // └── subsub2.toml func createDirStructure() (rootDir string, err error) { mod := os.FileMode(0755) flag := os.O_RDWR | os.O_CREATE | os.O_EXCL rootDir, err = ioutil.TempDir("", "") if err != nil { return "", err } _, err = os.OpenFile(rootDir+"/root.toml", flag, mod) if err != nil { return "", err } _, err = os.OpenFile(rootDir+"/root.other1", flag, mod) if err != nil { return "", err } subDir := filepath.Join(rootDir, "subDir1") err = os.Mkdir(subDir, mod) if err != nil { return "", err } _, err = os.OpenFile(subDir+"/sub1.toml", flag, mod) if err != nil { return "", err } _, err = os.OpenFile(subDir+"/sub12.toml", flag, mod) if err != nil { return "", err } _, err = os.OpenFile(subDir+"/sub1.other", flag, mod) if err != nil { return "", err } subDir2 := filepath.Join(rootDir, "subDir2") err = os.Mkdir(subDir2, mod) if err != nil { return "", err } _, err = os.OpenFile(subDir2+"/sub2.toml", flag, mod) if err != nil { return "", err } _, err = os.OpenFile(subDir2+"/sub22.toml", flag, mod) if err != nil { return "", err } _, err = os.OpenFile(subDir2+"/sub2.other", flag, mod) if err != nil { return "", err } subSubDir := filepath.Join(subDir2, "subSubDir") err = os.Mkdir(subSubDir, mod) if err != nil { return "", err } _, err = os.OpenFile(subSubDir+"/subsub.toml", flag, mod) if err != nil { return "", err } _, err = os.OpenFile(subSubDir+"/subsub2.toml", flag, mod) if err != nil { return "", err } _, err = os.OpenFile(subSubDir+"/subsub.other", flag, mod) if err != nil { return "", err } return } func TestRecursiveFilesLookup(t *testing.T) { log.SetLevel("warn") // Setup temporary directories rootDir, err := createDirStructure() if err != nil { t.Errorf("Failed to create temp dirs: %s", err.Error()) } defer os.RemoveAll(rootDir) files, err := RecursiveFilesLookup(rootDir, "*toml") if err != nil { t.Errorf("Failed to run recursiveFindFiles, got error: " + err.Error()) } sort.Strings(files) exceptedFiles := []string{ rootDir + "/" + "root.toml", rootDir + "/subDir1/" + "sub1.toml", rootDir + "/subDir1/" + "sub12.toml", rootDir + "/subDir2/" + "sub2.toml", rootDir + "/subDir2/" + "sub22.toml", rootDir + "/subDir2/subSubDir/" + "subsub.toml", rootDir + "/subDir2/subSubDir/" + "subsub2.toml", } for i, f := range exceptedFiles { if f != files[i] { t.FailNow() } } } func TestIsConfigChangedTrue(t *testing.T) { log.SetLevel("warn") src, err := ioutil.TempFile("", "src") defer os.Remove(src.Name()) if err != nil { t.Errorf(err.Error()) } _, err = src.WriteString("foo") if err != nil { t.Errorf(err.Error()) } dest, err := ioutil.TempFile("", "dest") defer os.Remove(dest.Name()) if err != nil { t.Errorf(err.Error()) } _, err = dest.WriteString("foo") if err != nil { t.Errorf(err.Error()) } status, err := IsConfigChanged(src.Name(), dest.Name()) if err != nil { t.Errorf(err.Error()) } if status == true { t.Errorf("Expected IsConfigChanged(src, dest) to be %v, got %v", true, status) } } func TestIsConfigChangedFalse(t *testing.T) { log.SetLevel("warn") src, err := ioutil.TempFile("", "src") defer os.Remove(src.Name()) if err != nil { t.Errorf(err.Error()) } _, err = src.WriteString("src") if err != nil { t.Errorf(err.Error()) } dest, err := ioutil.TempFile("", "dest") defer os.Remove(dest.Name()) if err != nil { t.Errorf(err.Error()) } _, err = dest.WriteString("dest") if err != nil { t.Errorf(err.Error()) } status, err := IsConfigChanged(src.Name(), dest.Name()) if err != nil { t.Errorf(err.Error()) } if status == false { t.Errorf("Expected sameConfig(src, dest) to be %v, got %v", false, status) } } ================================================ FILE: vendor/github.com/BurntSushi/toml/.gitignore ================================================ /toml.test /toml-test ================================================ FILE: vendor/github.com/BurntSushi/toml/COPYING ================================================ The MIT License (MIT) Copyright (c) 2013 TOML authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: vendor/github.com/BurntSushi/toml/README.md ================================================ TOML stands for Tom's Obvious, Minimal Language. This Go package provides a reflection interface similar to Go's standard library `json` and `xml` packages. Compatible with TOML version [v1.0.0](https://toml.io/en/v1.0.0). Documentation: https://godocs.io/github.com/BurntSushi/toml See the [releases page](https://github.com/BurntSushi/toml/releases) for a changelog; this information is also in the git tag annotations (e.g. `git show v0.4.0`). This library requires Go 1.13 or newer; add it to your go.mod with: % go get github.com/BurntSushi/toml@latest It also comes with a TOML validator CLI tool: % go install github.com/BurntSushi/toml/cmd/tomlv@latest % tomlv some-toml-file.toml ### Examples For the simplest example, consider some TOML file as just a list of keys and values: ```toml Age = 25 Cats = [ "Cauchy", "Plato" ] Pi = 3.14 Perfection = [ 6, 28, 496, 8128 ] DOB = 1987-07-05T05:45:00Z ``` Which can be decoded with: ```go type Config struct { Age int Cats []string Pi float64 Perfection []int DOB time.Time } var conf Config _, err := toml.Decode(tomlData, &conf) ``` You can also use struct tags if your struct field name doesn't map to a TOML key value directly: ```toml some_key_NAME = "wat" ``` ```go type TOML struct { ObscureKey string `toml:"some_key_NAME"` } ``` Beware that like other decoders **only exported fields** are considered when encoding and decoding; private fields are silently ignored. ### Using the `Marshaler` and `encoding.TextUnmarshaler` interfaces Here's an example that automatically parses values in a `mail.Address`: ```toml contacts = [ "Donald Duck ", "Scrooge McDuck ", ] ``` Can be decoded with: ```go // Create address type which satisfies the encoding.TextUnmarshaler interface. type address struct { *mail.Address } func (a *address) UnmarshalText(text []byte) error { var err error a.Address, err = mail.ParseAddress(string(text)) return err } // Decode it. func decode() { blob := ` contacts = [ "Donald Duck ", "Scrooge McDuck ", ] ` var contacts struct { Contacts []address } _, err := toml.Decode(blob, &contacts) if err != nil { log.Fatal(err) } for _, c := range contacts.Contacts { fmt.Printf("%#v\n", c.Address) } // Output: // &mail.Address{Name:"Donald Duck", Address:"donald@duckburg.com"} // &mail.Address{Name:"Scrooge McDuck", Address:"scrooge@duckburg.com"} } ``` To target TOML specifically you can implement `UnmarshalTOML` TOML interface in a similar way. ### More complex usage See the [`_example/`](/_example) directory for a more complex example. ================================================ FILE: vendor/github.com/BurntSushi/toml/decode.go ================================================ package toml import ( "bytes" "encoding" "encoding/json" "fmt" "io" "io/ioutil" "math" "os" "reflect" "strconv" "strings" "time" ) // Unmarshaler is the interface implemented by objects that can unmarshal a // TOML description of themselves. type Unmarshaler interface { UnmarshalTOML(interface{}) error } // Unmarshal decodes the contents of data in TOML format into a pointer v. // // See [Decoder] for a description of the decoding process. func Unmarshal(data []byte, v interface{}) error { _, err := NewDecoder(bytes.NewReader(data)).Decode(v) return err } // Decode the TOML data in to the pointer v. // // See [Decoder] for a description of the decoding process. func Decode(data string, v interface{}) (MetaData, error) { return NewDecoder(strings.NewReader(data)).Decode(v) } // DecodeFile reads the contents of a file and decodes it with [Decode]. func DecodeFile(path string, v interface{}) (MetaData, error) { fp, err := os.Open(path) if err != nil { return MetaData{}, err } defer fp.Close() return NewDecoder(fp).Decode(v) } // Primitive is a TOML value that hasn't been decoded into a Go value. // // This type can be used for any value, which will cause decoding to be delayed. // You can use [PrimitiveDecode] to "manually" decode these values. // // NOTE: The underlying representation of a `Primitive` value is subject to // change. Do not rely on it. // // NOTE: Primitive values are still parsed, so using them will only avoid the // overhead of reflection. They can be useful when you don't know the exact type // of TOML data until runtime. type Primitive struct { undecoded interface{} context Key } // The significand precision for float32 and float64 is 24 and 53 bits; this is // the range a natural number can be stored in a float without loss of data. const ( maxSafeFloat32Int = 16777215 // 2^24-1 maxSafeFloat64Int = int64(9007199254740991) // 2^53-1 ) // Decoder decodes TOML data. // // TOML tables correspond to Go structs or maps; they can be used // interchangeably, but structs offer better type safety. // // TOML table arrays correspond to either a slice of structs or a slice of maps. // // TOML datetimes correspond to [time.Time]. Local datetimes are parsed in the // local timezone. // // [time.Duration] types are treated as nanoseconds if the TOML value is an // integer, or they're parsed with time.ParseDuration() if they're strings. // // All other TOML types (float, string, int, bool and array) correspond to the // obvious Go types. // // An exception to the above rules is if a type implements the TextUnmarshaler // interface, in which case any primitive TOML value (floats, strings, integers, // booleans, datetimes) will be converted to a []byte and given to the value's // UnmarshalText method. See the Unmarshaler example for a demonstration with // email addresses. // // # Key mapping // // TOML keys can map to either keys in a Go map or field names in a Go struct. // The special `toml` struct tag can be used to map TOML keys to struct fields // that don't match the key name exactly (see the example). A case insensitive // match to struct names will be tried if an exact match can't be found. // // The mapping between TOML values and Go values is loose. That is, there may // exist TOML values that cannot be placed into your representation, and there // may be parts of your representation that do not correspond to TOML values. // This loose mapping can be made stricter by using the IsDefined and/or // Undecoded methods on the MetaData returned. // // This decoder does not handle cyclic types. Decode will not terminate if a // cyclic type is passed. type Decoder struct { r io.Reader } // NewDecoder creates a new Decoder. func NewDecoder(r io.Reader) *Decoder { return &Decoder{r: r} } var ( unmarshalToml = reflect.TypeOf((*Unmarshaler)(nil)).Elem() unmarshalText = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() primitiveType = reflect.TypeOf((*Primitive)(nil)).Elem() ) // Decode TOML data in to the pointer `v`. func (dec *Decoder) Decode(v interface{}) (MetaData, error) { rv := reflect.ValueOf(v) if rv.Kind() != reflect.Ptr { s := "%q" if reflect.TypeOf(v) == nil { s = "%v" } return MetaData{}, fmt.Errorf("toml: cannot decode to non-pointer "+s, reflect.TypeOf(v)) } if rv.IsNil() { return MetaData{}, fmt.Errorf("toml: cannot decode to nil value of %q", reflect.TypeOf(v)) } // Check if this is a supported type: struct, map, interface{}, or something // that implements UnmarshalTOML or UnmarshalText. rv = indirect(rv) rt := rv.Type() if rv.Kind() != reflect.Struct && rv.Kind() != reflect.Map && !(rv.Kind() == reflect.Interface && rv.NumMethod() == 0) && !rt.Implements(unmarshalToml) && !rt.Implements(unmarshalText) { return MetaData{}, fmt.Errorf("toml: cannot decode to type %s", rt) } // TODO: parser should read from io.Reader? Or at the very least, make it // read from []byte rather than string data, err := ioutil.ReadAll(dec.r) if err != nil { return MetaData{}, err } p, err := parse(string(data)) if err != nil { return MetaData{}, err } md := MetaData{ mapping: p.mapping, keyInfo: p.keyInfo, keys: p.ordered, decoded: make(map[string]struct{}, len(p.ordered)), context: nil, data: data, } return md, md.unify(p.mapping, rv) } // PrimitiveDecode is just like the other Decode* functions, except it decodes a // TOML value that has already been parsed. Valid primitive values can *only* be // obtained from values filled by the decoder functions, including this method. // (i.e., v may contain more [Primitive] values.) // // Meta data for primitive values is included in the meta data returned by the // Decode* functions with one exception: keys returned by the Undecoded method // will only reflect keys that were decoded. Namely, any keys hidden behind a // Primitive will be considered undecoded. Executing this method will update the // undecoded keys in the meta data. (See the example.) func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error { md.context = primValue.context defer func() { md.context = nil }() return md.unify(primValue.undecoded, rvalue(v)) } // unify performs a sort of type unification based on the structure of `rv`, // which is the client representation. // // Any type mismatch produces an error. Finding a type that we don't know // how to handle produces an unsupported type error. func (md *MetaData) unify(data interface{}, rv reflect.Value) error { // Special case. Look for a `Primitive` value. // TODO: #76 would make this superfluous after implemented. if rv.Type() == primitiveType { // Save the undecoded data and the key context into the primitive // value. context := make(Key, len(md.context)) copy(context, md.context) rv.Set(reflect.ValueOf(Primitive{ undecoded: data, context: context, })) return nil } rvi := rv.Interface() if v, ok := rvi.(Unmarshaler); ok { return v.UnmarshalTOML(data) } if v, ok := rvi.(encoding.TextUnmarshaler); ok { return md.unifyText(data, v) } // TODO: // The behavior here is incorrect whenever a Go type satisfies the // encoding.TextUnmarshaler interface but also corresponds to a TOML hash or // array. In particular, the unmarshaler should only be applied to primitive // TOML values. But at this point, it will be applied to all kinds of values // and produce an incorrect error whenever those values are hashes or arrays // (including arrays of tables). k := rv.Kind() if k >= reflect.Int && k <= reflect.Uint64 { return md.unifyInt(data, rv) } switch k { case reflect.Ptr: elem := reflect.New(rv.Type().Elem()) err := md.unify(data, reflect.Indirect(elem)) if err != nil { return err } rv.Set(elem) return nil case reflect.Struct: return md.unifyStruct(data, rv) case reflect.Map: return md.unifyMap(data, rv) case reflect.Array: return md.unifyArray(data, rv) case reflect.Slice: return md.unifySlice(data, rv) case reflect.String: return md.unifyString(data, rv) case reflect.Bool: return md.unifyBool(data, rv) case reflect.Interface: if rv.NumMethod() > 0 { /// Only empty interfaces are supported. return md.e("unsupported type %s", rv.Type()) } return md.unifyAnything(data, rv) case reflect.Float32, reflect.Float64: return md.unifyFloat64(data, rv) } return md.e("unsupported type %s", rv.Kind()) } func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error { tmap, ok := mapping.(map[string]interface{}) if !ok { if mapping == nil { return nil } return md.e("type mismatch for %s: expected table but found %T", rv.Type().String(), mapping) } for key, datum := range tmap { var f *field fields := cachedTypeFields(rv.Type()) for i := range fields { ff := &fields[i] if ff.name == key { f = ff break } if f == nil && strings.EqualFold(ff.name, key) { f = ff } } if f != nil { subv := rv for _, i := range f.index { subv = indirect(subv.Field(i)) } if isUnifiable(subv) { md.decoded[md.context.add(key).String()] = struct{}{} md.context = append(md.context, key) err := md.unify(datum, subv) if err != nil { return err } md.context = md.context[0 : len(md.context)-1] } else if f.name != "" { return md.e("cannot write unexported field %s.%s", rv.Type().String(), f.name) } } } return nil } func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error { keyType := rv.Type().Key().Kind() if keyType != reflect.String && keyType != reflect.Interface { return fmt.Errorf("toml: cannot decode to a map with non-string key type (%s in %q)", keyType, rv.Type()) } tmap, ok := mapping.(map[string]interface{}) if !ok { if tmap == nil { return nil } return md.badtype("map", mapping) } if rv.IsNil() { rv.Set(reflect.MakeMap(rv.Type())) } for k, v := range tmap { md.decoded[md.context.add(k).String()] = struct{}{} md.context = append(md.context, k) rvval := reflect.Indirect(reflect.New(rv.Type().Elem())) err := md.unify(v, indirect(rvval)) if err != nil { return err } md.context = md.context[0 : len(md.context)-1] rvkey := indirect(reflect.New(rv.Type().Key())) switch keyType { case reflect.Interface: rvkey.Set(reflect.ValueOf(k)) case reflect.String: rvkey.SetString(k) } rv.SetMapIndex(rvkey, rvval) } return nil } func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error { datav := reflect.ValueOf(data) if datav.Kind() != reflect.Slice { if !datav.IsValid() { return nil } return md.badtype("slice", data) } if l := datav.Len(); l != rv.Len() { return md.e("expected array length %d; got TOML array of length %d", rv.Len(), l) } return md.unifySliceArray(datav, rv) } func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error { datav := reflect.ValueOf(data) if datav.Kind() != reflect.Slice { if !datav.IsValid() { return nil } return md.badtype("slice", data) } n := datav.Len() if rv.IsNil() || rv.Cap() < n { rv.Set(reflect.MakeSlice(rv.Type(), n, n)) } rv.SetLen(n) return md.unifySliceArray(datav, rv) } func (md *MetaData) unifySliceArray(data, rv reflect.Value) error { l := data.Len() for i := 0; i < l; i++ { err := md.unify(data.Index(i).Interface(), indirect(rv.Index(i))) if err != nil { return err } } return nil } func (md *MetaData) unifyString(data interface{}, rv reflect.Value) error { _, ok := rv.Interface().(json.Number) if ok { if i, ok := data.(int64); ok { rv.SetString(strconv.FormatInt(i, 10)) } else if f, ok := data.(float64); ok { rv.SetString(strconv.FormatFloat(f, 'f', -1, 64)) } else { return md.badtype("string", data) } return nil } if s, ok := data.(string); ok { rv.SetString(s) return nil } return md.badtype("string", data) } func (md *MetaData) unifyFloat64(data interface{}, rv reflect.Value) error { rvk := rv.Kind() if num, ok := data.(float64); ok { switch rvk { case reflect.Float32: if num < -math.MaxFloat32 || num > math.MaxFloat32 { return md.parseErr(errParseRange{i: num, size: rvk.String()}) } fallthrough case reflect.Float64: rv.SetFloat(num) default: panic("bug") } return nil } if num, ok := data.(int64); ok { if (rvk == reflect.Float32 && (num < -maxSafeFloat32Int || num > maxSafeFloat32Int)) || (rvk == reflect.Float64 && (num < -maxSafeFloat64Int || num > maxSafeFloat64Int)) { return md.parseErr(errParseRange{i: num, size: rvk.String()}) } rv.SetFloat(float64(num)) return nil } return md.badtype("float", data) } func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error { _, ok := rv.Interface().(time.Duration) if ok { // Parse as string duration, and fall back to regular integer parsing // (as nanosecond) if this is not a string. if s, ok := data.(string); ok { dur, err := time.ParseDuration(s) if err != nil { return md.parseErr(errParseDuration{s}) } rv.SetInt(int64(dur)) return nil } } num, ok := data.(int64) if !ok { return md.badtype("integer", data) } rvk := rv.Kind() switch { case rvk >= reflect.Int && rvk <= reflect.Int64: if (rvk == reflect.Int8 && (num < math.MinInt8 || num > math.MaxInt8)) || (rvk == reflect.Int16 && (num < math.MinInt16 || num > math.MaxInt16)) || (rvk == reflect.Int32 && (num < math.MinInt32 || num > math.MaxInt32)) { return md.parseErr(errParseRange{i: num, size: rvk.String()}) } rv.SetInt(num) case rvk >= reflect.Uint && rvk <= reflect.Uint64: unum := uint64(num) if rvk == reflect.Uint8 && (num < 0 || unum > math.MaxUint8) || rvk == reflect.Uint16 && (num < 0 || unum > math.MaxUint16) || rvk == reflect.Uint32 && (num < 0 || unum > math.MaxUint32) { return md.parseErr(errParseRange{i: num, size: rvk.String()}) } rv.SetUint(unum) default: panic("unreachable") } return nil } func (md *MetaData) unifyBool(data interface{}, rv reflect.Value) error { if b, ok := data.(bool); ok { rv.SetBool(b) return nil } return md.badtype("boolean", data) } func (md *MetaData) unifyAnything(data interface{}, rv reflect.Value) error { rv.Set(reflect.ValueOf(data)) return nil } func (md *MetaData) unifyText(data interface{}, v encoding.TextUnmarshaler) error { var s string switch sdata := data.(type) { case Marshaler: text, err := sdata.MarshalTOML() if err != nil { return err } s = string(text) case encoding.TextMarshaler: text, err := sdata.MarshalText() if err != nil { return err } s = string(text) case fmt.Stringer: s = sdata.String() case string: s = sdata case bool: s = fmt.Sprintf("%v", sdata) case int64: s = fmt.Sprintf("%d", sdata) case float64: s = fmt.Sprintf("%f", sdata) default: return md.badtype("primitive (string-like)", data) } if err := v.UnmarshalText([]byte(s)); err != nil { return err } return nil } func (md *MetaData) badtype(dst string, data interface{}) error { return md.e("incompatible types: TOML value has type %T; destination has type %s", data, dst) } func (md *MetaData) parseErr(err error) error { k := md.context.String() return ParseError{ LastKey: k, Position: md.keyInfo[k].pos, Line: md.keyInfo[k].pos.Line, err: err, input: string(md.data), } } func (md *MetaData) e(format string, args ...interface{}) error { f := "toml: " if len(md.context) > 0 { f = fmt.Sprintf("toml: (last key %q): ", md.context) p := md.keyInfo[md.context.String()].pos if p.Line > 0 { f = fmt.Sprintf("toml: line %d (last key %q): ", p.Line, md.context) } } return fmt.Errorf(f+format, args...) } // rvalue returns a reflect.Value of `v`. All pointers are resolved. func rvalue(v interface{}) reflect.Value { return indirect(reflect.ValueOf(v)) } // indirect returns the value pointed to by a pointer. // // Pointers are followed until the value is not a pointer. New values are // allocated for each nil pointer. // // An exception to this rule is if the value satisfies an interface of interest // to us (like encoding.TextUnmarshaler). func indirect(v reflect.Value) reflect.Value { if v.Kind() != reflect.Ptr { if v.CanSet() { pv := v.Addr() pvi := pv.Interface() if _, ok := pvi.(encoding.TextUnmarshaler); ok { return pv } if _, ok := pvi.(Unmarshaler); ok { return pv } } return v } if v.IsNil() { v.Set(reflect.New(v.Type().Elem())) } return indirect(reflect.Indirect(v)) } func isUnifiable(rv reflect.Value) bool { if rv.CanSet() { return true } rvi := rv.Interface() if _, ok := rvi.(encoding.TextUnmarshaler); ok { return true } if _, ok := rvi.(Unmarshaler); ok { return true } return false } ================================================ FILE: vendor/github.com/BurntSushi/toml/decode_go116.go ================================================ //go:build go1.16 // +build go1.16 package toml import ( "io/fs" ) // DecodeFS reads the contents of a file from [fs.FS] and decodes it with // [Decode]. func DecodeFS(fsys fs.FS, path string, v interface{}) (MetaData, error) { fp, err := fsys.Open(path) if err != nil { return MetaData{}, err } defer fp.Close() return NewDecoder(fp).Decode(v) } ================================================ FILE: vendor/github.com/BurntSushi/toml/deprecated.go ================================================ package toml import ( "encoding" "io" ) // TextMarshaler is an alias for encoding.TextMarshaler. // // Deprecated: use encoding.TextMarshaler type TextMarshaler encoding.TextMarshaler // TextUnmarshaler is an alias for encoding.TextUnmarshaler. // // Deprecated: use encoding.TextUnmarshaler type TextUnmarshaler encoding.TextUnmarshaler // PrimitiveDecode is an alias for MetaData.PrimitiveDecode(). // // Deprecated: use MetaData.PrimitiveDecode. func PrimitiveDecode(primValue Primitive, v interface{}) error { md := MetaData{decoded: make(map[string]struct{})} return md.unify(primValue.undecoded, rvalue(v)) } // DecodeReader is an alias for NewDecoder(r).Decode(v). // // Deprecated: use NewDecoder(reader).Decode(&value). func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { return NewDecoder(r).Decode(v) } ================================================ FILE: vendor/github.com/BurntSushi/toml/doc.go ================================================ // Package toml implements decoding and encoding of TOML files. // // This package supports TOML v1.0.0, as specified at https://toml.io // // There is also support for delaying decoding with the Primitive type, and // querying the set of keys in a TOML document with the MetaData type. // // The github.com/BurntSushi/toml/cmd/tomlv package implements a TOML validator, // and can be used to verify if TOML document is valid. It can also be used to // print the type of each key. package toml ================================================ FILE: vendor/github.com/BurntSushi/toml/encode.go ================================================ package toml import ( "bufio" "encoding" "encoding/json" "errors" "fmt" "io" "math" "reflect" "sort" "strconv" "strings" "time" "github.com/BurntSushi/toml/internal" ) type tomlEncodeError struct{ error } var ( errArrayNilElement = errors.New("toml: cannot encode array with nil element") errNonString = errors.New("toml: cannot encode a map with non-string key type") errNoKey = errors.New("toml: top-level values must be Go maps or structs") errAnything = errors.New("") // used in testing ) var dblQuotedReplacer = strings.NewReplacer( "\"", "\\\"", "\\", "\\\\", "\x00", `\u0000`, "\x01", `\u0001`, "\x02", `\u0002`, "\x03", `\u0003`, "\x04", `\u0004`, "\x05", `\u0005`, "\x06", `\u0006`, "\x07", `\u0007`, "\b", `\b`, "\t", `\t`, "\n", `\n`, "\x0b", `\u000b`, "\f", `\f`, "\r", `\r`, "\x0e", `\u000e`, "\x0f", `\u000f`, "\x10", `\u0010`, "\x11", `\u0011`, "\x12", `\u0012`, "\x13", `\u0013`, "\x14", `\u0014`, "\x15", `\u0015`, "\x16", `\u0016`, "\x17", `\u0017`, "\x18", `\u0018`, "\x19", `\u0019`, "\x1a", `\u001a`, "\x1b", `\u001b`, "\x1c", `\u001c`, "\x1d", `\u001d`, "\x1e", `\u001e`, "\x1f", `\u001f`, "\x7f", `\u007f`, ) var ( marshalToml = reflect.TypeOf((*Marshaler)(nil)).Elem() marshalText = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() timeType = reflect.TypeOf((*time.Time)(nil)).Elem() ) // Marshaler is the interface implemented by types that can marshal themselves // into valid TOML. type Marshaler interface { MarshalTOML() ([]byte, error) } // Encoder encodes a Go to a TOML document. // // The mapping between Go values and TOML values should be precisely the same as // for [Decode]. // // time.Time is encoded as a RFC 3339 string, and time.Duration as its string // representation. // // The [Marshaler] and [encoding.TextMarshaler] interfaces are supported to // encoding the value as custom TOML. // // If you want to write arbitrary binary data then you will need to use // something like base64 since TOML does not have any binary types. // // When encoding TOML hashes (Go maps or structs), keys without any sub-hashes // are encoded first. // // Go maps will be sorted alphabetically by key for deterministic output. // // The toml struct tag can be used to provide the key name; if omitted the // struct field name will be used. If the "omitempty" option is present the // following value will be skipped: // // - arrays, slices, maps, and string with len of 0 // - struct with all zero values // - bool false // // If omitzero is given all int and float types with a value of 0 will be // skipped. // // Encoding Go values without a corresponding TOML representation will return an // error. Examples of this includes maps with non-string keys, slices with nil // elements, embedded non-struct types, and nested slices containing maps or // structs. (e.g. [][]map[string]string is not allowed but []map[string]string // is okay, as is []map[string][]string). // // NOTE: only exported keys are encoded due to the use of reflection. Unexported // keys are silently discarded. type Encoder struct { // String to use for a single indentation level; default is two spaces. Indent string w *bufio.Writer hasWritten bool // written any output to w yet? } // NewEncoder create a new Encoder. func NewEncoder(w io.Writer) *Encoder { return &Encoder{ w: bufio.NewWriter(w), Indent: " ", } } // Encode writes a TOML representation of the Go value to the [Encoder]'s writer. // // An error is returned if the value given cannot be encoded to a valid TOML // document. func (enc *Encoder) Encode(v interface{}) error { rv := eindirect(reflect.ValueOf(v)) err := enc.safeEncode(Key([]string{}), rv) if err != nil { return err } return enc.w.Flush() } func (enc *Encoder) safeEncode(key Key, rv reflect.Value) (err error) { defer func() { if r := recover(); r != nil { if terr, ok := r.(tomlEncodeError); ok { err = terr.error return } panic(r) } }() enc.encode(key, rv) return nil } func (enc *Encoder) encode(key Key, rv reflect.Value) { // If we can marshal the type to text, then we use that. This prevents the // encoder for handling these types as generic structs (or whatever the // underlying type of a TextMarshaler is). switch { case isMarshaler(rv): enc.writeKeyValue(key, rv, false) return case rv.Type() == primitiveType: // TODO: #76 would make this superfluous after implemented. enc.encode(key, reflect.ValueOf(rv.Interface().(Primitive).undecoded)) return } k := rv.Kind() switch k { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String, reflect.Bool: enc.writeKeyValue(key, rv, false) case reflect.Array, reflect.Slice: if typeEqual(tomlArrayHash, tomlTypeOfGo(rv)) { enc.eArrayOfTables(key, rv) } else { enc.writeKeyValue(key, rv, false) } case reflect.Interface: if rv.IsNil() { return } enc.encode(key, rv.Elem()) case reflect.Map: if rv.IsNil() { return } enc.eTable(key, rv) case reflect.Ptr: if rv.IsNil() { return } enc.encode(key, rv.Elem()) case reflect.Struct: enc.eTable(key, rv) default: encPanic(fmt.Errorf("unsupported type for key '%s': %s", key, k)) } } // eElement encodes any value that can be an array element. func (enc *Encoder) eElement(rv reflect.Value) { switch v := rv.Interface().(type) { case time.Time: // Using TextMarshaler adds extra quotes, which we don't want. format := time.RFC3339Nano switch v.Location() { case internal.LocalDatetime: format = "2006-01-02T15:04:05.999999999" case internal.LocalDate: format = "2006-01-02" case internal.LocalTime: format = "15:04:05.999999999" } switch v.Location() { default: enc.wf(v.Format(format)) case internal.LocalDatetime, internal.LocalDate, internal.LocalTime: enc.wf(v.In(time.UTC).Format(format)) } return case Marshaler: s, err := v.MarshalTOML() if err != nil { encPanic(err) } if s == nil { encPanic(errors.New("MarshalTOML returned nil and no error")) } enc.w.Write(s) return case encoding.TextMarshaler: s, err := v.MarshalText() if err != nil { encPanic(err) } if s == nil { encPanic(errors.New("MarshalText returned nil and no error")) } enc.writeQuoted(string(s)) return case time.Duration: enc.writeQuoted(v.String()) return case json.Number: n, _ := rv.Interface().(json.Number) if n == "" { /// Useful zero value. enc.w.WriteByte('0') return } else if v, err := n.Int64(); err == nil { enc.eElement(reflect.ValueOf(v)) return } else if v, err := n.Float64(); err == nil { enc.eElement(reflect.ValueOf(v)) return } encPanic(fmt.Errorf("unable to convert %q to int64 or float64", n)) } switch rv.Kind() { case reflect.Ptr: enc.eElement(rv.Elem()) return case reflect.String: enc.writeQuoted(rv.String()) case reflect.Bool: enc.wf(strconv.FormatBool(rv.Bool())) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: enc.wf(strconv.FormatInt(rv.Int(), 10)) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: enc.wf(strconv.FormatUint(rv.Uint(), 10)) case reflect.Float32: f := rv.Float() if math.IsNaN(f) { enc.wf("nan") } else if math.IsInf(f, 0) { enc.wf("%cinf", map[bool]byte{true: '-', false: '+'}[math.Signbit(f)]) } else { enc.wf(floatAddDecimal(strconv.FormatFloat(f, 'f', -1, 32))) } case reflect.Float64: f := rv.Float() if math.IsNaN(f) { enc.wf("nan") } else if math.IsInf(f, 0) { enc.wf("%cinf", map[bool]byte{true: '-', false: '+'}[math.Signbit(f)]) } else { enc.wf(floatAddDecimal(strconv.FormatFloat(f, 'f', -1, 64))) } case reflect.Array, reflect.Slice: enc.eArrayOrSliceElement(rv) case reflect.Struct: enc.eStruct(nil, rv, true) case reflect.Map: enc.eMap(nil, rv, true) case reflect.Interface: enc.eElement(rv.Elem()) default: encPanic(fmt.Errorf("unexpected type: %T", rv.Interface())) } } // By the TOML spec, all floats must have a decimal with at least one number on // either side. func floatAddDecimal(fstr string) string { if !strings.Contains(fstr, ".") { return fstr + ".0" } return fstr } func (enc *Encoder) writeQuoted(s string) { enc.wf("\"%s\"", dblQuotedReplacer.Replace(s)) } func (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) { length := rv.Len() enc.wf("[") for i := 0; i < length; i++ { elem := eindirect(rv.Index(i)) enc.eElement(elem) if i != length-1 { enc.wf(", ") } } enc.wf("]") } func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) { if len(key) == 0 { encPanic(errNoKey) } for i := 0; i < rv.Len(); i++ { trv := eindirect(rv.Index(i)) if isNil(trv) { continue } enc.newline() enc.wf("%s[[%s]]", enc.indentStr(key), key) enc.newline() enc.eMapOrStruct(key, trv, false) } } func (enc *Encoder) eTable(key Key, rv reflect.Value) { if len(key) == 1 { // Output an extra newline between top-level tables. // (The newline isn't written if nothing else has been written though.) enc.newline() } if len(key) > 0 { enc.wf("%s[%s]", enc.indentStr(key), key) enc.newline() } enc.eMapOrStruct(key, rv, false) } func (enc *Encoder) eMapOrStruct(key Key, rv reflect.Value, inline bool) { switch rv.Kind() { case reflect.Map: enc.eMap(key, rv, inline) case reflect.Struct: enc.eStruct(key, rv, inline) default: // Should never happen? panic("eTable: unhandled reflect.Value Kind: " + rv.Kind().String()) } } func (enc *Encoder) eMap(key Key, rv reflect.Value, inline bool) { rt := rv.Type() if rt.Key().Kind() != reflect.String { encPanic(errNonString) } // Sort keys so that we have deterministic output. And write keys directly // underneath this key first, before writing sub-structs or sub-maps. var mapKeysDirect, mapKeysSub []string for _, mapKey := range rv.MapKeys() { k := mapKey.String() if typeIsTable(tomlTypeOfGo(eindirect(rv.MapIndex(mapKey)))) { mapKeysSub = append(mapKeysSub, k) } else { mapKeysDirect = append(mapKeysDirect, k) } } var writeMapKeys = func(mapKeys []string, trailC bool) { sort.Strings(mapKeys) for i, mapKey := range mapKeys { val := eindirect(rv.MapIndex(reflect.ValueOf(mapKey))) if isNil(val) { continue } if inline { enc.writeKeyValue(Key{mapKey}, val, true) if trailC || i != len(mapKeys)-1 { enc.wf(", ") } } else { enc.encode(key.add(mapKey), val) } } } if inline { enc.wf("{") } writeMapKeys(mapKeysDirect, len(mapKeysSub) > 0) writeMapKeys(mapKeysSub, false) if inline { enc.wf("}") } } const is32Bit = (32 << (^uint(0) >> 63)) == 32 func pointerTo(t reflect.Type) reflect.Type { if t.Kind() == reflect.Ptr { return pointerTo(t.Elem()) } return t } func (enc *Encoder) eStruct(key Key, rv reflect.Value, inline bool) { // Write keys for fields directly under this key first, because if we write // a field that creates a new table then all keys under it will be in that // table (not the one we're writing here). // // Fields is a [][]int: for fieldsDirect this always has one entry (the // struct index). For fieldsSub it contains two entries: the parent field // index from tv, and the field indexes for the fields of the sub. var ( rt = rv.Type() fieldsDirect, fieldsSub [][]int addFields func(rt reflect.Type, rv reflect.Value, start []int) ) addFields = func(rt reflect.Type, rv reflect.Value, start []int) { for i := 0; i < rt.NumField(); i++ { f := rt.Field(i) isEmbed := f.Anonymous && pointerTo(f.Type).Kind() == reflect.Struct if f.PkgPath != "" && !isEmbed { /// Skip unexported fields. continue } opts := getOptions(f.Tag) if opts.skip { continue } frv := eindirect(rv.Field(i)) if is32Bit { // Copy so it works correct on 32bit archs; not clear why this // is needed. See #314, and https://www.reddit.com/r/golang/comments/pnx8v4 // This also works fine on 64bit, but 32bit archs are somewhat // rare and this is a wee bit faster. copyStart := make([]int, len(start)) copy(copyStart, start) start = copyStart } // Treat anonymous struct fields with tag names as though they are // not anonymous, like encoding/json does. // // Non-struct anonymous fields use the normal encoding logic. if isEmbed { if getOptions(f.Tag).name == "" && frv.Kind() == reflect.Struct { addFields(frv.Type(), frv, append(start, f.Index...)) continue } } if typeIsTable(tomlTypeOfGo(frv)) { fieldsSub = append(fieldsSub, append(start, f.Index...)) } else { fieldsDirect = append(fieldsDirect, append(start, f.Index...)) } } } addFields(rt, rv, nil) writeFields := func(fields [][]int) { for _, fieldIndex := range fields { fieldType := rt.FieldByIndex(fieldIndex) fieldVal := rv.FieldByIndex(fieldIndex) opts := getOptions(fieldType.Tag) if opts.skip { continue } if opts.omitempty && isEmpty(fieldVal) { continue } fieldVal = eindirect(fieldVal) if isNil(fieldVal) { /// Don't write anything for nil fields. continue } keyName := fieldType.Name if opts.name != "" { keyName = opts.name } if opts.omitzero && isZero(fieldVal) { continue } if inline { enc.writeKeyValue(Key{keyName}, fieldVal, true) if fieldIndex[0] != len(fields)-1 { enc.wf(", ") } } else { enc.encode(key.add(keyName), fieldVal) } } } if inline { enc.wf("{") } writeFields(fieldsDirect) writeFields(fieldsSub) if inline { enc.wf("}") } } // tomlTypeOfGo returns the TOML type name of the Go value's type. // // It is used to determine whether the types of array elements are mixed (which // is forbidden). If the Go value is nil, then it is illegal for it to be an // array element, and valueIsNil is returned as true. // // The type may be `nil`, which means no concrete TOML type could be found. func tomlTypeOfGo(rv reflect.Value) tomlType { if isNil(rv) || !rv.IsValid() { return nil } if rv.Kind() == reflect.Struct { if rv.Type() == timeType { return tomlDatetime } if isMarshaler(rv) { return tomlString } return tomlHash } if isMarshaler(rv) { return tomlString } switch rv.Kind() { case reflect.Bool: return tomlBool case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: return tomlInteger case reflect.Float32, reflect.Float64: return tomlFloat case reflect.Array, reflect.Slice: if isTableArray(rv) { return tomlArrayHash } return tomlArray case reflect.Ptr, reflect.Interface: return tomlTypeOfGo(rv.Elem()) case reflect.String: return tomlString case reflect.Map: return tomlHash default: encPanic(errors.New("unsupported type: " + rv.Kind().String())) panic("unreachable") } } func isMarshaler(rv reflect.Value) bool { return rv.Type().Implements(marshalText) || rv.Type().Implements(marshalToml) } // isTableArray reports if all entries in the array or slice are a table. func isTableArray(arr reflect.Value) bool { if isNil(arr) || !arr.IsValid() || arr.Len() == 0 { return false } ret := true for i := 0; i < arr.Len(); i++ { tt := tomlTypeOfGo(eindirect(arr.Index(i))) // Don't allow nil. if tt == nil { encPanic(errArrayNilElement) } if ret && !typeEqual(tomlHash, tt) { ret = false } } return ret } type tagOptions struct { skip bool // "-" name string omitempty bool omitzero bool } func getOptions(tag reflect.StructTag) tagOptions { t := tag.Get("toml") if t == "-" { return tagOptions{skip: true} } var opts tagOptions parts := strings.Split(t, ",") opts.name = parts[0] for _, s := range parts[1:] { switch s { case "omitempty": opts.omitempty = true case "omitzero": opts.omitzero = true } } return opts } func isZero(rv reflect.Value) bool { switch rv.Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return rv.Int() == 0 case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: return rv.Uint() == 0 case reflect.Float32, reflect.Float64: return rv.Float() == 0.0 } return false } func isEmpty(rv reflect.Value) bool { switch rv.Kind() { case reflect.Array, reflect.Slice, reflect.Map, reflect.String: return rv.Len() == 0 case reflect.Struct: if rv.Type().Comparable() { return reflect.Zero(rv.Type()).Interface() == rv.Interface() } // Need to also check if all the fields are empty, otherwise something // like this with uncomparable types will always return true: // // type a struct{ field b } // type b struct{ s []string } // s := a{field: b{s: []string{"AAA"}}} for i := 0; i < rv.NumField(); i++ { if !isEmpty(rv.Field(i)) { return false } } return true case reflect.Bool: return !rv.Bool() case reflect.Ptr: return rv.IsNil() } return false } func (enc *Encoder) newline() { if enc.hasWritten { enc.wf("\n") } } // Write a key/value pair: // // key = // // This is also used for "k = v" in inline tables; so something like this will // be written in three calls: // // ┌───────────────────┐ // │ ┌───┐ ┌────┐│ // v v v v vv // key = {k = 1, k2 = 2} func (enc *Encoder) writeKeyValue(key Key, val reflect.Value, inline bool) { /// Marshaler used on top-level document; call eElement() to just call /// Marshal{TOML,Text}. if len(key) == 0 { enc.eElement(val) return } enc.wf("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1)) enc.eElement(val) if !inline { enc.newline() } } func (enc *Encoder) wf(format string, v ...interface{}) { _, err := fmt.Fprintf(enc.w, format, v...) if err != nil { encPanic(err) } enc.hasWritten = true } func (enc *Encoder) indentStr(key Key) string { return strings.Repeat(enc.Indent, len(key)-1) } func encPanic(err error) { panic(tomlEncodeError{err}) } // Resolve any level of pointers to the actual value (e.g. **string → string). func eindirect(v reflect.Value) reflect.Value { if v.Kind() != reflect.Ptr && v.Kind() != reflect.Interface { if isMarshaler(v) { return v } if v.CanAddr() { /// Special case for marshalers; see #358. if pv := v.Addr(); isMarshaler(pv) { return pv } } return v } if v.IsNil() { return v } return eindirect(v.Elem()) } func isNil(rv reflect.Value) bool { switch rv.Kind() { case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: return rv.IsNil() default: return false } } ================================================ FILE: vendor/github.com/BurntSushi/toml/error.go ================================================ package toml import ( "fmt" "strings" ) // ParseError is returned when there is an error parsing the TOML syntax such as // invalid syntax, duplicate keys, etc. // // In addition to the error message itself, you can also print detailed location // information with context by using [ErrorWithPosition]: // // toml: error: Key 'fruit' was already created and cannot be used as an array. // // At line 4, column 2-7: // // 2 | fruit = [] // 3 | // 4 | [[fruit]] # Not allowed // ^^^^^ // // [ErrorWithUsage] can be used to print the above with some more detailed usage // guidance: // // toml: error: newlines not allowed within inline tables // // At line 1, column 18: // // 1 | x = [{ key = 42 # // ^ // // Error help: // // Inline tables must always be on a single line: // // table = {key = 42, second = 43} // // It is invalid to split them over multiple lines like so: // // # INVALID // table = { // key = 42, // second = 43 // } // // Use regular for this: // // [table] // key = 42 // second = 43 type ParseError struct { Message string // Short technical message. Usage string // Longer message with usage guidance; may be blank. Position Position // Position of the error LastKey string // Last parsed key, may be blank. // Line the error occurred. // // Deprecated: use [Position]. Line int err error input string } // Position of an error. type Position struct { Line int // Line number, starting at 1. Start int // Start of error, as byte offset starting at 0. Len int // Lenght in bytes. } func (pe ParseError) Error() string { msg := pe.Message if msg == "" { // Error from errorf() msg = pe.err.Error() } if pe.LastKey == "" { return fmt.Sprintf("toml: line %d: %s", pe.Position.Line, msg) } return fmt.Sprintf("toml: line %d (last key %q): %s", pe.Position.Line, pe.LastKey, msg) } // ErrorWithPosition returns the error with detailed location context. // // See the documentation on [ParseError]. func (pe ParseError) ErrorWithPosition() string { if pe.input == "" { // Should never happen, but just in case. return pe.Error() } var ( lines = strings.Split(pe.input, "\n") col = pe.column(lines) b = new(strings.Builder) ) msg := pe.Message if msg == "" { msg = pe.err.Error() } // TODO: don't show control characters as literals? This may not show up // well everywhere. if pe.Position.Len == 1 { fmt.Fprintf(b, "toml: error: %s\n\nAt line %d, column %d:\n\n", msg, pe.Position.Line, col+1) } else { fmt.Fprintf(b, "toml: error: %s\n\nAt line %d, column %d-%d:\n\n", msg, pe.Position.Line, col, col+pe.Position.Len) } if pe.Position.Line > 2 { fmt.Fprintf(b, "% 7d | %s\n", pe.Position.Line-2, lines[pe.Position.Line-3]) } if pe.Position.Line > 1 { fmt.Fprintf(b, "% 7d | %s\n", pe.Position.Line-1, lines[pe.Position.Line-2]) } fmt.Fprintf(b, "% 7d | %s\n", pe.Position.Line, lines[pe.Position.Line-1]) fmt.Fprintf(b, "% 10s%s%s\n", "", strings.Repeat(" ", col), strings.Repeat("^", pe.Position.Len)) return b.String() } // ErrorWithUsage returns the error with detailed location context and usage // guidance. // // See the documentation on [ParseError]. func (pe ParseError) ErrorWithUsage() string { m := pe.ErrorWithPosition() if u, ok := pe.err.(interface{ Usage() string }); ok && u.Usage() != "" { lines := strings.Split(strings.TrimSpace(u.Usage()), "\n") for i := range lines { if lines[i] != "" { lines[i] = " " + lines[i] } } return m + "Error help:\n\n" + strings.Join(lines, "\n") + "\n" } return m } func (pe ParseError) column(lines []string) int { var pos, col int for i := range lines { ll := len(lines[i]) + 1 // +1 for the removed newline if pos+ll >= pe.Position.Start { col = pe.Position.Start - pos if col < 0 { // Should never happen, but just in case. col = 0 } break } pos += ll } return col } type ( errLexControl struct{ r rune } errLexEscape struct{ r rune } errLexUTF8 struct{ b byte } errLexInvalidNum struct{ v string } errLexInvalidDate struct{ v string } errLexInlineTableNL struct{} errLexStringNL struct{} errParseRange struct { i interface{} // int or float size string // "int64", "uint16", etc. } errParseDuration struct{ d string } ) func (e errLexControl) Error() string { return fmt.Sprintf("TOML files cannot contain control characters: '0x%02x'", e.r) } func (e errLexControl) Usage() string { return "" } func (e errLexEscape) Error() string { return fmt.Sprintf(`invalid escape in string '\%c'`, e.r) } func (e errLexEscape) Usage() string { return usageEscape } func (e errLexUTF8) Error() string { return fmt.Sprintf("invalid UTF-8 byte: 0x%02x", e.b) } func (e errLexUTF8) Usage() string { return "" } func (e errLexInvalidNum) Error() string { return fmt.Sprintf("invalid number: %q", e.v) } func (e errLexInvalidNum) Usage() string { return "" } func (e errLexInvalidDate) Error() string { return fmt.Sprintf("invalid date: %q", e.v) } func (e errLexInvalidDate) Usage() string { return "" } func (e errLexInlineTableNL) Error() string { return "newlines not allowed within inline tables" } func (e errLexInlineTableNL) Usage() string { return usageInlineNewline } func (e errLexStringNL) Error() string { return "strings cannot contain newlines" } func (e errLexStringNL) Usage() string { return usageStringNewline } func (e errParseRange) Error() string { return fmt.Sprintf("%v is out of range for %s", e.i, e.size) } func (e errParseRange) Usage() string { return usageIntOverflow } func (e errParseDuration) Error() string { return fmt.Sprintf("invalid duration: %q", e.d) } func (e errParseDuration) Usage() string { return usageDuration } const usageEscape = ` A '\' inside a "-delimited string is interpreted as an escape character. The following escape sequences are supported: \b, \t, \n, \f, \r, \", \\, \uXXXX, and \UXXXXXXXX To prevent a '\' from being recognized as an escape character, use either: - a ' or '''-delimited string; escape characters aren't processed in them; or - write two backslashes to get a single backslash: '\\'. If you're trying to add a Windows path (e.g. "C:\Users\martin") then using '/' instead of '\' will usually also work: "C:/Users/martin". ` const usageInlineNewline = ` Inline tables must always be on a single line: table = {key = 42, second = 43} It is invalid to split them over multiple lines like so: # INVALID table = { key = 42, second = 43 } Use regular for this: [table] key = 42 second = 43 ` const usageStringNewline = ` Strings must always be on a single line, and cannot span more than one line: # INVALID string = "Hello, world!" Instead use """ or ''' to split strings over multiple lines: string = """Hello, world!""" ` const usageIntOverflow = ` This number is too large; this may be an error in the TOML, but it can also be a bug in the program that uses too small of an integer. The maximum and minimum values are: size │ lowest │ highest ───────┼────────────────┼────────── int8 │ -128 │ 127 int16 │ -32,768 │ 32,767 int32 │ -2,147,483,648 │ 2,147,483,647 int64 │ -9.2 × 10¹⁷ │ 9.2 × 10¹⁷ uint8 │ 0 │ 255 uint16 │ 0 │ 65535 uint32 │ 0 │ 4294967295 uint64 │ 0 │ 1.8 × 10¹⁸ int refers to int32 on 32-bit systems and int64 on 64-bit systems. ` const usageDuration = ` A duration must be as "number", without any spaces. Valid units are: ns nanoseconds (billionth of a second) us, µs microseconds (millionth of a second) ms milliseconds (thousands of a second) s seconds m minutes h hours You can combine multiple units; for example "5m10s" for 5 minutes and 10 seconds. ` ================================================ FILE: vendor/github.com/BurntSushi/toml/internal/tz.go ================================================ package internal import "time" // Timezones used for local datetime, date, and time TOML types. // // The exact way times and dates without a timezone should be interpreted is not // well-defined in the TOML specification and left to the implementation. These // defaults to current local timezone offset of the computer, but this can be // changed by changing these variables before decoding. // // TODO: // Ideally we'd like to offer people the ability to configure the used timezone // by setting Decoder.Timezone and Encoder.Timezone; however, this is a bit // tricky: the reason we use three different variables for this is to support // round-tripping – without these specific TZ names we wouldn't know which // format to use. // // There isn't a good way to encode this right now though, and passing this sort // of information also ties in to various related issues such as string format // encoding, encoding of comments, etc. // // So, for the time being, just put this in internal until we can write a good // comprehensive API for doing all of this. // // The reason they're exported is because they're referred from in e.g. // internal/tag. // // Note that this behaviour is valid according to the TOML spec as the exact // behaviour is left up to implementations. var ( localOffset = func() int { _, o := time.Now().Zone(); return o }() LocalDatetime = time.FixedZone("datetime-local", localOffset) LocalDate = time.FixedZone("date-local", localOffset) LocalTime = time.FixedZone("time-local", localOffset) ) ================================================ FILE: vendor/github.com/BurntSushi/toml/lex.go ================================================ package toml import ( "fmt" "reflect" "runtime" "strings" "unicode" "unicode/utf8" ) type itemType int const ( itemError itemType = iota itemNIL // used in the parser to indicate no type itemEOF itemText itemString itemRawString itemMultilineString itemRawMultilineString itemBool itemInteger itemFloat itemDatetime itemArray // the start of an array itemArrayEnd itemTableStart itemTableEnd itemArrayTableStart itemArrayTableEnd itemKeyStart itemKeyEnd itemCommentStart itemInlineTableStart itemInlineTableEnd ) const eof = 0 type stateFn func(lx *lexer) stateFn func (p Position) String() string { return fmt.Sprintf("at line %d; start %d; length %d", p.Line, p.Start, p.Len) } type lexer struct { input string start int pos int line int state stateFn items chan item tomlNext bool // Allow for backing up up to 4 runes. This is necessary because TOML // contains 3-rune tokens (""" and '''). prevWidths [4]int nprev int // how many of prevWidths are in use atEOF bool // If we emit an eof, we can still back up, but it is not OK to call next again. // A stack of state functions used to maintain context. // // The idea is to reuse parts of the state machine in various places. For // example, values can appear at the top level or within arbitrarily nested // arrays. The last state on the stack is used after a value has been lexed. // Similarly for comments. stack []stateFn } type item struct { typ itemType val string err error pos Position } func (lx *lexer) nextItem() item { for { select { case item := <-lx.items: return item default: lx.state = lx.state(lx) //fmt.Printf(" STATE %-24s current: %-10s stack: %s\n", lx.state, lx.current(), lx.stack) } } } func lex(input string, tomlNext bool) *lexer { lx := &lexer{ input: input, state: lexTop, items: make(chan item, 10), stack: make([]stateFn, 0, 10), line: 1, tomlNext: tomlNext, } return lx } func (lx *lexer) push(state stateFn) { lx.stack = append(lx.stack, state) } func (lx *lexer) pop() stateFn { if len(lx.stack) == 0 { return lx.errorf("BUG in lexer: no states to pop") } last := lx.stack[len(lx.stack)-1] lx.stack = lx.stack[0 : len(lx.stack)-1] return last } func (lx *lexer) current() string { return lx.input[lx.start:lx.pos] } func (lx lexer) getPos() Position { p := Position{ Line: lx.line, Start: lx.start, Len: lx.pos - lx.start, } if p.Len <= 0 { p.Len = 1 } return p } func (lx *lexer) emit(typ itemType) { // Needed for multiline strings ending with an incomplete UTF-8 sequence. if lx.start > lx.pos { lx.error(errLexUTF8{lx.input[lx.pos]}) return } lx.items <- item{typ: typ, pos: lx.getPos(), val: lx.current()} lx.start = lx.pos } func (lx *lexer) emitTrim(typ itemType) { lx.items <- item{typ: typ, pos: lx.getPos(), val: strings.TrimSpace(lx.current())} lx.start = lx.pos } func (lx *lexer) next() (r rune) { if lx.atEOF { panic("BUG in lexer: next called after EOF") } if lx.pos >= len(lx.input) { lx.atEOF = true return eof } if lx.input[lx.pos] == '\n' { lx.line++ } lx.prevWidths[3] = lx.prevWidths[2] lx.prevWidths[2] = lx.prevWidths[1] lx.prevWidths[1] = lx.prevWidths[0] if lx.nprev < 4 { lx.nprev++ } r, w := utf8.DecodeRuneInString(lx.input[lx.pos:]) if r == utf8.RuneError { lx.error(errLexUTF8{lx.input[lx.pos]}) return utf8.RuneError } // Note: don't use peek() here, as this calls next(). if isControl(r) || (r == '\r' && (len(lx.input)-1 == lx.pos || lx.input[lx.pos+1] != '\n')) { lx.errorControlChar(r) return utf8.RuneError } lx.prevWidths[0] = w lx.pos += w return r } // ignore skips over the pending input before this point. func (lx *lexer) ignore() { lx.start = lx.pos } // backup steps back one rune. Can be called 4 times between calls to next. func (lx *lexer) backup() { if lx.atEOF { lx.atEOF = false return } if lx.nprev < 1 { panic("BUG in lexer: backed up too far") } w := lx.prevWidths[0] lx.prevWidths[0] = lx.prevWidths[1] lx.prevWidths[1] = lx.prevWidths[2] lx.prevWidths[2] = lx.prevWidths[3] lx.nprev-- lx.pos -= w if lx.pos < len(lx.input) && lx.input[lx.pos] == '\n' { lx.line-- } } // accept consumes the next rune if it's equal to `valid`. func (lx *lexer) accept(valid rune) bool { if lx.next() == valid { return true } lx.backup() return false } // peek returns but does not consume the next rune in the input. func (lx *lexer) peek() rune { r := lx.next() lx.backup() return r } // skip ignores all input that matches the given predicate. func (lx *lexer) skip(pred func(rune) bool) { for { r := lx.next() if pred(r) { continue } lx.backup() lx.ignore() return } } // error stops all lexing by emitting an error and returning `nil`. // // Note that any value that is a character is escaped if it's a special // character (newlines, tabs, etc.). func (lx *lexer) error(err error) stateFn { if lx.atEOF { return lx.errorPrevLine(err) } lx.items <- item{typ: itemError, pos: lx.getPos(), err: err} return nil } // errorfPrevline is like error(), but sets the position to the last column of // the previous line. // // This is so that unexpected EOF or NL errors don't show on a new blank line. func (lx *lexer) errorPrevLine(err error) stateFn { pos := lx.getPos() pos.Line-- pos.Len = 1 pos.Start = lx.pos - 1 lx.items <- item{typ: itemError, pos: pos, err: err} return nil } // errorPos is like error(), but allows explicitly setting the position. func (lx *lexer) errorPos(start, length int, err error) stateFn { pos := lx.getPos() pos.Start = start pos.Len = length lx.items <- item{typ: itemError, pos: pos, err: err} return nil } // errorf is like error, and creates a new error. func (lx *lexer) errorf(format string, values ...interface{}) stateFn { if lx.atEOF { pos := lx.getPos() pos.Line-- pos.Len = 1 pos.Start = lx.pos - 1 lx.items <- item{typ: itemError, pos: pos, err: fmt.Errorf(format, values...)} return nil } lx.items <- item{typ: itemError, pos: lx.getPos(), err: fmt.Errorf(format, values...)} return nil } func (lx *lexer) errorControlChar(cc rune) stateFn { return lx.errorPos(lx.pos-1, 1, errLexControl{cc}) } // lexTop consumes elements at the top level of TOML data. func lexTop(lx *lexer) stateFn { r := lx.next() if isWhitespace(r) || isNL(r) { return lexSkip(lx, lexTop) } switch r { case '#': lx.push(lexTop) return lexCommentStart case '[': return lexTableStart case eof: if lx.pos > lx.start { return lx.errorf("unexpected EOF") } lx.emit(itemEOF) return nil } // At this point, the only valid item can be a key, so we back up // and let the key lexer do the rest. lx.backup() lx.push(lexTopEnd) return lexKeyStart } // lexTopEnd is entered whenever a top-level item has been consumed. (A value // or a table.) It must see only whitespace, and will turn back to lexTop // upon a newline. If it sees EOF, it will quit the lexer successfully. func lexTopEnd(lx *lexer) stateFn { r := lx.next() switch { case r == '#': // a comment will read to a newline for us. lx.push(lexTop) return lexCommentStart case isWhitespace(r): return lexTopEnd case isNL(r): lx.ignore() return lexTop case r == eof: lx.emit(itemEOF) return nil } return lx.errorf( "expected a top-level item to end with a newline, comment, or EOF, but got %q instead", r) } // lexTable lexes the beginning of a table. Namely, it makes sure that // it starts with a character other than '.' and ']'. // It assumes that '[' has already been consumed. // It also handles the case that this is an item in an array of tables. // e.g., '[[name]]'. func lexTableStart(lx *lexer) stateFn { if lx.peek() == '[' { lx.next() lx.emit(itemArrayTableStart) lx.push(lexArrayTableEnd) } else { lx.emit(itemTableStart) lx.push(lexTableEnd) } return lexTableNameStart } func lexTableEnd(lx *lexer) stateFn { lx.emit(itemTableEnd) return lexTopEnd } func lexArrayTableEnd(lx *lexer) stateFn { if r := lx.next(); r != ']' { return lx.errorf("expected end of table array name delimiter ']', but got %q instead", r) } lx.emit(itemArrayTableEnd) return lexTopEnd } func lexTableNameStart(lx *lexer) stateFn { lx.skip(isWhitespace) switch r := lx.peek(); { case r == ']' || r == eof: return lx.errorf("unexpected end of table name (table names cannot be empty)") case r == '.': return lx.errorf("unexpected table separator (table names cannot be empty)") case r == '"' || r == '\'': lx.ignore() lx.push(lexTableNameEnd) return lexQuotedName default: lx.push(lexTableNameEnd) return lexBareName } } // lexTableNameEnd reads the end of a piece of a table name, optionally // consuming whitespace. func lexTableNameEnd(lx *lexer) stateFn { lx.skip(isWhitespace) switch r := lx.next(); { case isWhitespace(r): return lexTableNameEnd case r == '.': lx.ignore() return lexTableNameStart case r == ']': return lx.pop() default: return lx.errorf("expected '.' or ']' to end table name, but got %q instead", r) } } // lexBareName lexes one part of a key or table. // // It assumes that at least one valid character for the table has already been // read. // // Lexes only one part, e.g. only 'a' inside 'a.b'. func lexBareName(lx *lexer) stateFn { r := lx.next() if isBareKeyChar(r, lx.tomlNext) { return lexBareName } lx.backup() lx.emit(itemText) return lx.pop() } // lexBareName lexes one part of a key or table. // // It assumes that at least one valid character for the table has already been // read. // // Lexes only one part, e.g. only '"a"' inside '"a".b'. func lexQuotedName(lx *lexer) stateFn { r := lx.next() switch { case isWhitespace(r): return lexSkip(lx, lexValue) case r == '"': lx.ignore() // ignore the '"' return lexString case r == '\'': lx.ignore() // ignore the "'" return lexRawString case r == eof: return lx.errorf("unexpected EOF; expected value") default: return lx.errorf("expected value but found %q instead", r) } } // lexKeyStart consumes all key parts until a '='. func lexKeyStart(lx *lexer) stateFn { lx.skip(isWhitespace) switch r := lx.peek(); { case r == '=' || r == eof: return lx.errorf("unexpected '=': key name appears blank") case r == '.': return lx.errorf("unexpected '.': keys cannot start with a '.'") case r == '"' || r == '\'': lx.ignore() fallthrough default: // Bare key lx.emit(itemKeyStart) return lexKeyNameStart } } func lexKeyNameStart(lx *lexer) stateFn { lx.skip(isWhitespace) switch r := lx.peek(); { case r == '=' || r == eof: return lx.errorf("unexpected '='") case r == '.': return lx.errorf("unexpected '.'") case r == '"' || r == '\'': lx.ignore() lx.push(lexKeyEnd) return lexQuotedName default: lx.push(lexKeyEnd) return lexBareName } } // lexKeyEnd consumes the end of a key and trims whitespace (up to the key // separator). func lexKeyEnd(lx *lexer) stateFn { lx.skip(isWhitespace) switch r := lx.next(); { case isWhitespace(r): return lexSkip(lx, lexKeyEnd) case r == eof: return lx.errorf("unexpected EOF; expected key separator '='") case r == '.': lx.ignore() return lexKeyNameStart case r == '=': lx.emit(itemKeyEnd) return lexSkip(lx, lexValue) default: return lx.errorf("expected '.' or '=', but got %q instead", r) } } // lexValue starts the consumption of a value anywhere a value is expected. // lexValue will ignore whitespace. // After a value is lexed, the last state on the next is popped and returned. func lexValue(lx *lexer) stateFn { // We allow whitespace to precede a value, but NOT newlines. // In array syntax, the array states are responsible for ignoring newlines. r := lx.next() switch { case isWhitespace(r): return lexSkip(lx, lexValue) case isDigit(r): lx.backup() // avoid an extra state and use the same as above return lexNumberOrDateStart } switch r { case '[': lx.ignore() lx.emit(itemArray) return lexArrayValue case '{': lx.ignore() lx.emit(itemInlineTableStart) return lexInlineTableValue case '"': if lx.accept('"') { if lx.accept('"') { lx.ignore() // Ignore """ return lexMultilineString } lx.backup() } lx.ignore() // ignore the '"' return lexString case '\'': if lx.accept('\'') { if lx.accept('\'') { lx.ignore() // Ignore """ return lexMultilineRawString } lx.backup() } lx.ignore() // ignore the "'" return lexRawString case '.': // special error case, be kind to users return lx.errorf("floats must start with a digit, not '.'") case 'i', 'n': if (lx.accept('n') && lx.accept('f')) || (lx.accept('a') && lx.accept('n')) { lx.emit(itemFloat) return lx.pop() } case '-', '+': return lexDecimalNumberStart } if unicode.IsLetter(r) { // Be permissive here; lexBool will give a nice error if the // user wrote something like // x = foo // (i.e. not 'true' or 'false' but is something else word-like.) lx.backup() return lexBool } if r == eof { return lx.errorf("unexpected EOF; expected value") } return lx.errorf("expected value but found %q instead", r) } // lexArrayValue consumes one value in an array. It assumes that '[' or ',' // have already been consumed. All whitespace and newlines are ignored. func lexArrayValue(lx *lexer) stateFn { r := lx.next() switch { case isWhitespace(r) || isNL(r): return lexSkip(lx, lexArrayValue) case r == '#': lx.push(lexArrayValue) return lexCommentStart case r == ',': return lx.errorf("unexpected comma") case r == ']': return lexArrayEnd } lx.backup() lx.push(lexArrayValueEnd) return lexValue } // lexArrayValueEnd consumes everything between the end of an array value and // the next value (or the end of the array): it ignores whitespace and newlines // and expects either a ',' or a ']'. func lexArrayValueEnd(lx *lexer) stateFn { switch r := lx.next(); { case isWhitespace(r) || isNL(r): return lexSkip(lx, lexArrayValueEnd) case r == '#': lx.push(lexArrayValueEnd) return lexCommentStart case r == ',': lx.ignore() return lexArrayValue // move on to the next value case r == ']': return lexArrayEnd default: return lx.errorf("expected a comma (',') or array terminator (']'), but got %s", runeOrEOF(r)) } } // lexArrayEnd finishes the lexing of an array. // It assumes that a ']' has just been consumed. func lexArrayEnd(lx *lexer) stateFn { lx.ignore() lx.emit(itemArrayEnd) return lx.pop() } // lexInlineTableValue consumes one key/value pair in an inline table. // It assumes that '{' or ',' have already been consumed. Whitespace is ignored. func lexInlineTableValue(lx *lexer) stateFn { r := lx.next() switch { case isWhitespace(r): return lexSkip(lx, lexInlineTableValue) case isNL(r): if lx.tomlNext { return lexSkip(lx, lexInlineTableValue) } return lx.errorPrevLine(errLexInlineTableNL{}) case r == '#': lx.push(lexInlineTableValue) return lexCommentStart case r == ',': return lx.errorf("unexpected comma") case r == '}': return lexInlineTableEnd } lx.backup() lx.push(lexInlineTableValueEnd) return lexKeyStart } // lexInlineTableValueEnd consumes everything between the end of an inline table // key/value pair and the next pair (or the end of the table): // it ignores whitespace and expects either a ',' or a '}'. func lexInlineTableValueEnd(lx *lexer) stateFn { switch r := lx.next(); { case isWhitespace(r): return lexSkip(lx, lexInlineTableValueEnd) case isNL(r): if lx.tomlNext { return lexSkip(lx, lexInlineTableValueEnd) } return lx.errorPrevLine(errLexInlineTableNL{}) case r == '#': lx.push(lexInlineTableValueEnd) return lexCommentStart case r == ',': lx.ignore() lx.skip(isWhitespace) if lx.peek() == '}' { if lx.tomlNext { return lexInlineTableValueEnd } return lx.errorf("trailing comma not allowed in inline tables") } return lexInlineTableValue case r == '}': return lexInlineTableEnd default: return lx.errorf("expected a comma or an inline table terminator '}', but got %s instead", runeOrEOF(r)) } } func runeOrEOF(r rune) string { if r == eof { return "end of file" } return "'" + string(r) + "'" } // lexInlineTableEnd finishes the lexing of an inline table. // It assumes that a '}' has just been consumed. func lexInlineTableEnd(lx *lexer) stateFn { lx.ignore() lx.emit(itemInlineTableEnd) return lx.pop() } // lexString consumes the inner contents of a string. It assumes that the // beginning '"' has already been consumed and ignored. func lexString(lx *lexer) stateFn { r := lx.next() switch { case r == eof: return lx.errorf(`unexpected EOF; expected '"'`) case isNL(r): return lx.errorPrevLine(errLexStringNL{}) case r == '\\': lx.push(lexString) return lexStringEscape case r == '"': lx.backup() lx.emit(itemString) lx.next() lx.ignore() return lx.pop() } return lexString } // lexMultilineString consumes the inner contents of a string. It assumes that // the beginning '"""' has already been consumed and ignored. func lexMultilineString(lx *lexer) stateFn { r := lx.next() switch r { default: return lexMultilineString case eof: return lx.errorf(`unexpected EOF; expected '"""'`) case '\\': return lexMultilineStringEscape case '"': /// Found " → try to read two more "". if lx.accept('"') { if lx.accept('"') { /// Peek ahead: the string can contain " and "", including at the /// end: """str""""" /// 6 or more at the end, however, is an error. if lx.peek() == '"' { /// Check if we already lexed 5 's; if so we have 6 now, and /// that's just too many man! /// /// Second check is for the edge case: /// /// two quotes allowed. /// vv /// """lol \"""""" /// ^^ ^^^---- closing three /// escaped /// /// But ugly, but it works if strings.HasSuffix(lx.current(), `"""""`) && !strings.HasSuffix(lx.current(), `\"""""`) { return lx.errorf(`unexpected '""""""'`) } lx.backup() lx.backup() return lexMultilineString } lx.backup() /// backup: don't include the """ in the item. lx.backup() lx.backup() lx.emit(itemMultilineString) lx.next() /// Read over ''' again and discard it. lx.next() lx.next() lx.ignore() return lx.pop() } lx.backup() } return lexMultilineString } } // lexRawString consumes a raw string. Nothing can be escaped in such a string. // It assumes that the beginning "'" has already been consumed and ignored. func lexRawString(lx *lexer) stateFn { r := lx.next() switch { default: return lexRawString case r == eof: return lx.errorf(`unexpected EOF; expected "'"`) case isNL(r): return lx.errorPrevLine(errLexStringNL{}) case r == '\'': lx.backup() lx.emit(itemRawString) lx.next() lx.ignore() return lx.pop() } } // lexMultilineRawString consumes a raw string. Nothing can be escaped in such a // string. It assumes that the beginning triple-' has already been consumed and // ignored. func lexMultilineRawString(lx *lexer) stateFn { r := lx.next() switch r { default: return lexMultilineRawString case eof: return lx.errorf(`unexpected EOF; expected "'''"`) case '\'': /// Found ' → try to read two more ''. if lx.accept('\'') { if lx.accept('\'') { /// Peek ahead: the string can contain ' and '', including at the /// end: '''str''''' /// 6 or more at the end, however, is an error. if lx.peek() == '\'' { /// Check if we already lexed 5 's; if so we have 6 now, and /// that's just too many man! if strings.HasSuffix(lx.current(), "'''''") { return lx.errorf(`unexpected "''''''"`) } lx.backup() lx.backup() return lexMultilineRawString } lx.backup() /// backup: don't include the ''' in the item. lx.backup() lx.backup() lx.emit(itemRawMultilineString) lx.next() /// Read over ''' again and discard it. lx.next() lx.next() lx.ignore() return lx.pop() } lx.backup() } return lexMultilineRawString } } // lexMultilineStringEscape consumes an escaped character. It assumes that the // preceding '\\' has already been consumed. func lexMultilineStringEscape(lx *lexer) stateFn { if isNL(lx.next()) { /// \ escaping newline. return lexMultilineString } lx.backup() lx.push(lexMultilineString) return lexStringEscape(lx) } func lexStringEscape(lx *lexer) stateFn { r := lx.next() switch r { case 'e': if !lx.tomlNext { return lx.error(errLexEscape{r}) } fallthrough case 'b': fallthrough case 't': fallthrough case 'n': fallthrough case 'f': fallthrough case 'r': fallthrough case '"': fallthrough case ' ', '\t': // Inside """ .. """ strings you can use \ to escape newlines, and any // amount of whitespace can be between the \ and \n. fallthrough case '\\': return lx.pop() case 'x': if !lx.tomlNext { return lx.error(errLexEscape{r}) } return lexHexEscape case 'u': return lexShortUnicodeEscape case 'U': return lexLongUnicodeEscape } return lx.error(errLexEscape{r}) } func lexHexEscape(lx *lexer) stateFn { var r rune for i := 0; i < 2; i++ { r = lx.next() if !isHexadecimal(r) { return lx.errorf( `expected two hexadecimal digits after '\x', but got %q instead`, lx.current()) } } return lx.pop() } func lexShortUnicodeEscape(lx *lexer) stateFn { var r rune for i := 0; i < 4; i++ { r = lx.next() if !isHexadecimal(r) { return lx.errorf( `expected four hexadecimal digits after '\u', but got %q instead`, lx.current()) } } return lx.pop() } func lexLongUnicodeEscape(lx *lexer) stateFn { var r rune for i := 0; i < 8; i++ { r = lx.next() if !isHexadecimal(r) { return lx.errorf( `expected eight hexadecimal digits after '\U', but got %q instead`, lx.current()) } } return lx.pop() } // lexNumberOrDateStart processes the first character of a value which begins // with a digit. It exists to catch values starting with '0', so that // lexBaseNumberOrDate can differentiate base prefixed integers from other // types. func lexNumberOrDateStart(lx *lexer) stateFn { r := lx.next() switch r { case '0': return lexBaseNumberOrDate } if !isDigit(r) { // The only way to reach this state is if the value starts // with a digit, so specifically treat anything else as an // error. return lx.errorf("expected a digit but got %q", r) } return lexNumberOrDate } // lexNumberOrDate consumes either an integer, float or datetime. func lexNumberOrDate(lx *lexer) stateFn { r := lx.next() if isDigit(r) { return lexNumberOrDate } switch r { case '-', ':': return lexDatetime case '_': return lexDecimalNumber case '.', 'e', 'E': return lexFloat } lx.backup() lx.emit(itemInteger) return lx.pop() } // lexDatetime consumes a Datetime, to a first approximation. // The parser validates that it matches one of the accepted formats. func lexDatetime(lx *lexer) stateFn { r := lx.next() if isDigit(r) { return lexDatetime } switch r { case '-', ':', 'T', 't', ' ', '.', 'Z', 'z', '+': return lexDatetime } lx.backup() lx.emitTrim(itemDatetime) return lx.pop() } // lexHexInteger consumes a hexadecimal integer after seeing the '0x' prefix. func lexHexInteger(lx *lexer) stateFn { r := lx.next() if isHexadecimal(r) { return lexHexInteger } switch r { case '_': return lexHexInteger } lx.backup() lx.emit(itemInteger) return lx.pop() } // lexOctalInteger consumes an octal integer after seeing the '0o' prefix. func lexOctalInteger(lx *lexer) stateFn { r := lx.next() if isOctal(r) { return lexOctalInteger } switch r { case '_': return lexOctalInteger } lx.backup() lx.emit(itemInteger) return lx.pop() } // lexBinaryInteger consumes a binary integer after seeing the '0b' prefix. func lexBinaryInteger(lx *lexer) stateFn { r := lx.next() if isBinary(r) { return lexBinaryInteger } switch r { case '_': return lexBinaryInteger } lx.backup() lx.emit(itemInteger) return lx.pop() } // lexDecimalNumber consumes a decimal float or integer. func lexDecimalNumber(lx *lexer) stateFn { r := lx.next() if isDigit(r) { return lexDecimalNumber } switch r { case '.', 'e', 'E': return lexFloat case '_': return lexDecimalNumber } lx.backup() lx.emit(itemInteger) return lx.pop() } // lexDecimalNumber consumes the first digit of a number beginning with a sign. // It assumes the sign has already been consumed. Values which start with a sign // are only allowed to be decimal integers or floats. // // The special "nan" and "inf" values are also recognized. func lexDecimalNumberStart(lx *lexer) stateFn { r := lx.next() // Special error cases to give users better error messages switch r { case 'i': if !lx.accept('n') || !lx.accept('f') { return lx.errorf("invalid float: '%s'", lx.current()) } lx.emit(itemFloat) return lx.pop() case 'n': if !lx.accept('a') || !lx.accept('n') { return lx.errorf("invalid float: '%s'", lx.current()) } lx.emit(itemFloat) return lx.pop() case '0': p := lx.peek() switch p { case 'b', 'o', 'x': return lx.errorf("cannot use sign with non-decimal numbers: '%s%c'", lx.current(), p) } case '.': return lx.errorf("floats must start with a digit, not '.'") } if isDigit(r) { return lexDecimalNumber } return lx.errorf("expected a digit but got %q", r) } // lexBaseNumberOrDate differentiates between the possible values which // start with '0'. It assumes that before reaching this state, the initial '0' // has been consumed. func lexBaseNumberOrDate(lx *lexer) stateFn { r := lx.next() // Note: All datetimes start with at least two digits, so we don't // handle date characters (':', '-', etc.) here. if isDigit(r) { return lexNumberOrDate } switch r { case '_': // Can only be decimal, because there can't be an underscore // between the '0' and the base designator, and dates can't // contain underscores. return lexDecimalNumber case '.', 'e', 'E': return lexFloat case 'b': r = lx.peek() if !isBinary(r) { lx.errorf("not a binary number: '%s%c'", lx.current(), r) } return lexBinaryInteger case 'o': r = lx.peek() if !isOctal(r) { lx.errorf("not an octal number: '%s%c'", lx.current(), r) } return lexOctalInteger case 'x': r = lx.peek() if !isHexadecimal(r) { lx.errorf("not a hexidecimal number: '%s%c'", lx.current(), r) } return lexHexInteger } lx.backup() lx.emit(itemInteger) return lx.pop() } // lexFloat consumes the elements of a float. It allows any sequence of // float-like characters, so floats emitted by the lexer are only a first // approximation and must be validated by the parser. func lexFloat(lx *lexer) stateFn { r := lx.next() if isDigit(r) { return lexFloat } switch r { case '_', '.', '-', '+', 'e', 'E': return lexFloat } lx.backup() lx.emit(itemFloat) return lx.pop() } // lexBool consumes a bool string: 'true' or 'false. func lexBool(lx *lexer) stateFn { var rs []rune for { r := lx.next() if !unicode.IsLetter(r) { lx.backup() break } rs = append(rs, r) } s := string(rs) switch s { case "true", "false": lx.emit(itemBool) return lx.pop() } return lx.errorf("expected value but found %q instead", s) } // lexCommentStart begins the lexing of a comment. It will emit // itemCommentStart and consume no characters, passing control to lexComment. func lexCommentStart(lx *lexer) stateFn { lx.ignore() lx.emit(itemCommentStart) return lexComment } // lexComment lexes an entire comment. It assumes that '#' has been consumed. // It will consume *up to* the first newline character, and pass control // back to the last state on the stack. func lexComment(lx *lexer) stateFn { switch r := lx.next(); { case isNL(r) || r == eof: lx.backup() lx.emit(itemText) return lx.pop() default: return lexComment } } // lexSkip ignores all slurped input and moves on to the next state. func lexSkip(lx *lexer, nextState stateFn) stateFn { lx.ignore() return nextState } func (s stateFn) String() string { name := runtime.FuncForPC(reflect.ValueOf(s).Pointer()).Name() if i := strings.LastIndexByte(name, '.'); i > -1 { name = name[i+1:] } if s == nil { name = "" } return name + "()" } func (itype itemType) String() string { switch itype { case itemError: return "Error" case itemNIL: return "NIL" case itemEOF: return "EOF" case itemText: return "Text" case itemString, itemRawString, itemMultilineString, itemRawMultilineString: return "String" case itemBool: return "Bool" case itemInteger: return "Integer" case itemFloat: return "Float" case itemDatetime: return "DateTime" case itemTableStart: return "TableStart" case itemTableEnd: return "TableEnd" case itemKeyStart: return "KeyStart" case itemKeyEnd: return "KeyEnd" case itemArray: return "Array" case itemArrayEnd: return "ArrayEnd" case itemCommentStart: return "CommentStart" case itemInlineTableStart: return "InlineTableStart" case itemInlineTableEnd: return "InlineTableEnd" } panic(fmt.Sprintf("BUG: Unknown type '%d'.", int(itype))) } func (item item) String() string { return fmt.Sprintf("(%s, %s)", item.typ.String(), item.val) } func isWhitespace(r rune) bool { return r == '\t' || r == ' ' } func isNL(r rune) bool { return r == '\n' || r == '\r' } func isControl(r rune) bool { // Control characters except \t, \r, \n switch r { case '\t', '\r', '\n': return false default: return (r >= 0x00 && r <= 0x1f) || r == 0x7f } } func isDigit(r rune) bool { return r >= '0' && r <= '9' } func isBinary(r rune) bool { return r == '0' || r == '1' } func isOctal(r rune) bool { return r >= '0' && r <= '7' } func isHexadecimal(r rune) bool { return (r >= '0' && r <= '9') || (r >= 'a' && r <= 'f') || (r >= 'A' && r <= 'F') } func isBareKeyChar(r rune, tomlNext bool) bool { if tomlNext { return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '_' || r == '-' || r == 0xb2 || r == 0xb3 || r == 0xb9 || (r >= 0xbc && r <= 0xbe) || (r >= 0xc0 && r <= 0xd6) || (r >= 0xd8 && r <= 0xf6) || (r >= 0xf8 && r <= 0x037d) || (r >= 0x037f && r <= 0x1fff) || (r >= 0x200c && r <= 0x200d) || (r >= 0x203f && r <= 0x2040) || (r >= 0x2070 && r <= 0x218f) || (r >= 0x2460 && r <= 0x24ff) || (r >= 0x2c00 && r <= 0x2fef) || (r >= 0x3001 && r <= 0xd7ff) || (r >= 0xf900 && r <= 0xfdcf) || (r >= 0xfdf0 && r <= 0xfffd) || (r >= 0x10000 && r <= 0xeffff) } return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '_' || r == '-' } ================================================ FILE: vendor/github.com/BurntSushi/toml/meta.go ================================================ package toml import ( "strings" ) // MetaData allows access to meta information about TOML data that's not // accessible otherwise. // // It allows checking if a key is defined in the TOML data, whether any keys // were undecoded, and the TOML type of a key. type MetaData struct { context Key // Used only during decoding. keyInfo map[string]keyInfo mapping map[string]interface{} keys []Key decoded map[string]struct{} data []byte // Input file; for errors. } // IsDefined reports if the key exists in the TOML data. // // The key should be specified hierarchically, for example to access the TOML // key "a.b.c" you would use IsDefined("a", "b", "c"). Keys are case sensitive. // // Returns false for an empty key. func (md *MetaData) IsDefined(key ...string) bool { if len(key) == 0 { return false } var ( hash map[string]interface{} ok bool hashOrVal interface{} = md.mapping ) for _, k := range key { if hash, ok = hashOrVal.(map[string]interface{}); !ok { return false } if hashOrVal, ok = hash[k]; !ok { return false } } return true } // Type returns a string representation of the type of the key specified. // // Type will return the empty string if given an empty key or a key that does // not exist. Keys are case sensitive. func (md *MetaData) Type(key ...string) string { if ki, ok := md.keyInfo[Key(key).String()]; ok { return ki.tomlType.typeString() } return "" } // Keys returns a slice of every key in the TOML data, including key groups. // // Each key is itself a slice, where the first element is the top of the // hierarchy and the last is the most specific. The list will have the same // order as the keys appeared in the TOML data. // // All keys returned are non-empty. func (md *MetaData) Keys() []Key { return md.keys } // Undecoded returns all keys that have not been decoded in the order in which // they appear in the original TOML document. // // This includes keys that haven't been decoded because of a [Primitive] value. // Once the Primitive value is decoded, the keys will be considered decoded. // // Also note that decoding into an empty interface will result in no decoding, // and so no keys will be considered decoded. // // In this sense, the Undecoded keys correspond to keys in the TOML document // that do not have a concrete type in your representation. func (md *MetaData) Undecoded() []Key { undecoded := make([]Key, 0, len(md.keys)) for _, key := range md.keys { if _, ok := md.decoded[key.String()]; !ok { undecoded = append(undecoded, key) } } return undecoded } // Key represents any TOML key, including key groups. Use [MetaData.Keys] to get // values of this type. type Key []string func (k Key) String() string { ss := make([]string, len(k)) for i := range k { ss[i] = k.maybeQuoted(i) } return strings.Join(ss, ".") } func (k Key) maybeQuoted(i int) string { if k[i] == "" { return `""` } for _, c := range k[i] { if !isBareKeyChar(c, false) { return `"` + dblQuotedReplacer.Replace(k[i]) + `"` } } return k[i] } func (k Key) add(piece string) Key { newKey := make(Key, len(k)+1) copy(newKey, k) newKey[len(k)] = piece return newKey } ================================================ FILE: vendor/github.com/BurntSushi/toml/parse.go ================================================ package toml import ( "fmt" "os" "strconv" "strings" "time" "unicode/utf8" "github.com/BurntSushi/toml/internal" ) type parser struct { lx *lexer context Key // Full key for the current hash in scope. currentKey string // Base key name for everything except hashes. pos Position // Current position in the TOML file. tomlNext bool ordered []Key // List of keys in the order that they appear in the TOML data. keyInfo map[string]keyInfo // Map keyname → info about the TOML key. mapping map[string]interface{} // Map keyname → key value. implicits map[string]struct{} // Record implicit keys (e.g. "key.group.names"). } type keyInfo struct { pos Position tomlType tomlType } func parse(data string) (p *parser, err error) { _, tomlNext := os.LookupEnv("BURNTSUSHI_TOML_110") defer func() { if r := recover(); r != nil { if pErr, ok := r.(ParseError); ok { pErr.input = data err = pErr return } panic(r) } }() // Read over BOM; do this here as the lexer calls utf8.DecodeRuneInString() // which mangles stuff. UTF-16 BOM isn't strictly valid, but some tools add // it anyway. if strings.HasPrefix(data, "\xff\xfe") || strings.HasPrefix(data, "\xfe\xff") { // UTF-16 data = data[2:] } else if strings.HasPrefix(data, "\xef\xbb\xbf") { // UTF-8 data = data[3:] } // Examine first few bytes for NULL bytes; this probably means it's a UTF-16 // file (second byte in surrogate pair being NULL). Again, do this here to // avoid having to deal with UTF-8/16 stuff in the lexer. ex := 6 if len(data) < 6 { ex = len(data) } if i := strings.IndexRune(data[:ex], 0); i > -1 { return nil, ParseError{ Message: "files cannot contain NULL bytes; probably using UTF-16; TOML files must be UTF-8", Position: Position{Line: 1, Start: i, Len: 1}, Line: 1, input: data, } } p = &parser{ keyInfo: make(map[string]keyInfo), mapping: make(map[string]interface{}), lx: lex(data, tomlNext), ordered: make([]Key, 0), implicits: make(map[string]struct{}), tomlNext: tomlNext, } for { item := p.next() if item.typ == itemEOF { break } p.topLevel(item) } return p, nil } func (p *parser) panicErr(it item, err error) { panic(ParseError{ err: err, Position: it.pos, Line: it.pos.Len, LastKey: p.current(), }) } func (p *parser) panicItemf(it item, format string, v ...interface{}) { panic(ParseError{ Message: fmt.Sprintf(format, v...), Position: it.pos, Line: it.pos.Len, LastKey: p.current(), }) } func (p *parser) panicf(format string, v ...interface{}) { panic(ParseError{ Message: fmt.Sprintf(format, v...), Position: p.pos, Line: p.pos.Line, LastKey: p.current(), }) } func (p *parser) next() item { it := p.lx.nextItem() //fmt.Printf("ITEM %-18s line %-3d │ %q\n", it.typ, it.pos.Line, it.val) if it.typ == itemError { if it.err != nil { panic(ParseError{ Position: it.pos, Line: it.pos.Line, LastKey: p.current(), err: it.err, }) } p.panicItemf(it, "%s", it.val) } return it } func (p *parser) nextPos() item { it := p.next() p.pos = it.pos return it } func (p *parser) bug(format string, v ...interface{}) { panic(fmt.Sprintf("BUG: "+format+"\n\n", v...)) } func (p *parser) expect(typ itemType) item { it := p.next() p.assertEqual(typ, it.typ) return it } func (p *parser) assertEqual(expected, got itemType) { if expected != got { p.bug("Expected '%s' but got '%s'.", expected, got) } } func (p *parser) topLevel(item item) { switch item.typ { case itemCommentStart: // # .. p.expect(itemText) case itemTableStart: // [ .. ] name := p.nextPos() var key Key for ; name.typ != itemTableEnd && name.typ != itemEOF; name = p.next() { key = append(key, p.keyString(name)) } p.assertEqual(itemTableEnd, name.typ) p.addContext(key, false) p.setType("", tomlHash, item.pos) p.ordered = append(p.ordered, key) case itemArrayTableStart: // [[ .. ]] name := p.nextPos() var key Key for ; name.typ != itemArrayTableEnd && name.typ != itemEOF; name = p.next() { key = append(key, p.keyString(name)) } p.assertEqual(itemArrayTableEnd, name.typ) p.addContext(key, true) p.setType("", tomlArrayHash, item.pos) p.ordered = append(p.ordered, key) case itemKeyStart: // key = .. outerContext := p.context /// Read all the key parts (e.g. 'a' and 'b' in 'a.b') k := p.nextPos() var key Key for ; k.typ != itemKeyEnd && k.typ != itemEOF; k = p.next() { key = append(key, p.keyString(k)) } p.assertEqual(itemKeyEnd, k.typ) /// The current key is the last part. p.currentKey = key[len(key)-1] /// All the other parts (if any) are the context; need to set each part /// as implicit. context := key[:len(key)-1] for i := range context { p.addImplicitContext(append(p.context, context[i:i+1]...)) } p.ordered = append(p.ordered, p.context.add(p.currentKey)) /// Set value. vItem := p.next() val, typ := p.value(vItem, false) p.set(p.currentKey, val, typ, vItem.pos) /// Remove the context we added (preserving any context from [tbl] lines). p.context = outerContext p.currentKey = "" default: p.bug("Unexpected type at top level: %s", item.typ) } } // Gets a string for a key (or part of a key in a table name). func (p *parser) keyString(it item) string { switch it.typ { case itemText: return it.val case itemString, itemMultilineString, itemRawString, itemRawMultilineString: s, _ := p.value(it, false) return s.(string) default: p.bug("Unexpected key type: %s", it.typ) } panic("unreachable") } var datetimeRepl = strings.NewReplacer( "z", "Z", "t", "T", " ", "T") // value translates an expected value from the lexer into a Go value wrapped // as an empty interface. func (p *parser) value(it item, parentIsArray bool) (interface{}, tomlType) { switch it.typ { case itemString: return p.replaceEscapes(it, it.val), p.typeOfPrimitive(it) case itemMultilineString: return p.replaceEscapes(it, p.stripEscapedNewlines(stripFirstNewline(it.val))), p.typeOfPrimitive(it) case itemRawString: return it.val, p.typeOfPrimitive(it) case itemRawMultilineString: return stripFirstNewline(it.val), p.typeOfPrimitive(it) case itemInteger: return p.valueInteger(it) case itemFloat: return p.valueFloat(it) case itemBool: switch it.val { case "true": return true, p.typeOfPrimitive(it) case "false": return false, p.typeOfPrimitive(it) default: p.bug("Expected boolean value, but got '%s'.", it.val) } case itemDatetime: return p.valueDatetime(it) case itemArray: return p.valueArray(it) case itemInlineTableStart: return p.valueInlineTable(it, parentIsArray) default: p.bug("Unexpected value type: %s", it.typ) } panic("unreachable") } func (p *parser) valueInteger(it item) (interface{}, tomlType) { if !numUnderscoresOK(it.val) { p.panicItemf(it, "Invalid integer %q: underscores must be surrounded by digits", it.val) } if numHasLeadingZero(it.val) { p.panicItemf(it, "Invalid integer %q: cannot have leading zeroes", it.val) } num, err := strconv.ParseInt(it.val, 0, 64) if err != nil { // Distinguish integer values. Normally, it'd be a bug if the lexer // provides an invalid integer, but it's possible that the number is // out of range of valid values (which the lexer cannot determine). // So mark the former as a bug but the latter as a legitimate user // error. if e, ok := err.(*strconv.NumError); ok && e.Err == strconv.ErrRange { p.panicErr(it, errParseRange{i: it.val, size: "int64"}) } else { p.bug("Expected integer value, but got '%s'.", it.val) } } return num, p.typeOfPrimitive(it) } func (p *parser) valueFloat(it item) (interface{}, tomlType) { parts := strings.FieldsFunc(it.val, func(r rune) bool { switch r { case '.', 'e', 'E': return true } return false }) for _, part := range parts { if !numUnderscoresOK(part) { p.panicItemf(it, "Invalid float %q: underscores must be surrounded by digits", it.val) } } if len(parts) > 0 && numHasLeadingZero(parts[0]) { p.panicItemf(it, "Invalid float %q: cannot have leading zeroes", it.val) } if !numPeriodsOK(it.val) { // As a special case, numbers like '123.' or '1.e2', // which are valid as far as Go/strconv are concerned, // must be rejected because TOML says that a fractional // part consists of '.' followed by 1+ digits. p.panicItemf(it, "Invalid float %q: '.' must be followed by one or more digits", it.val) } val := strings.Replace(it.val, "_", "", -1) if val == "+nan" || val == "-nan" { // Go doesn't support this, but TOML spec does. val = "nan" } num, err := strconv.ParseFloat(val, 64) if err != nil { if e, ok := err.(*strconv.NumError); ok && e.Err == strconv.ErrRange { p.panicErr(it, errParseRange{i: it.val, size: "float64"}) } else { p.panicItemf(it, "Invalid float value: %q", it.val) } } return num, p.typeOfPrimitive(it) } var dtTypes = []struct { fmt string zone *time.Location next bool }{ {time.RFC3339Nano, time.Local, false}, {"2006-01-02T15:04:05.999999999", internal.LocalDatetime, false}, {"2006-01-02", internal.LocalDate, false}, {"15:04:05.999999999", internal.LocalTime, false}, // tomlNext {"2006-01-02T15:04Z07:00", time.Local, true}, {"2006-01-02T15:04", internal.LocalDatetime, true}, {"15:04", internal.LocalTime, true}, } func (p *parser) valueDatetime(it item) (interface{}, tomlType) { it.val = datetimeRepl.Replace(it.val) var ( t time.Time ok bool err error ) for _, dt := range dtTypes { if dt.next && !p.tomlNext { continue } t, err = time.ParseInLocation(dt.fmt, it.val, dt.zone) if err == nil { ok = true break } } if !ok { p.panicItemf(it, "Invalid TOML Datetime: %q.", it.val) } return t, p.typeOfPrimitive(it) } func (p *parser) valueArray(it item) (interface{}, tomlType) { p.setType(p.currentKey, tomlArray, it.pos) var ( types []tomlType // Initialize to a non-nil empty slice. This makes it consistent with // how S = [] decodes into a non-nil slice inside something like struct // { S []string }. See #338 array = []interface{}{} ) for it = p.next(); it.typ != itemArrayEnd; it = p.next() { if it.typ == itemCommentStart { p.expect(itemText) continue } val, typ := p.value(it, true) array = append(array, val) types = append(types, typ) // XXX: types isn't used here, we need it to record the accurate type // information. // // Not entirely sure how to best store this; could use "key[0]", // "key[1]" notation, or maybe store it on the Array type? _ = types } return array, tomlArray } func (p *parser) valueInlineTable(it item, parentIsArray bool) (interface{}, tomlType) { var ( hash = make(map[string]interface{}) outerContext = p.context outerKey = p.currentKey ) p.context = append(p.context, p.currentKey) prevContext := p.context p.currentKey = "" p.addImplicit(p.context) p.addContext(p.context, parentIsArray) /// Loop over all table key/value pairs. for it := p.next(); it.typ != itemInlineTableEnd; it = p.next() { if it.typ == itemCommentStart { p.expect(itemText) continue } /// Read all key parts. k := p.nextPos() var key Key for ; k.typ != itemKeyEnd && k.typ != itemEOF; k = p.next() { key = append(key, p.keyString(k)) } p.assertEqual(itemKeyEnd, k.typ) /// The current key is the last part. p.currentKey = key[len(key)-1] /// All the other parts (if any) are the context; need to set each part /// as implicit. context := key[:len(key)-1] for i := range context { p.addImplicitContext(append(p.context, context[i:i+1]...)) } p.ordered = append(p.ordered, p.context.add(p.currentKey)) /// Set the value. val, typ := p.value(p.next(), false) p.set(p.currentKey, val, typ, it.pos) hash[p.currentKey] = val /// Restore context. p.context = prevContext } p.context = outerContext p.currentKey = outerKey return hash, tomlHash } // numHasLeadingZero checks if this number has leading zeroes, allowing for '0', // +/- signs, and base prefixes. func numHasLeadingZero(s string) bool { if len(s) > 1 && s[0] == '0' && !(s[1] == 'b' || s[1] == 'o' || s[1] == 'x') { // Allow 0b, 0o, 0x return true } if len(s) > 2 && (s[0] == '-' || s[0] == '+') && s[1] == '0' { return true } return false } // numUnderscoresOK checks whether each underscore in s is surrounded by // characters that are not underscores. func numUnderscoresOK(s string) bool { switch s { case "nan", "+nan", "-nan", "inf", "-inf", "+inf": return true } accept := false for _, r := range s { if r == '_' { if !accept { return false } } // isHexadecimal is a superset of all the permissable characters // surrounding an underscore. accept = isHexadecimal(r) } return accept } // numPeriodsOK checks whether every period in s is followed by a digit. func numPeriodsOK(s string) bool { period := false for _, r := range s { if period && !isDigit(r) { return false } period = r == '.' } return !period } // Set the current context of the parser, where the context is either a hash or // an array of hashes, depending on the value of the `array` parameter. // // Establishing the context also makes sure that the key isn't a duplicate, and // will create implicit hashes automatically. func (p *parser) addContext(key Key, array bool) { var ok bool // Always start at the top level and drill down for our context. hashContext := p.mapping keyContext := make(Key, 0) // We only need implicit hashes for key[0:-1] for _, k := range key[0 : len(key)-1] { _, ok = hashContext[k] keyContext = append(keyContext, k) // No key? Make an implicit hash and move on. if !ok { p.addImplicit(keyContext) hashContext[k] = make(map[string]interface{}) } // If the hash context is actually an array of tables, then set // the hash context to the last element in that array. // // Otherwise, it better be a table, since this MUST be a key group (by // virtue of it not being the last element in a key). switch t := hashContext[k].(type) { case []map[string]interface{}: hashContext = t[len(t)-1] case map[string]interface{}: hashContext = t default: p.panicf("Key '%s' was already created as a hash.", keyContext) } } p.context = keyContext if array { // If this is the first element for this array, then allocate a new // list of tables for it. k := key[len(key)-1] if _, ok := hashContext[k]; !ok { hashContext[k] = make([]map[string]interface{}, 0, 4) } // Add a new table. But make sure the key hasn't already been used // for something else. if hash, ok := hashContext[k].([]map[string]interface{}); ok { hashContext[k] = append(hash, make(map[string]interface{})) } else { p.panicf("Key '%s' was already created and cannot be used as an array.", key) } } else { p.setValue(key[len(key)-1], make(map[string]interface{})) } p.context = append(p.context, key[len(key)-1]) } // set calls setValue and setType. func (p *parser) set(key string, val interface{}, typ tomlType, pos Position) { p.setValue(key, val) p.setType(key, typ, pos) } // setValue sets the given key to the given value in the current context. // It will make sure that the key hasn't already been defined, account for // implicit key groups. func (p *parser) setValue(key string, value interface{}) { var ( tmpHash interface{} ok bool hash = p.mapping keyContext Key ) for _, k := range p.context { keyContext = append(keyContext, k) if tmpHash, ok = hash[k]; !ok { p.bug("Context for key '%s' has not been established.", keyContext) } switch t := tmpHash.(type) { case []map[string]interface{}: // The context is a table of hashes. Pick the most recent table // defined as the current hash. hash = t[len(t)-1] case map[string]interface{}: hash = t default: p.panicf("Key '%s' has already been defined.", keyContext) } } keyContext = append(keyContext, key) if _, ok := hash[key]; ok { // Normally redefining keys isn't allowed, but the key could have been // defined implicitly and it's allowed to be redefined concretely. (See // the `valid/implicit-and-explicit-after.toml` in toml-test) // // But we have to make sure to stop marking it as an implicit. (So that // another redefinition provokes an error.) // // Note that since it has already been defined (as a hash), we don't // want to overwrite it. So our business is done. if p.isArray(keyContext) { p.removeImplicit(keyContext) hash[key] = value return } if p.isImplicit(keyContext) { p.removeImplicit(keyContext) return } // Otherwise, we have a concrete key trying to override a previous // key, which is *always* wrong. p.panicf("Key '%s' has already been defined.", keyContext) } hash[key] = value } // setType sets the type of a particular value at a given key. It should be // called immediately AFTER setValue. // // Note that if `key` is empty, then the type given will be applied to the // current context (which is either a table or an array of tables). func (p *parser) setType(key string, typ tomlType, pos Position) { keyContext := make(Key, 0, len(p.context)+1) keyContext = append(keyContext, p.context...) if len(key) > 0 { // allow type setting for hashes keyContext = append(keyContext, key) } // Special case to make empty keys ("" = 1) work. // Without it it will set "" rather than `""`. // TODO: why is this needed? And why is this only needed here? if len(keyContext) == 0 { keyContext = Key{""} } p.keyInfo[keyContext.String()] = keyInfo{tomlType: typ, pos: pos} } // Implicit keys need to be created when tables are implied in "a.b.c.d = 1" and // "[a.b.c]" (the "a", "b", and "c" hashes are never created explicitly). func (p *parser) addImplicit(key Key) { p.implicits[key.String()] = struct{}{} } func (p *parser) removeImplicit(key Key) { delete(p.implicits, key.String()) } func (p *parser) isImplicit(key Key) bool { _, ok := p.implicits[key.String()]; return ok } func (p *parser) isArray(key Key) bool { return p.keyInfo[key.String()].tomlType == tomlArray } func (p *parser) addImplicitContext(key Key) { p.addImplicit(key); p.addContext(key, false) } // current returns the full key name of the current context. func (p *parser) current() string { if len(p.currentKey) == 0 { return p.context.String() } if len(p.context) == 0 { return p.currentKey } return fmt.Sprintf("%s.%s", p.context, p.currentKey) } func stripFirstNewline(s string) string { if len(s) > 0 && s[0] == '\n' { return s[1:] } if len(s) > 1 && s[0] == '\r' && s[1] == '\n' { return s[2:] } return s } // stripEscapedNewlines removes whitespace after line-ending backslashes in // multiline strings. // // A line-ending backslash is an unescaped \ followed only by whitespace until // the next newline. After a line-ending backslash, all whitespace is removed // until the next non-whitespace character. func (p *parser) stripEscapedNewlines(s string) string { var b strings.Builder var i int for { ix := strings.Index(s[i:], `\`) if ix < 0 { b.WriteString(s) return b.String() } i += ix if len(s) > i+1 && s[i+1] == '\\' { // Escaped backslash. i += 2 continue } // Scan until the next non-whitespace. j := i + 1 whitespaceLoop: for ; j < len(s); j++ { switch s[j] { case ' ', '\t', '\r', '\n': default: break whitespaceLoop } } if j == i+1 { // Not a whitespace escape. i++ continue } if !strings.Contains(s[i:j], "\n") { // This is not a line-ending backslash. // (It's a bad escape sequence, but we can let // replaceEscapes catch it.) i++ continue } b.WriteString(s[:i]) s = s[j:] i = 0 } } func (p *parser) replaceEscapes(it item, str string) string { replaced := make([]rune, 0, len(str)) s := []byte(str) r := 0 for r < len(s) { if s[r] != '\\' { c, size := utf8.DecodeRune(s[r:]) r += size replaced = append(replaced, c) continue } r += 1 if r >= len(s) { p.bug("Escape sequence at end of string.") return "" } switch s[r] { default: p.bug("Expected valid escape code after \\, but got %q.", s[r]) case ' ', '\t': p.panicItemf(it, "invalid escape: '\\%c'", s[r]) case 'b': replaced = append(replaced, rune(0x0008)) r += 1 case 't': replaced = append(replaced, rune(0x0009)) r += 1 case 'n': replaced = append(replaced, rune(0x000A)) r += 1 case 'f': replaced = append(replaced, rune(0x000C)) r += 1 case 'r': replaced = append(replaced, rune(0x000D)) r += 1 case 'e': if p.tomlNext { replaced = append(replaced, rune(0x001B)) r += 1 } case '"': replaced = append(replaced, rune(0x0022)) r += 1 case '\\': replaced = append(replaced, rune(0x005C)) r += 1 case 'x': if p.tomlNext { escaped := p.asciiEscapeToUnicode(it, s[r+1:r+3]) replaced = append(replaced, escaped) r += 3 } case 'u': // At this point, we know we have a Unicode escape of the form // `uXXXX` at [r, r+5). (Because the lexer guarantees this // for us.) escaped := p.asciiEscapeToUnicode(it, s[r+1:r+5]) replaced = append(replaced, escaped) r += 5 case 'U': // At this point, we know we have a Unicode escape of the form // `uXXXX` at [r, r+9). (Because the lexer guarantees this // for us.) escaped := p.asciiEscapeToUnicode(it, s[r+1:r+9]) replaced = append(replaced, escaped) r += 9 } } return string(replaced) } func (p *parser) asciiEscapeToUnicode(it item, bs []byte) rune { s := string(bs) hex, err := strconv.ParseUint(strings.ToLower(s), 16, 32) if err != nil { p.bug("Could not parse '%s' as a hexadecimal number, but the lexer claims it's OK: %s", s, err) } if !utf8.ValidRune(rune(hex)) { p.panicItemf(it, "Escaped character '\\u%s' is not valid UTF-8.", s) } return rune(hex) } ================================================ FILE: vendor/github.com/BurntSushi/toml/type_fields.go ================================================ package toml // Struct field handling is adapted from code in encoding/json: // // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the Go distribution. import ( "reflect" "sort" "sync" ) // A field represents a single field found in a struct. type field struct { name string // the name of the field (`toml` tag included) tag bool // whether field has a `toml` tag index []int // represents the depth of an anonymous field typ reflect.Type // the type of the field } // byName sorts field by name, breaking ties with depth, // then breaking ties with "name came from toml tag", then // breaking ties with index sequence. type byName []field func (x byName) Len() int { return len(x) } func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } func (x byName) Less(i, j int) bool { if x[i].name != x[j].name { return x[i].name < x[j].name } if len(x[i].index) != len(x[j].index) { return len(x[i].index) < len(x[j].index) } if x[i].tag != x[j].tag { return x[i].tag } return byIndex(x).Less(i, j) } // byIndex sorts field by index sequence. type byIndex []field func (x byIndex) Len() int { return len(x) } func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } func (x byIndex) Less(i, j int) bool { for k, xik := range x[i].index { if k >= len(x[j].index) { return false } if xik != x[j].index[k] { return xik < x[j].index[k] } } return len(x[i].index) < len(x[j].index) } // typeFields returns a list of fields that TOML should recognize for the given // type. The algorithm is breadth-first search over the set of structs to // include - the top struct and then any reachable anonymous structs. func typeFields(t reflect.Type) []field { // Anonymous fields to explore at the current level and the next. current := []field{} next := []field{{typ: t}} // Count of queued names for current level and the next. var count map[reflect.Type]int var nextCount map[reflect.Type]int // Types already visited at an earlier level. visited := map[reflect.Type]bool{} // Fields found. var fields []field for len(next) > 0 { current, next = next, current[:0] count, nextCount = nextCount, map[reflect.Type]int{} for _, f := range current { if visited[f.typ] { continue } visited[f.typ] = true // Scan f.typ for fields to include. for i := 0; i < f.typ.NumField(); i++ { sf := f.typ.Field(i) if sf.PkgPath != "" && !sf.Anonymous { // unexported continue } opts := getOptions(sf.Tag) if opts.skip { continue } index := make([]int, len(f.index)+1) copy(index, f.index) index[len(f.index)] = i ft := sf.Type if ft.Name() == "" && ft.Kind() == reflect.Ptr { // Follow pointer. ft = ft.Elem() } // Record found field and index sequence. if opts.name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { tagged := opts.name != "" name := opts.name if name == "" { name = sf.Name } fields = append(fields, field{name, tagged, index, ft}) if count[f.typ] > 1 { // If there were multiple instances, add a second, // so that the annihilation code will see a duplicate. // It only cares about the distinction between 1 or 2, // so don't bother generating any more copies. fields = append(fields, fields[len(fields)-1]) } continue } // Record new anonymous struct to explore in next round. nextCount[ft]++ if nextCount[ft] == 1 { f := field{name: ft.Name(), index: index, typ: ft} next = append(next, f) } } } } sort.Sort(byName(fields)) // Delete all fields that are hidden by the Go rules for embedded fields, // except that fields with TOML tags are promoted. // The fields are sorted in primary order of name, secondary order // of field index length. Loop over names; for each name, delete // hidden fields by choosing the one dominant field that survives. out := fields[:0] for advance, i := 0, 0; i < len(fields); i += advance { // One iteration per name. // Find the sequence of fields with the name of this first field. fi := fields[i] name := fi.name for advance = 1; i+advance < len(fields); advance++ { fj := fields[i+advance] if fj.name != name { break } } if advance == 1 { // Only one field with this name out = append(out, fi) continue } dominant, ok := dominantField(fields[i : i+advance]) if ok { out = append(out, dominant) } } fields = out sort.Sort(byIndex(fields)) return fields } // dominantField looks through the fields, all of which are known to // have the same name, to find the single field that dominates the // others using Go's embedding rules, modified by the presence of // TOML tags. If there are multiple top-level fields, the boolean // will be false: This condition is an error in Go and we skip all // the fields. func dominantField(fields []field) (field, bool) { // The fields are sorted in increasing index-length order. The winner // must therefore be one with the shortest index length. Drop all // longer entries, which is easy: just truncate the slice. length := len(fields[0].index) tagged := -1 // Index of first tagged field. for i, f := range fields { if len(f.index) > length { fields = fields[:i] break } if f.tag { if tagged >= 0 { // Multiple tagged fields at the same level: conflict. // Return no field. return field{}, false } tagged = i } } if tagged >= 0 { return fields[tagged], true } // All remaining fields have the same length. If there's more than one, // we have a conflict (two fields named "X" at the same level) and we // return no field. if len(fields) > 1 { return field{}, false } return fields[0], true } var fieldCache struct { sync.RWMutex m map[reflect.Type][]field } // cachedTypeFields is like typeFields but uses a cache to avoid repeated work. func cachedTypeFields(t reflect.Type) []field { fieldCache.RLock() f := fieldCache.m[t] fieldCache.RUnlock() if f != nil { return f } // Compute fields without lock. // Might duplicate effort but won't hold other computations back. f = typeFields(t) if f == nil { f = []field{} } fieldCache.Lock() if fieldCache.m == nil { fieldCache.m = map[reflect.Type][]field{} } fieldCache.m[t] = f fieldCache.Unlock() return f } ================================================ FILE: vendor/github.com/BurntSushi/toml/type_toml.go ================================================ package toml // tomlType represents any Go type that corresponds to a TOML type. // While the first draft of the TOML spec has a simplistic type system that // probably doesn't need this level of sophistication, we seem to be militating // toward adding real composite types. type tomlType interface { typeString() string } // typeEqual accepts any two types and returns true if they are equal. func typeEqual(t1, t2 tomlType) bool { if t1 == nil || t2 == nil { return false } return t1.typeString() == t2.typeString() } func typeIsTable(t tomlType) bool { return typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash) } type tomlBaseType string func (btype tomlBaseType) typeString() string { return string(btype) } func (btype tomlBaseType) String() string { return btype.typeString() } var ( tomlInteger tomlBaseType = "Integer" tomlFloat tomlBaseType = "Float" tomlDatetime tomlBaseType = "Datetime" tomlString tomlBaseType = "String" tomlBool tomlBaseType = "Bool" tomlArray tomlBaseType = "Array" tomlHash tomlBaseType = "Hash" tomlArrayHash tomlBaseType = "ArrayHash" ) // typeOfPrimitive returns a tomlType of any primitive value in TOML. // Primitive values are: Integer, Float, Datetime, String and Bool. // // Passing a lexer item other than the following will cause a BUG message // to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime. func (p *parser) typeOfPrimitive(lexItem item) tomlType { switch lexItem.typ { case itemInteger: return tomlInteger case itemFloat: return tomlFloat case itemDatetime: return tomlDatetime case itemString: return tomlString case itemMultilineString: return tomlString case itemRawString: return tomlString case itemRawMultilineString: return tomlString case itemBool: return tomlBool } p.bug("Cannot infer primitive type of lex item '%s'.", lexItem) panic("unreachable") } ================================================ FILE: vendor/github.com/armon/go-metrics/.gitignore ================================================ # Compiled Object files, Static and Dynamic libs (Shared Objects) *.o *.a *.so # Folders _obj _test # Architecture specific extensions/prefixes *.[568vq] [568vq].out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* _testmain.go *.exe /metrics.out .idea ================================================ FILE: vendor/github.com/armon/go-metrics/.travis.yml ================================================ language: go go: - "1.x" env: - GO111MODULE=on install: - go get ./... script: - go test ./... ================================================ FILE: vendor/github.com/armon/go-metrics/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2013 Armon Dadgar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: vendor/github.com/armon/go-metrics/README.md ================================================ go-metrics ========== This library provides a `metrics` package which can be used to instrument code, expose application metrics, and profile runtime performance in a flexible manner. Current API: [![GoDoc](https://godoc.org/github.com/armon/go-metrics?status.svg)](https://godoc.org/github.com/armon/go-metrics) Sinks ----- The `metrics` package makes use of a `MetricSink` interface to support delivery to any type of backend. Currently the following sinks are provided: * StatsiteSink : Sinks to a [statsite](https://github.com/armon/statsite/) instance (TCP) * StatsdSink: Sinks to a [StatsD](https://github.com/etsy/statsd/) / statsite instance (UDP) * PrometheusSink: Sinks to a [Prometheus](http://prometheus.io/) metrics endpoint (exposed via HTTP for scrapes) * InmemSink : Provides in-memory aggregation, can be used to export stats * FanoutSink : Sinks to multiple sinks. Enables writing to multiple statsite instances for example. * BlackholeSink : Sinks to nowhere In addition to the sinks, the `InmemSignal` can be used to catch a signal, and dump a formatted output of recent metrics. For example, when a process gets a SIGUSR1, it can dump to stderr recent performance metrics for debugging. Labels ------ Most metrics do have an equivalent ending with `WithLabels`, such methods allow to push metrics with labels and use some features of underlying Sinks (ex: translated into Prometheus labels). Since some of these labels may increase greatly cardinality of metrics, the library allow to filter labels using a blacklist/whitelist filtering system which is global to all metrics. * If `Config.AllowedLabels` is not nil, then only labels specified in this value will be sent to underlying Sink, otherwise, all labels are sent by default. * If `Config.BlockedLabels` is not nil, any label specified in this value will not be sent to underlying Sinks. By default, both `Config.AllowedLabels` and `Config.BlockedLabels` are nil, meaning that no tags are filetered at all, but it allow to a user to globally block some tags with high cardinality at application level. Examples -------- Here is an example of using the package: ```go func SlowMethod() { // Profiling the runtime of a method defer metrics.MeasureSince([]string{"SlowMethod"}, time.Now()) } // Configure a statsite sink as the global metrics sink sink, _ := metrics.NewStatsiteSink("statsite:8125") metrics.NewGlobal(metrics.DefaultConfig("service-name"), sink) // Emit a Key/Value pair metrics.EmitKey([]string{"questions", "meaning of life"}, 42) ``` Here is an example of setting up a signal handler: ```go // Setup the inmem sink and signal handler inm := metrics.NewInmemSink(10*time.Second, time.Minute) sig := metrics.DefaultInmemSignal(inm) metrics.NewGlobal(metrics.DefaultConfig("service-name"), inm) // Run some code inm.SetGauge([]string{"foo"}, 42) inm.EmitKey([]string{"bar"}, 30) inm.IncrCounter([]string{"baz"}, 42) inm.IncrCounter([]string{"baz"}, 1) inm.IncrCounter([]string{"baz"}, 80) inm.AddSample([]string{"method", "wow"}, 42) inm.AddSample([]string{"method", "wow"}, 100) inm.AddSample([]string{"method", "wow"}, 22) .... ``` When a signal comes in, output like the following will be dumped to stderr: [2014-01-28 14:57:33.04 -0800 PST][G] 'foo': 42.000 [2014-01-28 14:57:33.04 -0800 PST][P] 'bar': 30.000 [2014-01-28 14:57:33.04 -0800 PST][C] 'baz': Count: 3 Min: 1.000 Mean: 41.000 Max: 80.000 Stddev: 39.509 [2014-01-28 14:57:33.04 -0800 PST][S] 'method.wow': Count: 3 Min: 22.000 Mean: 54.667 Max: 100.000 Stddev: 40.513 ================================================ FILE: vendor/github.com/armon/go-metrics/const_unix.go ================================================ // +build !windows package metrics import ( "syscall" ) const ( // DefaultSignal is used with DefaultInmemSignal DefaultSignal = syscall.SIGUSR1 ) ================================================ FILE: vendor/github.com/armon/go-metrics/const_windows.go ================================================ // +build windows package metrics import ( "syscall" ) const ( // DefaultSignal is used with DefaultInmemSignal // Windows has no SIGUSR1, use SIGBREAK DefaultSignal = syscall.Signal(21) ) ================================================ FILE: vendor/github.com/armon/go-metrics/inmem.go ================================================ package metrics import ( "bytes" "fmt" "math" "net/url" "strings" "sync" "time" ) var spaceReplacer = strings.NewReplacer(" ", "_") // InmemSink provides a MetricSink that does in-memory aggregation // without sending metrics over a network. It can be embedded within // an application to provide profiling information. type InmemSink struct { // How long is each aggregation interval interval time.Duration // Retain controls how many metrics interval we keep retain time.Duration // maxIntervals is the maximum length of intervals. // It is retain / interval. maxIntervals int // intervals is a slice of the retained intervals intervals []*IntervalMetrics intervalLock sync.RWMutex rateDenom float64 } // IntervalMetrics stores the aggregated metrics // for a specific interval type IntervalMetrics struct { sync.RWMutex // The start time of the interval Interval time.Time // Gauges maps the key to the last set value Gauges map[string]GaugeValue // Points maps the string to the list of emitted values // from EmitKey Points map[string][]float32 // Counters maps the string key to a sum of the counter // values Counters map[string]SampledValue // Samples maps the key to an AggregateSample, // which has the rolled up view of a sample Samples map[string]SampledValue // done is closed when this interval has ended, and a new IntervalMetrics // has been created to receive any future metrics. done chan struct{} } // NewIntervalMetrics creates a new IntervalMetrics for a given interval func NewIntervalMetrics(intv time.Time) *IntervalMetrics { return &IntervalMetrics{ Interval: intv, Gauges: make(map[string]GaugeValue), Points: make(map[string][]float32), Counters: make(map[string]SampledValue), Samples: make(map[string]SampledValue), done: make(chan struct{}), } } // AggregateSample is used to hold aggregate metrics // about a sample type AggregateSample struct { Count int // The count of emitted pairs Rate float64 // The values rate per time unit (usually 1 second) Sum float64 // The sum of values SumSq float64 `json:"-"` // The sum of squared values Min float64 // Minimum value Max float64 // Maximum value LastUpdated time.Time `json:"-"` // When value was last updated } // Computes a Stddev of the values func (a *AggregateSample) Stddev() float64 { num := (float64(a.Count) * a.SumSq) - math.Pow(a.Sum, 2) div := float64(a.Count * (a.Count - 1)) if div == 0 { return 0 } return math.Sqrt(num / div) } // Computes a mean of the values func (a *AggregateSample) Mean() float64 { if a.Count == 0 { return 0 } return a.Sum / float64(a.Count) } // Ingest is used to update a sample func (a *AggregateSample) Ingest(v float64, rateDenom float64) { a.Count++ a.Sum += v a.SumSq += (v * v) if v < a.Min || a.Count == 1 { a.Min = v } if v > a.Max || a.Count == 1 { a.Max = v } a.Rate = float64(a.Sum) / rateDenom a.LastUpdated = time.Now() } func (a *AggregateSample) String() string { if a.Count == 0 { return "Count: 0" } else if a.Stddev() == 0 { return fmt.Sprintf("Count: %d Sum: %0.3f LastUpdated: %s", a.Count, a.Sum, a.LastUpdated) } else { return fmt.Sprintf("Count: %d Min: %0.3f Mean: %0.3f Max: %0.3f Stddev: %0.3f Sum: %0.3f LastUpdated: %s", a.Count, a.Min, a.Mean(), a.Max, a.Stddev(), a.Sum, a.LastUpdated) } } // NewInmemSinkFromURL creates an InmemSink from a URL. It is used // (and tested) from NewMetricSinkFromURL. func NewInmemSinkFromURL(u *url.URL) (MetricSink, error) { params := u.Query() interval, err := time.ParseDuration(params.Get("interval")) if err != nil { return nil, fmt.Errorf("Bad 'interval' param: %s", err) } retain, err := time.ParseDuration(params.Get("retain")) if err != nil { return nil, fmt.Errorf("Bad 'retain' param: %s", err) } return NewInmemSink(interval, retain), nil } // NewInmemSink is used to construct a new in-memory sink. // Uses an aggregation interval and maximum retention period. func NewInmemSink(interval, retain time.Duration) *InmemSink { rateTimeUnit := time.Second i := &InmemSink{ interval: interval, retain: retain, maxIntervals: int(retain / interval), rateDenom: float64(interval.Nanoseconds()) / float64(rateTimeUnit.Nanoseconds()), } i.intervals = make([]*IntervalMetrics, 0, i.maxIntervals) return i } func (i *InmemSink) SetGauge(key []string, val float32) { i.SetGaugeWithLabels(key, val, nil) } func (i *InmemSink) SetGaugeWithLabels(key []string, val float32, labels []Label) { k, name := i.flattenKeyLabels(key, labels) intv := i.getInterval() intv.Lock() defer intv.Unlock() intv.Gauges[k] = GaugeValue{Name: name, Value: val, Labels: labels} } func (i *InmemSink) EmitKey(key []string, val float32) { k := i.flattenKey(key) intv := i.getInterval() intv.Lock() defer intv.Unlock() vals := intv.Points[k] intv.Points[k] = append(vals, val) } func (i *InmemSink) IncrCounter(key []string, val float32) { i.IncrCounterWithLabels(key, val, nil) } func (i *InmemSink) IncrCounterWithLabels(key []string, val float32, labels []Label) { k, name := i.flattenKeyLabels(key, labels) intv := i.getInterval() intv.Lock() defer intv.Unlock() agg, ok := intv.Counters[k] if !ok { agg = SampledValue{ Name: name, AggregateSample: &AggregateSample{}, Labels: labels, } intv.Counters[k] = agg } agg.Ingest(float64(val), i.rateDenom) } func (i *InmemSink) AddSample(key []string, val float32) { i.AddSampleWithLabels(key, val, nil) } func (i *InmemSink) AddSampleWithLabels(key []string, val float32, labels []Label) { k, name := i.flattenKeyLabels(key, labels) intv := i.getInterval() intv.Lock() defer intv.Unlock() agg, ok := intv.Samples[k] if !ok { agg = SampledValue{ Name: name, AggregateSample: &AggregateSample{}, Labels: labels, } intv.Samples[k] = agg } agg.Ingest(float64(val), i.rateDenom) } // Data is used to retrieve all the aggregated metrics // Intervals may be in use, and a read lock should be acquired func (i *InmemSink) Data() []*IntervalMetrics { // Get the current interval, forces creation i.getInterval() i.intervalLock.RLock() defer i.intervalLock.RUnlock() n := len(i.intervals) intervals := make([]*IntervalMetrics, n) copy(intervals[:n-1], i.intervals[:n-1]) current := i.intervals[n-1] // make its own copy for current interval intervals[n-1] = &IntervalMetrics{} copyCurrent := intervals[n-1] current.RLock() *copyCurrent = *current // RWMutex is not safe to copy, so create a new instance on the copy copyCurrent.RWMutex = sync.RWMutex{} copyCurrent.Gauges = make(map[string]GaugeValue, len(current.Gauges)) for k, v := range current.Gauges { copyCurrent.Gauges[k] = v } // saved values will be not change, just copy its link copyCurrent.Points = make(map[string][]float32, len(current.Points)) for k, v := range current.Points { copyCurrent.Points[k] = v } copyCurrent.Counters = make(map[string]SampledValue, len(current.Counters)) for k, v := range current.Counters { copyCurrent.Counters[k] = v.deepCopy() } copyCurrent.Samples = make(map[string]SampledValue, len(current.Samples)) for k, v := range current.Samples { copyCurrent.Samples[k] = v.deepCopy() } current.RUnlock() return intervals } // getInterval returns the current interval. A new interval is created if no // previous interval exists, or if the current time is beyond the window for the // current interval. func (i *InmemSink) getInterval() *IntervalMetrics { intv := time.Now().Truncate(i.interval) // Attempt to return the existing interval first, because it only requires // a read lock. i.intervalLock.RLock() n := len(i.intervals) if n > 0 && i.intervals[n-1].Interval == intv { defer i.intervalLock.RUnlock() return i.intervals[n-1] } i.intervalLock.RUnlock() i.intervalLock.Lock() defer i.intervalLock.Unlock() // Re-check for an existing interval now that the lock is re-acquired. n = len(i.intervals) if n > 0 && i.intervals[n-1].Interval == intv { return i.intervals[n-1] } current := NewIntervalMetrics(intv) i.intervals = append(i.intervals, current) if n > 0 { close(i.intervals[n-1].done) } n++ // Prune old intervals if the count exceeds the max. if n >= i.maxIntervals { copy(i.intervals[0:], i.intervals[n-i.maxIntervals:]) i.intervals = i.intervals[:i.maxIntervals] } return current } // Flattens the key for formatting, removes spaces func (i *InmemSink) flattenKey(parts []string) string { buf := &bytes.Buffer{} joined := strings.Join(parts, ".") spaceReplacer.WriteString(buf, joined) return buf.String() } // Flattens the key for formatting along with its labels, removes spaces func (i *InmemSink) flattenKeyLabels(parts []string, labels []Label) (string, string) { key := i.flattenKey(parts) buf := bytes.NewBufferString(key) for _, label := range labels { spaceReplacer.WriteString(buf, fmt.Sprintf(";%s=%s", label.Name, label.Value)) } return buf.String(), key } ================================================ FILE: vendor/github.com/armon/go-metrics/inmem_endpoint.go ================================================ package metrics import ( "context" "fmt" "net/http" "sort" "time" ) // MetricsSummary holds a roll-up of metrics info for a given interval type MetricsSummary struct { Timestamp string Gauges []GaugeValue Points []PointValue Counters []SampledValue Samples []SampledValue } type GaugeValue struct { Name string Hash string `json:"-"` Value float32 Labels []Label `json:"-"` DisplayLabels map[string]string `json:"Labels"` } type PointValue struct { Name string Points []float32 } type SampledValue struct { Name string Hash string `json:"-"` *AggregateSample Mean float64 Stddev float64 Labels []Label `json:"-"` DisplayLabels map[string]string `json:"Labels"` } // deepCopy allocates a new instance of AggregateSample func (source *SampledValue) deepCopy() SampledValue { dest := *source if source.AggregateSample != nil { dest.AggregateSample = &AggregateSample{} *dest.AggregateSample = *source.AggregateSample } return dest } // DisplayMetrics returns a summary of the metrics from the most recent finished interval. func (i *InmemSink) DisplayMetrics(resp http.ResponseWriter, req *http.Request) (interface{}, error) { data := i.Data() var interval *IntervalMetrics n := len(data) switch { case n == 0: return nil, fmt.Errorf("no metric intervals have been initialized yet") case n == 1: // Show the current interval if it's all we have interval = data[0] default: // Show the most recent finished interval if we have one interval = data[n-2] } return newMetricSummaryFromInterval(interval), nil } func newMetricSummaryFromInterval(interval *IntervalMetrics) MetricsSummary { interval.RLock() defer interval.RUnlock() summary := MetricsSummary{ Timestamp: interval.Interval.Round(time.Second).UTC().String(), Gauges: make([]GaugeValue, 0, len(interval.Gauges)), Points: make([]PointValue, 0, len(interval.Points)), } // Format and sort the output of each metric type, so it gets displayed in a // deterministic order. for name, points := range interval.Points { summary.Points = append(summary.Points, PointValue{name, points}) } sort.Slice(summary.Points, func(i, j int) bool { return summary.Points[i].Name < summary.Points[j].Name }) for hash, value := range interval.Gauges { value.Hash = hash value.DisplayLabels = make(map[string]string) for _, label := range value.Labels { value.DisplayLabels[label.Name] = label.Value } value.Labels = nil summary.Gauges = append(summary.Gauges, value) } sort.Slice(summary.Gauges, func(i, j int) bool { return summary.Gauges[i].Hash < summary.Gauges[j].Hash }) summary.Counters = formatSamples(interval.Counters) summary.Samples = formatSamples(interval.Samples) return summary } func formatSamples(source map[string]SampledValue) []SampledValue { output := make([]SampledValue, 0, len(source)) for hash, sample := range source { displayLabels := make(map[string]string) for _, label := range sample.Labels { displayLabels[label.Name] = label.Value } output = append(output, SampledValue{ Name: sample.Name, Hash: hash, AggregateSample: sample.AggregateSample, Mean: sample.AggregateSample.Mean(), Stddev: sample.AggregateSample.Stddev(), DisplayLabels: displayLabels, }) } sort.Slice(output, func(i, j int) bool { return output[i].Hash < output[j].Hash }) return output } type Encoder interface { Encode(interface{}) error } // Stream writes metrics using encoder.Encode each time an interval ends. Runs // until the request context is cancelled, or the encoder returns an error. // The caller is responsible for logging any errors from encoder. func (i *InmemSink) Stream(ctx context.Context, encoder Encoder) { interval := i.getInterval() for { select { case <-interval.done: summary := newMetricSummaryFromInterval(interval) if err := encoder.Encode(summary); err != nil { return } // update interval to the next one interval = i.getInterval() case <-ctx.Done(): return } } } ================================================ FILE: vendor/github.com/armon/go-metrics/inmem_signal.go ================================================ package metrics import ( "bytes" "fmt" "io" "os" "os/signal" "strings" "sync" "syscall" ) // InmemSignal is used to listen for a given signal, and when received, // to dump the current metrics from the InmemSink to an io.Writer type InmemSignal struct { signal syscall.Signal inm *InmemSink w io.Writer sigCh chan os.Signal stop bool stopCh chan struct{} stopLock sync.Mutex } // NewInmemSignal creates a new InmemSignal which listens for a given signal, // and dumps the current metrics out to a writer func NewInmemSignal(inmem *InmemSink, sig syscall.Signal, w io.Writer) *InmemSignal { i := &InmemSignal{ signal: sig, inm: inmem, w: w, sigCh: make(chan os.Signal, 1), stopCh: make(chan struct{}), } signal.Notify(i.sigCh, sig) go i.run() return i } // DefaultInmemSignal returns a new InmemSignal that responds to SIGUSR1 // and writes output to stderr. Windows uses SIGBREAK func DefaultInmemSignal(inmem *InmemSink) *InmemSignal { return NewInmemSignal(inmem, DefaultSignal, os.Stderr) } // Stop is used to stop the InmemSignal from listening func (i *InmemSignal) Stop() { i.stopLock.Lock() defer i.stopLock.Unlock() if i.stop { return } i.stop = true close(i.stopCh) signal.Stop(i.sigCh) } // run is a long running routine that handles signals func (i *InmemSignal) run() { for { select { case <-i.sigCh: i.dumpStats() case <-i.stopCh: return } } } // dumpStats is used to dump the data to output writer func (i *InmemSignal) dumpStats() { buf := bytes.NewBuffer(nil) data := i.inm.Data() // Skip the last period which is still being aggregated for j := 0; j < len(data)-1; j++ { intv := data[j] intv.RLock() for _, val := range intv.Gauges { name := i.flattenLabels(val.Name, val.Labels) fmt.Fprintf(buf, "[%v][G] '%s': %0.3f\n", intv.Interval, name, val.Value) } for name, vals := range intv.Points { for _, val := range vals { fmt.Fprintf(buf, "[%v][P] '%s': %0.3f\n", intv.Interval, name, val) } } for _, agg := range intv.Counters { name := i.flattenLabels(agg.Name, agg.Labels) fmt.Fprintf(buf, "[%v][C] '%s': %s\n", intv.Interval, name, agg.AggregateSample) } for _, agg := range intv.Samples { name := i.flattenLabels(agg.Name, agg.Labels) fmt.Fprintf(buf, "[%v][S] '%s': %s\n", intv.Interval, name, agg.AggregateSample) } intv.RUnlock() } // Write out the bytes i.w.Write(buf.Bytes()) } // Flattens the key for formatting along with its labels, removes spaces func (i *InmemSignal) flattenLabels(name string, labels []Label) string { buf := bytes.NewBufferString(name) replacer := strings.NewReplacer(" ", "_", ":", "_") for _, label := range labels { replacer.WriteString(buf, ".") replacer.WriteString(buf, label.Value) } return buf.String() } ================================================ FILE: vendor/github.com/armon/go-metrics/metrics.go ================================================ package metrics import ( "runtime" "strings" "time" iradix "github.com/hashicorp/go-immutable-radix" ) type Label struct { Name string Value string } func (m *Metrics) SetGauge(key []string, val float32) { m.SetGaugeWithLabels(key, val, nil) } func (m *Metrics) SetGaugeWithLabels(key []string, val float32, labels []Label) { if m.HostName != "" { if m.EnableHostnameLabel { labels = append(labels, Label{"host", m.HostName}) } else if m.EnableHostname { key = insert(0, m.HostName, key) } } if m.EnableTypePrefix { key = insert(0, "gauge", key) } if m.ServiceName != "" { if m.EnableServiceLabel { labels = append(labels, Label{"service", m.ServiceName}) } else { key = insert(0, m.ServiceName, key) } } allowed, labelsFiltered := m.allowMetric(key, labels) if !allowed { return } m.sink.SetGaugeWithLabels(key, val, labelsFiltered) } func (m *Metrics) EmitKey(key []string, val float32) { if m.EnableTypePrefix { key = insert(0, "kv", key) } if m.ServiceName != "" { key = insert(0, m.ServiceName, key) } allowed, _ := m.allowMetric(key, nil) if !allowed { return } m.sink.EmitKey(key, val) } func (m *Metrics) IncrCounter(key []string, val float32) { m.IncrCounterWithLabels(key, val, nil) } func (m *Metrics) IncrCounterWithLabels(key []string, val float32, labels []Label) { if m.HostName != "" && m.EnableHostnameLabel { labels = append(labels, Label{"host", m.HostName}) } if m.EnableTypePrefix { key = insert(0, "counter", key) } if m.ServiceName != "" { if m.EnableServiceLabel { labels = append(labels, Label{"service", m.ServiceName}) } else { key = insert(0, m.ServiceName, key) } } allowed, labelsFiltered := m.allowMetric(key, labels) if !allowed { return } m.sink.IncrCounterWithLabels(key, val, labelsFiltered) } func (m *Metrics) AddSample(key []string, val float32) { m.AddSampleWithLabels(key, val, nil) } func (m *Metrics) AddSampleWithLabels(key []string, val float32, labels []Label) { if m.HostName != "" && m.EnableHostnameLabel { labels = append(labels, Label{"host", m.HostName}) } if m.EnableTypePrefix { key = insert(0, "sample", key) } if m.ServiceName != "" { if m.EnableServiceLabel { labels = append(labels, Label{"service", m.ServiceName}) } else { key = insert(0, m.ServiceName, key) } } allowed, labelsFiltered := m.allowMetric(key, labels) if !allowed { return } m.sink.AddSampleWithLabels(key, val, labelsFiltered) } func (m *Metrics) MeasureSince(key []string, start time.Time) { m.MeasureSinceWithLabels(key, start, nil) } func (m *Metrics) MeasureSinceWithLabels(key []string, start time.Time, labels []Label) { if m.HostName != "" && m.EnableHostnameLabel { labels = append(labels, Label{"host", m.HostName}) } if m.EnableTypePrefix { key = insert(0, "timer", key) } if m.ServiceName != "" { if m.EnableServiceLabel { labels = append(labels, Label{"service", m.ServiceName}) } else { key = insert(0, m.ServiceName, key) } } allowed, labelsFiltered := m.allowMetric(key, labels) if !allowed { return } now := time.Now() elapsed := now.Sub(start) msec := float32(elapsed.Nanoseconds()) / float32(m.TimerGranularity) m.sink.AddSampleWithLabels(key, msec, labelsFiltered) } // UpdateFilter overwrites the existing filter with the given rules. func (m *Metrics) UpdateFilter(allow, block []string) { m.UpdateFilterAndLabels(allow, block, m.AllowedLabels, m.BlockedLabels) } // UpdateFilterAndLabels overwrites the existing filter with the given rules. func (m *Metrics) UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels []string) { m.filterLock.Lock() defer m.filterLock.Unlock() m.AllowedPrefixes = allow m.BlockedPrefixes = block if allowedLabels == nil { // Having a white list means we take only elements from it m.allowedLabels = nil } else { m.allowedLabels = make(map[string]bool) for _, v := range allowedLabels { m.allowedLabels[v] = true } } m.blockedLabels = make(map[string]bool) for _, v := range blockedLabels { m.blockedLabels[v] = true } m.AllowedLabels = allowedLabels m.BlockedLabels = blockedLabels m.filter = iradix.New() for _, prefix := range m.AllowedPrefixes { m.filter, _, _ = m.filter.Insert([]byte(prefix), true) } for _, prefix := range m.BlockedPrefixes { m.filter, _, _ = m.filter.Insert([]byte(prefix), false) } } func (m *Metrics) Shutdown() { if ss, ok := m.sink.(ShutdownSink); ok { ss.Shutdown() } } // labelIsAllowed return true if a should be included in metric // the caller should lock m.filterLock while calling this method func (m *Metrics) labelIsAllowed(label *Label) bool { labelName := (*label).Name if m.blockedLabels != nil { _, ok := m.blockedLabels[labelName] if ok { // If present, let's remove this label return false } } if m.allowedLabels != nil { _, ok := m.allowedLabels[labelName] return ok } // Allow by default return true } // filterLabels return only allowed labels // the caller should lock m.filterLock while calling this method func (m *Metrics) filterLabels(labels []Label) []Label { if labels == nil { return nil } toReturn := []Label{} for _, label := range labels { if m.labelIsAllowed(&label) { toReturn = append(toReturn, label) } } return toReturn } // Returns whether the metric should be allowed based on configured prefix filters // Also return the applicable labels func (m *Metrics) allowMetric(key []string, labels []Label) (bool, []Label) { m.filterLock.RLock() defer m.filterLock.RUnlock() if m.filter == nil || m.filter.Len() == 0 { return m.Config.FilterDefault, m.filterLabels(labels) } _, allowed, ok := m.filter.Root().LongestPrefix([]byte(strings.Join(key, "."))) if !ok { return m.Config.FilterDefault, m.filterLabels(labels) } return allowed.(bool), m.filterLabels(labels) } // Periodically collects runtime stats to publish func (m *Metrics) collectStats() { for { time.Sleep(m.ProfileInterval) m.EmitRuntimeStats() } } // Emits various runtime statsitics func (m *Metrics) EmitRuntimeStats() { // Export number of Goroutines numRoutines := runtime.NumGoroutine() m.SetGauge([]string{"runtime", "num_goroutines"}, float32(numRoutines)) // Export memory stats var stats runtime.MemStats runtime.ReadMemStats(&stats) m.SetGauge([]string{"runtime", "alloc_bytes"}, float32(stats.Alloc)) m.SetGauge([]string{"runtime", "sys_bytes"}, float32(stats.Sys)) m.SetGauge([]string{"runtime", "malloc_count"}, float32(stats.Mallocs)) m.SetGauge([]string{"runtime", "free_count"}, float32(stats.Frees)) m.SetGauge([]string{"runtime", "heap_objects"}, float32(stats.HeapObjects)) m.SetGauge([]string{"runtime", "total_gc_pause_ns"}, float32(stats.PauseTotalNs)) m.SetGauge([]string{"runtime", "total_gc_runs"}, float32(stats.NumGC)) // Export info about the last few GC runs num := stats.NumGC // Handle wrap around if num < m.lastNumGC { m.lastNumGC = 0 } // Ensure we don't scan more than 256 if num-m.lastNumGC >= 256 { m.lastNumGC = num - 255 } for i := m.lastNumGC; i < num; i++ { pause := stats.PauseNs[i%256] m.AddSample([]string{"runtime", "gc_pause_ns"}, float32(pause)) } m.lastNumGC = num } // Creates a new slice with the provided string value as the first element // and the provided slice values as the remaining values. // Ordering of the values in the provided input slice is kept in tact in the output slice. func insert(i int, v string, s []string) []string { // Allocate new slice to avoid modifying the input slice newS := make([]string, len(s)+1) // Copy s[0, i-1] into newS for j := 0; j < i; j++ { newS[j] = s[j] } // Insert provided element at index i newS[i] = v // Copy s[i, len(s)-1] into newS starting at newS[i+1] for j := i; j < len(s); j++ { newS[j+1] = s[j] } return newS } ================================================ FILE: vendor/github.com/armon/go-metrics/sink.go ================================================ package metrics import ( "fmt" "net/url" ) // The MetricSink interface is used to transmit metrics information // to an external system type MetricSink interface { // A Gauge should retain the last value it is set to SetGauge(key []string, val float32) SetGaugeWithLabels(key []string, val float32, labels []Label) // Should emit a Key/Value pair for each call EmitKey(key []string, val float32) // Counters should accumulate values IncrCounter(key []string, val float32) IncrCounterWithLabels(key []string, val float32, labels []Label) // Samples are for timing information, where quantiles are used AddSample(key []string, val float32) AddSampleWithLabels(key []string, val float32, labels []Label) } type ShutdownSink interface { MetricSink // Shutdown the metric sink, flush metrics to storage, and cleanup resources. // Called immediately prior to application exit. Implementations must block // until metrics are flushed to storage. Shutdown() } // BlackholeSink is used to just blackhole messages type BlackholeSink struct{} func (*BlackholeSink) SetGauge(key []string, val float32) {} func (*BlackholeSink) SetGaugeWithLabels(key []string, val float32, labels []Label) {} func (*BlackholeSink) EmitKey(key []string, val float32) {} func (*BlackholeSink) IncrCounter(key []string, val float32) {} func (*BlackholeSink) IncrCounterWithLabels(key []string, val float32, labels []Label) {} func (*BlackholeSink) AddSample(key []string, val float32) {} func (*BlackholeSink) AddSampleWithLabels(key []string, val float32, labels []Label) {} // FanoutSink is used to sink to fanout values to multiple sinks type FanoutSink []MetricSink func (fh FanoutSink) SetGauge(key []string, val float32) { fh.SetGaugeWithLabels(key, val, nil) } func (fh FanoutSink) SetGaugeWithLabels(key []string, val float32, labels []Label) { for _, s := range fh { s.SetGaugeWithLabels(key, val, labels) } } func (fh FanoutSink) EmitKey(key []string, val float32) { for _, s := range fh { s.EmitKey(key, val) } } func (fh FanoutSink) IncrCounter(key []string, val float32) { fh.IncrCounterWithLabels(key, val, nil) } func (fh FanoutSink) IncrCounterWithLabels(key []string, val float32, labels []Label) { for _, s := range fh { s.IncrCounterWithLabels(key, val, labels) } } func (fh FanoutSink) AddSample(key []string, val float32) { fh.AddSampleWithLabels(key, val, nil) } func (fh FanoutSink) AddSampleWithLabels(key []string, val float32, labels []Label) { for _, s := range fh { s.AddSampleWithLabels(key, val, labels) } } func (fh FanoutSink) Shutdown() { for _, s := range fh { if ss, ok := s.(ShutdownSink); ok { ss.Shutdown() } } } // sinkURLFactoryFunc is an generic interface around the *SinkFromURL() function provided // by each sink type type sinkURLFactoryFunc func(*url.URL) (MetricSink, error) // sinkRegistry supports the generic NewMetricSink function by mapping URL // schemes to metric sink factory functions var sinkRegistry = map[string]sinkURLFactoryFunc{ "statsd": NewStatsdSinkFromURL, "statsite": NewStatsiteSinkFromURL, "inmem": NewInmemSinkFromURL, } // NewMetricSinkFromURL allows a generic URL input to configure any of the // supported sinks. The scheme of the URL identifies the type of the sink, the // and query parameters are used to set options. // // "statsd://" - Initializes a StatsdSink. The host and port are passed through // as the "addr" of the sink // // "statsite://" - Initializes a StatsiteSink. The host and port become the // "addr" of the sink // // "inmem://" - Initializes an InmemSink. The host and port are ignored. The // "interval" and "duration" query parameters must be specified with valid // durations, see NewInmemSink for details. func NewMetricSinkFromURL(urlStr string) (MetricSink, error) { u, err := url.Parse(urlStr) if err != nil { return nil, err } sinkURLFactoryFunc := sinkRegistry[u.Scheme] if sinkURLFactoryFunc == nil { return nil, fmt.Errorf( "cannot create metric sink, unrecognized sink name: %q", u.Scheme) } return sinkURLFactoryFunc(u) } ================================================ FILE: vendor/github.com/armon/go-metrics/start.go ================================================ package metrics import ( "os" "sync" "sync/atomic" "time" iradix "github.com/hashicorp/go-immutable-radix" ) // Config is used to configure metrics settings type Config struct { ServiceName string // Prefixed with keys to separate services HostName string // Hostname to use. If not provided and EnableHostname, it will be os.Hostname EnableHostname bool // Enable prefixing gauge values with hostname EnableHostnameLabel bool // Enable adding hostname to labels EnableServiceLabel bool // Enable adding service to labels EnableRuntimeMetrics bool // Enables profiling of runtime metrics (GC, Goroutines, Memory) EnableTypePrefix bool // Prefixes key with a type ("counter", "gauge", "timer") TimerGranularity time.Duration // Granularity of timers. ProfileInterval time.Duration // Interval to profile runtime metrics AllowedPrefixes []string // A list of metric prefixes to allow, with '.' as the separator BlockedPrefixes []string // A list of metric prefixes to block, with '.' as the separator AllowedLabels []string // A list of metric labels to allow, with '.' as the separator BlockedLabels []string // A list of metric labels to block, with '.' as the separator FilterDefault bool // Whether to allow metrics by default } // Metrics represents an instance of a metrics sink that can // be used to emit type Metrics struct { Config lastNumGC uint32 sink MetricSink filter *iradix.Tree allowedLabels map[string]bool blockedLabels map[string]bool filterLock sync.RWMutex // Lock filters and allowedLabels/blockedLabels access } // Shared global metrics instance var globalMetrics atomic.Value // *Metrics func init() { // Initialize to a blackhole sink to avoid errors globalMetrics.Store(&Metrics{sink: &BlackholeSink{}}) } // Default returns the shared global metrics instance. func Default() *Metrics { return globalMetrics.Load().(*Metrics) } // DefaultConfig provides a sane default configuration func DefaultConfig(serviceName string) *Config { c := &Config{ ServiceName: serviceName, // Use client provided service HostName: "", EnableHostname: true, // Enable hostname prefix EnableRuntimeMetrics: true, // Enable runtime profiling EnableTypePrefix: false, // Disable type prefix TimerGranularity: time.Millisecond, // Timers are in milliseconds ProfileInterval: time.Second, // Poll runtime every second FilterDefault: true, // Don't filter metrics by default } // Try to get the hostname name, _ := os.Hostname() c.HostName = name return c } // New is used to create a new instance of Metrics func New(conf *Config, sink MetricSink) (*Metrics, error) { met := &Metrics{} met.Config = *conf met.sink = sink met.UpdateFilterAndLabels(conf.AllowedPrefixes, conf.BlockedPrefixes, conf.AllowedLabels, conf.BlockedLabels) // Start the runtime collector if conf.EnableRuntimeMetrics { go met.collectStats() } return met, nil } // NewGlobal is the same as New, but it assigns the metrics object to be // used globally as well as returning it. func NewGlobal(conf *Config, sink MetricSink) (*Metrics, error) { metrics, err := New(conf, sink) if err == nil { globalMetrics.Store(metrics) } return metrics, err } // Proxy all the methods to the globalMetrics instance func SetGauge(key []string, val float32) { globalMetrics.Load().(*Metrics).SetGauge(key, val) } func SetGaugeWithLabels(key []string, val float32, labels []Label) { globalMetrics.Load().(*Metrics).SetGaugeWithLabels(key, val, labels) } func EmitKey(key []string, val float32) { globalMetrics.Load().(*Metrics).EmitKey(key, val) } func IncrCounter(key []string, val float32) { globalMetrics.Load().(*Metrics).IncrCounter(key, val) } func IncrCounterWithLabels(key []string, val float32, labels []Label) { globalMetrics.Load().(*Metrics).IncrCounterWithLabels(key, val, labels) } func AddSample(key []string, val float32) { globalMetrics.Load().(*Metrics).AddSample(key, val) } func AddSampleWithLabels(key []string, val float32, labels []Label) { globalMetrics.Load().(*Metrics).AddSampleWithLabels(key, val, labels) } func MeasureSince(key []string, start time.Time) { globalMetrics.Load().(*Metrics).MeasureSince(key, start) } func MeasureSinceWithLabels(key []string, start time.Time, labels []Label) { globalMetrics.Load().(*Metrics).MeasureSinceWithLabels(key, start, labels) } func UpdateFilter(allow, block []string) { globalMetrics.Load().(*Metrics).UpdateFilter(allow, block) } // UpdateFilterAndLabels set allow/block prefixes of metrics while allowedLabels // and blockedLabels - when not nil - allow filtering of labels in order to // block/allow globally labels (especially useful when having large number of // values for a given label). See README.md for more information about usage. func UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels []string) { globalMetrics.Load().(*Metrics).UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels) } // Shutdown disables metric collection, then blocks while attempting to flush metrics to storage. // WARNING: Not all MetricSink backends support this functionality, and calling this will cause them to leak resources. // This is intended for use immediately prior to application exit. func Shutdown() { m := globalMetrics.Load().(*Metrics) // Swap whatever MetricSink is currently active with a BlackholeSink. Callers must not have a // reason to expect that calls to the library will successfully collect metrics after Shutdown // has been called. globalMetrics.Store(&Metrics{sink: &BlackholeSink{}}) m.Shutdown() } ================================================ FILE: vendor/github.com/armon/go-metrics/statsd.go ================================================ package metrics import ( "bytes" "fmt" "log" "net" "net/url" "strings" "time" ) const ( // statsdMaxLen is the maximum size of a packet // to send to statsd statsdMaxLen = 1400 ) // StatsdSink provides a MetricSink that can be used // with a statsite or statsd metrics server. It uses // only UDP packets, while StatsiteSink uses TCP. type StatsdSink struct { addr string metricQueue chan string } // NewStatsdSinkFromURL creates an StatsdSink from a URL. It is used // (and tested) from NewMetricSinkFromURL. func NewStatsdSinkFromURL(u *url.URL) (MetricSink, error) { return NewStatsdSink(u.Host) } // NewStatsdSink is used to create a new StatsdSink func NewStatsdSink(addr string) (*StatsdSink, error) { s := &StatsdSink{ addr: addr, metricQueue: make(chan string, 4096), } go s.flushMetrics() return s, nil } // Close is used to stop flushing to statsd func (s *StatsdSink) Shutdown() { close(s.metricQueue) } func (s *StatsdSink) SetGauge(key []string, val float32) { flatKey := s.flattenKey(key) s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val)) } func (s *StatsdSink) SetGaugeWithLabels(key []string, val float32, labels []Label) { flatKey := s.flattenKeyLabels(key, labels) s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val)) } func (s *StatsdSink) EmitKey(key []string, val float32) { flatKey := s.flattenKey(key) s.pushMetric(fmt.Sprintf("%s:%f|kv\n", flatKey, val)) } func (s *StatsdSink) IncrCounter(key []string, val float32) { flatKey := s.flattenKey(key) s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val)) } func (s *StatsdSink) IncrCounterWithLabels(key []string, val float32, labels []Label) { flatKey := s.flattenKeyLabels(key, labels) s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val)) } func (s *StatsdSink) AddSample(key []string, val float32) { flatKey := s.flattenKey(key) s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val)) } func (s *StatsdSink) AddSampleWithLabels(key []string, val float32, labels []Label) { flatKey := s.flattenKeyLabels(key, labels) s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val)) } // Flattens the key for formatting, removes spaces func (s *StatsdSink) flattenKey(parts []string) string { joined := strings.Join(parts, ".") return strings.Map(func(r rune) rune { switch r { case ':': fallthrough case ' ': return '_' default: return r } }, joined) } // Flattens the key along with labels for formatting, removes spaces func (s *StatsdSink) flattenKeyLabels(parts []string, labels []Label) string { for _, label := range labels { parts = append(parts, label.Value) } return s.flattenKey(parts) } // Does a non-blocking push to the metrics queue func (s *StatsdSink) pushMetric(m string) { select { case s.metricQueue <- m: default: } } // Flushes metrics func (s *StatsdSink) flushMetrics() { var sock net.Conn var err error var wait <-chan time.Time ticker := time.NewTicker(flushInterval) defer ticker.Stop() CONNECT: // Create a buffer buf := bytes.NewBuffer(nil) // Attempt to connect sock, err = net.Dial("udp", s.addr) if err != nil { log.Printf("[ERR] Error connecting to statsd! Err: %s", err) goto WAIT } for { select { case metric, ok := <-s.metricQueue: // Get a metric from the queue if !ok { goto QUIT } // Check if this would overflow the packet size if len(metric)+buf.Len() > statsdMaxLen { _, err := sock.Write(buf.Bytes()) buf.Reset() if err != nil { log.Printf("[ERR] Error writing to statsd! Err: %s", err) goto WAIT } } // Append to the buffer buf.WriteString(metric) case <-ticker.C: if buf.Len() == 0 { continue } _, err := sock.Write(buf.Bytes()) buf.Reset() if err != nil { log.Printf("[ERR] Error flushing to statsd! Err: %s", err) goto WAIT } } } WAIT: // Wait for a while wait = time.After(time.Duration(5) * time.Second) for { select { // Dequeue the messages to avoid backlog case _, ok := <-s.metricQueue: if !ok { goto QUIT } case <-wait: goto CONNECT } } QUIT: s.metricQueue = nil } ================================================ FILE: vendor/github.com/armon/go-metrics/statsite.go ================================================ package metrics import ( "bufio" "fmt" "log" "net" "net/url" "strings" "time" ) const ( // We force flush the statsite metrics after this period of // inactivity. Prevents stats from getting stuck in a buffer // forever. flushInterval = 100 * time.Millisecond ) // NewStatsiteSinkFromURL creates an StatsiteSink from a URL. It is used // (and tested) from NewMetricSinkFromURL. func NewStatsiteSinkFromURL(u *url.URL) (MetricSink, error) { return NewStatsiteSink(u.Host) } // StatsiteSink provides a MetricSink that can be used with a // statsite metrics server type StatsiteSink struct { addr string metricQueue chan string } // NewStatsiteSink is used to create a new StatsiteSink func NewStatsiteSink(addr string) (*StatsiteSink, error) { s := &StatsiteSink{ addr: addr, metricQueue: make(chan string, 4096), } go s.flushMetrics() return s, nil } // Close is used to stop flushing to statsite func (s *StatsiteSink) Shutdown() { close(s.metricQueue) } func (s *StatsiteSink) SetGauge(key []string, val float32) { flatKey := s.flattenKey(key) s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val)) } func (s *StatsiteSink) SetGaugeWithLabels(key []string, val float32, labels []Label) { flatKey := s.flattenKeyLabels(key, labels) s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val)) } func (s *StatsiteSink) EmitKey(key []string, val float32) { flatKey := s.flattenKey(key) s.pushMetric(fmt.Sprintf("%s:%f|kv\n", flatKey, val)) } func (s *StatsiteSink) IncrCounter(key []string, val float32) { flatKey := s.flattenKey(key) s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val)) } func (s *StatsiteSink) IncrCounterWithLabels(key []string, val float32, labels []Label) { flatKey := s.flattenKeyLabels(key, labels) s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val)) } func (s *StatsiteSink) AddSample(key []string, val float32) { flatKey := s.flattenKey(key) s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val)) } func (s *StatsiteSink) AddSampleWithLabels(key []string, val float32, labels []Label) { flatKey := s.flattenKeyLabels(key, labels) s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val)) } // Flattens the key for formatting, removes spaces func (s *StatsiteSink) flattenKey(parts []string) string { joined := strings.Join(parts, ".") return strings.Map(func(r rune) rune { switch r { case ':': fallthrough case ' ': return '_' default: return r } }, joined) } // Flattens the key along with labels for formatting, removes spaces func (s *StatsiteSink) flattenKeyLabels(parts []string, labels []Label) string { for _, label := range labels { parts = append(parts, label.Value) } return s.flattenKey(parts) } // Does a non-blocking push to the metrics queue func (s *StatsiteSink) pushMetric(m string) { select { case s.metricQueue <- m: default: } } // Flushes metrics func (s *StatsiteSink) flushMetrics() { var sock net.Conn var err error var wait <-chan time.Time var buffered *bufio.Writer ticker := time.NewTicker(flushInterval) defer ticker.Stop() CONNECT: // Attempt to connect sock, err = net.Dial("tcp", s.addr) if err != nil { log.Printf("[ERR] Error connecting to statsite! Err: %s", err) goto WAIT } // Create a buffered writer buffered = bufio.NewWriter(sock) for { select { case metric, ok := <-s.metricQueue: // Get a metric from the queue if !ok { goto QUIT } // Try to send to statsite _, err := buffered.Write([]byte(metric)) if err != nil { log.Printf("[ERR] Error writing to statsite! Err: %s", err) goto WAIT } case <-ticker.C: if err := buffered.Flush(); err != nil { log.Printf("[ERR] Error flushing to statsite! Err: %s", err) goto WAIT } } } WAIT: // Wait for a while wait = time.After(time.Duration(5) * time.Second) for { select { // Dequeue the messages to avoid backlog case _, ok := <-s.metricQueue: if !ok { goto QUIT } case <-wait: goto CONNECT } } QUIT: s.metricQueue = nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/LICENSE.txt ================================================ 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: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) 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 (d) 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. ================================================ FILE: vendor/github.com/aws/aws-sdk-go/NOTICE.txt ================================================ AWS SDK for Go Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. Copyright 2014-2015 Stripe, Inc. ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/auth/bearer/token.go ================================================ package bearer import ( "github.com/aws/aws-sdk-go/aws" "time" ) // Token provides a type wrapping a bearer token and expiration metadata. type Token struct { Value string CanExpire bool Expires time.Time } // Expired returns if the token's Expires time is before or equal to the time // provided. If CanExpire is false, Expired will always return false. func (t Token) Expired(now time.Time) bool { if !t.CanExpire { return false } now = now.Round(0) return now.Equal(t.Expires) || now.After(t.Expires) } // TokenProvider provides interface for retrieving bearer tokens. type TokenProvider interface { RetrieveBearerToken(aws.Context) (Token, error) } // TokenProviderFunc provides a helper utility to wrap a function as a type // that implements the TokenProvider interface. type TokenProviderFunc func(aws.Context) (Token, error) // RetrieveBearerToken calls the wrapped function, returning the Token or // error. func (fn TokenProviderFunc) RetrieveBearerToken(ctx aws.Context) (Token, error) { return fn(ctx) } // StaticTokenProvider provides a utility for wrapping a static bearer token // value within an implementation of a token provider. type StaticTokenProvider struct { Token Token } // RetrieveBearerToken returns the static token specified. func (s StaticTokenProvider) RetrieveBearerToken(aws.Context) (Token, error) { return s.Token, nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go ================================================ // Package awserr represents API error interface accessors for the SDK. package awserr // An Error wraps lower level errors with code, message and an original error. // The underlying concrete error type may also satisfy other interfaces which // can be to used to obtain more specific information about the error. // // Calling Error() or String() will always include the full information about // an error based on its underlying type. // // Example: // // output, err := s3manage.Upload(svc, input, opts) // if err != nil { // if awsErr, ok := err.(awserr.Error); ok { // // Get error details // log.Println("Error:", awsErr.Code(), awsErr.Message()) // // // Prints out full error message, including original error if there was one. // log.Println("Error:", awsErr.Error()) // // // Get original error // if origErr := awsErr.OrigErr(); origErr != nil { // // operate on original error. // } // } else { // fmt.Println(err.Error()) // } // } // type Error interface { // Satisfy the generic error interface. error // Returns the short phrase depicting the classification of the error. Code() string // Returns the error details message. Message() string // Returns the original error if one was set. Nil is returned if not set. OrigErr() error } // BatchError is a batch of errors which also wraps lower level errors with // code, message, and original errors. Calling Error() will include all errors // that occurred in the batch. // // Deprecated: Replaced with BatchedErrors. Only defined for backwards // compatibility. type BatchError interface { // Satisfy the generic error interface. error // Returns the short phrase depicting the classification of the error. Code() string // Returns the error details message. Message() string // Returns the original error if one was set. Nil is returned if not set. OrigErrs() []error } // BatchedErrors is a batch of errors which also wraps lower level errors with // code, message, and original errors. Calling Error() will include all errors // that occurred in the batch. // // Replaces BatchError type BatchedErrors interface { // Satisfy the base Error interface. Error // Returns the original error if one was set. Nil is returned if not set. OrigErrs() []error } // New returns an Error object described by the code, message, and origErr. // // If origErr satisfies the Error interface it will not be wrapped within a new // Error object and will instead be returned. func New(code, message string, origErr error) Error { var errs []error if origErr != nil { errs = append(errs, origErr) } return newBaseError(code, message, errs) } // NewBatchError returns an BatchedErrors with a collection of errors as an // array of errors. func NewBatchError(code, message string, errs []error) BatchedErrors { return newBaseError(code, message, errs) } // A RequestFailure is an interface to extract request failure information from // an Error such as the request ID of the failed request returned by a service. // RequestFailures may not always have a requestID value if the request failed // prior to reaching the service such as a connection error. // // Example: // // output, err := s3manage.Upload(svc, input, opts) // if err != nil { // if reqerr, ok := err.(RequestFailure); ok { // log.Println("Request failed", reqerr.Code(), reqerr.Message(), reqerr.RequestID()) // } else { // log.Println("Error:", err.Error()) // } // } // // Combined with awserr.Error: // // output, err := s3manage.Upload(svc, input, opts) // if err != nil { // if awsErr, ok := err.(awserr.Error); ok { // // Generic AWS Error with Code, Message, and original error (if any) // fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) // // if reqErr, ok := err.(awserr.RequestFailure); ok { // // A service error occurred // fmt.Println(reqErr.StatusCode(), reqErr.RequestID()) // } // } else { // fmt.Println(err.Error()) // } // } // type RequestFailure interface { Error // The status code of the HTTP response. StatusCode() int // The request ID returned by the service for a request failure. This will // be empty if no request ID is available such as the request failed due // to a connection error. RequestID() string } // NewRequestFailure returns a wrapped error with additional information for // request status code, and service requestID. // // Should be used to wrap all request which involve service requests. Even if // the request failed without a service response, but had an HTTP status code // that may be meaningful. func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure { return newRequestError(err, statusCode, reqID) } // UnmarshalError provides the interface for the SDK failing to unmarshal data. type UnmarshalError interface { awsError Bytes() []byte } // NewUnmarshalError returns an initialized UnmarshalError error wrapper adding // the bytes that fail to unmarshal to the error. func NewUnmarshalError(err error, msg string, bytes []byte) UnmarshalError { return &unmarshalError{ awsError: New("UnmarshalError", msg, err), bytes: bytes, } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go ================================================ package awserr import ( "encoding/hex" "fmt" ) // SprintError returns a string of the formatted error code. // // Both extra and origErr are optional. If they are included their lines // will be added, but if they are not included their lines will be ignored. func SprintError(code, message, extra string, origErr error) string { msg := fmt.Sprintf("%s: %s", code, message) if extra != "" { msg = fmt.Sprintf("%s\n\t%s", msg, extra) } if origErr != nil { msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error()) } return msg } // A baseError wraps the code and message which defines an error. It also // can be used to wrap an original error object. // // Should be used as the root for errors satisfying the awserr.Error. Also // for any error which does not fit into a specific error wrapper type. type baseError struct { // Classification of error code string // Detailed information about error message string // Optional original error this error is based off of. Allows building // chained errors. errs []error } // newBaseError returns an error object for the code, message, and errors. // // code is a short no whitespace phrase depicting the classification of // the error that is being created. // // message is the free flow string containing detailed information about the // error. // // origErrs is the error objects which will be nested under the new errors to // be returned. func newBaseError(code, message string, origErrs []error) *baseError { b := &baseError{ code: code, message: message, errs: origErrs, } return b } // Error returns the string representation of the error. // // See ErrorWithExtra for formatting. // // Satisfies the error interface. func (b baseError) Error() string { size := len(b.errs) if size > 0 { return SprintError(b.code, b.message, "", errorList(b.errs)) } return SprintError(b.code, b.message, "", nil) } // String returns the string representation of the error. // Alias for Error to satisfy the stringer interface. func (b baseError) String() string { return b.Error() } // Code returns the short phrase depicting the classification of the error. func (b baseError) Code() string { return b.code } // Message returns the error details message. func (b baseError) Message() string { return b.message } // OrigErr returns the original error if one was set. Nil is returned if no // error was set. This only returns the first element in the list. If the full // list is needed, use BatchedErrors. func (b baseError) OrigErr() error { switch len(b.errs) { case 0: return nil case 1: return b.errs[0] default: if err, ok := b.errs[0].(Error); ok { return NewBatchError(err.Code(), err.Message(), b.errs[1:]) } return NewBatchError("BatchedErrors", "multiple errors occurred", b.errs) } } // OrigErrs returns the original errors if one was set. An empty slice is // returned if no error was set. func (b baseError) OrigErrs() []error { return b.errs } // So that the Error interface type can be included as an anonymous field // in the requestError struct and not conflict with the error.Error() method. type awsError Error // A requestError wraps a request or service error. // // Composed of baseError for code, message, and original error. type requestError struct { awsError statusCode int requestID string bytes []byte } // newRequestError returns a wrapped error with additional information for // request status code, and service requestID. // // Should be used to wrap all request which involve service requests. Even if // the request failed without a service response, but had an HTTP status code // that may be meaningful. // // Also wraps original errors via the baseError. func newRequestError(err Error, statusCode int, requestID string) *requestError { return &requestError{ awsError: err, statusCode: statusCode, requestID: requestID, } } // Error returns the string representation of the error. // Satisfies the error interface. func (r requestError) Error() string { extra := fmt.Sprintf("status code: %d, request id: %s", r.statusCode, r.requestID) return SprintError(r.Code(), r.Message(), extra, r.OrigErr()) } // String returns the string representation of the error. // Alias for Error to satisfy the stringer interface. func (r requestError) String() string { return r.Error() } // StatusCode returns the wrapped status code for the error func (r requestError) StatusCode() int { return r.statusCode } // RequestID returns the wrapped requestID func (r requestError) RequestID() string { return r.requestID } // OrigErrs returns the original errors if one was set. An empty slice is // returned if no error was set. func (r requestError) OrigErrs() []error { if b, ok := r.awsError.(BatchedErrors); ok { return b.OrigErrs() } return []error{r.OrigErr()} } type unmarshalError struct { awsError bytes []byte } // Error returns the string representation of the error. // Satisfies the error interface. func (e unmarshalError) Error() string { extra := hex.Dump(e.bytes) return SprintError(e.Code(), e.Message(), extra, e.OrigErr()) } // String returns the string representation of the error. // Alias for Error to satisfy the stringer interface. func (e unmarshalError) String() string { return e.Error() } // Bytes returns the bytes that failed to unmarshal. func (e unmarshalError) Bytes() []byte { return e.bytes } // An error list that satisfies the golang interface type errorList []error // Error returns the string representation of the error. // // Satisfies the error interface. func (e errorList) Error() string { msg := "" // How do we want to handle the array size being zero if size := len(e); size > 0 { for i := 0; i < size; i++ { msg += e[i].Error() // We check the next index to see if it is within the slice. // If it is, then we append a newline. We do this, because unit tests // could be broken with the additional '\n' if i+1 < size { msg += "\n" } } } return msg } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go ================================================ package awsutil import ( "io" "reflect" "time" ) // Copy deeply copies a src structure to dst. Useful for copying request and // response structures. // // Can copy between structs of different type, but will only copy fields which // are assignable, and exist in both structs. Fields which are not assignable, // or do not exist in both structs are ignored. func Copy(dst, src interface{}) { dstval := reflect.ValueOf(dst) if !dstval.IsValid() { panic("Copy dst cannot be nil") } rcopy(dstval, reflect.ValueOf(src), true) } // CopyOf returns a copy of src while also allocating the memory for dst. // src must be a pointer type or this operation will fail. func CopyOf(src interface{}) (dst interface{}) { dsti := reflect.New(reflect.TypeOf(src).Elem()) dst = dsti.Interface() rcopy(dsti, reflect.ValueOf(src), true) return } // rcopy performs a recursive copy of values from the source to destination. // // root is used to skip certain aspects of the copy which are not valid // for the root node of a object. func rcopy(dst, src reflect.Value, root bool) { if !src.IsValid() { return } switch src.Kind() { case reflect.Ptr: if _, ok := src.Interface().(io.Reader); ok { if dst.Kind() == reflect.Ptr && dst.Elem().CanSet() { dst.Elem().Set(src) } else if dst.CanSet() { dst.Set(src) } } else { e := src.Type().Elem() if dst.CanSet() && !src.IsNil() { if _, ok := src.Interface().(*time.Time); !ok { dst.Set(reflect.New(e)) } else { tempValue := reflect.New(e) tempValue.Elem().Set(src.Elem()) // Sets time.Time's unexported values dst.Set(tempValue) } } if src.Elem().IsValid() { // Keep the current root state since the depth hasn't changed rcopy(dst.Elem(), src.Elem(), root) } } case reflect.Struct: t := dst.Type() for i := 0; i < t.NumField(); i++ { name := t.Field(i).Name srcVal := src.FieldByName(name) dstVal := dst.FieldByName(name) if srcVal.IsValid() && dstVal.CanSet() { rcopy(dstVal, srcVal, false) } } case reflect.Slice: if src.IsNil() { break } s := reflect.MakeSlice(src.Type(), src.Len(), src.Cap()) dst.Set(s) for i := 0; i < src.Len(); i++ { rcopy(dst.Index(i), src.Index(i), false) } case reflect.Map: if src.IsNil() { break } s := reflect.MakeMap(src.Type()) dst.Set(s) for _, k := range src.MapKeys() { v := src.MapIndex(k) v2 := reflect.New(v.Type()).Elem() rcopy(v2, v, false) dst.SetMapIndex(k, v2) } default: // Assign the value if possible. If its not assignable, the value would // need to be converted and the impact of that may be unexpected, or is // not compatible with the dst type. if src.Type().AssignableTo(dst.Type()) { dst.Set(src) } } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go ================================================ package awsutil import ( "reflect" ) // DeepEqual returns if the two values are deeply equal like reflect.DeepEqual. // In addition to this, this method will also dereference the input values if // possible so the DeepEqual performed will not fail if one parameter is a // pointer and the other is not. // // DeepEqual will not perform indirection of nested values of the input parameters. func DeepEqual(a, b interface{}) bool { ra := reflect.Indirect(reflect.ValueOf(a)) rb := reflect.Indirect(reflect.ValueOf(b)) if raValid, rbValid := ra.IsValid(), rb.IsValid(); !raValid && !rbValid { // If the elements are both nil, and of the same type they are equal // If they are of different types they are not equal return reflect.TypeOf(a) == reflect.TypeOf(b) } else if raValid != rbValid { // Both values must be valid to be equal return false } return reflect.DeepEqual(ra.Interface(), rb.Interface()) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go ================================================ package awsutil import ( "reflect" "regexp" "strconv" "strings" "github.com/jmespath/go-jmespath" ) var indexRe = regexp.MustCompile(`(.+)\[(-?\d+)?\]$`) // rValuesAtPath returns a slice of values found in value v. The values // in v are explored recursively so all nested values are collected. func rValuesAtPath(v interface{}, path string, createPath, caseSensitive, nilTerm bool) []reflect.Value { pathparts := strings.Split(path, "||") if len(pathparts) > 1 { for _, pathpart := range pathparts { vals := rValuesAtPath(v, pathpart, createPath, caseSensitive, nilTerm) if len(vals) > 0 { return vals } } return nil } values := []reflect.Value{reflect.Indirect(reflect.ValueOf(v))} components := strings.Split(path, ".") for len(values) > 0 && len(components) > 0 { var index *int64 var indexStar bool c := strings.TrimSpace(components[0]) if c == "" { // no actual component, illegal syntax return nil } else if caseSensitive && c != "*" && strings.ToLower(c[0:1]) == c[0:1] { // TODO normalize case for user return nil // don't support unexported fields } // parse this component if m := indexRe.FindStringSubmatch(c); m != nil { c = m[1] if m[2] == "" { index = nil indexStar = true } else { i, _ := strconv.ParseInt(m[2], 10, 32) index = &i indexStar = false } } nextvals := []reflect.Value{} for _, value := range values { // pull component name out of struct member if value.Kind() != reflect.Struct { continue } if c == "*" { // pull all members for i := 0; i < value.NumField(); i++ { if f := reflect.Indirect(value.Field(i)); f.IsValid() { nextvals = append(nextvals, f) } } continue } value = value.FieldByNameFunc(func(name string) bool { if c == name { return true } else if !caseSensitive && strings.EqualFold(name, c) { return true } return false }) if nilTerm && value.Kind() == reflect.Ptr && len(components[1:]) == 0 { if !value.IsNil() { value.Set(reflect.Zero(value.Type())) } return []reflect.Value{value} } if createPath && value.Kind() == reflect.Ptr && value.IsNil() { // TODO if the value is the terminus it should not be created // if the value to be set to its position is nil. value.Set(reflect.New(value.Type().Elem())) value = value.Elem() } else { value = reflect.Indirect(value) } if value.Kind() == reflect.Slice || value.Kind() == reflect.Map { if !createPath && value.IsNil() { value = reflect.ValueOf(nil) } } if value.IsValid() { nextvals = append(nextvals, value) } } values = nextvals if indexStar || index != nil { nextvals = []reflect.Value{} for _, valItem := range values { value := reflect.Indirect(valItem) if value.Kind() != reflect.Slice { continue } if indexStar { // grab all indices for i := 0; i < value.Len(); i++ { idx := reflect.Indirect(value.Index(i)) if idx.IsValid() { nextvals = append(nextvals, idx) } } continue } // pull out index i := int(*index) if i >= value.Len() { // check out of bounds if createPath { // TODO resize slice } else { continue } } else if i < 0 { // support negative indexing i = value.Len() + i } value = reflect.Indirect(value.Index(i)) if value.Kind() == reflect.Slice || value.Kind() == reflect.Map { if !createPath && value.IsNil() { value = reflect.ValueOf(nil) } } if value.IsValid() { nextvals = append(nextvals, value) } } values = nextvals } components = components[1:] } return values } // ValuesAtPath returns a list of values at the case insensitive lexical // path inside of a structure. func ValuesAtPath(i interface{}, path string) ([]interface{}, error) { result, err := jmespath.Search(path, i) if err != nil { return nil, err } v := reflect.ValueOf(result) if !v.IsValid() || (v.Kind() == reflect.Ptr && v.IsNil()) { return nil, nil } if s, ok := result.([]interface{}); ok { return s, err } if v.Kind() == reflect.Map && v.Len() == 0 { return nil, nil } if v.Kind() == reflect.Slice { out := make([]interface{}, v.Len()) for i := 0; i < v.Len(); i++ { out[i] = v.Index(i).Interface() } return out, nil } return []interface{}{result}, nil } // SetValueAtPath sets a value at the case insensitive lexical path inside // of a structure. func SetValueAtPath(i interface{}, path string, v interface{}) { rvals := rValuesAtPath(i, path, true, false, v == nil) for _, rval := range rvals { if rval.Kind() == reflect.Ptr && rval.IsNil() { continue } setValue(rval, v) } } func setValue(dstVal reflect.Value, src interface{}) { if dstVal.Kind() == reflect.Ptr { dstVal = reflect.Indirect(dstVal) } srcVal := reflect.ValueOf(src) if !srcVal.IsValid() { // src is literal nil if dstVal.CanAddr() { // Convert to pointer so that pointer's value can be nil'ed // dstVal = dstVal.Addr() } dstVal.Set(reflect.Zero(dstVal.Type())) } else if srcVal.Kind() == reflect.Ptr { if srcVal.IsNil() { srcVal = reflect.Zero(dstVal.Type()) } else { srcVal = reflect.ValueOf(src).Elem() } dstVal.Set(srcVal) } else { dstVal.Set(srcVal) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go ================================================ package awsutil import ( "bytes" "fmt" "io" "reflect" "strings" ) // Prettify returns the string representation of a value. func Prettify(i interface{}) string { var buf bytes.Buffer prettify(reflect.ValueOf(i), 0, &buf) return buf.String() } // prettify will recursively walk value v to build a textual // representation of the value. func prettify(v reflect.Value, indent int, buf *bytes.Buffer) { for v.Kind() == reflect.Ptr { v = v.Elem() } switch v.Kind() { case reflect.Struct: strtype := v.Type().String() if strtype == "time.Time" { fmt.Fprintf(buf, "%s", v.Interface()) break } else if strings.HasPrefix(strtype, "io.") { buf.WriteString("") break } 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]) { continue // ignore unexported fields } if (f.Kind() == reflect.Ptr || f.Kind() == reflect.Slice || f.Kind() == reflect.Map) && f.IsNil() { continue // ignore unset fields } names = append(names, name) } for i, n := range names { val := v.FieldByName(n) ft, ok := v.Type().FieldByName(n) if !ok { panic(fmt.Sprintf("expected to find field %v on type %v, but was not found", n, v.Type())) } buf.WriteString(strings.Repeat(" ", indent+2)) buf.WriteString(n + ": ") if tag := ft.Tag.Get("sensitive"); tag == "true" { buf.WriteString("") } else { prettify(val, indent+2, buf) } if i < len(names)-1 { buf.WriteString(",\n") } } buf.WriteString("\n" + strings.Repeat(" ", indent) + "}") case reflect.Slice: strtype := v.Type().String() if strtype == "[]uint8" { fmt.Fprintf(buf, " len %d", v.Len()) break } nl, id, id2 := "", "", "" if v.Len() > 3 { nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2) } buf.WriteString("[" + nl) for i := 0; i < v.Len(); i++ { buf.WriteString(id2) prettify(v.Index(i), indent+2, buf) if i < v.Len()-1 { buf.WriteString("," + nl) } } buf.WriteString(nl + id + "]") case reflect.Map: buf.WriteString("{\n") for i, k := range v.MapKeys() { buf.WriteString(strings.Repeat(" ", indent+2)) buf.WriteString(k.String() + ": ") prettify(v.MapIndex(k), indent+2, buf) if i < v.Len()-1 { buf.WriteString(",\n") } } buf.WriteString("\n" + strings.Repeat(" ", indent) + "}") default: if !v.IsValid() { fmt.Fprint(buf, "") return } format := "%v" switch v.Interface().(type) { case string: format = "%q" case io.ReadSeeker, io.Reader: format = "buffer(%p)" } fmt.Fprintf(buf, format, v.Interface()) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go ================================================ package awsutil import ( "bytes" "fmt" "reflect" "strings" ) // StringValue returns the string representation of a value. // // Deprecated: Use Prettify instead. func StringValue(i interface{}) string { var buf bytes.Buffer stringValue(reflect.ValueOf(i), 0, &buf) return buf.String() } func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) { for v.Kind() == reflect.Ptr { v = v.Elem() } switch v.Kind() { case reflect.Struct: buf.WriteString("{\n") for i := 0; i < v.Type().NumField(); i++ { 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 (fv.Kind() == reflect.Ptr || fv.Kind() == reflect.Slice) && fv.IsNil() { continue // ignore unset fields } buf.WriteString(strings.Repeat(" ", indent+2)) buf.WriteString(ft.Name + ": ") 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) + "}") case reflect.Slice: nl, id, id2 := "", "", "" if v.Len() > 3 { nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2) } buf.WriteString("[" + nl) for i := 0; i < v.Len(); i++ { buf.WriteString(id2) stringValue(v.Index(i), indent+2, buf) if i < v.Len()-1 { buf.WriteString("," + nl) } } buf.WriteString(nl + id + "]") case reflect.Map: buf.WriteString("{\n") for i, k := range v.MapKeys() { buf.WriteString(strings.Repeat(" ", indent+2)) buf.WriteString(k.String() + ": ") stringValue(v.MapIndex(k), indent+2, buf) if i < v.Len()-1 { buf.WriteString(",\n") } } buf.WriteString("\n" + strings.Repeat(" ", indent) + "}") default: format := "%v" switch v.Interface().(type) { case string: format = "%q" } fmt.Fprintf(buf, format, v.Interface()) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/client/client.go ================================================ package client import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/request" ) // A Config provides configuration to a service client instance. type Config struct { Config *aws.Config Handlers request.Handlers PartitionID string Endpoint string SigningRegion string SigningName string ResolvedRegion string // States that the signing name did not come from a modeled source but // was derived based on other data. Used by service client constructors // to determine if the signin name can be overridden based on metadata the // service has. SigningNameDerived bool } // ConfigProvider provides a generic way for a service client to receive // the ClientConfig without circular dependencies. type ConfigProvider interface { ClientConfig(serviceName string, cfgs ...*aws.Config) Config } // ConfigNoResolveEndpointProvider same as ConfigProvider except it will not // resolve the endpoint automatically. The service client's endpoint must be // provided via the aws.Config.Endpoint field. type ConfigNoResolveEndpointProvider interface { ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) Config } // A Client implements the base client request and response handling // used by all service clients. type Client struct { request.Retryer metadata.ClientInfo Config aws.Config Handlers request.Handlers } // New will return a pointer to a new initialized service client. func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, options ...func(*Client)) *Client { svc := &Client{ Config: cfg, ClientInfo: info, Handlers: handlers.Copy(), } switch retryer, ok := cfg.Retryer.(request.Retryer); { case ok: svc.Retryer = retryer case cfg.Retryer != nil && cfg.Logger != nil: s := fmt.Sprintf("WARNING: %T does not implement request.Retryer; using DefaultRetryer instead", cfg.Retryer) cfg.Logger.Log(s) fallthrough default: maxRetries := aws.IntValue(cfg.MaxRetries) if cfg.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries { maxRetries = DefaultRetryerMaxNumRetries } svc.Retryer = DefaultRetryer{NumMaxRetries: maxRetries} } svc.AddDebugHandlers() for _, option := range options { option(svc) } return svc } // NewRequest returns a new Request pointer for the service API // operation and parameters. func (c *Client) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request { return request.New(c.Config, c.ClientInfo, c.Handlers, c.Retryer, operation, params, data) } // AddDebugHandlers injects debug logging handlers into the service to log request // debug information. func (c *Client) AddDebugHandlers() { c.Handlers.Send.PushFrontNamed(LogHTTPRequestHandler) c.Handlers.Send.PushBackNamed(LogHTTPResponseHandler) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go ================================================ package client import ( "math" "strconv" "time" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/sdkrand" ) // DefaultRetryer implements basic retry logic using exponential backoff for // most services. If you want to implement custom retry logic, you can implement the // request.Retryer interface. // type DefaultRetryer struct { // Num max Retries is the number of max retries that will be performed. // By default, this is zero. NumMaxRetries int // MinRetryDelay is the minimum retry delay after which retry will be performed. // If not set, the value is 0ns. MinRetryDelay time.Duration // MinThrottleRetryDelay is the minimum retry delay when throttled. // If not set, the value is 0ns. MinThrottleDelay time.Duration // MaxRetryDelay is the maximum retry delay before which retry must be performed. // If not set, the value is 0ns. MaxRetryDelay time.Duration // MaxThrottleDelay is the maximum retry delay when throttled. // If not set, the value is 0ns. MaxThrottleDelay time.Duration } const ( // DefaultRetryerMaxNumRetries sets maximum number of retries DefaultRetryerMaxNumRetries = 3 // DefaultRetryerMinRetryDelay sets minimum retry delay DefaultRetryerMinRetryDelay = 30 * time.Millisecond // DefaultRetryerMinThrottleDelay sets minimum delay when throttled DefaultRetryerMinThrottleDelay = 500 * time.Millisecond // DefaultRetryerMaxRetryDelay sets maximum retry delay DefaultRetryerMaxRetryDelay = 300 * time.Second // DefaultRetryerMaxThrottleDelay sets maximum delay when throttled DefaultRetryerMaxThrottleDelay = 300 * time.Second ) // MaxRetries returns the number of maximum returns the service will use to make // an individual API request. func (d DefaultRetryer) MaxRetries() int { return d.NumMaxRetries } // setRetryerDefaults sets the default values of the retryer if not set func (d *DefaultRetryer) setRetryerDefaults() { if d.MinRetryDelay == 0 { d.MinRetryDelay = DefaultRetryerMinRetryDelay } if d.MaxRetryDelay == 0 { d.MaxRetryDelay = DefaultRetryerMaxRetryDelay } if d.MinThrottleDelay == 0 { d.MinThrottleDelay = DefaultRetryerMinThrottleDelay } if d.MaxThrottleDelay == 0 { d.MaxThrottleDelay = DefaultRetryerMaxThrottleDelay } } // RetryRules returns the delay duration before retrying this request again func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration { // if number of max retries is zero, no retries will be performed. if d.NumMaxRetries == 0 { return 0 } // Sets default value for retryer members d.setRetryerDefaults() // minDelay is the minimum retryer delay minDelay := d.MinRetryDelay var initialDelay time.Duration isThrottle := r.IsErrorThrottle() if isThrottle { if delay, ok := getRetryAfterDelay(r); ok { initialDelay = delay } minDelay = d.MinThrottleDelay } retryCount := r.RetryCount // maxDelay the maximum retryer delay maxDelay := d.MaxRetryDelay if isThrottle { maxDelay = d.MaxThrottleDelay } var delay time.Duration // Logic to cap the retry count based on the minDelay provided actualRetryCount := int(math.Log2(float64(minDelay))) + 1 if actualRetryCount < 63-retryCount { delay = time.Duration(1< maxDelay { delay = getJitterDelay(maxDelay / 2) } } else { delay = getJitterDelay(maxDelay / 2) } return delay + initialDelay } // getJitterDelay returns a jittered delay for retry func getJitterDelay(duration time.Duration) time.Duration { return time.Duration(sdkrand.SeededRand.Int63n(int64(duration)) + int64(duration)) } // ShouldRetry returns true if the request should be retried. func (d DefaultRetryer) ShouldRetry(r *request.Request) bool { // ShouldRetry returns false if number of max retries is 0. if d.NumMaxRetries == 0 { return false } // If one of the other handlers already set the retry state // we don't want to override it based on the service's state if r.Retryable != nil { return *r.Retryable } return r.IsErrorRetryable() || r.IsErrorThrottle() } // This will look in the Retry-After header, RFC 7231, for how long // it will wait before attempting another request func getRetryAfterDelay(r *request.Request) (time.Duration, bool) { if !canUseRetryAfterHeader(r) { return 0, false } delayStr := r.HTTPResponse.Header.Get("Retry-After") if len(delayStr) == 0 { return 0, false } delay, err := strconv.Atoi(delayStr) if err != nil { return 0, false } return time.Duration(delay) * time.Second, true } // Will look at the status code to see if the retry header pertains to // the status code. func canUseRetryAfterHeader(r *request.Request) bool { switch r.HTTPResponse.StatusCode { case 429: case 503: default: return false } return true } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/client/logger.go ================================================ package client import ( "bytes" "fmt" "io" "io/ioutil" "net/http/httputil" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" ) const logReqMsg = `DEBUG: Request %s/%s Details: ---[ REQUEST POST-SIGN ]----------------------------- %s -----------------------------------------------------` const logReqErrMsg = `DEBUG ERROR: Request %s/%s: ---[ REQUEST DUMP ERROR ]----------------------------- %s ------------------------------------------------------` type logWriter struct { // Logger is what we will use to log the payload of a response. Logger aws.Logger // buf stores the contents of what has been read buf *bytes.Buffer } func (logger *logWriter) Write(b []byte) (int, error) { return logger.buf.Write(b) } type teeReaderCloser struct { // io.Reader will be a tee reader that is used during logging. // This structure will read from a body and write the contents to a logger. io.Reader // Source is used just to close when we are done reading. Source io.ReadCloser } func (reader *teeReaderCloser) Close() error { return reader.Source.Close() } // LogHTTPRequestHandler is a SDK request handler to log the HTTP request sent // to a service. Will include the HTTP request body if the LogLevel of the // request matches LogDebugWithHTTPBody. var LogHTTPRequestHandler = request.NamedHandler{ Name: "awssdk.client.LogRequest", Fn: logRequest, } func logRequest(r *request.Request) { if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil { return } logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) bodySeekable := aws.IsReaderSeekable(r.Body) b, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) if err != nil { r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) return } if logBody { if !bodySeekable { r.SetReaderBody(aws.ReadSeekCloser(r.HTTPRequest.Body)) } // Reset the request body because dumpRequest will re-wrap the // r.HTTPRequest's Body as a NoOpCloser and will not be reset after // read by the HTTP client reader. if err := r.Error; err != nil { r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) return } } r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(b))) } // LogHTTPRequestHeaderHandler is a SDK request handler to log the HTTP request sent // to a service. Will only log the HTTP request's headers. The request payload // will not be read. var LogHTTPRequestHeaderHandler = request.NamedHandler{ Name: "awssdk.client.LogRequestHeader", Fn: logRequestHeader, } func logRequestHeader(r *request.Request) { if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil { return } b, err := httputil.DumpRequestOut(r.HTTPRequest, false) if err != nil { r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) return } r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(b))) } const logRespMsg = `DEBUG: Response %s/%s Details: ---[ RESPONSE ]-------------------------------------- %s -----------------------------------------------------` const logRespErrMsg = `DEBUG ERROR: Response %s/%s: ---[ RESPONSE DUMP ERROR ]----------------------------- %s -----------------------------------------------------` // LogHTTPResponseHandler is a SDK request handler to log the HTTP response // received from a service. Will include the HTTP response body if the LogLevel // of the request matches LogDebugWithHTTPBody. var LogHTTPResponseHandler = request.NamedHandler{ Name: "awssdk.client.LogResponse", Fn: logResponse, } func logResponse(r *request.Request) { if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil { return } lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)} if r.HTTPResponse == nil { lw.Logger.Log(fmt.Sprintf(logRespErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, "request's HTTPResponse is nil")) return } logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) if logBody { r.HTTPResponse.Body = &teeReaderCloser{ Reader: io.TeeReader(r.HTTPResponse.Body, lw), Source: r.HTTPResponse.Body, } } handlerFn := func(req *request.Request) { b, err := httputil.DumpResponse(req.HTTPResponse, false) if err != nil { lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) return } lw.Logger.Log(fmt.Sprintf(logRespMsg, req.ClientInfo.ServiceName, req.Operation.Name, string(b))) if logBody { b, err := ioutil.ReadAll(lw.buf) if err != nil { lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) return } lw.Logger.Log(string(b)) } } const handlerName = "awsdk.client.LogResponse.ResponseBody" r.Handlers.Unmarshal.SetBackNamed(request.NamedHandler{ Name: handlerName, Fn: handlerFn, }) r.Handlers.UnmarshalError.SetBackNamed(request.NamedHandler{ Name: handlerName, Fn: handlerFn, }) } // LogHTTPResponseHeaderHandler is a SDK request handler to log the HTTP // response received from a service. Will only log the HTTP response's headers. // The response payload will not be read. var LogHTTPResponseHeaderHandler = request.NamedHandler{ Name: "awssdk.client.LogResponseHeader", Fn: logResponseHeader, } func logResponseHeader(r *request.Request) { if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil { return } b, err := httputil.DumpResponse(r.HTTPResponse, false) if err != nil { r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) return } r.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(b))) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go ================================================ package metadata // ClientInfo wraps immutable data from the client.Client structure. type ClientInfo struct { ServiceName string ServiceID string APIVersion string PartitionID string Endpoint string SigningName string SigningRegion string JSONVersion string TargetPrefix string ResolvedRegion string } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go ================================================ package client import ( "time" "github.com/aws/aws-sdk-go/aws/request" ) // NoOpRetryer provides a retryer that performs no retries. // It should be used when we do not want retries to be performed. type NoOpRetryer struct{} // MaxRetries returns the number of maximum returns the service will use to make // an individual API; For NoOpRetryer the MaxRetries will always be zero. func (d NoOpRetryer) MaxRetries() int { return 0 } // ShouldRetry will always return false for NoOpRetryer, as it should never retry. func (d NoOpRetryer) ShouldRetry(_ *request.Request) bool { return false } // RetryRules returns the delay duration before retrying this request again; // since NoOpRetryer does not retry, RetryRules always returns 0. func (d NoOpRetryer) RetryRules(_ *request.Request) time.Duration { return 0 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/config.go ================================================ package aws import ( "net/http" "time" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/endpoints" ) // UseServiceDefaultRetries instructs the config to use the service's own // default number of retries. This will be the default action if // Config.MaxRetries is nil also. const UseServiceDefaultRetries = -1 // RequestRetryer is an alias for a type that implements the request.Retryer // interface. type RequestRetryer interface{} // A Config provides service configuration for service clients. By default, // all clients will use the defaults.DefaultConfig structure. // // // Create Session with MaxRetries configuration to be shared by multiple // // service clients. // sess := session.Must(session.NewSession(&aws.Config{ // MaxRetries: aws.Int(3), // })) // // // Create S3 service client with a specific Region. // svc := s3.New(sess, &aws.Config{ // Region: aws.String("us-west-2"), // }) type Config struct { // Enables verbose error printing of all credential chain errors. // Should be used when wanting to see all errors while attempting to // retrieve credentials. CredentialsChainVerboseErrors *bool // The credentials object to use when signing requests. Defaults to a // chain of credential providers to search for credentials in environment // variables, shared credential file, and EC2 Instance Roles. Credentials *credentials.Credentials // An optional endpoint URL (hostname only or fully qualified URI) // that overrides the default generated endpoint for a client. Set this // to `nil` or the value to `""` to use the default generated endpoint. // // 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 // to use based on region. EndpointResolver endpoints.Resolver // EnforceShouldRetryCheck is used in the AfterRetryHandler to always call // ShouldRetry regardless of whether or not if request.Retryable is set. // This will utilize ShouldRetry method of custom retryers. If EnforceShouldRetryCheck // is not set, then ShouldRetry will only be called if request.Retryable is nil. // Proper handling of the request.Retryable field is important when setting this field. EnforceShouldRetryCheck *bool // The region to send requests to. This parameter is required and must // be configured globally or on a per-client basis unless otherwise // 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 for AWS // Regions and Endpoints. Region *string // Set this to `true` to disable SSL when sending requests. Defaults // to `false`. DisableSSL *bool // The HTTP client to use when sending requests. Defaults to // `http.DefaultClient`. HTTPClient *http.Client // An integer value representing the logging level. The default log level // is zero (LogOff), which represents no logging. To enable logging set // to a LogLevel Value. LogLevel *LogLevelType // The logger writer interface to write logging messages to. Defaults to // standard out. Logger Logger // The maximum number of times that a request will be retried for failures. // Defaults to -1, which defers the max retry setting to the service // specific configuration. MaxRetries *int // Retryer guides how HTTP requests should be retried in case of // recoverable failures. // // When nil or the value does not implement the request.Retryer interface, // the client.DefaultRetryer will be used. // // When both Retryer and MaxRetries are non-nil, the former is used and // the latter ignored. // // To set the Retryer field in a type-safe manner and with chaining, use // the request.WithRetryer helper function: // // cfg := request.WithRetryer(aws.NewConfig(), myRetryer) // Retryer RequestRetryer // Disables semantic parameter validation, which validates input for // missing required fields and/or other semantic request input errors. DisableParamValidation *bool // Disables the computation of request and response checksums, e.g., // CRC32 checksums in Amazon DynamoDB. DisableComputeChecksums *bool // Set this to `true` to force the request to use path-style addressing, // i.e., `http://s3.amazonaws.com/BUCKET/KEY`. By default, the S3 client // 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 // for Amazon S3: Virtual Hosting of Buckets S3ForcePathStyle *bool // Set this to `true` to disable the SDK adding the `Expect: 100-Continue` // header to PUT requests over 2MB of content. 100-Continue instructs the // HTTP client not to send the body until the service responds with a // `continue` status. This is useful to prevent sending the request body // until after the request is authenticated, and validated. // // http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html // // 100-Continue is only enabled for Go 1.6 and above. See `http.Transport`'s // `ExpectContinueTimeout` for information on adjusting the continue wait // timeout. https://golang.org/pkg/net/http/#Transport // // You should use this flag to disable 100-Continue if you experience issues // with proxies or third party S3 compatible services. S3Disable100Continue *bool // Set this to `true` to enable S3 Accelerate feature. For all operations // compatible with S3 Accelerate will use the accelerate endpoint for // requests. Requests not compatible will fall back to normal S3 requests. // // The bucket must be enable for accelerate to be used with S3 client with // accelerate enabled. If the bucket is not enabled for accelerate an error // will be returned. The bucket name must be DNS compatible to also work // with accelerate. S3UseAccelerate *bool // S3DisableContentMD5Validation config option is temporarily disabled, // For S3 GetObject API calls, #1837. // // Set this to `true` to disable the S3 service client from automatically // adding the ContentMD5 to S3 Object Put and Upload API calls. This option // will also disable the SDK from performing object ContentMD5 validation // on GetObject API calls. S3DisableContentMD5Validation *bool // Set this to `true` to have the S3 service client to use the region specified // in the ARN, when an ARN is provided as an argument to a bucket parameter. S3UseARNRegion *bool // Set this to `true` to enable the SDK to unmarshal API response header maps to // normalized lower case map keys. // // For example S3's X-Amz-Meta prefixed header will be unmarshaled to lower case // Metadata member's map keys. The value of the header in the map is unaffected. // // The AWS SDK for Go v2, uses lower case header maps by default. The v1 // SDK provides this opt-in for this option, for backwards compatibility. LowerCaseHeaderMaps *bool // Set this to `true` to disable the EC2Metadata client from overriding the // default http.Client's Timeout. This is helpful if you do not want the // EC2Metadata client to create a new http.Client. This options is only // meaningful if you're not already using a custom HTTP client with the // SDK. Enabled by default. // // Must be set and provided to the session.NewSession() in order to disable // the EC2Metadata overriding the timeout for default credentials chain. // // Example: // sess := session.Must(session.NewSession(aws.NewConfig() // .WithEC2MetadataDisableTimeoutOverride(true))) // // svc := s3.New(sess) // EC2MetadataDisableTimeoutOverride *bool // Set this to `false` to disable EC2Metadata client from falling back to IMDSv1. // By default, EC2 role credentials will fall back to IMDSv1 as needed for backwards compatibility. // You can disable this behavior by explicitly setting this flag to `false`. When false, the EC2Metadata // client will return any errors encountered from attempting to fetch a token instead of silently // using the insecure data flow of IMDSv1. // // Example: // sess := session.Must(session.NewSession(aws.NewConfig() // .WithEC2MetadataEnableFallback(false))) // // svc := s3.New(sess) // // See [configuring IMDS] for more information. // // [configuring IMDS]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html EC2MetadataEnableFallback *bool // Instructs the endpoint to be generated for a service client to // be the dual stack endpoint. The dual stack endpoint will support // both IPv4 and IPv6 addressing. // // Setting this for a service which does not support dual stack will fail // to make requests. It is not recommended to set this value on the session // as it will apply to all service clients created with the session. Even // services which don't support dual stack endpoints. // // If the Endpoint config value is also provided the UseDualStack flag // will be ignored. // // Only supported with. // // sess := session.Must(session.NewSession()) // // svc := s3.New(sess, &aws.Config{ // UseDualStack: aws.Bool(true), // }) // // Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility. // UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients // moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher // precedence then this option. UseDualStack *bool // Sets the resolver to resolve a dual-stack endpoint for the service. UseDualStackEndpoint endpoints.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint endpoints.FIPSEndpointState // SleepDelay is an override for the func the SDK will call when sleeping // during the lifecycle of a request. Specifically this will be used for // request delays. This value should only be used for testing. To adjust // the delay of a request see the aws/client.DefaultRetryer and // aws/request.Retryer. // // SleepDelay will prevent any Context from being used for canceling retry // delay of an API operation. It is recommended to not use SleepDelay at all // and specify a Retryer instead. SleepDelay func(time.Duration) // DisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests. // Will default to false. This would only be used for empty directory names in s3 requests. // // Example: // sess := session.Must(session.NewSession(&aws.Config{ // DisableRestProtocolURICleaning: aws.Bool(true), // })) // // svc := s3.New(sess) // out, err := svc.GetObject(&s3.GetObjectInput { // Bucket: aws.String("bucketname"), // 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. // To use EndpointDiscovery, Endpoint should be unset or set to an empty string. // // 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 // STSRegionalEndpoint will enable regional or legacy endpoint resolving STSRegionalEndpoint endpoints.STSRegionalEndpoint // S3UsEast1RegionalEndpoint will enable regional or legacy endpoint resolving S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint } // NewConfig returns a new Config pointer that can be chained with builder // methods to set multiple configuration values inline without using pointers. // // // Create Session with MaxRetries configuration to be shared by multiple // // service clients. // sess := session.Must(session.NewSession(aws.NewConfig(). // WithMaxRetries(3), // )) // // // Create S3 service client with a specific Region. // svc := s3.New(sess, aws.NewConfig(). // WithRegion("us-west-2"), // ) func NewConfig() *Config { return &Config{} } // WithCredentialsChainVerboseErrors sets a config verbose errors boolean and returning // a Config pointer. func (c *Config) WithCredentialsChainVerboseErrors(verboseErrs bool) *Config { c.CredentialsChainVerboseErrors = &verboseErrs return c } // WithCredentials sets a config Credentials value returning a Config pointer // for chaining. func (c *Config) WithCredentials(creds *credentials.Credentials) *Config { c.Credentials = creds return c } // WithEndpoint sets a config Endpoint value returning a Config pointer for // chaining. func (c *Config) WithEndpoint(endpoint string) *Config { c.Endpoint = &endpoint return c } // WithEndpointResolver sets a config EndpointResolver value returning a // Config pointer for chaining. func (c *Config) WithEndpointResolver(resolver endpoints.Resolver) *Config { c.EndpointResolver = resolver return c } // WithRegion sets a config Region value returning a Config pointer for // chaining. func (c *Config) WithRegion(region string) *Config { c.Region = ®ion return c } // WithDisableSSL sets a config DisableSSL value returning a Config pointer // for chaining. func (c *Config) WithDisableSSL(disable bool) *Config { c.DisableSSL = &disable return c } // WithHTTPClient sets a config HTTPClient value returning a Config pointer // for chaining. func (c *Config) WithHTTPClient(client *http.Client) *Config { c.HTTPClient = client return c } // WithMaxRetries sets a config MaxRetries value returning a Config pointer // for chaining. func (c *Config) WithMaxRetries(max int) *Config { c.MaxRetries = &max return c } // WithDisableParamValidation sets a config DisableParamValidation value // returning a Config pointer for chaining. func (c *Config) WithDisableParamValidation(disable bool) *Config { c.DisableParamValidation = &disable return c } // WithDisableComputeChecksums sets a config DisableComputeChecksums value // returning a Config pointer for chaining. func (c *Config) WithDisableComputeChecksums(disable bool) *Config { c.DisableComputeChecksums = &disable return c } // WithLogLevel sets a config LogLevel value returning a Config pointer for // chaining. func (c *Config) WithLogLevel(level LogLevelType) *Config { c.LogLevel = &level return c } // WithLogger sets a config Logger value returning a Config pointer for // chaining. func (c *Config) WithLogger(logger Logger) *Config { c.Logger = logger return c } // WithS3ForcePathStyle sets a config S3ForcePathStyle value returning a Config // pointer for chaining. func (c *Config) WithS3ForcePathStyle(force bool) *Config { c.S3ForcePathStyle = &force return c } // WithS3Disable100Continue sets a config S3Disable100Continue value returning // a Config pointer for chaining. func (c *Config) WithS3Disable100Continue(disable bool) *Config { c.S3Disable100Continue = &disable return c } // WithS3UseAccelerate sets a config S3UseAccelerate value returning a Config // pointer for chaining. func (c *Config) WithS3UseAccelerate(enable bool) *Config { c.S3UseAccelerate = &enable return c } // WithS3DisableContentMD5Validation sets a config // S3DisableContentMD5Validation value returning a Config pointer for chaining. func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config { c.S3DisableContentMD5Validation = &enable return c } // WithS3UseARNRegion sets a config S3UseARNRegion value and // returning a Config pointer for chaining func (c *Config) WithS3UseARNRegion(enable bool) *Config { c.S3UseARNRegion = &enable return c } // WithUseDualStack sets a config UseDualStack value returning a Config // pointer for chaining. func (c *Config) WithUseDualStack(enable bool) *Config { c.UseDualStack = &enable return c } // WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value // returning a Config pointer for chaining. func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config { c.EC2MetadataDisableTimeoutOverride = &enable return c } // WithEC2MetadataEnableFallback sets a config EC2MetadataEnableFallback value // returning a Config pointer for chaining. func (c *Config) WithEC2MetadataEnableFallback(v bool) *Config { c.EC2MetadataEnableFallback = &v return c } // WithSleepDelay overrides the function used to sleep while waiting for the // next retry. Defaults to time.Sleep. func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config { c.SleepDelay = fn 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 } // WithSTSRegionalEndpoint will set whether or not to use regional endpoint flag // when resolving the endpoint for a service func (c *Config) WithSTSRegionalEndpoint(sre endpoints.STSRegionalEndpoint) *Config { c.STSRegionalEndpoint = sre return c } // WithS3UsEast1RegionalEndpoint will set whether or not to use regional endpoint flag // when resolving the endpoint for a service func (c *Config) WithS3UsEast1RegionalEndpoint(sre endpoints.S3UsEast1RegionalEndpoint) *Config { c.S3UsEast1RegionalEndpoint = sre return c } // WithLowerCaseHeaderMaps sets a config LowerCaseHeaderMaps value // returning a Config pointer for chaining. func (c *Config) WithLowerCaseHeaderMaps(t bool) *Config { c.LowerCaseHeaderMaps = &t return c } // WithDisableRestProtocolURICleaning sets a config DisableRestProtocolURICleaning value // returning a Config pointer for chaining. func (c *Config) WithDisableRestProtocolURICleaning(t bool) *Config { c.DisableRestProtocolURICleaning = &t return c } // MergeIn merges the passed in configs into the existing config object. func (c *Config) MergeIn(cfgs ...*Config) { for _, other := range cfgs { mergeInConfig(c, other) } } func mergeInConfig(dst *Config, other *Config) { if other == nil { return } if other.CredentialsChainVerboseErrors != nil { dst.CredentialsChainVerboseErrors = other.CredentialsChainVerboseErrors } if other.Credentials != nil { dst.Credentials = other.Credentials } if other.Endpoint != nil { dst.Endpoint = other.Endpoint } if other.EndpointResolver != nil { dst.EndpointResolver = other.EndpointResolver } if other.Region != nil { dst.Region = other.Region } if other.DisableSSL != nil { dst.DisableSSL = other.DisableSSL } if other.HTTPClient != nil { dst.HTTPClient = other.HTTPClient } if other.LogLevel != nil { dst.LogLevel = other.LogLevel } if other.Logger != nil { dst.Logger = other.Logger } if other.MaxRetries != nil { dst.MaxRetries = other.MaxRetries } if other.Retryer != nil { dst.Retryer = other.Retryer } if other.DisableParamValidation != nil { dst.DisableParamValidation = other.DisableParamValidation } if other.DisableComputeChecksums != nil { dst.DisableComputeChecksums = other.DisableComputeChecksums } if other.S3ForcePathStyle != nil { dst.S3ForcePathStyle = other.S3ForcePathStyle } if other.S3Disable100Continue != nil { dst.S3Disable100Continue = other.S3Disable100Continue } if other.S3UseAccelerate != nil { dst.S3UseAccelerate = other.S3UseAccelerate } if other.S3DisableContentMD5Validation != nil { dst.S3DisableContentMD5Validation = other.S3DisableContentMD5Validation } if other.S3UseARNRegion != nil { dst.S3UseARNRegion = other.S3UseARNRegion } if other.UseDualStack != nil { dst.UseDualStack = other.UseDualStack } if other.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset { dst.UseDualStackEndpoint = other.UseDualStackEndpoint } if other.EC2MetadataDisableTimeoutOverride != nil { dst.EC2MetadataDisableTimeoutOverride = other.EC2MetadataDisableTimeoutOverride } if other.EC2MetadataEnableFallback != nil { dst.EC2MetadataEnableFallback = other.EC2MetadataEnableFallback } if other.SleepDelay != nil { dst.SleepDelay = other.SleepDelay } if other.DisableRestProtocolURICleaning != nil { dst.DisableRestProtocolURICleaning = other.DisableRestProtocolURICleaning } if other.EnforceShouldRetryCheck != nil { dst.EnforceShouldRetryCheck = other.EnforceShouldRetryCheck } if other.EnableEndpointDiscovery != nil { dst.EnableEndpointDiscovery = other.EnableEndpointDiscovery } if other.DisableEndpointHostPrefix != nil { dst.DisableEndpointHostPrefix = other.DisableEndpointHostPrefix } if other.STSRegionalEndpoint != endpoints.UnsetSTSEndpoint { dst.STSRegionalEndpoint = other.STSRegionalEndpoint } if other.S3UsEast1RegionalEndpoint != endpoints.UnsetS3UsEast1Endpoint { dst.S3UsEast1RegionalEndpoint = other.S3UsEast1RegionalEndpoint } if other.LowerCaseHeaderMaps != nil { dst.LowerCaseHeaderMaps = other.LowerCaseHeaderMaps } if other.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset { dst.UseDualStackEndpoint = other.UseDualStackEndpoint } if other.UseFIPSEndpoint != endpoints.FIPSEndpointStateUnset { dst.UseFIPSEndpoint = other.UseFIPSEndpoint } } // Copy will return a shallow copy of the Config object. If any additional // configurations are provided they will be merged into the new config returned. func (c *Config) Copy(cfgs ...*Config) *Config { dst := &Config{} dst.MergeIn(c) for _, cfg := range cfgs { dst.MergeIn(cfg) } return dst } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go ================================================ //go:build !go1.9 // +build !go1.9 package aws import "time" // Context is an copy of the Go v1.7 stdlib's context.Context interface. // It is represented as a SDK interface to enable you to use the "WithContext" // API methods with Go v1.6 and a Context type such as golang.org/x/net/context. // // See https://golang.org/pkg/context on how to use contexts. type Context interface { // Deadline returns the time when work done on behalf of this context // should be canceled. Deadline returns ok==false when no deadline is // set. Successive calls to Deadline return the same results. Deadline() (deadline time.Time, ok bool) // Done returns a channel that's closed when work done on behalf of this // context should be canceled. Done may return nil if this context can // never be canceled. Successive calls to Done return the same value. Done() <-chan struct{} // Err returns a non-nil error value after Done is closed. Err returns // Canceled if the context was canceled or DeadlineExceeded if the // context's deadline passed. No other values for Err are defined. // After Done is closed, successive calls to Err return the same value. Err() error // Value returns the value associated with this context for key, or nil // if no value is associated with key. Successive calls to Value with // the same key returns the same result. // // Use context values only for request-scoped data that transits // processes and API boundaries, not for passing optional parameters to // functions. Value(key interface{}) interface{} } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go ================================================ //go:build go1.9 // +build go1.9 package aws import "context" // Context is an alias of the Go stdlib's context.Context interface. // It can be used within the SDK's API operation "WithContext" methods. // // See https://golang.org/pkg/context on how to use contexts. type Context = context.Context ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go ================================================ //go:build !go1.7 // +build !go1.7 package aws import ( "github.com/aws/aws-sdk-go/internal/context" ) // BackgroundContext returns a context that will never be canceled, has no // values, and no deadline. This context is used by the SDK to provide // backwards compatibility with non-context API operations and functionality. // // Go 1.6 and before: // This context function is equivalent to context.Background in the Go stdlib. // // Go 1.7 and later: // The context returned will be the value returned by context.Background() // // See https://golang.org/pkg/context for more information on Contexts. func BackgroundContext() Context { return context.BackgroundCtx } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go ================================================ //go:build go1.7 // +build go1.7 package aws import "context" // BackgroundContext returns a context that will never be canceled, has no // values, and no deadline. This context is used by the SDK to provide // backwards compatibility with non-context API operations and functionality. // // Go 1.6 and before: // This context function is equivalent to context.Background in the Go stdlib. // // Go 1.7 and later: // The context returned will be the value returned by context.Background() // // See https://golang.org/pkg/context for more information on Contexts. func BackgroundContext() Context { return context.Background() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go ================================================ package aws import ( "time" ) // SleepWithContext will wait for the timer duration to expire, or the context // is canceled. Which ever happens first. If the context is canceled the Context's // error will be returned. // // Expects Context to always return a non-nil error if the Done channel is closed. func SleepWithContext(ctx Context, dur time.Duration) error { t := time.NewTimer(dur) defer t.Stop() select { case <-t.C: break case <-ctx.Done(): return ctx.Err() } return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/convert_types.go ================================================ package aws import "time" // String returns a pointer to the string value passed in. func String(v string) *string { return &v } // StringValue returns the value of the string pointer passed in or // "" if the pointer is nil. func StringValue(v *string) string { if v != nil { return *v } return "" } // StringSlice converts a slice of string values into a slice of // string pointers func StringSlice(src []string) []*string { dst := make([]*string, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // StringValueSlice converts a slice of string pointers into a slice of // string values func StringValueSlice(src []*string) []string { dst := make([]string, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // StringMap converts a string map of string values into a string // map of string pointers func StringMap(src map[string]string) map[string]*string { dst := make(map[string]*string) for k, val := range src { v := val dst[k] = &v } return dst } // StringValueMap converts a string map of string pointers into a string // map of string values func StringValueMap(src map[string]*string) map[string]string { dst := make(map[string]string) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Bool returns a pointer to the bool value passed in. func Bool(v bool) *bool { return &v } // BoolValue returns the value of the bool pointer passed in or // false if the pointer is nil. func BoolValue(v *bool) bool { if v != nil { return *v } return false } // BoolSlice converts a slice of bool values into a slice of // bool pointers func BoolSlice(src []bool) []*bool { dst := make([]*bool, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // BoolValueSlice converts a slice of bool pointers into a slice of // bool values func BoolValueSlice(src []*bool) []bool { dst := make([]bool, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // BoolMap converts a string map of bool values into a string // map of bool pointers func BoolMap(src map[string]bool) map[string]*bool { dst := make(map[string]*bool) for k, val := range src { v := val dst[k] = &v } return dst } // BoolValueMap converts a string map of bool pointers into a string // map of bool values func BoolValueMap(src map[string]*bool) map[string]bool { dst := make(map[string]bool) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Int returns a pointer to the int value passed in. func Int(v int) *int { return &v } // IntValue returns the value of the int pointer passed in or // 0 if the pointer is nil. func IntValue(v *int) int { if v != nil { return *v } return 0 } // IntSlice converts a slice of int values into a slice of // int pointers func IntSlice(src []int) []*int { dst := make([]*int, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // IntValueSlice converts a slice of int pointers into a slice of // int values func IntValueSlice(src []*int) []int { dst := make([]int, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // IntMap converts a string map of int values into a string // map of int pointers func IntMap(src map[string]int) map[string]*int { dst := make(map[string]*int) for k, val := range src { v := val dst[k] = &v } return dst } // IntValueMap converts a string map of int pointers into a string // map of int values func IntValueMap(src map[string]*int) map[string]int { dst := make(map[string]int) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Uint returns a pointer to the uint value passed in. func Uint(v uint) *uint { return &v } // UintValue returns the value of the uint pointer passed in or // 0 if the pointer is nil. func UintValue(v *uint) uint { if v != nil { return *v } return 0 } // UintSlice converts a slice of uint values uinto a slice of // uint pointers func UintSlice(src []uint) []*uint { dst := make([]*uint, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // UintValueSlice converts a slice of uint pointers uinto a slice of // uint values func UintValueSlice(src []*uint) []uint { dst := make([]uint, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // UintMap converts a string map of uint values uinto a string // map of uint pointers func UintMap(src map[string]uint) map[string]*uint { dst := make(map[string]*uint) for k, val := range src { v := val dst[k] = &v } return dst } // UintValueMap converts a string map of uint pointers uinto a string // map of uint values func UintValueMap(src map[string]*uint) map[string]uint { dst := make(map[string]uint) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Int8 returns a pointer to the int8 value passed in. func Int8(v int8) *int8 { return &v } // Int8Value returns the value of the int8 pointer passed in or // 0 if the pointer is nil. func Int8Value(v *int8) int8 { if v != nil { return *v } return 0 } // Int8Slice converts a slice of int8 values into a slice of // int8 pointers func Int8Slice(src []int8) []*int8 { dst := make([]*int8, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Int8ValueSlice converts a slice of int8 pointers into a slice of // int8 values func Int8ValueSlice(src []*int8) []int8 { dst := make([]int8, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Int8Map converts a string map of int8 values into a string // map of int8 pointers func Int8Map(src map[string]int8) map[string]*int8 { dst := make(map[string]*int8) for k, val := range src { v := val dst[k] = &v } return dst } // Int8ValueMap converts a string map of int8 pointers into a string // map of int8 values func Int8ValueMap(src map[string]*int8) map[string]int8 { dst := make(map[string]int8) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Int16 returns a pointer to the int16 value passed in. func Int16(v int16) *int16 { return &v } // Int16Value returns the value of the int16 pointer passed in or // 0 if the pointer is nil. func Int16Value(v *int16) int16 { if v != nil { return *v } return 0 } // Int16Slice converts a slice of int16 values into a slice of // int16 pointers func Int16Slice(src []int16) []*int16 { dst := make([]*int16, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Int16ValueSlice converts a slice of int16 pointers into a slice of // int16 values func Int16ValueSlice(src []*int16) []int16 { dst := make([]int16, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Int16Map converts a string map of int16 values into a string // map of int16 pointers func Int16Map(src map[string]int16) map[string]*int16 { dst := make(map[string]*int16) for k, val := range src { v := val dst[k] = &v } return dst } // Int16ValueMap converts a string map of int16 pointers into a string // map of int16 values func Int16ValueMap(src map[string]*int16) map[string]int16 { dst := make(map[string]int16) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Int32 returns a pointer to the int32 value passed in. func Int32(v int32) *int32 { return &v } // Int32Value returns the value of the int32 pointer passed in or // 0 if the pointer is nil. func Int32Value(v *int32) int32 { if v != nil { return *v } return 0 } // Int32Slice converts a slice of int32 values into a slice of // int32 pointers func Int32Slice(src []int32) []*int32 { dst := make([]*int32, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Int32ValueSlice converts a slice of int32 pointers into a slice of // int32 values func Int32ValueSlice(src []*int32) []int32 { dst := make([]int32, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Int32Map converts a string map of int32 values into a string // map of int32 pointers func Int32Map(src map[string]int32) map[string]*int32 { dst := make(map[string]*int32) for k, val := range src { v := val dst[k] = &v } return dst } // Int32ValueMap converts a string map of int32 pointers into a string // map of int32 values func Int32ValueMap(src map[string]*int32) map[string]int32 { dst := make(map[string]int32) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Int64 returns a pointer to the int64 value passed in. func Int64(v int64) *int64 { return &v } // Int64Value returns the value of the int64 pointer passed in or // 0 if the pointer is nil. func Int64Value(v *int64) int64 { if v != nil { return *v } return 0 } // Int64Slice converts a slice of int64 values into a slice of // int64 pointers func Int64Slice(src []int64) []*int64 { dst := make([]*int64, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Int64ValueSlice converts a slice of int64 pointers into a slice of // int64 values func Int64ValueSlice(src []*int64) []int64 { dst := make([]int64, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Int64Map converts a string map of int64 values into a string // map of int64 pointers func Int64Map(src map[string]int64) map[string]*int64 { dst := make(map[string]*int64) for k, val := range src { v := val dst[k] = &v } return dst } // Int64ValueMap converts a string map of int64 pointers into a string // map of int64 values func Int64ValueMap(src map[string]*int64) map[string]int64 { dst := make(map[string]int64) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Uint8 returns a pointer to the uint8 value passed in. func Uint8(v uint8) *uint8 { return &v } // Uint8Value returns the value of the uint8 pointer passed in or // 0 if the pointer is nil. func Uint8Value(v *uint8) uint8 { if v != nil { return *v } return 0 } // Uint8Slice converts a slice of uint8 values into a slice of // uint8 pointers func Uint8Slice(src []uint8) []*uint8 { dst := make([]*uint8, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Uint8ValueSlice converts a slice of uint8 pointers into a slice of // uint8 values func Uint8ValueSlice(src []*uint8) []uint8 { dst := make([]uint8, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Uint8Map converts a string map of uint8 values into a string // map of uint8 pointers func Uint8Map(src map[string]uint8) map[string]*uint8 { dst := make(map[string]*uint8) for k, val := range src { v := val dst[k] = &v } return dst } // Uint8ValueMap converts a string map of uint8 pointers into a string // map of uint8 values func Uint8ValueMap(src map[string]*uint8) map[string]uint8 { dst := make(map[string]uint8) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Uint16 returns a pointer to the uint16 value passed in. func Uint16(v uint16) *uint16 { return &v } // Uint16Value returns the value of the uint16 pointer passed in or // 0 if the pointer is nil. func Uint16Value(v *uint16) uint16 { if v != nil { return *v } return 0 } // Uint16Slice converts a slice of uint16 values into a slice of // uint16 pointers func Uint16Slice(src []uint16) []*uint16 { dst := make([]*uint16, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Uint16ValueSlice converts a slice of uint16 pointers into a slice of // uint16 values func Uint16ValueSlice(src []*uint16) []uint16 { dst := make([]uint16, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Uint16Map converts a string map of uint16 values into a string // map of uint16 pointers func Uint16Map(src map[string]uint16) map[string]*uint16 { dst := make(map[string]*uint16) for k, val := range src { v := val dst[k] = &v } return dst } // Uint16ValueMap converts a string map of uint16 pointers into a string // map of uint16 values func Uint16ValueMap(src map[string]*uint16) map[string]uint16 { dst := make(map[string]uint16) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Uint32 returns a pointer to the uint32 value passed in. func Uint32(v uint32) *uint32 { return &v } // Uint32Value returns the value of the uint32 pointer passed in or // 0 if the pointer is nil. func Uint32Value(v *uint32) uint32 { if v != nil { return *v } return 0 } // Uint32Slice converts a slice of uint32 values into a slice of // uint32 pointers func Uint32Slice(src []uint32) []*uint32 { dst := make([]*uint32, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Uint32ValueSlice converts a slice of uint32 pointers into a slice of // uint32 values func Uint32ValueSlice(src []*uint32) []uint32 { dst := make([]uint32, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Uint32Map converts a string map of uint32 values into a string // map of uint32 pointers func Uint32Map(src map[string]uint32) map[string]*uint32 { dst := make(map[string]*uint32) for k, val := range src { v := val dst[k] = &v } return dst } // Uint32ValueMap converts a string map of uint32 pointers into a string // map of uint32 values func Uint32ValueMap(src map[string]*uint32) map[string]uint32 { dst := make(map[string]uint32) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Uint64 returns a pointer to the uint64 value passed in. func Uint64(v uint64) *uint64 { return &v } // Uint64Value returns the value of the uint64 pointer passed in or // 0 if the pointer is nil. func Uint64Value(v *uint64) uint64 { if v != nil { return *v } return 0 } // Uint64Slice converts a slice of uint64 values into a slice of // uint64 pointers func Uint64Slice(src []uint64) []*uint64 { dst := make([]*uint64, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Uint64ValueSlice converts a slice of uint64 pointers into a slice of // uint64 values func Uint64ValueSlice(src []*uint64) []uint64 { dst := make([]uint64, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Uint64Map converts a string map of uint64 values into a string // map of uint64 pointers func Uint64Map(src map[string]uint64) map[string]*uint64 { dst := make(map[string]*uint64) for k, val := range src { v := val dst[k] = &v } return dst } // Uint64ValueMap converts a string map of uint64 pointers into a string // map of uint64 values func Uint64ValueMap(src map[string]*uint64) map[string]uint64 { dst := make(map[string]uint64) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Float32 returns a pointer to the float32 value passed in. func Float32(v float32) *float32 { return &v } // Float32Value returns the value of the float32 pointer passed in or // 0 if the pointer is nil. func Float32Value(v *float32) float32 { if v != nil { return *v } return 0 } // Float32Slice converts a slice of float32 values into a slice of // float32 pointers func Float32Slice(src []float32) []*float32 { dst := make([]*float32, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Float32ValueSlice converts a slice of float32 pointers into a slice of // float32 values func Float32ValueSlice(src []*float32) []float32 { dst := make([]float32, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Float32Map converts a string map of float32 values into a string // map of float32 pointers func Float32Map(src map[string]float32) map[string]*float32 { dst := make(map[string]*float32) for k, val := range src { v := val dst[k] = &v } return dst } // Float32ValueMap converts a string map of float32 pointers into a string // map of float32 values func Float32ValueMap(src map[string]*float32) map[string]float32 { dst := make(map[string]float32) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Float64 returns a pointer to the float64 value passed in. func Float64(v float64) *float64 { return &v } // Float64Value returns the value of the float64 pointer passed in or // 0 if the pointer is nil. func Float64Value(v *float64) float64 { if v != nil { return *v } return 0 } // Float64Slice converts a slice of float64 values into a slice of // float64 pointers func Float64Slice(src []float64) []*float64 { dst := make([]*float64, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // Float64ValueSlice converts a slice of float64 pointers into a slice of // float64 values func Float64ValueSlice(src []*float64) []float64 { dst := make([]float64, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // Float64Map converts a string map of float64 values into a string // map of float64 pointers func Float64Map(src map[string]float64) map[string]*float64 { dst := make(map[string]*float64) for k, val := range src { v := val dst[k] = &v } return dst } // Float64ValueMap converts a string map of float64 pointers into a string // map of float64 values func Float64ValueMap(src map[string]*float64) map[string]float64 { dst := make(map[string]float64) for k, val := range src { if val != nil { dst[k] = *val } } return dst } // Time returns a pointer to the time.Time value passed in. func Time(v time.Time) *time.Time { return &v } // TimeValue returns the value of the time.Time pointer passed in or // time.Time{} if the pointer is nil. func TimeValue(v *time.Time) time.Time { if v != nil { return *v } return time.Time{} } // SecondsTimeValue converts an int64 pointer to a time.Time value // representing seconds since Epoch or time.Time{} if the pointer is nil. func SecondsTimeValue(v *int64) time.Time { if v != nil { return time.Unix((*v / 1000), 0) } return time.Time{} } // MillisecondsTimeValue converts an int64 pointer to a time.Time value // representing milliseconds sinch Epoch or time.Time{} if the pointer is nil. func MillisecondsTimeValue(v *int64) time.Time { if v != nil { return time.Unix(0, (*v * 1000000)) } return time.Time{} } // TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". // The result is undefined if the Unix time cannot be represented by an int64. // Which includes calling TimeUnixMilli on a zero Time is undefined. // // This utility is useful for service API's such as CloudWatch Logs which require // their unix time values to be in milliseconds. // // See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information. func TimeUnixMilli(t time.Time) int64 { return t.UnixNano() / int64(time.Millisecond/time.Nanosecond) } // TimeSlice converts a slice of time.Time values into a slice of // time.Time pointers func TimeSlice(src []time.Time) []*time.Time { dst := make([]*time.Time, len(src)) for i := 0; i < len(src); i++ { dst[i] = &(src[i]) } return dst } // TimeValueSlice converts a slice of time.Time pointers into a slice of // time.Time values func TimeValueSlice(src []*time.Time) []time.Time { dst := make([]time.Time, len(src)) for i := 0; i < len(src); i++ { if src[i] != nil { dst[i] = *(src[i]) } } return dst } // TimeMap converts a string map of time.Time values into a string // map of time.Time pointers func TimeMap(src map[string]time.Time) map[string]*time.Time { dst := make(map[string]*time.Time) for k, val := range src { v := val dst[k] = &v } return dst } // TimeValueMap converts a string map of time.Time pointers into a string // map of time.Time values func TimeValueMap(src map[string]*time.Time) map[string]time.Time { dst := make(map[string]time.Time) for k, val := range src { if val != nil { dst[k] = *val } } return dst } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/corehandlers/awsinternal.go ================================================ // DO NOT EDIT package corehandlers const isAwsInternal = "" ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go ================================================ package corehandlers import ( "bytes" "fmt" "io/ioutil" "net/http" "net/url" "regexp" "strconv" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" ) // Interface for matching types which also have a Len method. type lener interface { Len() int } // BuildContentLengthHandler builds the content length of a request based on the body, // or will use the HTTPRequest.Header's "Content-Length" if defined. If unable // to determine request body length and no "Content-Length" was specified it will panic. // // The Content-Length will only be added to the request if the length of the body // is greater than 0. If the body is empty or the current `Content-Length` // header is <= 0, the header will also be stripped. var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLengthHandler", Fn: func(r *request.Request) { var length int64 if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" { length, _ = strconv.ParseInt(slength, 10, 64) } else { if r.Body != nil { var err error length, err = aws.SeekerLen(r.Body) if err != nil { r.Error = awserr.New(request.ErrCodeSerialization, "failed to get request body's length", err) return } } } if length > 0 { r.HTTPRequest.ContentLength = length r.HTTPRequest.Header.Set("Content-Length", fmt.Sprintf("%d", length)) } else { r.HTTPRequest.ContentLength = 0 r.HTTPRequest.Header.Del("Content-Length") } }} var reStatusCode = regexp.MustCompile(`^(\d{3})`) // ValidateReqSigHandler is a request handler to ensure that the request's // signature doesn't expire before it is sent. This can happen when a request // is built and signed significantly before it is sent. Or significant delays // occur when retrying requests that would cause the signature to expire. var ValidateReqSigHandler = request.NamedHandler{ Name: "core.ValidateReqSigHandler", Fn: func(r *request.Request) { // Unsigned requests are not signed if r.Config.Credentials == credentials.AnonymousCredentials { return } signedTime := r.Time if !r.LastSignedAt.IsZero() { signedTime = r.LastSignedAt } // 5 minutes to allow for some clock skew/delays in transmission. // Would be improved with aws/aws-sdk-go#423 if signedTime.Add(5 * time.Minute).After(time.Now()) { return } fmt.Println("request expired, resigning") r.Sign() }, } // SendHandler is a request handler to send service request using HTTP client. var SendHandler = request.NamedHandler{ Name: "core.SendHandler", Fn: func(r *request.Request) { sender := sendFollowRedirects if r.DisableFollowRedirects { sender = sendWithoutFollowRedirects } if request.NoBody == r.HTTPRequest.Body { // Strip off the request body if the NoBody reader was used as a // place holder for a request body. This prevents the SDK from // making requests with a request body when it would be invalid // to do so. // // Use a shallow copy of the http.Request to ensure the race condition // of transport on Body will not trigger reqOrig, reqCopy := r.HTTPRequest, *r.HTTPRequest reqCopy.Body = nil r.HTTPRequest = &reqCopy defer func() { r.HTTPRequest = reqOrig }() } var err error r.HTTPResponse, err = sender(r) if err != nil { handleSendError(r, err) } }, } func sendFollowRedirects(r *request.Request) (*http.Response, error) { return r.Config.HTTPClient.Do(r.HTTPRequest) } func sendWithoutFollowRedirects(r *request.Request) (*http.Response, error) { transport := r.Config.HTTPClient.Transport if transport == nil { transport = http.DefaultTransport } return transport.RoundTrip(r.HTTPRequest) } func handleSendError(r *request.Request, err error) { // Prevent leaking if an HTTPResponse was returned. Clean up // the body. if r.HTTPResponse != nil { r.HTTPResponse.Body.Close() } // Capture the case where url.Error is returned for error processing // response. e.g. 301 without location header comes back as string // error and r.HTTPResponse is nil. Other URL redirect errors will // comeback in a similar method. if e, ok := err.(*url.Error); ok && e.Err != nil { if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil { code, _ := strconv.ParseInt(s[1], 10, 64) r.HTTPResponse = &http.Response{ StatusCode: int(code), Status: http.StatusText(int(code)), Body: ioutil.NopCloser(bytes.NewReader([]byte{})), } return } } if r.HTTPResponse == nil { // Add a dummy request response object to ensure the HTTPResponse // value is consistent. r.HTTPResponse = &http.Response{ StatusCode: int(0), Status: http.StatusText(int(0)), Body: ioutil.NopCloser(bytes.NewReader([]byte{})), } } // Catch all request errors, and let the default retrier determine // if the error is retryable. r.Error = awserr.New(request.ErrCodeRequestError, "send request failed", err) // Override the error with a context canceled error, if that was canceled. ctx := r.Context() select { case <-ctx.Done(): r.Error = awserr.New(request.CanceledErrorCode, "request context canceled", ctx.Err()) r.Retryable = aws.Bool(false) default: } } // ValidateResponseHandler is a request handler to validate service response. var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseHandler", Fn: func(r *request.Request) { if r.HTTPResponse.StatusCode == 0 || r.HTTPResponse.StatusCode >= 300 { // this may be replaced by an UnmarshalError handler r.Error = awserr.New("UnknownError", "unknown error", r.Error) } }} // AfterRetryHandler performs final checks to determine if the request should // be retried and how long to delay. var AfterRetryHandler = request.NamedHandler{ Name: "core.AfterRetryHandler", Fn: func(r *request.Request) { // If one of the other handlers already set the retry state // we don't want to override it based on the service's state if r.Retryable == nil || aws.BoolValue(r.Config.EnforceShouldRetryCheck) { r.Retryable = aws.Bool(r.ShouldRetry(r)) } if r.WillRetry() { r.RetryDelay = r.RetryRules(r) if sleepFn := r.Config.SleepDelay; sleepFn != nil { // Support SleepDelay for backwards compatibility and testing sleepFn(r.RetryDelay) } else if err := aws.SleepWithContext(r.Context(), r.RetryDelay); err != nil { r.Error = awserr.New(request.CanceledErrorCode, "request context canceled", err) r.Retryable = aws.Bool(false) return } // when the expired token exception occurs the credentials // need to be expired locally so that the next request to // get credentials will trigger a credentials refresh. if r.IsErrorExpired() { r.Config.Credentials.Expire() } r.RetryCount++ r.Error = nil } }} // ValidateEndpointHandler is a request handler to validate a request had the // appropriate Region and Endpoint set. Will set r.Error if the endpoint or // region is not valid. var ValidateEndpointHandler = request.NamedHandler{Name: "core.ValidateEndpointHandler", Fn: func(r *request.Request) { if r.ClientInfo.SigningRegion == "" && aws.StringValue(r.Config.Region) == "" { r.Error = aws.ErrMissingRegion } else if r.ClientInfo.Endpoint == "" { // Was any endpoint provided by the user, or one was derived by the // SDK's endpoint resolver? r.Error = aws.ErrMissingEndpoint } }} ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go ================================================ package corehandlers import "github.com/aws/aws-sdk-go/aws/request" // ValidateParametersHandler is a request handler to validate the input parameters. // Validating parameters only has meaning if done prior to the request being sent. var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) { if !r.ParamsFilled() { return } if v, ok := r.Params.(request.Validator); ok { if err := v.Validate(); err != nil { r.Error = err } } }} ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go ================================================ package corehandlers import ( "os" "runtime" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" ) // SDKVersionUserAgentHandler is a request handler for adding the SDK Version // to the user agent. var SDKVersionUserAgentHandler = request.NamedHandler{ Name: "core.SDKVersionUserAgentHandler", Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion, runtime.Version(), runtime.GOOS, runtime.GOARCH), } const execEnvVar = `AWS_EXECUTION_ENV` const execEnvUAKey = `exec-env` // AddHostExecEnvUserAgentHander is a request handler appending the SDK's // execution environment to the user agent. // // If the environment variable AWS_EXECUTION_ENV is set, its value will be // appended to the user agent string. var AddHostExecEnvUserAgentHander = request.NamedHandler{ Name: "core.AddHostExecEnvUserAgentHander", Fn: func(r *request.Request) { v := os.Getenv(execEnvVar) if len(v) == 0 { return } request.AddToUserAgent(r, execEnvUAKey+"/"+v) }, } var AddAwsInternal = request.NamedHandler{ Name: "core.AddAwsInternal", Fn: func(r *request.Request) { if len(isAwsInternal) == 0 { return } request.AddToUserAgent(r, isAwsInternal) }, } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go ================================================ package credentials import ( "github.com/aws/aws-sdk-go/aws/awserr" ) var ( // ErrNoValidProvidersFoundInChain Is returned when there are no valid // providers in the ChainProvider. // // This has been deprecated. For verbose error messaging set // aws.Config.CredentialsChainVerboseErrors to true. ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders", `no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors`, nil) ) // A ChainProvider will search for a provider which returns credentials // and cache that provider until Retrieve is called again. // // The ChainProvider provides a way of chaining multiple providers together // which will pick the first available using priority order of the Providers // in the list. // // If none of the Providers retrieve valid credentials Value, ChainProvider's // Retrieve() will return the error ErrNoValidProvidersFoundInChain. // // If a Provider is found which returns valid credentials Value ChainProvider // will cache that Provider for all calls to IsExpired(), until Retrieve is // called again. // // Example of ChainProvider to be used with an EnvProvider and EC2RoleProvider. // In this example EnvProvider will first check if any credentials are available // via the environment variables. If there are none ChainProvider will check // the next Provider in the list, EC2RoleProvider in this case. If EC2RoleProvider // does not return any credentials ChainProvider will return the error // ErrNoValidProvidersFoundInChain // // creds := credentials.NewChainCredentials( // []credentials.Provider{ // &credentials.EnvProvider{}, // &ec2rolecreds.EC2RoleProvider{ // Client: ec2metadata.New(sess), // }, // }) // // // Usage of ChainCredentials with aws.Config // svc := ec2.New(session.Must(session.NewSession(&aws.Config{ // Credentials: creds, // }))) // type ChainProvider struct { Providers []Provider curr Provider VerboseErrors bool } // NewChainCredentials returns a pointer to a new Credentials object // wrapping a chain of providers. func NewChainCredentials(providers []Provider) *Credentials { return NewCredentials(&ChainProvider{ Providers: append([]Provider{}, providers...), }) } // Retrieve returns the credentials value or error if no provider returned // without error. // // If a provider is found it will be cached and any calls to IsExpired() // will return the expired state of the cached provider. func (c *ChainProvider) Retrieve() (Value, error) { var errs []error for _, p := range c.Providers { creds, err := p.Retrieve() if err == nil { c.curr = p return creds, nil } errs = append(errs, err) } c.curr = nil var err error err = ErrNoValidProvidersFoundInChain if c.VerboseErrors { err = awserr.NewBatchError("NoCredentialProviders", "no valid providers in chain", errs) } return Value{}, err } // IsExpired will returned the expired state of the currently cached provider // if there is one. If there is no current provider, true will be returned. func (c *ChainProvider) IsExpired() bool { if c.curr != nil { return c.curr.IsExpired() } return true } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.5.go ================================================ //go:build !go1.7 // +build !go1.7 package credentials import ( "github.com/aws/aws-sdk-go/internal/context" ) // backgroundContext returns a context that will never be canceled, has no // values, and no deadline. This context is used by the SDK to provide // backwards compatibility with non-context API operations and functionality. // // Go 1.6 and before: // This context function is equivalent to context.Background in the Go stdlib. // // Go 1.7 and later: // The context returned will be the value returned by context.Background() // // See https://golang.org/pkg/context for more information on Contexts. func backgroundContext() Context { return context.BackgroundCtx } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.7.go ================================================ //go:build go1.7 // +build go1.7 package credentials import "context" // backgroundContext returns a context that will never be canceled, has no // values, and no deadline. This context is used by the SDK to provide // backwards compatibility with non-context API operations and functionality. // // Go 1.6 and before: // This context function is equivalent to context.Background in the Go stdlib. // // Go 1.7 and later: // The context returned will be the value returned by context.Background() // // See https://golang.org/pkg/context for more information on Contexts. func backgroundContext() Context { return context.Background() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.5.go ================================================ //go:build !go1.9 // +build !go1.9 package credentials import "time" // Context is an copy of the Go v1.7 stdlib's context.Context interface. // It is represented as a SDK interface to enable you to use the "WithContext" // API methods with Go v1.6 and a Context type such as golang.org/x/net/context. // // This type, aws.Context, and context.Context are equivalent. // // See https://golang.org/pkg/context on how to use contexts. type Context interface { // Deadline returns the time when work done on behalf of this context // should be canceled. Deadline returns ok==false when no deadline is // set. Successive calls to Deadline return the same results. Deadline() (deadline time.Time, ok bool) // Done returns a channel that's closed when work done on behalf of this // context should be canceled. Done may return nil if this context can // never be canceled. Successive calls to Done return the same value. Done() <-chan struct{} // Err returns a non-nil error value after Done is closed. Err returns // Canceled if the context was canceled or DeadlineExceeded if the // context's deadline passed. No other values for Err are defined. // After Done is closed, successive calls to Err return the same value. Err() error // Value returns the value associated with this context for key, or nil // if no value is associated with key. Successive calls to Value with // the same key returns the same result. // // Use context values only for request-scoped data that transits // processes and API boundaries, not for passing optional parameters to // functions. Value(key interface{}) interface{} } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go ================================================ //go:build go1.9 // +build go1.9 package credentials import "context" // Context is an alias of the Go stdlib's context.Context interface. // It can be used within the SDK's API operation "WithContext" methods. // // This type, aws.Context, and context.Context are equivalent. // // See https://golang.org/pkg/context on how to use contexts. type Context = context.Context ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go ================================================ // Package credentials provides credential retrieval and management // // The Credentials is the primary method of getting access to and managing // credentials Values. Using dependency injection retrieval of the credential // values is handled by a object which satisfies the Provider interface. // // By default the Credentials.Get() will cache the successful result of a // Provider's Retrieve() until Provider.IsExpired() returns true. At which // point Credentials will call Provider's Retrieve() to get new credential Value. // // The Provider is responsible for determining when credentials Value have expired. // It is also important to note that Credentials will always call Retrieve the // first time Credentials.Get() is called. // // Example of using the environment variable credentials. // // creds := credentials.NewEnvCredentials() // // // Retrieve the credentials value // credValue, err := creds.Get() // if err != nil { // // handle error // } // // Example of forcing credentials to expire and be refreshed on the next Get(). // This may be helpful to proactively expire credentials and refresh them sooner // than they would naturally expire on their own. // // creds := credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{}) // creds.Expire() // credsValue, err := creds.Get() // // New credentials will be retrieved instead of from cache. // // // Custom Provider // // Each Provider built into this package also provides a helper method to generate // a Credentials pointer setup with the provider. To use a custom Provider just // create a type which satisfies the Provider interface and pass it to the // NewCredentials method. // // type MyProvider struct{} // func (m *MyProvider) Retrieve() (Value, error) {...} // func (m *MyProvider) IsExpired() bool {...} // // creds := credentials.NewCredentials(&MyProvider{}) // credValue, err := creds.Get() // package credentials import ( "fmt" "sync" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/internal/sync/singleflight" ) // AnonymousCredentials is an empty Credential object that can be used as // dummy placeholder credentials for requests that do not need signed. // // This Credentials can be used to configure a service to not sign requests // when making service API calls. For example, when accessing public // s3 buckets. // // svc := s3.New(session.Must(session.NewSession(&aws.Config{ // Credentials: credentials.AnonymousCredentials, // }))) // // Access public S3 buckets. var AnonymousCredentials = NewStaticCredentials("", "", "") // A Value is the AWS credentials value for individual credential fields. type Value struct { // AWS Access key ID AccessKeyID string // AWS Secret Access Key SecretAccessKey string // AWS Session Token SessionToken string // Provider used to get credentials ProviderName string } // HasKeys returns if the credentials Value has both AccessKeyID and // SecretAccessKey value set. func (v Value) HasKeys() bool { return len(v.AccessKeyID) != 0 && len(v.SecretAccessKey) != 0 } // A Provider is the interface for any component which will provide credentials // Value. A provider is required to manage its own Expired state, and what to // be expired means. // // The Provider should not need to implement its own mutexes, because // that will be managed by Credentials. type Provider interface { // Retrieve returns nil if it successfully retrieved the value. // Error is returned if the value were not obtainable, or empty. Retrieve() (Value, error) // IsExpired returns if the credentials are no longer valid, and need // to be retrieved. IsExpired() bool } // ProviderWithContext is a Provider that can retrieve credentials with a Context type ProviderWithContext interface { Provider RetrieveWithContext(Context) (Value, error) } // An Expirer is an interface that Providers can implement to expose the expiration // time, if known. If the Provider cannot accurately provide this info, // it should not implement this interface. type Expirer interface { // The time at which the credentials are no longer valid ExpiresAt() time.Time } // An ErrorProvider is a stub credentials provider that always returns an error // this is used by the SDK when construction a known provider is not possible // due to an error. type ErrorProvider struct { // The error to be returned from Retrieve Err error // The provider name to set on the Retrieved returned Value ProviderName string } // Retrieve will always return the error that the ErrorProvider was created with. func (p ErrorProvider) Retrieve() (Value, error) { return Value{ProviderName: p.ProviderName}, p.Err } // IsExpired will always return not expired. func (p ErrorProvider) IsExpired() bool { return false } // A Expiry provides shared expiration logic to be used by credentials // providers to implement expiry functionality. // // The best method to use this struct is as an anonymous field within the // provider's struct. // // Example: // type EC2RoleProvider struct { // Expiry // ... // } type Expiry struct { // The date/time when to expire on expiration time.Time // If set will be used by IsExpired to determine the current time. // Defaults to time.Now if CurrentTime is not set. Available for testing // to be able to mock out the current time. CurrentTime func() time.Time } // SetExpiration sets the expiration IsExpired will check when called. // // If window is greater than 0 the expiration time will be reduced by the // window value. // // Using a window is helpful to trigger credentials to expire sooner than // the expiration time given to ensure no requests are made with expired // tokens. func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) { // Passed in expirations should have the monotonic clock values stripped. // This ensures time comparisons will be based on wall-time. e.expiration = expiration.Round(0) if window > 0 { e.expiration = e.expiration.Add(-window) } } // IsExpired returns if the credentials are expired. func (e *Expiry) IsExpired() bool { curTime := e.CurrentTime if curTime == nil { curTime = time.Now } return e.expiration.Before(curTime()) } // ExpiresAt returns the expiration time of the credential func (e *Expiry) ExpiresAt() time.Time { return e.expiration } // A Credentials provides concurrency safe retrieval of AWS credentials Value. // Credentials will cache the credentials value until they expire. Once the value // expires the next Get will attempt to retrieve valid credentials. // // Credentials is safe to use across multiple goroutines and will manage the // synchronous state so the Providers do not need to implement their own // synchronization. // // The first Credentials.Get() will always call Provider.Retrieve() to get the // first instance of the credentials Value. All calls to Get() after that // will return the cached credentials Value until IsExpired() returns true. type Credentials struct { sf singleflight.Group m sync.RWMutex creds Value provider Provider } // NewCredentials returns a pointer to a new Credentials with the provider set. func NewCredentials(provider Provider) *Credentials { c := &Credentials{ provider: provider, } return c } // GetWithContext returns the credentials value, or error if the credentials // Value failed to be retrieved. Will return early if the passed in context is // canceled. // // Will return the cached credentials Value if it has not expired. If the // credentials Value has expired the Provider's Retrieve() will be called // to refresh the credentials. // // If Credentials.Expire() was called the credentials Value will be force // expired, and the next call to Get() will cause them to be refreshed. // // Passed in Context is equivalent to aws.Context, and context.Context. func (c *Credentials) GetWithContext(ctx Context) (Value, error) { // Check if credentials are cached, and not expired. select { case curCreds, ok := <-c.asyncIsExpired(): // ok will only be true, of the credentials were not expired. ok will // be false and have no value if the credentials are expired. if ok { return curCreds, nil } case <-ctx.Done(): return Value{}, awserr.New("RequestCanceled", "request context canceled", ctx.Err()) } // Cannot pass context down to the actual retrieve, because the first // context would cancel the whole group when there is not direct // association of items in the group. resCh := c.sf.DoChan("", func() (interface{}, error) { return c.singleRetrieve(&suppressedContext{ctx}) }) select { case res := <-resCh: return res.Val.(Value), res.Err case <-ctx.Done(): return Value{}, awserr.New("RequestCanceled", "request context canceled", ctx.Err()) } } func (c *Credentials) singleRetrieve(ctx Context) (interface{}, error) { c.m.Lock() defer c.m.Unlock() if curCreds := c.creds; !c.isExpiredLocked(curCreds) { return curCreds, nil } var creds Value var err error if p, ok := c.provider.(ProviderWithContext); ok { creds, err = p.RetrieveWithContext(ctx) } else { creds, err = c.provider.Retrieve() } if err == nil { c.creds = creds } return creds, err } // Get returns the credentials value, or error if the credentials Value failed // to be retrieved. // // Will return the cached credentials Value if it has not expired. If the // credentials Value has expired the Provider's Retrieve() will be called // to refresh the credentials. // // If Credentials.Expire() was called the credentials Value will be force // expired, and the next call to Get() will cause them to be refreshed. func (c *Credentials) Get() (Value, error) { return c.GetWithContext(backgroundContext()) } // Expire expires the credentials and forces them to be retrieved on the // next call to Get(). // // This will override the Provider's expired state, and force Credentials // to call the Provider's Retrieve(). func (c *Credentials) Expire() { c.m.Lock() defer c.m.Unlock() c.creds = Value{} } // IsExpired returns if the credentials are no longer valid, and need // to be retrieved. // // If the Credentials were forced to be expired with Expire() this will // reflect that override. func (c *Credentials) IsExpired() bool { c.m.RLock() defer c.m.RUnlock() return c.isExpiredLocked(c.creds) } // asyncIsExpired returns a channel of credentials Value. If the channel is // closed the credentials are expired and credentials value are not empty. func (c *Credentials) asyncIsExpired() <-chan Value { ch := make(chan Value, 1) go func() { c.m.RLock() defer c.m.RUnlock() if curCreds := c.creds; !c.isExpiredLocked(curCreds) { ch <- curCreds } close(ch) }() return ch } // isExpiredLocked helper method wrapping the definition of expired credentials. func (c *Credentials) isExpiredLocked(creds interface{}) bool { return creds == nil || creds.(Value) == Value{} || c.provider.IsExpired() } // ExpiresAt provides access to the functionality of the Expirer interface of // the underlying Provider, if it supports that interface. Otherwise, it returns // an error. func (c *Credentials) ExpiresAt() (time.Time, error) { c.m.RLock() defer c.m.RUnlock() expirer, ok := c.provider.(Expirer) if !ok { return time.Time{}, awserr.New("ProviderNotExpirer", fmt.Sprintf("provider %s does not support ExpiresAt()", c.creds.ProviderName), nil) } if c.creds == (Value{}) { // set expiration time to the distant past return time.Time{}, nil } return expirer.ExpiresAt(), nil } type suppressedContext struct { Context } func (s *suppressedContext) Deadline() (deadline time.Time, ok bool) { return time.Time{}, false } func (s *suppressedContext) Done() <-chan struct{} { return nil } func (s *suppressedContext) Err() error { return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go ================================================ package ec2rolecreds import ( "bufio" "encoding/json" "fmt" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/sdkuri" ) // ProviderName provides a name of EC2Role provider const ProviderName = "EC2RoleProvider" // A EC2RoleProvider retrieves credentials from the EC2 service, and keeps track if // those credentials are expired. // // Example how to configure the EC2RoleProvider with custom http Client, Endpoint // or ExpiryWindow // // p := &ec2rolecreds.EC2RoleProvider{ // // Pass in a custom timeout to be used when requesting // // IAM EC2 Role credentials. // Client: ec2metadata.New(sess, aws.Config{ // HTTPClient: &http.Client{Timeout: 10 * time.Second}, // }), // // // Do not use early expiry of credentials. If a non zero value is // // specified the credentials will be expired early // ExpiryWindow: 0, // } type EC2RoleProvider struct { credentials.Expiry // Required EC2Metadata client to use when connecting to EC2 metadata service. Client *ec2metadata.EC2Metadata // 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 } // NewCredentials returns a pointer to a new Credentials object wrapping // the EC2RoleProvider. Takes a ConfigProvider to create a EC2Metadata client. // The ConfigProvider is satisfied by the session.Session type. func NewCredentials(c client.ConfigProvider, options ...func(*EC2RoleProvider)) *credentials.Credentials { p := &EC2RoleProvider{ Client: ec2metadata.New(c), } for _, option := range options { option(p) } return credentials.NewCredentials(p) } // NewCredentialsWithClient returns a pointer to a new Credentials object wrapping // the EC2RoleProvider. Takes a EC2Metadata client to use when connecting to EC2 // metadata service. func NewCredentialsWithClient(client *ec2metadata.EC2Metadata, options ...func(*EC2RoleProvider)) *credentials.Credentials { p := &EC2RoleProvider{ Client: client, } for _, option := range options { option(p) } return credentials.NewCredentials(p) } // Retrieve retrieves credentials from the EC2 service. // Error will be returned if the request fails, or unable to extract // the desired credentials. func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) { return m.RetrieveWithContext(aws.BackgroundContext()) } // RetrieveWithContext retrieves credentials from the EC2 service. // Error will be returned if the request fails, or unable to extract // the desired credentials. func (m *EC2RoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { credsList, err := requestCredList(ctx, m.Client) if err != nil { return credentials.Value{ProviderName: ProviderName}, err } if len(credsList) == 0 { return credentials.Value{ProviderName: ProviderName}, awserr.New("EmptyEC2RoleList", "empty EC2 Role list", nil) } credsName := credsList[0] roleCreds, err := requestCred(ctx, m.Client, credsName) if err != nil { return credentials.Value{ProviderName: ProviderName}, err } m.SetExpiration(roleCreds.Expiration, m.ExpiryWindow) return credentials.Value{ AccessKeyID: roleCreds.AccessKeyID, SecretAccessKey: roleCreds.SecretAccessKey, SessionToken: roleCreds.Token, ProviderName: ProviderName, }, nil } // A ec2RoleCredRespBody provides the shape for unmarshaling credential // request responses. type ec2RoleCredRespBody struct { // Success State Expiration time.Time AccessKeyID string SecretAccessKey string Token string // Error state Code string Message string } const iamSecurityCredsPath = "iam/security-credentials/" // requestCredList requests a list of credentials from the EC2 service. // If there are no credentials, or there is an error making or receiving the request func requestCredList(ctx aws.Context, client *ec2metadata.EC2Metadata) ([]string, error) { resp, err := client.GetMetadataWithContext(ctx, iamSecurityCredsPath) if err != nil { return nil, awserr.New("EC2RoleRequestError", "no EC2 instance role found", err) } credsList := []string{} s := bufio.NewScanner(strings.NewReader(resp)) for s.Scan() { credsList = append(credsList, s.Text()) } if err := s.Err(); err != nil { return nil, awserr.New(request.ErrCodeSerialization, "failed to read EC2 instance role from metadata service", err) } return credsList, nil } // requestCred requests the credentials for a specific credentials from the EC2 service. // // If the credentials cannot be found, or there is an error reading the response // and error will be returned. func requestCred(ctx aws.Context, client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) { resp, err := client.GetMetadataWithContext(ctx, sdkuri.PathJoin(iamSecurityCredsPath, credsName)) if err != nil { return ec2RoleCredRespBody{}, awserr.New("EC2RoleRequestError", fmt.Sprintf("failed to get %s EC2 instance role credentials", credsName), err) } respCreds := ec2RoleCredRespBody{} if err := json.NewDecoder(strings.NewReader(resp)).Decode(&respCreds); err != nil { return ec2RoleCredRespBody{}, awserr.New(request.ErrCodeSerialization, fmt.Sprintf("failed to decode %s EC2 instance role credentials", credsName), err) } if respCreds.Code != "Success" { // If an error code was returned something failed requesting the role. return ec2RoleCredRespBody{}, awserr.New(respCreds.Code, respCreds.Message, nil) } return respCreds, nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go ================================================ // Package endpointcreds provides support for retrieving credentials from an // arbitrary HTTP endpoint. // // The credentials endpoint Provider can receive both static and refreshable // credentials that will expire. Credentials are static when an "Expiration" // value is not provided in the endpoint's response. // // Static credentials will never expire once they have been retrieved. The format // of the static credentials response: // { // "AccessKeyId" : "MUA...", // "SecretAccessKey" : "/7PC5om....", // } // // Refreshable credentials will expire within the "ExpiryWindow" of the Expiration // value in the response. The format of the refreshable credentials response: // { // "AccessKeyId" : "MUA...", // "SecretAccessKey" : "/7PC5om....", // "Token" : "AQoDY....=", // "Expiration" : "2016-02-25T06:03:31Z" // } // // Errors should be returned in the following format and only returned with 400 // or 500 HTTP status codes. // { // "code": "ErrorCode", // "message": "Helpful error message." // } package endpointcreds import ( "encoding/json" "fmt" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" ) // ProviderName is the name of the credentials provider. const ProviderName = `CredentialsEndpointProvider` // Provider satisfies the credentials.Provider interface, and is a client to // retrieve credentials from an arbitrary endpoint. type Provider struct { staticCreds bool credentials.Expiry // Requires a AWS Client to make HTTP requests to the endpoint with. // the Endpoint the request will be made to is provided by the aws.Config's // Endpoint value. Client *client.Client // 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 // Optional authorization token value if set will be used as the value of // the Authorization header of the endpoint credential request. // // When constructed from environment, the provider will use the value of // AWS_CONTAINER_AUTHORIZATION_TOKEN environment variable as the token // // Will be overridden if AuthorizationTokenProvider is configured AuthorizationToken string // Optional auth provider func to dynamically load the auth token from a file // everytime a credential is retrieved // // When constructed from environment, the provider will read and use the content // of the file pointed to by AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE environment variable // as the auth token everytime credentials are retrieved // // Will override AuthorizationToken if configured AuthorizationTokenProvider AuthTokenProvider } // AuthTokenProvider defines an interface to dynamically load a value to be passed // for the Authorization header of a credentials request. type AuthTokenProvider interface { GetToken() (string, error) } // TokenProviderFunc is a func type implementing AuthTokenProvider interface // and enables customizing token provider behavior type TokenProviderFunc func() (string, error) // GetToken func retrieves auth token according to TokenProviderFunc implementation func (p TokenProviderFunc) GetToken() (string, error) { return p() } // NewProviderClient returns a credentials Provider for retrieving AWS credentials // from arbitrary endpoint. func NewProviderClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) credentials.Provider { p := &Provider{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: "CredentialsEndpoint", Endpoint: endpoint, }, handlers, ), } p.Client.Handlers.Unmarshal.PushBack(unmarshalHandler) p.Client.Handlers.UnmarshalError.PushBack(unmarshalError) p.Client.Handlers.Validate.Clear() p.Client.Handlers.Validate.PushBack(validateEndpointHandler) for _, option := range options { option(p) } return p } // NewCredentialsClient returns a pointer to a new Credentials object // wrapping the endpoint credentials Provider. func NewCredentialsClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) *credentials.Credentials { return credentials.NewCredentials(NewProviderClient(cfg, handlers, endpoint, options...)) } // IsExpired returns true if the credentials retrieved are expired, or not yet // retrieved. func (p *Provider) IsExpired() bool { if p.staticCreds { return false } return p.Expiry.IsExpired() } // Retrieve will attempt to request the credentials from the endpoint the Provider // was configured for. And error will be returned if the retrieval fails. func (p *Provider) Retrieve() (credentials.Value, error) { return p.RetrieveWithContext(aws.BackgroundContext()) } // RetrieveWithContext will attempt to request the credentials from the endpoint the Provider // was configured for. And error will be returned if the retrieval fails. func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { resp, err := p.getCredentials(ctx) if err != nil { return credentials.Value{ProviderName: ProviderName}, awserr.New("CredentialsEndpointError", "failed to load credentials", err) } if resp.Expiration != nil { p.SetExpiration(*resp.Expiration, p.ExpiryWindow) } else { p.staticCreds = true } return credentials.Value{ AccessKeyID: resp.AccessKeyID, SecretAccessKey: resp.SecretAccessKey, SessionToken: resp.Token, ProviderName: ProviderName, }, nil } type getCredentialsOutput struct { Expiration *time.Time AccessKeyID string SecretAccessKey string Token string } type errorOutput struct { Code string `json:"code"` Message string `json:"message"` } func (p *Provider) getCredentials(ctx aws.Context) (*getCredentialsOutput, error) { op := &request.Operation{ Name: "GetCredentials", HTTPMethod: "GET", } out := &getCredentialsOutput{} req := p.Client.NewRequest(op, nil, out) req.SetContext(ctx) req.HTTPRequest.Header.Set("Accept", "application/json") authToken := p.AuthorizationToken var err error if p.AuthorizationTokenProvider != nil { authToken, err = p.AuthorizationTokenProvider.GetToken() if err != nil { return nil, fmt.Errorf("get authorization token: %v", err) } } if strings.ContainsAny(authToken, "\r\n") { return nil, fmt.Errorf("authorization token contains invalid newline sequence") } if len(authToken) != 0 { req.HTTPRequest.Header.Set("Authorization", authToken) } return out, req.Send() } func validateEndpointHandler(r *request.Request) { if len(r.ClientInfo.Endpoint) == 0 { r.Error = aws.ErrMissingEndpoint } } func unmarshalHandler(r *request.Request) { defer r.HTTPResponse.Body.Close() out := r.Data.(*getCredentialsOutput) if err := json.NewDecoder(r.HTTPResponse.Body).Decode(&out); err != nil { r.Error = awserr.New(request.ErrCodeSerialization, "failed to decode endpoint credentials", err, ) } } func unmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() var errOut errorOutput err := jsonutil.UnmarshalJSONError(&errOut, r.HTTPResponse.Body) if err != nil { r.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, "failed to decode error message", err), r.HTTPResponse.StatusCode, r.RequestID, ) return } // Response body format is not consistent between metadata endpoints. // Grab the error message as a string and include that as the source error r.Error = awserr.New(errOut.Code, errOut.Message, nil) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go ================================================ package credentials import ( "os" "github.com/aws/aws-sdk-go/aws/awserr" ) // EnvProviderName provides a name of Env provider const EnvProviderName = "EnvProvider" var ( // ErrAccessKeyIDNotFound is returned when the AWS Access Key ID can't be // found in the process's environment. 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. ErrSecretAccessKeyNotFound = awserr.New("EnvSecretNotFound", "AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment", nil) ) // A EnvProvider retrieves credentials from the environment variables of the // running process. Environment credentials never expire. // // Environment variables used: // // * Access Key ID: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY // // * Secret Access Key: AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY type EnvProvider struct { retrieved bool } // NewEnvCredentials returns a pointer to a new Credentials object // wrapping the environment variable provider. func NewEnvCredentials() *Credentials { return NewCredentials(&EnvProvider{}) } // Retrieve retrieves the keys from the environment. func (e *EnvProvider) Retrieve() (Value, error) { e.retrieved = false id := os.Getenv("AWS_ACCESS_KEY_ID") if id == "" { id = os.Getenv("AWS_ACCESS_KEY") } secret := os.Getenv("AWS_SECRET_ACCESS_KEY") if secret == "" { secret = os.Getenv("AWS_SECRET_KEY") } if id == "" { return Value{ProviderName: EnvProviderName}, ErrAccessKeyIDNotFound } if secret == "" { return Value{ProviderName: EnvProviderName}, ErrSecretAccessKeyNotFound } e.retrieved = true return Value{ AccessKeyID: id, SecretAccessKey: secret, SessionToken: os.Getenv("AWS_SESSION_TOKEN"), ProviderName: EnvProviderName, }, nil } // IsExpired returns if the credentials have been retrieved. func (e *EnvProvider) IsExpired() bool { return !e.retrieved } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini ================================================ [default] aws_access_key_id = accessKey aws_secret_access_key = secret aws_session_token = token [no_token] aws_access_key_id = accessKey aws_secret_access_key = secret [with_colon] aws_access_key_id: accessKey aws_secret_access_key: secret ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go ================================================ /* 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" "github.com/aws/aws-sdk-go/internal/sdkio" ) 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 = int(8 * sdkio.KibiByte) // 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) } // A CredentialProcessResponse is the AWS credentials format that must be // returned when executing an external credential_process. type CredentialProcessResponse struct { // As of this writing, the Version key must be set to 1. This might // increment over time as the structure evolves. Version int // The access key ID that identifies the temporary security credentials. AccessKeyID string `json:"AccessKeyId"` // The secret access key that can be used to sign requests. SecretAccessKey string // The token that users must pass to the service API to use the temporary credentials. SessionToken string // The date on which the current credentials expire. 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go ================================================ package credentials import ( "fmt" "os" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/internal/ini" "github.com/aws/aws-sdk-go/internal/shareddefaults" ) // SharedCredsProviderName provides a name of SharedCreds provider const SharedCredsProviderName = "SharedCredentialsProvider" var ( // ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found. ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil) ) // A SharedCredentialsProvider retrieves access key pair (access key ID, // secret access key, and session token if present) credentials from the current // user's home directory, and keeps track if those credentials are expired. // // Profile ini file example: $HOME/.aws/credentials type SharedCredentialsProvider struct { // Path to the shared credentials file. // // If empty will look for "AWS_SHARED_CREDENTIALS_FILE" env variable. If the // env value is empty will default to current user's home directory. // Linux/OSX: "$HOME/.aws/credentials" // Windows: "%USERPROFILE%\.aws\credentials" Filename string // AWS Profile to extract credentials from the shared credentials file. If empty // will default to environment variable "AWS_PROFILE" or "default" if // environment variable is also not set. Profile string // retrieved states if the credentials have been successfully retrieved. retrieved bool } // NewSharedCredentials returns a pointer to a new Credentials object // wrapping the Profile file provider. func NewSharedCredentials(filename, profile string) *Credentials { return NewCredentials(&SharedCredentialsProvider{ Filename: filename, Profile: profile, }) } // Retrieve reads and extracts the shared credentials from the current // users home directory. func (p *SharedCredentialsProvider) Retrieve() (Value, error) { p.retrieved = false filename, err := p.filename() if err != nil { return Value{ProviderName: SharedCredsProviderName}, err } creds, err := loadProfile(filename, p.profile()) if err != nil { return Value{ProviderName: SharedCredsProviderName}, err } p.retrieved = true return creds, nil } // IsExpired returns if the shared credentials have expired. func (p *SharedCredentialsProvider) IsExpired() bool { return !p.retrieved } // loadProfiles loads from the file pointed to by shared credentials filename for profile. // 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.OpenFile(filename) if err != nil { return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to load shared credentials file", err) } iniProfile, ok := config.GetSection(profile) if !ok { return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to get profile", 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), 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.String("aws_session_token") return Value{ AccessKeyID: id, SecretAccessKey: secret, SessionToken: token, ProviderName: SharedCredsProviderName, }, nil } // filename returns the filename to use to read AWS shared credentials. // // Will return an error if the user's home directory path cannot be found. func (p *SharedCredentialsProvider) filename() (string, error) { if len(p.Filename) != 0 { return p.Filename, nil } if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 { return p.Filename, nil } if home := shareddefaults.UserHomeDir(); len(home) == 0 { // Backwards compatibility of home directly not found error being returned. // This error is too verbose, failure when opening the file would of been // a better error to return. return "", ErrSharedCredentialsHomeNotFound } p.Filename = shareddefaults.SharedCredentialsFilename() return p.Filename, nil } // profile returns the AWS shared credentials profile. If empty will read // environment variable "AWS_PROFILE". If that is not set profile will // return "default". func (p *SharedCredentialsProvider) profile() string { if p.Profile == "" { p.Profile = os.Getenv("AWS_PROFILE") } if p.Profile == "" { p.Profile = "default" } return p.Profile } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go ================================================ // Package ssocreds provides a credential provider for retrieving temporary AWS credentials using an SSO access token. // // IMPORTANT: The provider in this package does not initiate or perform the AWS SSO login flow. The SDK provider // expects that you have already performed the SSO login flow using AWS CLI using the "aws sso login" command, or by // some other mechanism. The provider must find a valid non-expired access token for the AWS SSO user portal URL in // ~/.aws/sso/cache. If a cached token is not found, it is expired, or the file is malformed an error will be returned. // // Loading AWS SSO credentials with the AWS shared configuration file // // You can use configure AWS SSO credentials from the AWS shared configuration file by // providing the specifying the required keys in the profile: // // sso_account_id // sso_region // sso_role_name // sso_start_url // // For example, the following defines a profile "devsso" and specifies the AWS SSO parameters that defines the target // account, role, sign-on portal, and the region where the user portal is located. Note: all SSO arguments must be // provided, or an error will be returned. // // [profile devsso] // sso_start_url = https://my-sso-portal.awsapps.com/start // sso_role_name = SSOReadOnlyRole // sso_region = us-east-1 // sso_account_id = 123456789012 // // Using the config module, you can load the AWS SDK shared configuration, and specify that this profile be used to // retrieve credentials. For example: // // sess, err := session.NewSessionWithOptions(session.Options{ // SharedConfigState: session.SharedConfigEnable, // Profile: "devsso", // }) // if err != nil { // return err // } // // Programmatically loading AWS SSO credentials directly // // You can programmatically construct the AWS SSO Provider in your application, and provide the necessary information // to load and retrieve temporary credentials using an access token from ~/.aws/sso/cache. // // svc := sso.New(sess, &aws.Config{ // Region: aws.String("us-west-2"), // Client Region must correspond to the AWS SSO user portal region // }) // // provider := ssocreds.NewCredentialsWithClient(svc, "123456789012", "SSOReadOnlyRole", "https://my-sso-portal.awsapps.com/start") // // credentials, err := provider.Get() // if err != nil { // return err // } // // Additional Resources // // Configuring the AWS CLI to use AWS Single Sign-On: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html // // AWS Single Sign-On User Guide: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html package ssocreds ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go ================================================ //go:build !windows // +build !windows package ssocreds import "os" func getHomeDirectory() string { return os.Getenv("HOME") } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go ================================================ package ssocreds import "os" func getHomeDirectory() string { return os.Getenv("USERPROFILE") } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go ================================================ package ssocreds import ( "crypto/sha1" "encoding/hex" "encoding/json" "io/ioutil" "path/filepath" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/auth/bearer" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/service/sso" "github.com/aws/aws-sdk-go/service/sso/ssoiface" ) // ErrCodeSSOProviderInvalidToken is the code type that is returned if loaded token has expired or is otherwise invalid. // To refresh the SSO session run aws sso login with the corresponding profile. const ErrCodeSSOProviderInvalidToken = "SSOProviderInvalidToken" const invalidTokenMessage = "the SSO session has expired or is invalid" func init() { nowTime = time.Now defaultCacheLocation = defaultCacheLocationImpl } var nowTime func() time.Time // ProviderName is the name of the provider used to specify the source of credentials. const ProviderName = "SSOProvider" var defaultCacheLocation func() string func defaultCacheLocationImpl() string { return filepath.Join(getHomeDirectory(), ".aws", "sso", "cache") } // Provider is an AWS credential provider that retrieves temporary AWS credentials by exchanging an SSO login token. type Provider struct { credentials.Expiry // The Client which is configured for the AWS Region where the AWS SSO user portal is located. Client ssoiface.SSOAPI // The AWS account that is assigned to the user. AccountID string // The role name that is assigned to the user. RoleName string // The URL that points to the organization's AWS Single Sign-On (AWS SSO) user portal. StartURL string // The filepath the cached token will be retrieved from. If unset Provider will // use the startURL to determine the filepath at. // // ~/.aws/sso/cache/.json // // If custom cached token filepath is used, the Provider's startUrl // parameter will be ignored. CachedTokenFilepath string // Used by the SSOCredentialProvider if a token configuration // profile is used in the shared config TokenProvider bearer.TokenProvider } // NewCredentials returns a new AWS Single Sign-On (AWS SSO) credential provider. The ConfigProvider is expected to be configured // for the AWS Region where the AWS SSO user portal is located. func NewCredentials(configProvider client.ConfigProvider, accountID, roleName, startURL string, optFns ...func(provider *Provider)) *credentials.Credentials { return NewCredentialsWithClient(sso.New(configProvider), accountID, roleName, startURL, optFns...) } // NewCredentialsWithClient returns a new AWS Single Sign-On (AWS SSO) credential provider. The provided client is expected to be configured // for the AWS Region where the AWS SSO user portal is located. func NewCredentialsWithClient(client ssoiface.SSOAPI, accountID, roleName, startURL string, optFns ...func(provider *Provider)) *credentials.Credentials { p := &Provider{ Client: client, AccountID: accountID, RoleName: roleName, StartURL: startURL, } for _, fn := range optFns { fn(p) } return credentials.NewCredentials(p) } // Retrieve retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal // by exchanging the accessToken present in ~/.aws/sso/cache. func (p *Provider) Retrieve() (credentials.Value, error) { return p.RetrieveWithContext(aws.BackgroundContext()) } // RetrieveWithContext retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal // by exchanging the accessToken present in ~/.aws/sso/cache. func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { var accessToken *string if p.TokenProvider != nil { token, err := p.TokenProvider.RetrieveBearerToken(ctx) if err != nil { return credentials.Value{}, err } accessToken = &token.Value } else { if p.CachedTokenFilepath == "" { cachedTokenFilePath, err := getCachedFilePath(p.StartURL) if err != nil { return credentials.Value{}, err } p.CachedTokenFilepath = cachedTokenFilePath } tokenFile, err := loadTokenFile(p.CachedTokenFilepath) if err != nil { return credentials.Value{}, err } accessToken = &tokenFile.AccessToken } output, err := p.Client.GetRoleCredentialsWithContext(ctx, &sso.GetRoleCredentialsInput{ AccessToken: accessToken, AccountId: &p.AccountID, RoleName: &p.RoleName, }) if err != nil { return credentials.Value{}, err } expireTime := time.Unix(0, aws.Int64Value(output.RoleCredentials.Expiration)*int64(time.Millisecond)).UTC() p.SetExpiration(expireTime, 0) return credentials.Value{ AccessKeyID: aws.StringValue(output.RoleCredentials.AccessKeyId), SecretAccessKey: aws.StringValue(output.RoleCredentials.SecretAccessKey), SessionToken: aws.StringValue(output.RoleCredentials.SessionToken), ProviderName: ProviderName, }, nil } func getCachedFilePath(startUrl string) (string, error) { hash := sha1.New() _, err := hash.Write([]byte(startUrl)) if err != nil { return "", err } return filepath.Join(defaultCacheLocation(), strings.ToLower(hex.EncodeToString(hash.Sum(nil)))+".json"), nil } type token struct { AccessToken string `json:"accessToken"` ExpiresAt rfc3339 `json:"expiresAt"` Region string `json:"region,omitempty"` StartURL string `json:"startUrl,omitempty"` } func (t token) Expired() bool { return nowTime().Round(0).After(time.Time(t.ExpiresAt)) } func loadTokenFile(cachedTokenPath string) (t token, err error) { fileBytes, err := ioutil.ReadFile(cachedTokenPath) if err != nil { return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err) } if err := json.Unmarshal(fileBytes, &t); err != nil { return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err) } if len(t.AccessToken) == 0 { return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, nil) } if t.Expired() { return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, nil) } return t, nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/sso_cached_token.go ================================================ package ssocreds import ( "crypto/sha1" "encoding/hex" "encoding/json" "fmt" "github.com/aws/aws-sdk-go/internal/shareddefaults" "io/ioutil" "os" "path/filepath" "strconv" "strings" "time" ) var resolvedOsUserHomeDir = shareddefaults.UserHomeDir // StandardCachedTokenFilepath returns the filepath for the cached SSO token file, or // error if unable get derive the path. Key that will be used to compute a SHA1 // value that is hex encoded. // // Derives the filepath using the Key as: // // ~/.aws/sso/cache/.json func StandardCachedTokenFilepath(key string) (string, error) { homeDir := resolvedOsUserHomeDir() if len(homeDir) == 0 { return "", fmt.Errorf("unable to get USER's home directory for cached token") } hash := sha1.New() if _, err := hash.Write([]byte(key)); err != nil { return "", fmt.Errorf("unable to compute cached token filepath key SHA1 hash, %v", err) } cacheFilename := strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json" return filepath.Join(homeDir, ".aws", "sso", "cache", cacheFilename), nil } type tokenKnownFields struct { AccessToken string `json:"accessToken,omitempty"` ExpiresAt *rfc3339 `json:"expiresAt,omitempty"` RefreshToken string `json:"refreshToken,omitempty"` ClientID string `json:"clientId,omitempty"` ClientSecret string `json:"clientSecret,omitempty"` } type cachedToken struct { tokenKnownFields UnknownFields map[string]interface{} `json:"-"` } // MarshalJSON provides custom marshalling because the standard library Go marshaller ignores unknown/unspecified fields // when marshalling from a struct: https://pkg.go.dev/encoding/json#Marshal // This function adds some extra validation to the known fields and captures unknown fields. func (t cachedToken) MarshalJSON() ([]byte, error) { fields := map[string]interface{}{} setTokenFieldString(fields, "accessToken", t.AccessToken) setTokenFieldRFC3339(fields, "expiresAt", t.ExpiresAt) setTokenFieldString(fields, "refreshToken", t.RefreshToken) setTokenFieldString(fields, "clientId", t.ClientID) setTokenFieldString(fields, "clientSecret", t.ClientSecret) for k, v := range t.UnknownFields { if _, ok := fields[k]; ok { return nil, fmt.Errorf("unknown token field %v, duplicates known field", k) } fields[k] = v } return json.Marshal(fields) } func setTokenFieldString(fields map[string]interface{}, key, value string) { if value == "" { return } fields[key] = value } func setTokenFieldRFC3339(fields map[string]interface{}, key string, value *rfc3339) { if value == nil { return } fields[key] = value } // UnmarshalJSON provides custom unmarshalling because the standard library Go unmarshaller ignores unknown/unspecified // fields when unmarshalling from a struct: https://pkg.go.dev/encoding/json#Unmarshal // This function adds some extra validation to the known fields and captures unknown fields. func (t *cachedToken) UnmarshalJSON(b []byte) error { var fields map[string]interface{} if err := json.Unmarshal(b, &fields); err != nil { return nil } t.UnknownFields = map[string]interface{}{} for k, v := range fields { var err error switch k { case "accessToken": err = getTokenFieldString(v, &t.AccessToken) case "expiresAt": err = getTokenFieldRFC3339(v, &t.ExpiresAt) case "refreshToken": err = getTokenFieldString(v, &t.RefreshToken) case "clientId": err = getTokenFieldString(v, &t.ClientID) case "clientSecret": err = getTokenFieldString(v, &t.ClientSecret) default: t.UnknownFields[k] = v } if err != nil { return fmt.Errorf("field %q, %v", k, err) } } return nil } func getTokenFieldString(v interface{}, value *string) error { var ok bool *value, ok = v.(string) if !ok { return fmt.Errorf("expect value to be string, got %T", v) } return nil } func getTokenFieldRFC3339(v interface{}, value **rfc3339) error { var stringValue string if err := getTokenFieldString(v, &stringValue); err != nil { return err } timeValue, err := parseRFC3339(stringValue) if err != nil { return err } *value = &timeValue return nil } func loadCachedToken(filename string) (cachedToken, error) { fileBytes, err := ioutil.ReadFile(filename) if err != nil { return cachedToken{}, fmt.Errorf("failed to read cached SSO token file, %v", err) } var t cachedToken if err := json.Unmarshal(fileBytes, &t); err != nil { return cachedToken{}, fmt.Errorf("failed to parse cached SSO token file, %v", err) } if len(t.AccessToken) == 0 || t.ExpiresAt == nil || time.Time(*t.ExpiresAt).IsZero() { return cachedToken{}, fmt.Errorf( "cached SSO token must contain accessToken and expiresAt fields") } return t, nil } func storeCachedToken(filename string, t cachedToken, fileMode os.FileMode) (err error) { tmpFilename := filename + ".tmp-" + strconv.FormatInt(nowTime().UnixNano(), 10) if err := writeCacheFile(tmpFilename, fileMode, t); err != nil { return err } if err := os.Rename(tmpFilename, filename); err != nil { return fmt.Errorf("failed to replace old cached SSO token file, %v", err) } return nil } func writeCacheFile(filename string, fileMode os.FileMode, t cachedToken) (err error) { var f *os.File f, err = os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_RDWR, fileMode) if err != nil { return fmt.Errorf("failed to create cached SSO token file %v", err) } defer func() { closeErr := f.Close() if err == nil && closeErr != nil { err = fmt.Errorf("failed to close cached SSO token file, %v", closeErr) } }() encoder := json.NewEncoder(f) if err = encoder.Encode(t); err != nil { return fmt.Errorf("failed to serialize cached SSO token, %v", err) } return nil } type rfc3339 time.Time // UnmarshalJSON decode rfc3339 from JSON format func (r *rfc3339) UnmarshalJSON(bytes []byte) error { var value string var err error if err = json.Unmarshal(bytes, &value); err != nil { return err } *r, err = parseRFC3339(value) return err } func parseRFC3339(v string) (rfc3339, error) { parsed, err := time.Parse(time.RFC3339, v) if err != nil { return rfc3339{}, fmt.Errorf("expected RFC3339 timestamp: %v", err) } return rfc3339(parsed), nil } // MarshalJSON encode rfc3339 to JSON format time func (r *rfc3339) MarshalJSON() ([]byte, error) { value := time.Time(*r).Format(time.RFC3339) // Use JSON unmarshal to unescape the quoted value making use of JSON's // quoting rules. return json.Marshal(value) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/token_provider.go ================================================ package ssocreds import ( "fmt" "os" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/auth/bearer" "github.com/aws/aws-sdk-go/service/ssooidc" ) // CreateTokenAPIClient provides the interface for the SSOTokenProvider's API // client for calling CreateToken operation to refresh the SSO token. type CreateTokenAPIClient interface { CreateToken(input *ssooidc.CreateTokenInput) (*ssooidc.CreateTokenOutput, error) } // SSOTokenProviderOptions provides the options for configuring the // SSOTokenProvider. type SSOTokenProviderOptions struct { // Client that can be overridden Client CreateTokenAPIClient // The path the file containing the cached SSO token will be read from. // Initialized the NewSSOTokenProvider's cachedTokenFilepath parameter. CachedTokenFilepath string } // SSOTokenProvider provides a utility for refreshing SSO AccessTokens for // Bearer Authentication. The SSOTokenProvider can only be used to refresh // already cached SSO Tokens. This utility cannot perform the initial SSO // create token. // // The initial SSO create token should be preformed with the AWS CLI before the // Go application using the SSOTokenProvider will need to retrieve the SSO // token. If the AWS CLI has not created the token cache file, this provider // will return an error when attempting to retrieve the cached token. // // This provider will attempt to refresh the cached SSO token periodically if // needed when RetrieveBearerToken is called. // // A utility such as the AWS CLI must be used to initially create the SSO // session and cached token file. // https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html type SSOTokenProvider struct { options SSOTokenProviderOptions } // NewSSOTokenProvider returns an initialized SSOTokenProvider that will // periodically refresh the SSO token cached stored in the cachedTokenFilepath. // The cachedTokenFilepath file's content will be rewritten by the token // provider when the token is refreshed. // // The client must be configured for the AWS region the SSO token was created for. func NewSSOTokenProvider(client CreateTokenAPIClient, cachedTokenFilepath string, optFns ...func(o *SSOTokenProviderOptions)) *SSOTokenProvider { options := SSOTokenProviderOptions{ Client: client, CachedTokenFilepath: cachedTokenFilepath, } for _, fn := range optFns { fn(&options) } provider := &SSOTokenProvider{ options: options, } return provider } // RetrieveBearerToken returns the SSO token stored in the cachedTokenFilepath // the SSOTokenProvider was created with. If the token has expired // RetrieveBearerToken will attempt to refresh it. If the token cannot be // refreshed or is not present an error will be returned. // // A utility such as the AWS CLI must be used to initially create the SSO // session and cached token file. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html func (p *SSOTokenProvider) RetrieveBearerToken(ctx aws.Context) (bearer.Token, error) { cachedToken, err := loadCachedToken(p.options.CachedTokenFilepath) if err != nil { return bearer.Token{}, err } if cachedToken.ExpiresAt != nil && nowTime().After(time.Time(*cachedToken.ExpiresAt)) { cachedToken, err = p.refreshToken(cachedToken) if err != nil { return bearer.Token{}, fmt.Errorf("refresh cached SSO token failed, %v", err) } } expiresAt := toTime((*time.Time)(cachedToken.ExpiresAt)) return bearer.Token{ Value: cachedToken.AccessToken, CanExpire: !expiresAt.IsZero(), Expires: expiresAt, }, nil } func (p *SSOTokenProvider) refreshToken(token cachedToken) (cachedToken, error) { if token.ClientSecret == "" || token.ClientID == "" || token.RefreshToken == "" { return cachedToken{}, fmt.Errorf("cached SSO token is expired, or not present, and cannot be refreshed") } createResult, err := p.options.Client.CreateToken(&ssooidc.CreateTokenInput{ ClientId: &token.ClientID, ClientSecret: &token.ClientSecret, RefreshToken: &token.RefreshToken, GrantType: aws.String("refresh_token"), }) if err != nil { return cachedToken{}, fmt.Errorf("unable to refresh SSO token, %v", err) } if createResult.ExpiresIn == nil { return cachedToken{}, fmt.Errorf("missing required field ExpiresIn") } if createResult.AccessToken == nil { return cachedToken{}, fmt.Errorf("missing required field AccessToken") } if createResult.RefreshToken == nil { return cachedToken{}, fmt.Errorf("missing required field RefreshToken") } expiresAt := nowTime().Add(time.Duration(*createResult.ExpiresIn) * time.Second) token.AccessToken = *createResult.AccessToken token.ExpiresAt = (*rfc3339)(&expiresAt) token.RefreshToken = *createResult.RefreshToken fileInfo, err := os.Stat(p.options.CachedTokenFilepath) if err != nil { return cachedToken{}, fmt.Errorf("failed to stat cached SSO token file %v", err) } if err = storeCachedToken(p.options.CachedTokenFilepath, token, fileInfo.Mode()); err != nil { return cachedToken{}, fmt.Errorf("unable to cache refreshed SSO token, %v", err) } return token, nil } func toTime(p *time.Time) (v time.Time) { if p == nil { return v } return *p } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go ================================================ package credentials import ( "github.com/aws/aws-sdk-go/aws/awserr" ) // StaticProviderName provides a name of Static provider const StaticProviderName = "StaticProvider" var ( // ErrStaticCredentialsEmpty is emitted when static credentials are empty. ErrStaticCredentialsEmpty = awserr.New("EmptyStaticCreds", "static credentials are empty", nil) ) // A StaticProvider is a set of credentials which are set programmatically, // and will never expire. type StaticProvider struct { Value } // NewStaticCredentials returns a pointer to a new Credentials object // wrapping a static credentials value provider. Token is only required // for temporary security credentials retrieved via STS, otherwise an empty // string can be passed for this parameter. func NewStaticCredentials(id, secret, token string) *Credentials { return NewCredentials(&StaticProvider{Value: Value{ AccessKeyID: id, SecretAccessKey: secret, SessionToken: token, }}) } // NewStaticCredentialsFromCreds returns a pointer to a new Credentials object // wrapping the static credentials value provide. Same as NewStaticCredentials // but takes the creds Value instead of individual fields func NewStaticCredentialsFromCreds(creds Value) *Credentials { return NewCredentials(&StaticProvider{Value: creds}) } // Retrieve returns the credentials or error if the credentials are invalid. func (s *StaticProvider) Retrieve() (Value, error) { if s.AccessKeyID == "" || s.SecretAccessKey == "" { return Value{ProviderName: StaticProviderName}, ErrStaticCredentialsEmpty } if len(s.Value.ProviderName) == 0 { s.Value.ProviderName = StaticProviderName } return s.Value, nil } // IsExpired returns if the credentials are expired. // // For StaticProvider, the credentials never expired. func (s *StaticProvider) IsExpired() bool { return false } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go ================================================ /* Package stscreds are credential Providers to retrieve STS AWS credentials. STS provides multiple ways to retrieve credentials which can be used when making future AWS service API operation calls. The SDK will ensure that per instance of credentials.Credentials all requests to refresh the credentials will be synchronized. But, the SDK is unable to ensure synchronous usage of the AssumeRoleProvider if the value is shared between multiple Credentials, Sessions or service clients. # Assume Role To assume an IAM role using STS with the SDK you can create a new Credentials with the SDKs's stscreds package. // Initial credentials loaded from SDK's default credential chain. Such as // the environment, shared credentials (~/.aws/credentials), or EC2 Instance // Role. These credentials will be used to to make the STS Assume Role API. sess := session.Must(session.NewSession()) // Create the credentials from AssumeRoleProvider to assume the role // referenced by the "myRoleARN" ARN. creds := stscreds.NewCredentials(sess, "myRoleArn") // Create service client value configured for credentials // from assumed role. svc := s3.New(sess, &aws.Config{Credentials: creds}) # Assume Role with static MFA Token To assume an IAM role with a MFA token you can either specify a MFA token code directly or provide a function to prompt the user each time the credentials need to refresh the role's credentials. Specifying the TokenCode should be used for short lived operations that will not need to be refreshed, and when you do not want to have direct control over the user provides their MFA token. With TokenCode the AssumeRoleProvider will be not be able to refresh the role's credentials. // Create the credentials from AssumeRoleProvider to assume the role // referenced by the "myRoleARN" ARN using the MFA token code provided. creds := stscreds.NewCredentials(sess, "myRoleArn", func(p *stscreds.AssumeRoleProvider) { p.SerialNumber = aws.String("myTokenSerialNumber") p.TokenCode = aws.String("00000000") }) // Create service client value configured for credentials // from assumed role. svc := s3.New(sess, &aws.Config{Credentials: creds}) # Assume Role with MFA Token Provider To assume an IAM role with MFA for longer running tasks where the credentials may need to be refreshed setting the TokenProvider field of AssumeRoleProvider will allow the credential provider to prompt for new MFA token code when the role's credentials need to be refreshed. The StdinTokenProvider function is available to prompt on stdin to retrieve the MFA token code from the user. You can also implement custom prompts by satisfing the TokenProvider function signature. Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will have undesirable results as the StdinTokenProvider will not be synchronized. A single Credentials with an AssumeRoleProvider can be shared safely. // Create the credentials from AssumeRoleProvider to assume the role // referenced by the "myRoleARN" ARN. Prompting for MFA token from stdin. creds := stscreds.NewCredentials(sess, "myRoleArn", func(p *stscreds.AssumeRoleProvider) { p.SerialNumber = aws.String("myTokenSerialNumber") p.TokenProvider = stscreds.StdinTokenProvider }) // Create service client value configured for credentials // from assumed role. svc := s3.New(sess, &aws.Config{Credentials: creds}) */ package stscreds import ( "fmt" "os" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/sdkrand" "github.com/aws/aws-sdk-go/service/sts" ) // StdinTokenProvider will prompt on stderr and read from stdin for a string value. // An error is returned if reading from stdin fails. // // Use this function to read MFA tokens from stdin. The function makes no attempt // to make atomic prompts from stdin across multiple gorouties. // // Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will // have undesirable results as the StdinTokenProvider will not be synchronized. A // single Credentials with an AssumeRoleProvider can be shared safely // // Will wait forever until something is provided on the stdin. func StdinTokenProvider() (string, error) { var v string fmt.Fprintf(os.Stderr, "Assume Role MFA token code: ") _, err := fmt.Scanln(&v) return v, err } // ProviderName provides a name of AssumeRole provider const ProviderName = "AssumeRoleProvider" // AssumeRoler represents the minimal subset of the STS client API used by this provider. type AssumeRoler interface { AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) } type assumeRolerWithContext interface { AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error) } // DefaultDuration is the default amount of time in minutes that the credentials // will be valid for. var DefaultDuration = time.Duration(15) * time.Minute // AssumeRoleProvider retrieves temporary credentials from the STS service, and // keeps track of their expiration time. // // This credential provider will be used by the SDKs default credential change // when shared configuration is enabled, and the shared config or shared credentials // file configure assume role. See Session docs for how to do this. // // AssumeRoleProvider does not provide any synchronization and it is not safe // to share this value across multiple Credentials, Sessions, or service clients // without also sharing the same Credentials instance. type AssumeRoleProvider struct { credentials.Expiry // STS client to make assume role request with. Client AssumeRoler // Role to be assumed. RoleARN string // Session name, if you wish to reuse the credentials elsewhere. RoleSessionName string // Optional, you can pass tag key-value pairs to your session. These tags are called session tags. Tags []*sts.Tag // A list of keys for session tags that you want to set as transitive. // If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. TransitiveTagKeys []*string // Expiry duration of the STS credentials. Defaults to 15 minutes if not set. Duration time.Duration // Optional ExternalID to pass along, defaults to nil if not set. ExternalID *string // The policy plain text must be 2048 bytes or shorter. However, an internal // conversion compresses it into a packed binary format with a separate limit. // The PackedPolicySize response element indicates by percentage how close to // the upper size limit the policy is, with 100% equaling the maximum allowed // size. Policy *string // The ARNs of IAM managed policies you want to use as managed session policies. // The policies must exist in the same account as the role. // // This parameter is optional. You can provide up to 10 managed policy ARNs. // However, the plain text that you use for both inline and managed session // policies can't exceed 2,048 characters. // // An AWS conversion compresses the passed session policies and session tags // into a packed binary format that has a separate limit. Your request can fail // for this limit even if your plain text meets the other requirements. The // PackedPolicySize response element indicates by percentage how close the policies // and tags for your request are to the upper size limit. // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials // in subsequent AWS API calls to access resources in the account that owns // the role. You cannot use session policies to grant more permissions than // those allowed by the identity-based policy of the role that is being assumed. // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []*sts.PolicyDescriptorType // The identification number of the MFA device that is associated with the user // who is making the AssumeRole call. Specify this value if the trust policy // of the role being assumed includes a condition that requires MFA authentication. // The value is either the serial number for a hardware device (such as GAHT12345678) // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). SerialNumber *string // The SourceIdentity which is used to identity a persistent identity through the whole session. // For more details see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html SourceIdentity *string // The value provided by the MFA device, if the trust policy of the role being // assumed requires MFA (that is, if the policy includes a condition that tests // for MFA). If the role being assumed requires MFA and if the TokenCode value // is missing or expired, the AssumeRole call returns an "access denied" error. // // If SerialNumber is set and neither TokenCode nor TokenProvider are also // set an error will be returned. TokenCode *string // Async method of providing MFA token code for assuming an IAM role with MFA. // The value returned by the function will be used as the TokenCode in the Retrieve // call. See StdinTokenProvider for a provider that prompts and reads from stdin. // // This token provider will be called when ever the assumed role's // credentials need to be refreshed when SerialNumber is also set and // TokenCode is not set. // // If both TokenCode and TokenProvider is set, TokenProvider will be used and // TokenCode is ignored. TokenProvider func() (string, error) // 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 // MaxJitterFrac reduces the effective Duration of each credential requested // by a random percentage between 0 and MaxJitterFraction. MaxJitterFrac must // have a value between 0 and 1. Any other value may lead to expected behavior. // With a MaxJitterFrac value of 0, default) will no jitter will be used. // // For example, with a Duration of 30m and a MaxJitterFrac of 0.1, the // AssumeRole call will be made with an arbitrary Duration between 27m and // 30m. // // MaxJitterFrac should not be negative. MaxJitterFrac float64 } // NewCredentials returns a pointer to a new Credentials value wrapping the // AssumeRoleProvider. The credentials will expire every 15 minutes and the // role will be named after a nanosecond timestamp of this operation. The // Credentials value will attempt to refresh the credentials using the provider // when Credentials.Get is called, if the cached credentials are expiring. // // Takes a Config provider to create the STS client. The ConfigProvider is // satisfied by the session.Session type. // // It is safe to share the returned Credentials with multiple Sessions and // service clients. All access to the credentials and refreshing them // will be synchronized. func NewCredentials(c client.ConfigProvider, roleARN string, options ...func(*AssumeRoleProvider)) *credentials.Credentials { p := &AssumeRoleProvider{ Client: sts.New(c), RoleARN: roleARN, Duration: DefaultDuration, } for _, option := range options { option(p) } return credentials.NewCredentials(p) } // NewCredentialsWithClient returns a pointer to a new Credentials value wrapping the // AssumeRoleProvider. The credentials will expire every 15 minutes and the // role will be named after a nanosecond timestamp of this operation. The // Credentials value will attempt to refresh the credentials using the provider // when Credentials.Get is called, if the cached credentials are expiring. // // Takes an AssumeRoler which can be satisfied by the STS client. // // It is safe to share the returned Credentials with multiple Sessions and // service clients. All access to the credentials and refreshing them // will be synchronized. func NewCredentialsWithClient(svc AssumeRoler, roleARN string, options ...func(*AssumeRoleProvider)) *credentials.Credentials { p := &AssumeRoleProvider{ Client: svc, RoleARN: roleARN, Duration: DefaultDuration, } for _, option := range options { option(p) } return credentials.NewCredentials(p) } // Retrieve generates a new set of temporary credentials using STS. func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) { return p.RetrieveWithContext(aws.BackgroundContext()) } // RetrieveWithContext generates a new set of temporary credentials using STS. func (p *AssumeRoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { // Apply defaults where parameters are not set. if p.RoleSessionName == "" { // Try to work out a role name that will hopefully end up unique. p.RoleSessionName = fmt.Sprintf("%d", time.Now().UTC().UnixNano()) } if p.Duration == 0 { // Expire as often as AWS permits. p.Duration = DefaultDuration } jitter := time.Duration(sdkrand.SeededRand.Float64() * p.MaxJitterFrac * float64(p.Duration)) input := &sts.AssumeRoleInput{ DurationSeconds: aws.Int64(int64((p.Duration - jitter) / time.Second)), RoleArn: aws.String(p.RoleARN), RoleSessionName: aws.String(p.RoleSessionName), ExternalId: p.ExternalID, Tags: p.Tags, PolicyArns: p.PolicyArns, TransitiveTagKeys: p.TransitiveTagKeys, SourceIdentity: p.SourceIdentity, } if p.Policy != nil { input.Policy = p.Policy } if p.SerialNumber != nil { if p.TokenCode != nil { input.SerialNumber = p.SerialNumber input.TokenCode = p.TokenCode } else if p.TokenProvider != nil { input.SerialNumber = p.SerialNumber code, err := p.TokenProvider() if err != nil { return credentials.Value{ProviderName: ProviderName}, err } input.TokenCode = aws.String(code) } else { return credentials.Value{ProviderName: ProviderName}, awserr.New("AssumeRoleTokenNotAvailable", "assume role with MFA enabled, but neither TokenCode nor TokenProvider are set", nil) } } var roleOutput *sts.AssumeRoleOutput var err error if c, ok := p.Client.(assumeRolerWithContext); ok { roleOutput, err = c.AssumeRoleWithContext(ctx, input) } else { roleOutput, err = p.Client.AssumeRole(input) } if err != nil { return credentials.Value{ProviderName: ProviderName}, err } // We will proactively generate new credentials before they expire. p.SetExpiration(*roleOutput.Credentials.Expiration, p.ExpiryWindow) return credentials.Value{ AccessKeyID: *roleOutput.Credentials.AccessKeyId, SecretAccessKey: *roleOutput.Credentials.SecretAccessKey, SessionToken: *roleOutput.Credentials.SessionToken, ProviderName: ProviderName, }, nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go ================================================ package stscreds import ( "fmt" "io/ioutil" "strconv" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/service/sts" "github.com/aws/aws-sdk-go/service/sts/stsiface" ) const ( // ErrCodeWebIdentity will be used as an error code when constructing // a new error to be returned during session creation or retrieval. ErrCodeWebIdentity = "WebIdentityErr" // WebIdentityProviderName is the web identity provider name WebIdentityProviderName = "WebIdentityCredentials" ) // now is used to return a time.Time object representing // the current time. This can be used to easily test and // compare test values. var now = time.Now // TokenFetcher should return WebIdentity token bytes or an error type TokenFetcher interface { FetchToken(credentials.Context) ([]byte, error) } // FetchTokenPath is a path to a WebIdentity token file type FetchTokenPath string // FetchToken returns a token by reading from the filesystem func (f FetchTokenPath) FetchToken(ctx credentials.Context) ([]byte, error) { data, err := ioutil.ReadFile(string(f)) if err != nil { errMsg := fmt.Sprintf("unable to read file at %s", f) return nil, awserr.New(ErrCodeWebIdentity, errMsg, err) } return data, nil } // WebIdentityRoleProvider is used to retrieve credentials using // an OIDC token. type WebIdentityRoleProvider struct { credentials.Expiry // The policy ARNs to use with the web identity assumed role. PolicyArns []*sts.PolicyDescriptorType // Duration the STS credentials will be valid for. Truncated to seconds. // If unset, the assumed role will use AssumeRoleWithWebIdentity's default // expiry duration. See // https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#STS.AssumeRoleWithWebIdentity // for more information. Duration time.Duration // The amount of time the credentials will be refreshed before they expire. // This is useful refresh credentials before they expire to reduce risk of // using credentials as they expire. If unset, will default to no expiry // window. ExpiryWindow time.Duration client stsiface.STSAPI tokenFetcher TokenFetcher roleARN string roleSessionName string } // NewWebIdentityCredentials will return a new set of credentials with a given // configuration, role arn, and token file path. // // Deprecated: Use NewWebIdentityRoleProviderWithOptions for flexible // functional options, and wrap with credentials.NewCredentials helper. func NewWebIdentityCredentials(c client.ConfigProvider, roleARN, roleSessionName, path string) *credentials.Credentials { svc := sts.New(c) p := NewWebIdentityRoleProvider(svc, roleARN, roleSessionName, path) return credentials.NewCredentials(p) } // NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the // provided stsiface.STSAPI // // Deprecated: Use NewWebIdentityRoleProviderWithOptions for flexible // functional options. func NewWebIdentityRoleProvider(svc stsiface.STSAPI, roleARN, roleSessionName, path string) *WebIdentityRoleProvider { return NewWebIdentityRoleProviderWithOptions(svc, roleARN, roleSessionName, FetchTokenPath(path)) } // NewWebIdentityRoleProviderWithToken will return a new WebIdentityRoleProvider with the // provided stsiface.STSAPI and a TokenFetcher // // Deprecated: Use NewWebIdentityRoleProviderWithOptions for flexible // functional options. func NewWebIdentityRoleProviderWithToken(svc stsiface.STSAPI, roleARN, roleSessionName string, tokenFetcher TokenFetcher) *WebIdentityRoleProvider { return NewWebIdentityRoleProviderWithOptions(svc, roleARN, roleSessionName, tokenFetcher) } // NewWebIdentityRoleProviderWithOptions will return an initialize // WebIdentityRoleProvider with the provided stsiface.STSAPI, role ARN, and a // TokenFetcher. Additional options can be provided as functional options. // // TokenFetcher is the implementation that will retrieve the JWT token from to // assume the role with. Use the provided FetchTokenPath implementation to // retrieve the JWT token using a file system path. func NewWebIdentityRoleProviderWithOptions(svc stsiface.STSAPI, roleARN, roleSessionName string, tokenFetcher TokenFetcher, optFns ...func(*WebIdentityRoleProvider)) *WebIdentityRoleProvider { p := WebIdentityRoleProvider{ client: svc, tokenFetcher: tokenFetcher, roleARN: roleARN, roleSessionName: roleSessionName, } for _, fn := range optFns { fn(&p) } return &p } // Retrieve will attempt to assume a role from a token which is located at // 'WebIdentityTokenFilePath' specified destination and if that is empty an // error will be returned. func (p *WebIdentityRoleProvider) Retrieve() (credentials.Value, error) { return p.RetrieveWithContext(aws.BackgroundContext()) } // RetrieveWithContext will attempt to assume a role from a token which is // located at 'WebIdentityTokenFilePath' specified destination and if that is // empty an error will be returned. func (p *WebIdentityRoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { b, err := p.tokenFetcher.FetchToken(ctx) if err != nil { return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed fetching WebIdentity token: ", err) } sessionName := p.roleSessionName if len(sessionName) == 0 { // session name is used to uniquely identify a session. This simply // uses unix time in nanoseconds to uniquely identify sessions. sessionName = strconv.FormatInt(now().UnixNano(), 10) } var duration *int64 if p.Duration != 0 { duration = aws.Int64(int64(p.Duration / time.Second)) } req, resp := p.client.AssumeRoleWithWebIdentityRequest(&sts.AssumeRoleWithWebIdentityInput{ PolicyArns: p.PolicyArns, RoleArn: &p.roleARN, RoleSessionName: &sessionName, WebIdentityToken: aws.String(string(b)), DurationSeconds: duration, }) req.SetContext(ctx) // InvalidIdentityToken error is a temporary error that can occur // when assuming an Role with a JWT web identity token. req.RetryErrorCodes = append(req.RetryErrorCodes, sts.ErrCodeInvalidIdentityTokenException) if err := req.Send(); err != nil { return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed to retrieve credentials", err) } p.SetExpiration(aws.TimeValue(resp.Credentials.Expiration), p.ExpiryWindow) value := credentials.Value{ AccessKeyID: aws.StringValue(resp.Credentials.AccessKeyId), SecretAccessKey: aws.StringValue(resp.Credentials.SecretAccessKey), SessionToken: aws.StringValue(resp.Credentials.SessionToken), ProviderName: WebIdentityProviderName, } return value, nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/crr/cache.go ================================================ 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 } ev := endpoint.(Endpoint) ev.Prune() c.endpoints.Store(endpointKey, ev) 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/crr/endpoint.go ================================================ 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 } we.URL = cloneURL(we.URL) return we, true } return WeightedAddress{}, false } // Prune will prune the expired addresses from the endpoint by allocating a new []WeightAddress. // This is not concurrent safe, and should be called from a single owning thread. func (e *Endpoint) Prune() bool { validLen := e.Len() if validLen == len(e.Addresses) { return false } wa := make([]WeightedAddress, 0, validLen) for i := range e.Addresses { if e.Addresses[i].HasExpired() { continue } wa = append(wa, e.Addresses[i]) } e.Addresses = wa return true } // 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, ".") } func cloneURL(u *url.URL) (clone *url.URL) { clone = &url.URL{} *clone = *u if u.User != nil { user := *u.User clone.User = &user } return clone } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/crr/sync_map.go ================================================ //go:build go1.9 // +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) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/crr/sync_map_1_8.go ================================================ //go:build !go1.9 // +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 } } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go ================================================ // Package csm provides the Client Side Monitoring (CSM) client which enables // sending metrics via UDP connection to the CSM agent. This package provides // control options, and configuration for the CSM client. The client can be // controlled manually, or automatically via the SDK's Session configuration. // // Enabling CSM client via SDK's Session configuration // // The CSM client can be enabled automatically via SDK's Session configuration. // The SDK's session configuration enables the CSM client if the AWS_CSM_PORT // environment variable is set to a non-empty value. // // The configuration options for the CSM client via the SDK's session // configuration are: // // * AWS_CSM_PORT= // The port number the CSM agent will receive metrics on. // // * AWS_CSM_HOST= // The hostname, or IP address the CSM agent will receive metrics on. // Without port number. // // Manually enabling the CSM client // // The CSM client can be started, paused, and resumed manually. The Start // function will enable the CSM client to publish metrics to the CSM agent. It // is safe to call Start concurrently, but if Start is called additional times // with different ClientID or address it will panic. // // r, err := csm.Start("clientID", ":31000") // if err != nil { // panic(fmt.Errorf("failed starting CSM: %v", err)) // } // // When controlling the CSM client manually, you must also inject its request // handlers into the SDK's Session configuration for the SDK's API clients to // publish metrics. // // sess, err := session.NewSession(&aws.Config{}) // if err != nil { // panic(fmt.Errorf("failed loading session: %v", err)) // } // // // Add CSM client's metric publishing request handlers to the SDK's // // Session Configuration. // r.InjectHandlers(&sess.Handlers) // // Controlling CSM client // // Once the CSM client has been enabled the Get function will return a Reporter // value that you can use to pause and resume the metrics published to the CSM // agent. If Get function is called before the reporter is enabled with the // Start function or via SDK's Session configuration nil will be returned. // // The Pause method can be called to stop the CSM client publishing metrics to // the CSM agent. The Continue method will resume metric publishing. // // // Get the CSM client Reporter. // r := csm.Get() // // // Will pause monitoring // r.Pause() // resp, err = client.GetObject(&s3.GetObjectInput{ // Bucket: aws.String("bucket"), // Key: aws.String("key"), // }) // // // Resume monitoring // r.Continue() package csm ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go ================================================ package csm import ( "fmt" "strings" "sync" ) var ( lock sync.Mutex ) const ( // DefaultPort is used when no port is specified. DefaultPort = "31000" // DefaultHost is the host that will be used when none is specified. DefaultHost = "127.0.0.1" ) // AddressWithDefaults returns a CSM address built from the host and port // values. If the host or port is not set, default values will be used // instead. If host is "localhost" it will be replaced with "127.0.0.1". func AddressWithDefaults(host, port string) string { if len(host) == 0 || strings.EqualFold(host, "localhost") { host = DefaultHost } if len(port) == 0 { port = DefaultPort } // Only IP6 host can contain a colon if strings.Contains(host, ":") { return "[" + host + "]:" + port } return host + ":" + port } // Start will start a long running go routine to capture // client side metrics. Calling start multiple time will only // start the metric listener once and will panic if a different // client ID or port is passed in. // // r, err := csm.Start("clientID", "127.0.0.1:31000") // if err != nil { // panic(fmt.Errorf("expected no error, but received %v", err)) // } // sess := session.NewSession() // r.InjectHandlers(sess.Handlers) // // svc := s3.New(sess) // out, err := svc.GetObject(&s3.GetObjectInput{ // Bucket: aws.String("bucket"), // Key: aws.String("key"), // }) func Start(clientID string, url string) (*Reporter, error) { lock.Lock() defer lock.Unlock() if sender == nil { sender = newReporter(clientID, url) } else { if sender.clientID != clientID { panic(fmt.Errorf("inconsistent client IDs. %q was expected, but received %q", sender.clientID, clientID)) } if sender.url != url { panic(fmt.Errorf("inconsistent URLs. %q was expected, but received %q", sender.url, url)) } } if err := connect(url); err != nil { sender = nil return nil, err } return sender, nil } // Get will return a reporter if one exists, if one does not exist, nil will // be returned. func Get() *Reporter { lock.Lock() defer lock.Unlock() return sender } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go ================================================ package csm import ( "strconv" "time" "github.com/aws/aws-sdk-go/aws" ) type metricTime time.Time func (t metricTime) MarshalJSON() ([]byte, error) { ns := time.Duration(time.Time(t).UnixNano()) return []byte(strconv.FormatInt(int64(ns/time.Millisecond), 10)), nil } type metric struct { ClientID *string `json:"ClientId,omitempty"` API *string `json:"Api,omitempty"` Service *string `json:"Service,omitempty"` Timestamp *metricTime `json:"Timestamp,omitempty"` Type *string `json:"Type,omitempty"` Version *int `json:"Version,omitempty"` AttemptCount *int `json:"AttemptCount,omitempty"` Latency *int `json:"Latency,omitempty"` Fqdn *string `json:"Fqdn,omitempty"` UserAgent *string `json:"UserAgent,omitempty"` AttemptLatency *int `json:"AttemptLatency,omitempty"` SessionToken *string `json:"SessionToken,omitempty"` Region *string `json:"Region,omitempty"` AccessKey *string `json:"AccessKey,omitempty"` HTTPStatusCode *int `json:"HttpStatusCode,omitempty"` XAmzID2 *string `json:"XAmzId2,omitempty"` XAmzRequestID *string `json:"XAmznRequestId,omitempty"` AWSException *string `json:"AwsException,omitempty"` AWSExceptionMessage *string `json:"AwsExceptionMessage,omitempty"` SDKException *string `json:"SdkException,omitempty"` SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"` FinalHTTPStatusCode *int `json:"FinalHttpStatusCode,omitempty"` FinalAWSException *string `json:"FinalAwsException,omitempty"` FinalAWSExceptionMessage *string `json:"FinalAwsExceptionMessage,omitempty"` FinalSDKException *string `json:"FinalSdkException,omitempty"` FinalSDKExceptionMessage *string `json:"FinalSdkExceptionMessage,omitempty"` DestinationIP *string `json:"DestinationIp,omitempty"` ConnectionReused *int `json:"ConnectionReused,omitempty"` AcquireConnectionLatency *int `json:"AcquireConnectionLatency,omitempty"` ConnectLatency *int `json:"ConnectLatency,omitempty"` RequestLatency *int `json:"RequestLatency,omitempty"` DNSLatency *int `json:"DnsLatency,omitempty"` TCPLatency *int `json:"TcpLatency,omitempty"` SSLLatency *int `json:"SslLatency,omitempty"` MaxRetriesExceeded *int `json:"MaxRetriesExceeded,omitempty"` } func (m *metric) TruncateFields() { m.ClientID = truncateString(m.ClientID, 255) m.UserAgent = truncateString(m.UserAgent, 256) m.AWSException = truncateString(m.AWSException, 128) m.AWSExceptionMessage = truncateString(m.AWSExceptionMessage, 512) m.SDKException = truncateString(m.SDKException, 128) m.SDKExceptionMessage = truncateString(m.SDKExceptionMessage, 512) m.FinalAWSException = truncateString(m.FinalAWSException, 128) m.FinalAWSExceptionMessage = truncateString(m.FinalAWSExceptionMessage, 512) m.FinalSDKException = truncateString(m.FinalSDKException, 128) m.FinalSDKExceptionMessage = truncateString(m.FinalSDKExceptionMessage, 512) } func truncateString(v *string, l int) *string { if v != nil && len(*v) > l { nv := (*v)[:l] return &nv } return v } func (m *metric) SetException(e metricException) { switch te := e.(type) { case awsException: m.AWSException = aws.String(te.exception) m.AWSExceptionMessage = aws.String(te.message) case sdkException: m.SDKException = aws.String(te.exception) m.SDKExceptionMessage = aws.String(te.message) } } func (m *metric) SetFinalException(e metricException) { switch te := e.(type) { case awsException: m.FinalAWSException = aws.String(te.exception) m.FinalAWSExceptionMessage = aws.String(te.message) case sdkException: m.FinalSDKException = aws.String(te.exception) m.FinalSDKExceptionMessage = aws.String(te.message) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go ================================================ package csm import ( "sync/atomic" ) const ( runningEnum = iota pausedEnum ) var ( // MetricsChannelSize of metrics to hold in the channel MetricsChannelSize = 100 ) type metricChan struct { ch chan metric paused *int64 } func newMetricChan(size int) metricChan { return metricChan{ ch: make(chan metric, size), paused: new(int64), } } func (ch *metricChan) Pause() { atomic.StoreInt64(ch.paused, pausedEnum) } func (ch *metricChan) Continue() { atomic.StoreInt64(ch.paused, runningEnum) } func (ch *metricChan) IsPaused() bool { v := atomic.LoadInt64(ch.paused) return v == pausedEnum } // Push will push metrics to the metric channel if the channel // is not paused func (ch *metricChan) Push(m metric) bool { if ch.IsPaused() { return false } select { case ch.ch <- m: return true default: return false } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go ================================================ package csm type metricException interface { Exception() string Message() string } type requestException struct { exception string message string } func (e requestException) Exception() string { return e.exception } func (e requestException) Message() string { return e.message } type awsException struct { requestException } type sdkException struct { requestException } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go ================================================ package csm import ( "encoding/json" "net" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" ) // Reporter will gather metrics of API requests made and // send those metrics to the CSM endpoint. type Reporter struct { clientID string url string conn net.Conn metricsCh metricChan done chan struct{} } var ( sender *Reporter ) func connect(url string) error { const network = "udp" if err := sender.connect(network, url); err != nil { return err } if sender.done == nil { sender.done = make(chan struct{}) go sender.start() } return nil } func newReporter(clientID, url string) *Reporter { return &Reporter{ clientID: clientID, url: url, metricsCh: newMetricChan(MetricsChannelSize), } } func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) { if rep == nil { return } now := time.Now() creds, _ := r.Config.Credentials.Get() m := metric{ ClientID: aws.String(rep.clientID), API: aws.String(r.Operation.Name), Service: aws.String(r.ClientInfo.ServiceID), Timestamp: (*metricTime)(&now), UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")), Region: r.Config.Region, Type: aws.String("ApiCallAttempt"), Version: aws.Int(1), XAmzRequestID: aws.String(r.RequestID), AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))), AccessKey: aws.String(creds.AccessKeyID), } if r.HTTPResponse != nil { m.HTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode) } if r.Error != nil { if awserr, ok := r.Error.(awserr.Error); ok { m.SetException(getMetricException(awserr)) } } m.TruncateFields() rep.metricsCh.Push(m) } func getMetricException(err awserr.Error) metricException { msg := err.Error() code := err.Code() switch code { case request.ErrCodeRequestError, request.ErrCodeSerialization, request.CanceledErrorCode: return sdkException{ requestException{exception: code, message: msg}, } default: return awsException{ requestException{exception: code, message: msg}, } } } func (rep *Reporter) sendAPICallMetric(r *request.Request) { if rep == nil { return } now := time.Now() m := metric{ ClientID: aws.String(rep.clientID), API: aws.String(r.Operation.Name), Service: aws.String(r.ClientInfo.ServiceID), Timestamp: (*metricTime)(&now), UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")), Type: aws.String("ApiCall"), AttemptCount: aws.Int(r.RetryCount + 1), Region: r.Config.Region, Latency: aws.Int(int(time.Since(r.Time) / time.Millisecond)), XAmzRequestID: aws.String(r.RequestID), MaxRetriesExceeded: aws.Int(boolIntValue(r.RetryCount >= r.MaxRetries())), } if r.HTTPResponse != nil { m.FinalHTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode) } if r.Error != nil { if awserr, ok := r.Error.(awserr.Error); ok { m.SetFinalException(getMetricException(awserr)) } } m.TruncateFields() // TODO: Probably want to figure something out for logging dropped // metrics rep.metricsCh.Push(m) } func (rep *Reporter) connect(network, url string) error { if rep.conn != nil { rep.conn.Close() } conn, err := net.Dial(network, url) if err != nil { return awserr.New("UDPError", "Could not connect", err) } rep.conn = conn return nil } func (rep *Reporter) close() { if rep.done != nil { close(rep.done) } rep.metricsCh.Pause() } func (rep *Reporter) start() { defer func() { rep.metricsCh.Pause() }() for { select { case <-rep.done: rep.done = nil return case m := <-rep.metricsCh.ch: // TODO: What to do with this error? Probably should just log b, err := json.Marshal(m) if err != nil { continue } rep.conn.Write(b) } } } // Pause will pause the metric channel preventing any new metrics from being // added. It is safe to call concurrently with other calls to Pause, but if // called concurently with Continue can lead to unexpected state. func (rep *Reporter) Pause() { lock.Lock() defer lock.Unlock() if rep == nil { return } rep.close() } // Continue will reopen the metric channel and allow for monitoring to be // resumed. It is safe to call concurrently with other calls to Continue, but // if called concurently with Pause can lead to unexpected state. func (rep *Reporter) Continue() { lock.Lock() defer lock.Unlock() if rep == nil { return } if !rep.metricsCh.IsPaused() { return } rep.metricsCh.Continue() } // Client side metric handler names const ( APICallMetricHandlerName = "awscsm.SendAPICallMetric" APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric" ) // InjectHandlers will will enable client side metrics and inject the proper // handlers to handle how metrics are sent. // // InjectHandlers is NOT safe to call concurrently. Calling InjectHandlers // multiple times may lead to unexpected behavior, (e.g. duplicate metrics). // // // Start must be called in order to inject the correct handlers // r, err := csm.Start("clientID", "127.0.0.1:8094") // if err != nil { // panic(fmt.Errorf("expected no error, but received %v", err)) // } // // sess := session.NewSession() // r.InjectHandlers(&sess.Handlers) // // // create a new service client with our client side metric session // svc := s3.New(sess) func (rep *Reporter) InjectHandlers(handlers *request.Handlers) { if rep == nil { return } handlers.Complete.PushFrontNamed(request.NamedHandler{ Name: APICallMetricHandlerName, Fn: rep.sendAPICallMetric, }) handlers.CompleteAttempt.PushFrontNamed(request.NamedHandler{ Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric, }) } // boolIntValue return 1 for true and 0 for false. func boolIntValue(b bool) int { if b { return 1 } return 0 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go ================================================ // Package defaults is a collection of helpers to retrieve the SDK's default // configuration and handlers. // // Generally this package shouldn't be used directly, but session.Session // instead. This package is useful when you need to reset the defaults // of a session or service client to the SDK defaults before setting // additional parameters. package defaults import ( "fmt" "io/ioutil" "net" "net/http" "net/url" "os" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/shareddefaults" ) // A Defaults provides a collection of default values for SDK clients. type Defaults struct { Config *aws.Config Handlers request.Handlers } // Get returns the SDK's default values with Config and handlers pre-configured. func Get() Defaults { cfg := Config() handlers := Handlers() cfg.Credentials = CredChain(cfg, handlers) return Defaults{ Config: cfg, Handlers: handlers, } } // Config returns the default configuration without credentials. // To retrieve a config with credentials also included use // `defaults.Get().Config` instead. // // Generally you shouldn't need to use this method directly, but // is available if you need to reset the configuration of an // existing service client or session. func Config() *aws.Config { return aws.NewConfig(). WithCredentials(credentials.AnonymousCredentials). WithRegion(os.Getenv("AWS_REGION")). WithHTTPClient(http.DefaultClient). WithMaxRetries(aws.UseServiceDefaultRetries). WithLogger(aws.NewDefaultLogger()). WithLogLevel(aws.LogOff). WithEndpointResolver(endpoints.DefaultResolver()) } // Handlers returns the default request handlers. // // Generally you shouldn't need to use this method directly, but // is available if you need to reset the request handlers of an // existing service client or session. func Handlers() request.Handlers { var handlers request.Handlers handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler) handlers.Validate.AfterEachFn = request.HandlerListStopOnError handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler) handlers.Build.PushBackNamed(corehandlers.AddAwsInternal) handlers.Build.PushBackNamed(corehandlers.AddHostExecEnvUserAgentHander) handlers.Build.AfterEachFn = request.HandlerListStopOnError handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler) handlers.Send.PushBackNamed(corehandlers.ValidateReqSigHandler) handlers.Send.PushBackNamed(corehandlers.SendHandler) handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler) handlers.ValidateResponse.PushBackNamed(corehandlers.ValidateResponseHandler) return handlers } // CredChain returns the default credential chain. // // Generally you shouldn't need to use this method directly, but // is available if you need to reset the credentials of an // existing service client or session's Config. func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials { return credentials.NewCredentials(&credentials.ChainProvider{ VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors), Providers: CredProviders(cfg, handlers), }) } // CredProviders returns the slice of providers used in // the default credential chain. // // For applications that need to use some other provider (for example use // different environment variables for legacy reasons) but still fall back // on the default chain of providers. This allows that default chaint to be // automatically updated func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Provider { return []credentials.Provider{ &credentials.EnvProvider{}, &credentials.SharedCredentialsProvider{Filename: "", Profile: ""}, RemoteCredProvider(*cfg, handlers), } } const ( httpProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN" httpProviderAuthFileEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE" httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI" ) // direct representation of the IPv4 address for the ECS container // "169.254.170.2" var ecsContainerIPv4 net.IP = []byte{ 169, 254, 170, 2, } // direct representation of the IPv4 address for the EKS container // "169.254.170.23" var eksContainerIPv4 net.IP = []byte{ 169, 254, 170, 23, } // direct representation of the IPv6 address for the EKS container // "fd00:ec2::23" var eksContainerIPv6 net.IP = []byte{ 0xFD, 0, 0xE, 0xC2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x23, } // RemoteCredProvider returns a credentials provider for the default remote // endpoints such as EC2 or ECS Roles. func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider { if u := os.Getenv(httpProviderEnvVar); len(u) > 0 { return localHTTPCredProvider(cfg, handlers, u) } if uri := os.Getenv(shareddefaults.ECSCredsProviderEnvVar); len(uri) > 0 { u := fmt.Sprintf("%s%s", shareddefaults.ECSContainerCredentialsURI, uri) return httpCredProvider(cfg, handlers, u) } return ec2RoleProvider(cfg, handlers) } var lookupHostFn = net.LookupHost // isAllowedHost allows host to be loopback or known ECS/EKS container IPs // // host can either be an IP address OR an unresolved hostname - resolution will // be automatically performed in the latter case func isAllowedHost(host string) (bool, error) { if ip := net.ParseIP(host); ip != nil { return isIPAllowed(ip), nil } addrs, err := lookupHostFn(host) if err != nil { return false, err } for _, addr := range addrs { if ip := net.ParseIP(addr); ip == nil || !isIPAllowed(ip) { return false, nil } } return true, nil } func isIPAllowed(ip net.IP) bool { return ip.IsLoopback() || ip.Equal(ecsContainerIPv4) || ip.Equal(eksContainerIPv4) || ip.Equal(eksContainerIPv6) } func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider { var errMsg string parsed, err := url.Parse(u) if err != nil { errMsg = fmt.Sprintf("invalid URL, %v", err) } else { host := aws.URLHostname(parsed) if len(host) == 0 { errMsg = "unable to parse host from local HTTP cred provider URL" } else if parsed.Scheme == "http" { if isAllowedHost, allowHostErr := isAllowedHost(host); allowHostErr != nil { errMsg = fmt.Sprintf("failed to resolve host %q, %v", host, allowHostErr) } else if !isAllowedHost { errMsg = fmt.Sprintf("invalid endpoint host, %q, only loopback/ecs/eks hosts are allowed.", host) } } } if len(errMsg) > 0 { if cfg.Logger != nil { cfg.Logger.Log("Ignoring, HTTP credential provider", errMsg, err) } return credentials.ErrorProvider{ Err: awserr.New("CredentialsEndpointError", errMsg, err), ProviderName: endpointcreds.ProviderName, } } return httpCredProvider(cfg, handlers, u) } func httpCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider { return endpointcreds.NewProviderClient(cfg, handlers, u, func(p *endpointcreds.Provider) { p.ExpiryWindow = 5 * time.Minute p.AuthorizationToken = os.Getenv(httpProviderAuthorizationEnvVar) if authFilePath := os.Getenv(httpProviderAuthFileEnvVar); authFilePath != "" { p.AuthorizationTokenProvider = endpointcreds.TokenProviderFunc(func() (string, error) { if contents, err := ioutil.ReadFile(authFilePath); err != nil { return "", fmt.Errorf("failed to read authorization token from %v: %v", authFilePath, err) } else { return string(contents), nil } }) } }, ) } func ec2RoleProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider { resolver := cfg.EndpointResolver if resolver == nil { resolver = endpoints.DefaultResolver() } e, _ := resolver.EndpointFor(endpoints.Ec2metadataServiceID, "") return &ec2rolecreds.EC2RoleProvider{ Client: ec2metadata.NewClient(cfg, handlers, e.URL, e.SigningRegion), ExpiryWindow: 5 * time.Minute, } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go ================================================ package defaults import ( "github.com/aws/aws-sdk-go/internal/shareddefaults" ) // SharedCredentialsFilename returns the SDK's default file path // for the shared credentials file. // // Builds the shared config file path based on the OS's platform. // // - Linux/Unix: $HOME/.aws/credentials // - Windows: %USERPROFILE%\.aws\credentials func SharedCredentialsFilename() string { return shareddefaults.SharedCredentialsFilename() } // SharedConfigFilename returns the SDK's default file path for // the shared config file. // // Builds the shared config file path based on the OS's platform. // // - Linux/Unix: $HOME/.aws/config // - Windows: %USERPROFILE%\.aws\config func SharedConfigFilename() string { return shareddefaults.SharedConfigFilename() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/doc.go ================================================ // Package aws provides the core SDK's utilities and shared types. Use this package's // utilities to simplify setting and reading API operations parameters. // // Value and Pointer Conversion Utilities // // This package includes a helper conversion utility for each scalar type the SDK's // API use. These utilities make getting a pointer of the scalar, and dereferencing // a pointer easier. // // Each conversion utility comes in two forms. Value to Pointer and Pointer to Value. // The Pointer to value will safely dereference the pointer and return its value. // If the pointer was nil, the scalar's zero value will be returned. // // The value to pointer functions will be named after the scalar type. So get a // *string from a string value use the "String" function. This makes it easy to // to get pointer of a literal string value, because getting the address of a // literal requires assigning the value to a variable first. // // var strPtr *string // // // Without the SDK's conversion functions // str := "my string" // strPtr = &str // // // With the SDK's conversion functions // strPtr = aws.String("my string") // // // Convert *string to string value // str = aws.StringValue(strPtr) // // In addition to scalars the aws package also includes conversion utilities for // map and slice for commonly types used in API parameters. The map and slice // conversion functions use similar naming pattern as the scalar conversion // functions. // // var strPtrs []*string // var strs []string = []string{"Go", "Gophers", "Go"} // // // Convert []string to []*string // strPtrs = aws.StringSlice(strs) // // // Convert []*string to []string // strs = aws.StringValueSlice(strPtrs) // // SDK Default HTTP Client // // The SDK will use the http.DefaultClient if a HTTP client is not provided to // the SDK's Session, or service client constructor. This means that if the // http.DefaultClient is modified by other components of your application the // modifications will be picked up by the SDK as well. // // In some cases this might be intended, but it is a better practice to create // a custom HTTP Client to share explicitly through your application. You can // configure the SDK to use the custom HTTP Client by setting the HTTPClient // value of the SDK's Config type when creating a Session or service client. package aws ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go ================================================ package ec2metadata import ( "encoding/json" "fmt" "net/http" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/sdkuri" ) // getToken uses the duration to return a token for EC2 metadata service, // or an error if the request failed. func (c *EC2Metadata) getToken(ctx aws.Context, duration time.Duration) (tokenOutput, error) { op := &request.Operation{ Name: "GetToken", HTTPMethod: "PUT", HTTPPath: "/latest/api/token", } var output tokenOutput req := c.NewRequest(op, nil, &output) req.SetContext(ctx) // remove the fetch token handler from the request handlers to avoid infinite recursion req.Handlers.Sign.RemoveByName(fetchTokenHandlerName) // Swap the unmarshalMetadataHandler with unmarshalTokenHandler on this request. req.Handlers.Unmarshal.Swap(unmarshalMetadataHandlerName, unmarshalTokenHandler) ttl := strconv.FormatInt(int64(duration/time.Second), 10) req.HTTPRequest.Header.Set(ttlHeader, ttl) err := req.Send() // Errors with bad request status should be returned. if err != nil { err = awserr.NewRequestFailure( awserr.New(req.HTTPResponse.Status, http.StatusText(req.HTTPResponse.StatusCode), err), req.HTTPResponse.StatusCode, req.RequestID) } return output, err } // GetMetadata uses the path provided to request information from the EC2 // instance metadata service. The content will be returned as a string, or // error if the request failed. func (c *EC2Metadata) GetMetadata(p string) (string, error) { return c.GetMetadataWithContext(aws.BackgroundContext(), p) } // GetMetadataWithContext uses the path provided to request information from the EC2 // instance metadata service. The content will be returned as a string, or // error if the request failed. func (c *EC2Metadata) GetMetadataWithContext(ctx aws.Context, p string) (string, error) { op := &request.Operation{ Name: "GetMetadata", HTTPMethod: "GET", HTTPPath: sdkuri.PathJoin("/latest/meta-data", p), } output := &metadataOutput{} req := c.NewRequest(op, nil, output) req.SetContext(ctx) err := req.Send() return output.Content, err } // GetUserData returns the userdata that was configured for the service. If // there is no user-data setup for the EC2 instance a "NotFoundError" error // code will be returned. func (c *EC2Metadata) GetUserData() (string, error) { return c.GetUserDataWithContext(aws.BackgroundContext()) } // GetUserDataWithContext returns the userdata that was configured for the service. If // there is no user-data setup for the EC2 instance a "NotFoundError" error // code will be returned. func (c *EC2Metadata) GetUserDataWithContext(ctx aws.Context) (string, error) { op := &request.Operation{ Name: "GetUserData", HTTPMethod: "GET", HTTPPath: "/latest/user-data", } output := &metadataOutput{} req := c.NewRequest(op, nil, output) req.SetContext(ctx) err := req.Send() return output.Content, err } // GetDynamicData uses the path provided to request information from the EC2 // instance metadata service for dynamic data. The content will be returned // as a string, or error if the request failed. func (c *EC2Metadata) GetDynamicData(p string) (string, error) { return c.GetDynamicDataWithContext(aws.BackgroundContext(), p) } // GetDynamicDataWithContext uses the path provided to request information from the EC2 // instance metadata service for dynamic data. The content will be returned // as a string, or error if the request failed. func (c *EC2Metadata) GetDynamicDataWithContext(ctx aws.Context, p string) (string, error) { op := &request.Operation{ Name: "GetDynamicData", HTTPMethod: "GET", HTTPPath: sdkuri.PathJoin("/latest/dynamic", p), } output := &metadataOutput{} req := c.NewRequest(op, nil, output) req.SetContext(ctx) err := req.Send() return output.Content, err } // GetInstanceIdentityDocument retrieves an identity document describing an // instance. Error is returned if the request fails or is unable to parse // the response. func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument, error) { return c.GetInstanceIdentityDocumentWithContext(aws.BackgroundContext()) } // GetInstanceIdentityDocumentWithContext retrieves an identity document describing an // instance. Error is returned if the request fails or is unable to parse // the response. func (c *EC2Metadata) GetInstanceIdentityDocumentWithContext(ctx aws.Context) (EC2InstanceIdentityDocument, error) { resp, err := c.GetDynamicDataWithContext(ctx, "instance-identity/document") if err != nil { return EC2InstanceIdentityDocument{}, awserr.New("EC2MetadataRequestError", "failed to get EC2 instance identity document", err) } doc := EC2InstanceIdentityDocument{} if err := json.NewDecoder(strings.NewReader(resp)).Decode(&doc); err != nil { return EC2InstanceIdentityDocument{}, awserr.New(request.ErrCodeSerialization, "failed to decode EC2 instance identity document", err) } return doc, nil } // IAMInfo retrieves IAM info from the metadata API func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) { return c.IAMInfoWithContext(aws.BackgroundContext()) } // IAMInfoWithContext retrieves IAM info from the metadata API func (c *EC2Metadata) IAMInfoWithContext(ctx aws.Context) (EC2IAMInfo, error) { resp, err := c.GetMetadataWithContext(ctx, "iam/info") if err != nil { return EC2IAMInfo{}, awserr.New("EC2MetadataRequestError", "failed to get EC2 IAM info", err) } info := EC2IAMInfo{} if err := json.NewDecoder(strings.NewReader(resp)).Decode(&info); err != nil { return EC2IAMInfo{}, awserr.New(request.ErrCodeSerialization, "failed to decode EC2 IAM info", err) } if info.Code != "Success" { errMsg := fmt.Sprintf("failed to get EC2 IAM Info (%s)", info.Code) return EC2IAMInfo{}, awserr.New("EC2MetadataError", errMsg, nil) } return info, nil } // Region returns the region the instance is running in. func (c *EC2Metadata) Region() (string, error) { return c.RegionWithContext(aws.BackgroundContext()) } // RegionWithContext returns the region the instance is running in. func (c *EC2Metadata) RegionWithContext(ctx aws.Context) (string, error) { ec2InstanceIdentityDocument, err := c.GetInstanceIdentityDocumentWithContext(ctx) if err != nil { return "", err } // extract region from the ec2InstanceIdentityDocument region := ec2InstanceIdentityDocument.Region if len(region) == 0 { return "", awserr.New("EC2MetadataError", "invalid region received for ec2metadata instance", nil) } // returns region return region, nil } // Available returns if the application has access to the EC2 Metadata service. // Can be used to determine if application is running within an EC2 Instance and // the metadata service is available. func (c *EC2Metadata) Available() bool { return c.AvailableWithContext(aws.BackgroundContext()) } // AvailableWithContext returns if the application has access to the EC2 Metadata service. // Can be used to determine if application is running within an EC2 Instance and // the metadata service is available. func (c *EC2Metadata) AvailableWithContext(ctx aws.Context) bool { if _, err := c.GetMetadataWithContext(ctx, "instance-id"); err != nil { return false } return true } // An EC2IAMInfo provides the shape for unmarshaling // an IAM info from the metadata API type EC2IAMInfo struct { Code string LastUpdated time.Time InstanceProfileArn string InstanceProfileID string } // An EC2InstanceIdentityDocument provides the shape for unmarshaling // an instance identity document type EC2InstanceIdentityDocument struct { DevpayProductCodes []string `json:"devpayProductCodes"` MarketplaceProductCodes []string `json:"marketplaceProductCodes"` AvailabilityZone string `json:"availabilityZone"` PrivateIP string `json:"privateIp"` Version string `json:"version"` Region string `json:"region"` InstanceID string `json:"instanceId"` BillingProducts []string `json:"billingProducts"` InstanceType string `json:"instanceType"` AccountID string `json:"accountId"` PendingTime time.Time `json:"pendingTime"` ImageID string `json:"imageId"` KernelID string `json:"kernelId"` RamdiskID string `json:"ramdiskId"` Architecture string `json:"architecture"` } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go ================================================ // Package ec2metadata provides the client for making API calls to the // EC2 Metadata service. // // This package's client can be disabled completely by setting the environment // variable "AWS_EC2_METADATA_DISABLED=true". This environment variable set to // true instructs the SDK to disable the EC2 Metadata client. The client cannot // be used while the environment variable is set to true, (case insensitive). // // The endpoint of the EC2 IMDS client can be configured via the environment // variable, AWS_EC2_METADATA_SERVICE_ENDPOINT when creating the client with a // Session. See aws/session#Options.EC2IMDSEndpoint for more details. package ec2metadata import ( "bytes" "io" "net/http" "net/url" "os" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/request" ) const ( // ServiceName is the name of the service. ServiceName = "ec2metadata" disableServiceEnvVar = "AWS_EC2_METADATA_DISABLED" // Headers for Token and TTL ttlHeader = "x-aws-ec2-metadata-token-ttl-seconds" tokenHeader = "x-aws-ec2-metadata-token" // Named Handler constants fetchTokenHandlerName = "FetchTokenHandler" unmarshalMetadataHandlerName = "unmarshalMetadataHandler" unmarshalTokenHandlerName = "unmarshalTokenHandler" enableTokenProviderHandlerName = "enableTokenProviderHandler" // TTL constants defaultTTL = 21600 * time.Second ttlExpirationWindow = 30 * time.Second ) // A EC2Metadata is an EC2 Metadata service Client. type EC2Metadata struct { *client.Client } // New creates a new instance of the EC2Metadata client with a session. // This client is safe to use across multiple goroutines. // // Example: // // // Create a EC2Metadata client from just a session. // svc := ec2metadata.New(mySession) // // // Create a EC2Metadata client with additional configuration // svc := ec2metadata.New(mySession, aws.NewConfig().WithLogLevel(aws.LogDebugHTTPBody)) func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2Metadata { c := p.ClientConfig(ServiceName, cfgs...) return NewClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion) } // NewClient returns a new EC2Metadata client. Should be used to create // a client when not using a session. Generally using just New with a session // is preferred. // // Will remove the URL path from the endpoint provided to ensure the EC2 IMDS // client is able to communicate with the EC2 IMDS API. // // If an unmodified HTTP client is provided from the stdlib default, or no client // the EC2RoleProvider's EC2Metadata HTTP client's timeout will be shortened. // To disable this set Config.EC2MetadataDisableTimeoutOverride to false. Enabled by default. func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string, opts ...func(*client.Client)) *EC2Metadata { if !aws.BoolValue(cfg.EC2MetadataDisableTimeoutOverride) && httpClientZero(cfg.HTTPClient) { // If the http client is unmodified and this feature is not disabled // set custom timeouts for EC2Metadata requests. cfg.HTTPClient = &http.Client{ // use a shorter timeout than default because the metadata // service is local if it is running, and to fail faster // if not running on an ec2 instance. Timeout: 1 * time.Second, } // max number of retries on the client operation cfg.MaxRetries = aws.Int(2) } if u, err := url.Parse(endpoint); err == nil { // Remove path from the endpoint since it will be added by requests. // This is an artifact of the SDK adding `/latest` to the endpoint for // EC2 IMDS, but this is now moved to the operation definition. u.Path = "" u.RawPath = "" endpoint = u.String() } svc := &EC2Metadata{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: ServiceName, ServiceID: ServiceName, Endpoint: endpoint, APIVersion: "latest", }, handlers, ), } // token provider instance tp := newTokenProvider(svc, defaultTTL) // NamedHandler for fetching token svc.Handlers.Sign.PushBackNamed(request.NamedHandler{ Name: fetchTokenHandlerName, Fn: tp.fetchTokenHandler, }) // NamedHandler for enabling token provider svc.Handlers.Complete.PushBackNamed(request.NamedHandler{ Name: enableTokenProviderHandlerName, Fn: tp.enableTokenProviderHandler, }) svc.Handlers.Unmarshal.PushBackNamed(unmarshalHandler) svc.Handlers.UnmarshalError.PushBack(unmarshalError) svc.Handlers.Validate.Clear() svc.Handlers.Validate.PushBack(validateEndpointHandler) // Disable the EC2 Metadata service if the environment variable is set. // This short-circuits the service's functionality to always fail to send // requests. if strings.ToLower(os.Getenv(disableServiceEnvVar)) == "true" { svc.Handlers.Send.SwapNamed(request.NamedHandler{ Name: corehandlers.SendHandler.Name, Fn: func(r *request.Request) { r.HTTPResponse = &http.Response{ Header: http.Header{}, } r.Error = awserr.New( request.CanceledErrorCode, "EC2 IMDS access disabled via "+disableServiceEnvVar+" env var", nil) }, }) } // Add additional options to the service config for _, option := range opts { option(svc.Client) } return svc } func httpClientZero(c *http.Client) bool { return c == nil || (c.Transport == nil && c.CheckRedirect == nil && c.Jar == nil && c.Timeout == 0) } type metadataOutput struct { Content string } type tokenOutput struct { Token string TTL time.Duration } // unmarshal token handler is used to parse the response of a getToken operation var unmarshalTokenHandler = request.NamedHandler{ Name: unmarshalTokenHandlerName, Fn: func(r *request.Request) { defer r.HTTPResponse.Body.Close() var b bytes.Buffer if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil { r.Error = awserr.NewRequestFailure(awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata response", err), r.HTTPResponse.StatusCode, r.RequestID) return } v := r.HTTPResponse.Header.Get(ttlHeader) data, ok := r.Data.(*tokenOutput) if !ok { return } data.Token = b.String() // TTL is in seconds i, err := strconv.ParseInt(v, 10, 64) if err != nil { r.Error = awserr.NewRequestFailure(awserr.New(request.ParamFormatErrCode, "unable to parse EC2 token TTL response", err), r.HTTPResponse.StatusCode, r.RequestID) return } t := time.Duration(i) * time.Second data.TTL = t }, } var unmarshalHandler = request.NamedHandler{ Name: unmarshalMetadataHandlerName, Fn: func(r *request.Request) { defer r.HTTPResponse.Body.Close() var b bytes.Buffer if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil { r.Error = awserr.NewRequestFailure(awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata response", err), r.HTTPResponse.StatusCode, r.RequestID) return } if data, ok := r.Data.(*metadataOutput); ok { data.Content = b.String() } }, } func unmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() var b bytes.Buffer if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil { r.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata error response", err), r.HTTPResponse.StatusCode, r.RequestID) return } // Response body format is not consistent between metadata endpoints. // Grab the error message as a string and include that as the source error r.Error = awserr.NewRequestFailure( awserr.New("EC2MetadataError", "failed to make EC2Metadata request\n"+b.String(), nil), r.HTTPResponse.StatusCode, r.RequestID) } func validateEndpointHandler(r *request.Request) { if r.ClientInfo.Endpoint == "" { r.Error = aws.ErrMissingEndpoint } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go ================================================ package ec2metadata import ( "fmt" "net/http" "sync/atomic" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" ) // A tokenProvider struct provides access to EC2Metadata client // and atomic instance of a token, along with configuredTTL for it. // tokenProvider also provides an atomic flag to disable the // fetch token operation. // The disabled member will use 0 as false, and 1 as true. type tokenProvider struct { client *EC2Metadata token atomic.Value configuredTTL time.Duration disabled uint32 } // A ec2Token struct helps use of token in EC2 Metadata service ops type ec2Token struct { token string credentials.Expiry } // newTokenProvider provides a pointer to a tokenProvider instance func newTokenProvider(c *EC2Metadata, duration time.Duration) *tokenProvider { return &tokenProvider{client: c, configuredTTL: duration} } // check if fallback is enabled func (t *tokenProvider) fallbackEnabled() bool { return t.client.Config.EC2MetadataEnableFallback == nil || *t.client.Config.EC2MetadataEnableFallback } // fetchTokenHandler fetches token for EC2Metadata service client by default. func (t *tokenProvider) fetchTokenHandler(r *request.Request) { // short-circuits to insecure data flow if tokenProvider is disabled. if v := atomic.LoadUint32(&t.disabled); v == 1 && t.fallbackEnabled() { return } if ec2Token, ok := t.token.Load().(ec2Token); ok && !ec2Token.IsExpired() { r.HTTPRequest.Header.Set(tokenHeader, ec2Token.token) return } output, err := t.client.getToken(r.Context(), t.configuredTTL) if err != nil { // only attempt fallback to insecure data flow if IMDSv1 is enabled if !t.fallbackEnabled() { r.Error = awserr.New("EC2MetadataError", "failed to get IMDSv2 token and fallback to IMDSv1 is disabled", err) return } // change the disabled flag on token provider to true and fallback if requestFailureError, ok := err.(awserr.RequestFailure); ok { switch requestFailureError.StatusCode() { case http.StatusForbidden, http.StatusNotFound, http.StatusMethodNotAllowed: atomic.StoreUint32(&t.disabled, 1) t.client.Config.Logger.Log(fmt.Sprintf("WARN: failed to get session token, falling back to IMDSv1: %v", requestFailureError)) case http.StatusBadRequest: r.Error = requestFailureError } } return } newToken := ec2Token{ token: output.Token, } newToken.SetExpiration(time.Now().Add(output.TTL), ttlExpirationWindow) t.token.Store(newToken) // Inject token header to the request. if ec2Token, ok := t.token.Load().(ec2Token); ok { r.HTTPRequest.Header.Set(tokenHeader, ec2Token.token) } } // enableTokenProviderHandler enables the token provider func (t *tokenProvider) enableTokenProviderHandler(r *request.Request) { // If the error code status is 401, we enable the token provider if e, ok := r.Error.(awserr.RequestFailure); ok && e != nil && e.StatusCode() == http.StatusUnauthorized { t.token.Store(ec2Token{}) atomic.StoreUint32(&t.disabled, 0) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go ================================================ package endpoints import ( "encoding/json" "fmt" "io" "github.com/aws/aws-sdk-go/aws/awserr" ) type modelDefinition map[string]json.RawMessage // A DecodeModelOptions are the options for how the endpoints model definition // are decoded. type DecodeModelOptions struct { SkipCustomizations bool } // Set combines all of the option functions together. func (d *DecodeModelOptions) Set(optFns ...func(*DecodeModelOptions)) { for _, fn := range optFns { fn(d) } } // DecodeModel unmarshals a Regions and Endpoint model definition file into // a endpoint Resolver. If the file format is not supported, or an error occurs // when unmarshaling the model an error will be returned. // // Casting the return value of this func to a EnumPartitions will // allow you to get a list of the partitions in the order the endpoints // will be resolved in. // // resolver, err := endpoints.DecodeModel(reader) // // partitions := resolver.(endpoints.EnumPartitions).Partitions() // for _, p := range partitions { // // ... inspect partitions // } func DecodeModel(r io.Reader, optFns ...func(*DecodeModelOptions)) (Resolver, error) { var opts DecodeModelOptions opts.Set(optFns...) // Get the version of the partition file to determine what // unmarshaling model to use. modelDef := modelDefinition{} if err := json.NewDecoder(r).Decode(&modelDef); err != nil { return nil, newDecodeModelError("failed to decode endpoints model", err) } var version string if b, ok := modelDef["version"]; ok { version = string(b) } else { return nil, newDecodeModelError("endpoints version not found in model", nil) } if version == "3" { return decodeV3Endpoints(modelDef, opts) } return nil, newDecodeModelError( fmt.Sprintf("endpoints version %s, not supported", version), nil) } func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resolver, error) { b, ok := modelDef["partitions"] if !ok { return nil, newDecodeModelError("endpoints model missing partitions", nil) } ps := partitions{} if err := json.Unmarshal(b, &ps); err != nil { return nil, newDecodeModelError("failed to decode endpoints model", err) } if opts.SkipCustomizations { return ps, nil } // Customization for i := 0; i < len(ps); i++ { p := &ps[i] custRegionalS3(p) custRmIotDataService(p) custFixAppAutoscalingChina(p) custFixAppAutoscalingUsGov(p) } return ps, nil } func custRegionalS3(p *partition) { if p.ID != "aws" { return } service, ok := p.Services["s3"] if !ok { return } const awsGlobal = "aws-global" const usEast1 = "us-east-1" // If global endpoint already exists no customization needed. if _, ok := service.Endpoints[endpointKey{Region: awsGlobal}]; ok { return } service.PartitionEndpoint = awsGlobal if _, ok := service.Endpoints[endpointKey{Region: usEast1}]; !ok { service.Endpoints[endpointKey{Region: usEast1}] = endpoint{} } service.Endpoints[endpointKey{Region: awsGlobal}] = endpoint{ Hostname: "s3.amazonaws.com", CredentialScope: credentialScope{ Region: usEast1, }, } p.Services["s3"] = service } func custRmIotDataService(p *partition) { delete(p.Services, "data.iot") } func custFixAppAutoscalingChina(p *partition) { if p.ID != "aws-cn" { return } const serviceName = "application-autoscaling" s, ok := p.Services[serviceName] if !ok { return } const expectHostname = `autoscaling.{region}.amazonaws.com` serviceDefault := s.Defaults[defaultKey{}] if e, a := expectHostname, serviceDefault.Hostname; e != a { fmt.Printf("custFixAppAutoscalingChina: ignoring customization, expected %s, got %s\n", e, a) return } serviceDefault.Hostname = expectHostname + ".cn" s.Defaults[defaultKey{}] = serviceDefault p.Services[serviceName] = s } func custFixAppAutoscalingUsGov(p *partition) { if p.ID != "aws-us-gov" { return } const serviceName = "application-autoscaling" s, ok := p.Services[serviceName] if !ok { return } serviceDefault := s.Defaults[defaultKey{}] if a := serviceDefault.CredentialScope.Service; a != "" { fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty credential scope service, got %s\n", a) return } if a := serviceDefault.Hostname; a != "" { fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty hostname, got %s\n", a) return } serviceDefault.CredentialScope.Service = "application-autoscaling" serviceDefault.Hostname = "autoscaling.{region}.amazonaws.com" if s.Defaults == nil { s.Defaults = make(endpointDefaults) } s.Defaults[defaultKey{}] = serviceDefault p.Services[serviceName] = s } type decodeModelError struct { awsError } func newDecodeModelError(msg string, err error) decodeModelError { return decodeModelError{ awsError: awserr.New("DecodeEndpointsModelError", msg, err), } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go ================================================ // Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT. package endpoints import ( "regexp" ) // Partition identifiers const ( AwsPartitionID = "aws" // AWS Standard partition. AwsCnPartitionID = "aws-cn" // AWS China partition. AwsUsGovPartitionID = "aws-us-gov" // AWS GovCloud (US) partition. AwsIsoPartitionID = "aws-iso" // AWS ISO (US) partition. AwsIsoBPartitionID = "aws-iso-b" // AWS ISOB (US) partition. AwsIsoEPartitionID = "aws-iso-e" // AWS ISOE (Europe) partition. AwsIsoFPartitionID = "aws-iso-f" // AWS ISOF partition. ) // AWS Standard partition's regions. const ( AfSouth1RegionID = "af-south-1" // Africa (Cape Town). ApEast1RegionID = "ap-east-1" // Asia Pacific (Hong Kong). ApNortheast1RegionID = "ap-northeast-1" // Asia Pacific (Tokyo). ApNortheast2RegionID = "ap-northeast-2" // Asia Pacific (Seoul). ApNortheast3RegionID = "ap-northeast-3" // Asia Pacific (Osaka). ApSouth1RegionID = "ap-south-1" // Asia Pacific (Mumbai). ApSouth2RegionID = "ap-south-2" // Asia Pacific (Hyderabad). ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore). ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney). ApSoutheast3RegionID = "ap-southeast-3" // Asia Pacific (Jakarta). ApSoutheast4RegionID = "ap-southeast-4" // Asia Pacific (Melbourne). CaCentral1RegionID = "ca-central-1" // Canada (Central). EuCentral1RegionID = "eu-central-1" // Europe (Frankfurt). EuCentral2RegionID = "eu-central-2" // Europe (Zurich). EuNorth1RegionID = "eu-north-1" // Europe (Stockholm). EuSouth1RegionID = "eu-south-1" // Europe (Milan). EuSouth2RegionID = "eu-south-2" // Europe (Spain). EuWest1RegionID = "eu-west-1" // Europe (Ireland). EuWest2RegionID = "eu-west-2" // Europe (London). EuWest3RegionID = "eu-west-3" // Europe (Paris). IlCentral1RegionID = "il-central-1" // Israel (Tel Aviv). MeCentral1RegionID = "me-central-1" // Middle East (UAE). MeSouth1RegionID = "me-south-1" // Middle East (Bahrain). SaEast1RegionID = "sa-east-1" // South America (Sao Paulo). UsEast1RegionID = "us-east-1" // US East (N. Virginia). UsEast2RegionID = "us-east-2" // US East (Ohio). UsWest1RegionID = "us-west-1" // US West (N. California). UsWest2RegionID = "us-west-2" // US West (Oregon). ) // AWS China partition's regions. const ( CnNorth1RegionID = "cn-north-1" // China (Beijing). CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia). ) // AWS GovCloud (US) partition's regions. const ( UsGovEast1RegionID = "us-gov-east-1" // AWS GovCloud (US-East). UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US-West). ) // AWS ISO (US) partition's regions. const ( UsIsoEast1RegionID = "us-iso-east-1" // US ISO East. UsIsoWest1RegionID = "us-iso-west-1" // US ISO WEST. ) // AWS ISOB (US) partition's regions. const ( UsIsobEast1RegionID = "us-isob-east-1" // US ISOB East (Ohio). ) // AWS ISOE (Europe) partition's regions. const () // AWS ISOF partition's regions. const () // DefaultResolver returns an Endpoint resolver that will be able // to resolve endpoints for: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), AWS ISOB (US), AWS ISOE (Europe), and AWS ISOF. // // Use DefaultPartitions() to get the list of the default partitions. func DefaultResolver() Resolver { return defaultPartitions } // DefaultPartitions returns a list of the partitions the SDK is bundled // with. The available partitions are: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), AWS ISOB (US), AWS ISOE (Europe), and AWS ISOF. // // partitions := endpoints.DefaultPartitions // for _, p := range partitions { // // ... inspect partitions // } func DefaultPartitions() []Partition { return defaultPartitions.Partitions() } var defaultPartitions = partitions{ awsPartition, awscnPartition, awsusgovPartition, awsisoPartition, awsisobPartition, awsisoePartition, awsisofPartition, } // AwsPartition returns the Resolver for AWS Standard. func AwsPartition() Partition { return awsPartition.Partition() } var awsPartition = partition{ ID: "aws", Name: "AWS Standard", DNSSuffix: "amazonaws.com", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$") return reg }(), }, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", DNSSuffix: "api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, Regions: regions{ "af-south-1": region{ Description: "Africa (Cape Town)", }, "ap-east-1": region{ Description: "Asia Pacific (Hong Kong)", }, "ap-northeast-1": region{ Description: "Asia Pacific (Tokyo)", }, "ap-northeast-2": region{ Description: "Asia Pacific (Seoul)", }, "ap-northeast-3": region{ Description: "Asia Pacific (Osaka)", }, "ap-south-1": region{ Description: "Asia Pacific (Mumbai)", }, "ap-south-2": region{ Description: "Asia Pacific (Hyderabad)", }, "ap-southeast-1": region{ Description: "Asia Pacific (Singapore)", }, "ap-southeast-2": region{ Description: "Asia Pacific (Sydney)", }, "ap-southeast-3": region{ Description: "Asia Pacific (Jakarta)", }, "ap-southeast-4": region{ Description: "Asia Pacific (Melbourne)", }, "ca-central-1": region{ Description: "Canada (Central)", }, "eu-central-1": region{ Description: "Europe (Frankfurt)", }, "eu-central-2": region{ Description: "Europe (Zurich)", }, "eu-north-1": region{ Description: "Europe (Stockholm)", }, "eu-south-1": region{ Description: "Europe (Milan)", }, "eu-south-2": region{ Description: "Europe (Spain)", }, "eu-west-1": region{ Description: "Europe (Ireland)", }, "eu-west-2": region{ Description: "Europe (London)", }, "eu-west-3": region{ Description: "Europe (Paris)", }, "il-central-1": region{ Description: "Israel (Tel Aviv)", }, "me-central-1": region{ Description: "Middle East (UAE)", }, "me-south-1": region{ Description: "Middle East (Bahrain)", }, "sa-east-1": region{ Description: "South America (Sao Paulo)", }, "us-east-1": region{ Description: "US East (N. Virginia)", }, "us-east-2": region{ Description: "US East (Ohio)", }, "us-west-1": region{ Description: "US West (N. California)", }, "us-west-2": region{ Description: "US West (Oregon)", }, }, Services: services{ "a4b": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "access-analyzer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "access-analyzer-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "access-analyzer-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "access-analyzer-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "access-analyzer-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "access-analyzer-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "access-analyzer-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "access-analyzer-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "access-analyzer-fips.us-west-2.amazonaws.com", }, }, }, "account": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "account.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "acm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "acm-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "acm-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "acm-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "acm-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "acm-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "acm-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "acm-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "acm-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "acm-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "acm-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "acm-pca": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "acm-pca-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "acm-pca-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "acm-pca-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "acm-pca-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "acm-pca-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "acm-pca-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "acm-pca-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "acm-pca-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "acm-pca-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "acm-pca-fips.us-west-2.amazonaws.com", }, }, }, "agreement-marketplace": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "airflow": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "amplify": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "amplifybackend": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "amplifyuibuilder": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "aoss": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "api.detective": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.detective-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "api.detective-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.detective-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "api.detective-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "api.detective-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "api.detective-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.detective-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "api.detective-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "api.detective-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "api.detective-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "api.ecr": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "api.ecr.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "api.ecr.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "api.ecr.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "api.ecr.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "api.ecr.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "api.ecr.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "api.ecr.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "api.ecr.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "api.ecr.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "api.ecr.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "api.ecr.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "api.ecr.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "dkr-us-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-east-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-west-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "api.ecr.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "api.ecr.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "api.ecr.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "api.ecr.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "eu-south-2", }: endpoint{ Hostname: "api.ecr.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "api.ecr.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "api.ecr.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "api.ecr.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "fips-dkr-us-east-1", }: endpoint{ Hostname: "ecr-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-dkr-us-east-2", }: endpoint{ Hostname: "ecr-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-dkr-us-west-1", }: endpoint{ Hostname: "ecr-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-dkr-us-west-2", }: endpoint{ Hostname: "ecr-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ecr-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ecr-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ecr-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ecr-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "api.ecr.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "api.ecr.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "api.ecr.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "api.ecr.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "api.ecr.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "api.ecr.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "api.ecr.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "api.ecr.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "api.ecr-public": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "api.ecr-public.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "api.ecr-public.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "api.elastic-inference": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "api.elastic-inference.ap-northeast-1.amazonaws.com", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "api.elastic-inference.ap-northeast-2.amazonaws.com", }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "api.elastic-inference.eu-west-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "api.elastic-inference.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "api.elastic-inference.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "api.elastic-inference.us-west-2.amazonaws.com", }, }, }, "api.fleethub.iot": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com", }, }, }, "api.iotdeviceadvisor": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "api.iotdeviceadvisor.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "api.iotdeviceadvisor.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "api.iotdeviceadvisor.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "api.iotdeviceadvisor.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "api.iotwireless": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "api.iotwireless.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "api.iotwireless.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "api.iotwireless.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "api.iotwireless.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "api.iotwireless.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "api.mediatailor": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "api.pricing": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "pricing", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "api.sagemaker": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "api.tunneling.iot": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com", }, }, }, "apigateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "apigateway-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "apigateway-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "apigateway-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "apigateway-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "apigateway-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "apigateway-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "apigateway-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "apigateway-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "apigateway-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "apigateway-fips.us-west-2.amazonaws.com", }, }, }, "app-integrations": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "appconfig": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "appconfigdata": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "appflow": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "appflow-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "appflow-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "appflow-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "appflow-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "appflow-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "appflow-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "appflow-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "appflow-fips.us-west-2.amazonaws.com", }, }, }, "application-autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "applicationinsights": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "appmesh": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ap-south-1.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ap-southeast-3.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.ca-central-1.api.aws", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "appmesh-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "appmesh-fips.ca-central-1.api.aws", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "appmesh-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.eu-central-1.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.eu-south-1.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.eu-west-3.api.aws", }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.il-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "appmesh-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "appmesh-fips.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "appmesh-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "appmesh-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "appmesh-fips.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "appmesh-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "appmesh-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "appmesh-fips.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "appmesh-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "appmesh-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "appmesh-fips.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "appmesh-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "apprunner": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "apprunner-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "apprunner-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "apprunner-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "apprunner-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "apprunner-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "apprunner-fips.us-west-2.amazonaws.com", }, }, }, "appstream2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, CredentialScope: credentialScope{ Service: "appstream", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips", }: endpoint{ Hostname: "appstream2-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "appstream2-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "appstream2-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "appstream2-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "appstream2-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "appsync": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "aps": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "arc-zonal-shift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "athena": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.ca-central-1.api.aws", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-central-2", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.eu-west-3.api.aws", }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "athena-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "athena-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "athena-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "athena-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "athena-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "athena-fips.us-east-1.api.aws", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "athena-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "athena-fips.us-east-2.api.aws", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "athena-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "athena-fips.us-west-1.api.aws", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "athena-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "athena-fips.us-west-2.api.aws", }, }, }, "auditmanager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "autoscaling-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "autoscaling-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "autoscaling-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "autoscaling-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "autoscaling-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "autoscaling-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "autoscaling-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "autoscaling-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "autoscaling-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "autoscaling-fips.us-west-2.amazonaws.com", }, }, }, "autoscaling-plans": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "backup": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "backup-gateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "backupstorage": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "batch": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "fips.batch.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "fips.batch.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "fips.batch.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "fips.batch.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "fips.batch.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.batch.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "fips.batch.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.batch.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "fips.batch.us-west-2.amazonaws.com", }, }, }, "bedrock": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "bedrock-ap-northeast-1", }: endpoint{ Hostname: "bedrock.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "bedrock-ap-southeast-1", }: endpoint{ Hostname: "bedrock.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "bedrock-eu-central-1", }: endpoint{ Hostname: "bedrock.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "bedrock-fips-us-east-1", }: endpoint{ Hostname: "bedrock-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "bedrock-fips-us-west-2", }: endpoint{ Hostname: "bedrock-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "bedrock-runtime-ap-northeast-1", }: endpoint{ Hostname: "bedrock-runtime.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "bedrock-runtime-ap-southeast-1", }: endpoint{ Hostname: "bedrock-runtime.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "bedrock-runtime-eu-central-1", }: endpoint{ Hostname: "bedrock-runtime.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "bedrock-runtime-fips-us-east-1", }: endpoint{ Hostname: "bedrock-runtime-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "bedrock-runtime-fips-us-west-2", }: endpoint{ Hostname: "bedrock-runtime-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "bedrock-runtime-us-east-1", }: endpoint{ Hostname: "bedrock-runtime.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "bedrock-runtime-us-west-2", }: endpoint{ Hostname: "bedrock-runtime.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "bedrock-us-east-1", }: endpoint{ Hostname: "bedrock.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "bedrock-us-west-2", }: endpoint{ Hostname: "bedrock.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "billingconductor": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "billingconductor.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "braket": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "budgets": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "budgets.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "cases": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{}, }, }, "cassandra": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "cassandra-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "cassandra-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cassandra-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "cassandra-fips.us-west-2.amazonaws.com", }, }, }, "catalog.marketplace": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "ce": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "ce.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "chime": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "chime.us-east-1.amazonaws.com", Protocols: []string{"https"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "cleanrooms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "cloud9": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "cloudcontrolapi": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com", }, }, }, "clouddirectory": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "cloudformation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudformation-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "cloudformation-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "cloudformation-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "cloudformation-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudformation-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "cloudformation-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "cloudformation-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "cloudformation-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "cloudfront": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "cloudfront.amazonaws.com", Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "cloudhsm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "cloudhsmv2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "cloudhsm", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "cloudsearch": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "cloudtrail": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "cloudtrail-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "cloudtrail-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "cloudtrail-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "cloudtrail-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudtrail-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "cloudtrail-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudtrail-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "cloudtrail-fips.us-west-2.amazonaws.com", }, }, }, "cloudtrail-data": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "codeartifact": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "codebuild": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "codebuild-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "codebuild-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "codebuild-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "codebuild-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "codebuild-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "codebuild-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "codebuild-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "codebuild-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "codecatalyst": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "codecatalyst.global.api.aws", }, }, }, "codecommit": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "codecommit-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "codecommit-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips", }: endpoint{ Hostname: "codecommit-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "codecommit-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "codecommit-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "codecommit-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "codecommit-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "codecommit-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "codecommit-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "codecommit-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "codecommit-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "codedeploy": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "codedeploy-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "codedeploy-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "codedeploy-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "codedeploy-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "codedeploy-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "codedeploy-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "codedeploy-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "codedeploy-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "codeguru-reviewer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "codepipeline": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "codepipeline-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "codepipeline-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "codepipeline-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "codepipeline-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "codepipeline-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "codepipeline-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "codepipeline-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "codepipeline-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "codepipeline-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "codepipeline-fips.us-west-2.amazonaws.com", }, }, }, "codestar": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "codestar-connections": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "codestar-notifications": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "cognito-identity": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "cognito-identity-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "cognito-identity-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "cognito-identity-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "cognito-identity-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-identity-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-identity-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-identity-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-identity-fips.us-west-2.amazonaws.com", }, }, }, "cognito-idp": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "cognito-idp-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "cognito-idp-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "cognito-idp-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "cognito-idp-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-idp-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-idp-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-idp-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-idp-fips.us-west-2.amazonaws.com", }, }, }, "cognito-sync": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "comprehend": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "comprehend-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "comprehend-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "comprehend-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "comprehend-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "comprehend-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "comprehend-fips.us-west-2.amazonaws.com", }, }, }, "comprehendmedical": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com", }, }, }, "compute-optimizer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "compute-optimizer.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "compute-optimizer.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "compute-optimizer.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "compute-optimizer.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "compute-optimizer.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "compute-optimizer.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "compute-optimizer.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "compute-optimizer.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "compute-optimizer.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "compute-optimizer.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "compute-optimizer.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "compute-optimizer.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "compute-optimizer.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "compute-optimizer.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "compute-optimizer.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "compute-optimizer.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "eu-south-2", }: endpoint{ Hostname: "compute-optimizer.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "compute-optimizer.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "compute-optimizer.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "compute-optimizer.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "compute-optimizer.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "compute-optimizer.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "compute-optimizer.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "compute-optimizer.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "compute-optimizer.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "compute-optimizer.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "compute-optimizer.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "compute-optimizer.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "config": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "config-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "config-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "config-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "config-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "config-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "config-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "config-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "config-fips.us-west-2.amazonaws.com", }, }, }, "connect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "connect-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "connect-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "connect-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "connect-fips.us-west-2.amazonaws.com", }, }, }, "connect-campaigns": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "connect-campaigns-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "connect-campaigns-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "connect-campaigns-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "connect-campaigns-fips.us-west-2.amazonaws.com", }, }, }, "contact-lens": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "controltower": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "controltower-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "controltower-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "controltower-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "controltower-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "controltower-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "controltower-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "controltower-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "controltower-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "controltower-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "controltower-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "cost-optimization-hub": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "cost-optimization-hub.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "cur": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "data-ats.iot": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, CredentialScope: credentialScope{ Service: "iotdata", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.iot-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "data.iot-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Service: "iotdata", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "data.iot-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Service: "iotdata", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "data.iot-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Service: "iotdata", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "data.iot-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Service: "iotdata", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "data.iot-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Service: "iotdata", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.iot-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "data.iot-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.iot-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "data.iot-fips.us-west-2.amazonaws.com", }, }, }, "data.jobs.iot": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com", }, }, }, "data.mediastore": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "databrew": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "databrew-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "databrew-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "databrew-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "databrew-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "databrew-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "databrew-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "databrew-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "databrew-fips.us-west-2.amazonaws.com", }, }, }, "dataexchange": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "datapipeline": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "datasync": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "datasync-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "datasync-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "datasync-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "datasync-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "datasync-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "datasync-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "datasync-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "datasync-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "datasync-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "datasync-fips.us-west-2.amazonaws.com", }, }, }, "datazone": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "datazone.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "datazone.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "datazone.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "datazone.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "datazone.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "datazone.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "datazone.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "datazone.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "datazone.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "datazone.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "datazone.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "datazone.ca-central-1.api.aws", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "datazone-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "datazone.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "datazone.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "datazone.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "datazone.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", }: endpoint{ Hostname: "datazone.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "datazone.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "datazone.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "datazone.eu-west-3.api.aws", }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "datazone.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "datazone.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "datazone.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "datazone.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "datazone.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "datazone-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "datazone.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "datazone-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "datazone.us-west-1.api.aws", }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "datazone.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "datazone-fips.us-west-2.amazonaws.com", }, }, }, "dax": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "devicefarm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "devops-guru": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "devops-guru-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "devops-guru-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "devops-guru-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "devops-guru-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "devops-guru-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "devops-guru-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "devops-guru-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "devops-guru-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "devops-guru-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "devops-guru-fips.us-west-2.amazonaws.com", }, }, }, "directconnect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "directconnect-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "directconnect-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "directconnect-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "directconnect-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "directconnect-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "directconnect-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "directconnect-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "directconnect-fips.us-west-2.amazonaws.com", }, }, }, "discovery": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "dlm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "dms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "dms", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dms", Variant: fipsVariant, }: endpoint{ Hostname: "dms-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dms-fips", }: endpoint{ Hostname: "dms-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "dms-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "dms-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "dms-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "dms-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "dms-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "dms-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "dms-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "dms-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "docdb": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "rds.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "rds.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "rds.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "rds.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "rds.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "rds.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "rds.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "rds.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "rds.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "rds.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "rds.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "rds.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "rds.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "rds.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "drs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "ds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "ds-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "ds-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ds-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ds-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ds-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ds-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ds-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ds-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ds-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ds-fips.us-west-2.amazonaws.com", }, }, }, "dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "dynamodb-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "dynamodb-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "local", }: endpoint{ Hostname: "localhost:8000", Protocols: []string{"http"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "dynamodb-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "dynamodb-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "dynamodb-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "dynamodb-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "dynamodb-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "dynamodb-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "dynamodb-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "dynamodb-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "ebs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "ebs-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "ebs-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ebs-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ebs-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ebs-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ebs-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ebs-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ebs-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ebs-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ebs-fips.us-west-2.amazonaws.com", }, }, }, "ec2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "ec2.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "ec2-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "ec2.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "ec2-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ec2-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ec2-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ec2-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ec2-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "ec2.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "ec2.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ec2-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "ec2.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ec2-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ec2-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "ec2.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ec2-fips.us-west-2.amazonaws.com", }, }, }, "ecs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ecs-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ecs-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ecs-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ecs-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecs-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ecs-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecs-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ecs-fips.us-west-2.amazonaws.com", }, }, }, "edge.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "eks": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "fips.eks.{region}.{dnsSuffix}", Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "fips.eks.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "fips.eks.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "fips.eks.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "fips.eks.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.eks.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "fips.eks.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.eks.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "fips.eks.us-west-2.amazonaws.com", }, }, }, "elasticache": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips", }: endpoint{ Hostname: "elasticache-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticache-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "elasticache-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticache-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "elasticache-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticache-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "elasticache-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticache-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "elasticache-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "elasticbeanstalk": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com", }, }, }, "elasticfilesystem": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com", }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com", }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com", }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-south-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-south-2.amazonaws.com", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ap-southeast-4.amazonaws.com", }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-central-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.eu-central-2.amazonaws.com", }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com", }, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com", }, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-south-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.eu-south-2.amazonaws.com", }, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com", }, endpointKey{ Region: "fips-af-south-1", }: endpoint{ Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-east-1", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-1", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-2", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-3", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-south-1", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-south-2", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-1", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-2", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-3", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-4", }: endpoint{ Hostname: "elasticfilesystem-fips.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-central-1", }: endpoint{ Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-central-2", }: endpoint{ Hostname: "elasticfilesystem-fips.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-north-1", }: endpoint{ Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-south-1", }: endpoint{ Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-south-2", }: endpoint{ Hostname: "elasticfilesystem-fips.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-1", }: endpoint{ Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-2", }: endpoint{ Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-3", }: endpoint{ Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-il-central-1", }: endpoint{ Hostname: "elasticfilesystem-fips.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-central-1", }: endpoint{ Hostname: "elasticfilesystem-fips.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-south-1", }: endpoint{ Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-sa-east-1", }: endpoint{ Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.il-central-1.amazonaws.com", }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.me-central-1.amazonaws.com", }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com", }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com", }, }, }, "elasticloadbalancing": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com", }, }, }, "elasticmapreduce": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ SSLCommonName: "{region}.{service}.{dnsSuffix}", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{ SSLCommonName: "{service}.{region}.{dnsSuffix}", }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{ SSLCommonName: "{service}.{region}.{dnsSuffix}", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com", SSLCommonName: "{service}.{region}.{dnsSuffix}", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "elasticmapreduce.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com", }, }, }, "elastictranscoder": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "email": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "email-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "email-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "email-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "email-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "email-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "email-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "email-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "email-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "email-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "email-fips.us-west-2.amazonaws.com", }, }, }, "emr-containers": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "emr-containers-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "emr-containers-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "emr-containers-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "emr-containers-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "emr-containers-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "emr-containers-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "emr-containers-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "emr-containers-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "emr-containers-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "emr-containers-fips.us-west-2.amazonaws.com", }, }, }, "emr-serverless": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "emr-serverless-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "emr-serverless-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "emr-serverless-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "emr-serverless-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "emr-serverless-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "emr-serverless-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "emr-serverless-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "emr-serverless-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "emr-serverless-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "emr-serverless-fips.us-west-2.amazonaws.com", }, }, }, "entitlement.marketplace": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "aws-marketplace", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "es": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.ca-central-1.api.aws", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-central-2", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.eu-west-3.api.aws", }, endpointKey{ Region: "fips", }: endpoint{ Hostname: "es-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "es-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "es-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "es-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "es-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "es-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "es-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "es-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "es-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "events": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "events-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "events-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "events-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "events-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "events-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "events-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "events-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "events-fips.us-west-2.amazonaws.com", }, }, }, "evidently": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "evidently.ap-northeast-1.amazonaws.com", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "evidently.ap-southeast-1.amazonaws.com", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "evidently.ap-southeast-2.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "evidently.eu-central-1.amazonaws.com", }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "evidently.eu-north-1.amazonaws.com", }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "evidently.eu-west-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "evidently.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "evidently.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "evidently.us-west-2.amazonaws.com", }, }, }, "finspace": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "finspace-api": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "firehose": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "firehose-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "firehose-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "firehose-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "firehose-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "firehose-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "firehose-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "firehose-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "firehose-fips.us-west-2.amazonaws.com", }, }, }, "fms": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.af-south-1.amazonaws.com", }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.ap-east-1.amazonaws.com", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.ap-northeast-1.amazonaws.com", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.ap-northeast-2.amazonaws.com", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.ap-south-1.amazonaws.com", }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.ap-southeast-1.amazonaws.com", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.ap-southeast-2.amazonaws.com", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.eu-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.eu-south-1.amazonaws.com", }, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.eu-west-1.amazonaws.com", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.eu-west-2.amazonaws.com", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.eu-west-3.amazonaws.com", }, endpointKey{ Region: "fips-af-south-1", }: endpoint{ Hostname: "fms-fips.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-east-1", }: endpoint{ Hostname: "fms-fips.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-1", }: endpoint{ Hostname: "fms-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-2", }: endpoint{ Hostname: "fms-fips.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-south-1", }: endpoint{ Hostname: "fms-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-1", }: endpoint{ Hostname: "fms-fips.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-2", }: endpoint{ Hostname: "fms-fips.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "fms-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-central-1", }: endpoint{ Hostname: "fms-fips.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-south-1", }: endpoint{ Hostname: "fms-fips.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-1", }: endpoint{ Hostname: "fms-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-2", }: endpoint{ Hostname: "fms-fips.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-3", }: endpoint{ Hostname: "fms-fips.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-south-1", }: endpoint{ Hostname: "fms-fips.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-sa-east-1", }: endpoint{ Hostname: "fms-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "fms-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "fms-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "fms-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "fms-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.me-south-1.amazonaws.com", }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.sa-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.us-west-2.amazonaws.com", }, }, }, "forecast": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "forecast-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "forecast-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "forecast-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "forecast-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "forecast-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "forecast-fips.us-west-2.amazonaws.com", }, }, }, "forecastquery": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "forecastquery-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "forecastquery-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "forecastquery-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "forecastquery-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "forecastquery-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "forecastquery-fips.us-west-2.amazonaws.com", }, }, }, "frauddetector": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "fsx": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "fsx-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-prod-ca-central-1", }: endpoint{ Hostname: "fsx-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-prod-us-east-1", }: endpoint{ Hostname: "fsx-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-prod-us-east-2", }: endpoint{ Hostname: "fsx-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-prod-us-west-1", }: endpoint{ Hostname: "fsx-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-prod-us-west-2", }: endpoint{ Hostname: "fsx-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "fsx-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "fsx-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "fsx-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "fsx-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "prod-ca-central-1", }: endpoint{ CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-east-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-west-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-west-2.amazonaws.com", }, }, }, "gamelift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "geo": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "glacier": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "glacier-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "glacier-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "glacier-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "glacier-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "glacier-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "glacier-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "glacier-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "glacier-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "glacier-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "glacier-fips.us-west-2.amazonaws.com", }, }, }, "glue": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "glue-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "glue-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "glue-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "glue-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "glue-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "glue-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "glue-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "glue-fips.us-west-2.amazonaws.com", }, }, }, "grafana": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "grafana.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "grafana.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "grafana.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "grafana.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "grafana.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "grafana.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "grafana.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "grafana.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "grafana.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "grafana.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "greengrass": service{ IsRegionalized: boxedTrue, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "greengrass-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "greengrass-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "greengrass-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "greengrass-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "greengrass-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "greengrass-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "greengrass-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "greengrass-fips.us-west-2.amazonaws.com", }, }, }, "groundstation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "groundstation-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "groundstation-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "groundstation-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "groundstation-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "groundstation-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "groundstation-fips.us-west-2.amazonaws.com", }, }, }, "guardduty": service{ IsRegionalized: boxedTrue, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "guardduty-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "guardduty-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "guardduty-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "guardduty-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "guardduty-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "guardduty-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "guardduty-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "guardduty-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "health": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Defaults: endpointDefaults{ defaultKey{}: endpoint{ SSLCommonName: "health.us-east-1.amazonaws.com", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "global.health.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "health-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "health-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, }, }, "healthlake": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "honeycode": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "iam": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "iam.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "aws-global", Variant: fipsVariant, }: endpoint{ Hostname: "iam-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "aws-global-fips", }: endpoint{ Hostname: "iam-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "iam", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "iam", Variant: fipsVariant, }: endpoint{ Hostname: "iam-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "iam-fips", }: endpoint{ Hostname: "iam-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, }, }, "identity-chime": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "identity-chime-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "identity-chime-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, }, }, "identitystore": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "importexport": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "importexport.amazonaws.com", SignatureVersions: []string{"v2", "v4"}, CredentialScope: credentialScope{ Region: "us-east-1", Service: "IngestionService", }, }, }, }, "ingest.timestream": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "ingest-fips-us-east-1", }: endpoint{ Hostname: "ingest.timestream-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ingest-fips-us-east-2", }: endpoint{ Hostname: "ingest.timestream-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ingest-fips-us-west-2", }: endpoint{ Hostname: "ingest.timestream-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ingest-us-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ingest-us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ingest.timestream-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ingest-us-east-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ingest-us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ingest.timestream-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ingest-us-west-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ingest-us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ingest.timestream-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "inspector": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "inspector-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "inspector-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "inspector-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "inspector-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "inspector-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "inspector-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "inspector-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "inspector-fips.us-west-2.amazonaws.com", }, }, }, "inspector2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "inspector2-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "inspector2-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "inspector2-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "inspector2-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "inspector2-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "inspector2-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "inspector2-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "inspector2-fips.us-west-2.amazonaws.com", }, }, }, "internetmonitor": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "internetmonitor.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "internetmonitor.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "internetmonitor.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "internetmonitor.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "internetmonitor.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "internetmonitor.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "internetmonitor.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "internetmonitor.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "internetmonitor.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "internetmonitor.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "internetmonitor.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "internetmonitor.ca-central-1.api.aws", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "internetmonitor-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "internetmonitor.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "internetmonitor.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "internetmonitor.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "internetmonitor.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", }: endpoint{ Hostname: "internetmonitor.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "internetmonitor.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "internetmonitor.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "internetmonitor.eu-west-3.api.aws", }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "internetmonitor.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "internetmonitor.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "internetmonitor.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "internetmonitor.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "internetmonitor.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "internetmonitor-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "internetmonitor.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "internetmonitor-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "internetmonitor.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "internetmonitor-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "internetmonitor.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "internetmonitor-fips.us-west-2.amazonaws.com", }, }, }, "iot": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "iot-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "iot-fips.ca-central-1.amazonaws.com", Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "iot-fips.us-east-1.amazonaws.com", Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "iot-fips.us-east-2.amazonaws.com", Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "iot-fips.us-west-1.amazonaws.com", Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "iot-fips.us-west-2.amazonaws.com", Deprecated: boxedTrue, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "iot-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "iot-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "iot-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "iot-fips.us-west-2.amazonaws.com", }, }, }, "iotanalytics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "iotevents": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "iotevents-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "iotevents-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "iotevents-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "iotevents-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "iotevents-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "iotevents-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "iotevents-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "iotevents-fips.us-west-2.amazonaws.com", }, }, }, "ioteventsdata": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "data.iotevents.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "data.iotevents.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "data.iotevents.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "data.iotevents.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "data.iotevents.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "data.iotevents.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.iotevents-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "data.iotevents.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "data.iotevents.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "data.iotevents.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "data.iotevents-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "data.iotevents-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "data.iotevents-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "data.iotevents-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "data.iotevents.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.iotevents-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "data.iotevents.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "data.iotevents-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "data.iotevents.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "data.iotevents-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "iotfleetwise": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "iotroborunner": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "iotsecuredtunneling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com", }, }, }, "iotsitewise": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "iotsitewise-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "iotsitewise-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "iotsitewise-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "iotsitewise-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "iotsitewise-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "iotsitewise-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "iotsitewise-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "iotsitewise-fips.us-west-2.amazonaws.com", }, }, }, "iotthingsgraph": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "iotthingsgraph", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "iottwinmaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "api-ap-northeast-1", }: endpoint{ Hostname: "api.iottwinmaker.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "api-ap-northeast-2", }: endpoint{ Hostname: "api.iottwinmaker.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "api-ap-south-1", }: endpoint{ Hostname: "api.iottwinmaker.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "api-ap-southeast-1", }: endpoint{ Hostname: "api.iottwinmaker.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "api-ap-southeast-2", }: endpoint{ Hostname: "api.iottwinmaker.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "api-eu-central-1", }: endpoint{ Hostname: "api.iottwinmaker.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "api-eu-west-1", }: endpoint{ Hostname: "api.iottwinmaker.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "api-us-east-1", }: endpoint{ Hostname: "api.iottwinmaker.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "api-us-west-2", }: endpoint{ Hostname: "api.iottwinmaker.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "data-ap-northeast-1", }: endpoint{ Hostname: "data.iottwinmaker.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "data-ap-northeast-2", }: endpoint{ Hostname: "data.iottwinmaker.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "data-ap-south-1", }: endpoint{ Hostname: "data.iottwinmaker.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "data-ap-southeast-1", }: endpoint{ Hostname: "data.iottwinmaker.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "data-ap-southeast-2", }: endpoint{ Hostname: "data.iottwinmaker.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "data-eu-central-1", }: endpoint{ Hostname: "data.iottwinmaker.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "data-eu-west-1", }: endpoint{ Hostname: "data.iottwinmaker.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "data-us-east-1", }: endpoint{ Hostname: "data.iottwinmaker.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "data-us-west-2", }: endpoint{ Hostname: "data.iottwinmaker.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "fips-api-us-east-1", }: endpoint{ Hostname: "api.iottwinmaker-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "fips-api-us-west-2", }: endpoint{ Hostname: "api.iottwinmaker-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "fips-data-us-east-1", }: endpoint{ Hostname: "data.iottwinmaker-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "fips-data-us-west-2", }: endpoint{ Hostname: "data.iottwinmaker-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "iottwinmaker-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "iottwinmaker-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "iottwinmaker-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "iottwinmaker-fips.us-west-2.amazonaws.com", }, }, }, "iotwireless": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "api.iotwireless.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "api.iotwireless.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "api.iotwireless.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "ivs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "ivschat": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "ivsrealtime": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "kafka": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "kafka-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "kafka-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "kafka-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "kafka-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "kafka-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "kafka-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kafka-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "kafka-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kafka-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "kafka-fips.us-west-2.amazonaws.com", }, }, }, "kafkaconnect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "kendra": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "kendra-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "kendra-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "kendra-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kendra-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "kendra-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "kendra-fips.us-west-2.amazonaws.com", }, }, }, "kendra-ranking": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "kendra-ranking.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "kendra-ranking.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "kendra-ranking.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "kendra-ranking.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "kendra-ranking.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "kendra-ranking.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "kendra-ranking.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "kendra-ranking.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "kendra-ranking.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "kendra-ranking.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "kendra-ranking.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "kendra-ranking.ca-central-1.api.aws", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "kendra-ranking-fips.ca-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "kendra-ranking.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "kendra-ranking.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "kendra-ranking.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", }: endpoint{ Hostname: "kendra-ranking.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "kendra-ranking.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "kendra-ranking.eu-west-3.api.aws", }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "kendra-ranking.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "kendra-ranking.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "kendra-ranking.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "kendra-ranking.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "kendra-ranking.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kendra-ranking-fips.us-east-1.api.aws", }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "kendra-ranking.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "kendra-ranking-fips.us-east-2.api.aws", }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "kendra-ranking.us-west-1.api.aws", }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "kendra-ranking.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "kendra-ranking-fips.us-west-2.api.aws", }, }, }, "kinesis": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "kinesis-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "kinesis-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "kinesis-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "kinesis-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kinesis-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "kinesis-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kinesis-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "kinesis-fips.us-west-2.amazonaws.com", }, }, }, "kinesisanalytics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "kinesisvideo": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "kms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ProdFips", }: endpoint{ Hostname: "kms-fips.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.af-south-1.amazonaws.com", }, endpointKey{ Region: "af-south-1-fips", }: endpoint{ Hostname: "kms-fips.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-east-1.amazonaws.com", }, endpointKey{ Region: "ap-east-1-fips", }: endpoint{ Hostname: "kms-fips.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-northeast-1.amazonaws.com", }, endpointKey{ Region: "ap-northeast-1-fips", }: endpoint{ Hostname: "kms-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-northeast-2.amazonaws.com", }, endpointKey{ Region: "ap-northeast-2-fips", }: endpoint{ Hostname: "kms-fips.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-northeast-3.amazonaws.com", }, endpointKey{ Region: "ap-northeast-3-fips", }: endpoint{ Hostname: "kms-fips.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-south-1.amazonaws.com", }, endpointKey{ Region: "ap-south-1-fips", }: endpoint{ Hostname: "kms-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-south-2", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-south-2.amazonaws.com", }, endpointKey{ Region: "ap-south-2-fips", }: endpoint{ Hostname: "kms-fips.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-southeast-1.amazonaws.com", }, endpointKey{ Region: "ap-southeast-1-fips", }: endpoint{ Hostname: "kms-fips.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-southeast-2.amazonaws.com", }, endpointKey{ Region: "ap-southeast-2-fips", }: endpoint{ Hostname: "kms-fips.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-southeast-3.amazonaws.com", }, endpointKey{ Region: "ap-southeast-3-fips", }: endpoint{ Hostname: "kms-fips.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ap-southeast-4.amazonaws.com", }, endpointKey{ Region: "ap-southeast-4-fips", }: endpoint{ Hostname: "kms-fips.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, Deprecated: boxedTrue, }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "kms-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.eu-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1-fips", }: endpoint{ Hostname: "kms-fips.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-central-2", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.eu-central-2.amazonaws.com", }, endpointKey{ Region: "eu-central-2-fips", }: endpoint{ Hostname: "kms-fips.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.eu-north-1.amazonaws.com", }, endpointKey{ Region: "eu-north-1-fips", }: endpoint{ Hostname: "kms-fips.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.eu-south-1.amazonaws.com", }, endpointKey{ Region: "eu-south-1-fips", }: endpoint{ Hostname: "kms-fips.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-south-2", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.eu-south-2.amazonaws.com", }, endpointKey{ Region: "eu-south-2-fips", }: endpoint{ Hostname: "kms-fips.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.eu-west-1.amazonaws.com", }, endpointKey{ Region: "eu-west-1-fips", }: endpoint{ Hostname: "kms-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.eu-west-2.amazonaws.com", }, endpointKey{ Region: "eu-west-2-fips", }: endpoint{ Hostname: "kms-fips.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.eu-west-3.amazonaws.com", }, endpointKey{ Region: "eu-west-3-fips", }: endpoint{ Hostname: "kms-fips.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.il-central-1.amazonaws.com", }, endpointKey{ Region: "il-central-1-fips", }: endpoint{ Hostname: "kms-fips.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.me-central-1.amazonaws.com", }, endpointKey{ Region: "me-central-1-fips", }: endpoint{ Hostname: "kms-fips.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.me-south-1.amazonaws.com", }, endpointKey{ Region: "me-south-1-fips", }: endpoint{ Hostname: "kms-fips.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.sa-east-1.amazonaws.com", }, endpointKey{ Region: "sa-east-1-fips", }: endpoint{ Hostname: "kms-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "kms-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "kms-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "kms-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "kms-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "lakeformation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "lakeformation-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "lakeformation-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "lakeformation-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "lakeformation-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "lakeformation-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "lakeformation-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "lakeformation-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "lakeformation-fips.us-west-2.amazonaws.com", }, }, }, "lambda": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.ca-central-1.api.aws", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-central-2", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.eu-west-3.api.aws", }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "lambda-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "lambda-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "lambda-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "lambda-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "lambda-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "lambda-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "lambda-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "lambda-fips.us-west-2.amazonaws.com", }, }, }, "license-manager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "license-manager-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "license-manager-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "license-manager-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "license-manager-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-fips.us-west-2.amazonaws.com", }, }, }, "license-manager-linux-subscriptions": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "license-manager-linux-subscriptions-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "license-manager-linux-subscriptions-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "license-manager-linux-subscriptions-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "license-manager-linux-subscriptions-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-linux-subscriptions-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-linux-subscriptions-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-linux-subscriptions-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-linux-subscriptions-fips.us-west-2.amazonaws.com", }, }, }, "license-manager-user-subscriptions": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com", }, }, }, "lightsail": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "logs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "logs-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "logs-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "logs-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "logs-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "logs-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "logs-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "logs-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "logs-fips.us-west-2.amazonaws.com", }, }, }, "lookoutequipment": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "lookoutmetrics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "lookoutvision": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "m2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{}, }, }, "machinelearning": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "macie2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "macie2-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "macie2-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "macie2-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "macie2-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "macie2-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "macie2-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "macie2-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "macie2-fips.us-west-2.amazonaws.com", }, }, }, "managedblockchain": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "managedblockchain-query": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "marketplacecommerceanalytics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "media-pipelines-chime": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "media-pipelines-chime-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "media-pipelines-chime-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "media-pipelines-chime-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "media-pipelines-chime-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "mediaconnect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "mediaconvert": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "mediaconvert-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "mediaconvert-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "mediaconvert-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "mediaconvert-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "mediaconvert-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "mediaconvert-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "mediaconvert-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "mediaconvert-fips.us-west-2.amazonaws.com", }, }, }, "medialive": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "medialive-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "medialive-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "medialive-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "medialive-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "medialive-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "medialive-fips.us-west-2.amazonaws.com", }, }, }, "mediapackage": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "mediapackage-vod": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "mediapackagev2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "mediastore": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "meetings-chime": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "meetings-chime-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "meetings-chime-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "meetings-chime-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "meetings-chime-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "memory-db": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips", }: endpoint{ Hostname: "memory-db-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "messaging-chime": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "messaging-chime-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "messaging-chime-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, }, }, "metering.marketplace": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "aws-marketplace", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "metrics.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "mgh": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "mgn": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "mgn-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "mgn-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "mgn-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "mgn-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "mgn-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "mgn-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "mgn-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "mgn-fips.us-west-2.amazonaws.com", }, }, }, "migrationhub-orchestrator": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "migrationhub-strategy": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "mobileanalytics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "models-v2-lex": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "models.lex": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "lex", }, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "models-fips.lex.{region}.{dnsSuffix}", CredentialScope: credentialScope{ Service: "lex", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "models-fips.lex.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "models-fips.lex.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "models-fips.lex.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "models-fips.lex.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "monitoring": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "monitoring-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "monitoring-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "monitoring-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "monitoring-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "monitoring-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "monitoring-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "monitoring-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "monitoring-fips.us-west-2.amazonaws.com", }, }, }, "mq": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "mq-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "mq-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "mq-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "mq-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "mq-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "mq-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "mq-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "mq-fips.us-west-2.amazonaws.com", }, }, }, "mturk-requester": service{ IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "sandbox", }: endpoint{ Hostname: "mturk-requester-sandbox.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "neptune": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "rds.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "rds.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "rds.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "rds.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "rds.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "rds.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "rds.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "rds.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "rds.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "rds.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "rds.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "rds.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "rds.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "rds.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "rds.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "rds.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "rds.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "rds.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "network-firewall": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "network-firewall-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "network-firewall-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "network-firewall-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "network-firewall-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "network-firewall-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "network-firewall-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "network-firewall-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "network-firewall-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "network-firewall-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "network-firewall-fips.us-west-2.amazonaws.com", }, }, }, "networkmanager": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "networkmanager.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "aws-global", Variant: fipsVariant, }: endpoint{ Hostname: "networkmanager-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "fips-aws-global", }: endpoint{ Hostname: "networkmanager-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "nimble": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "oam": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "oidc": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "oidc.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "oidc.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "oidc.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "oidc.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "oidc.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "oidc.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "oidc.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "oidc.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "oidc.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "oidc.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "oidc.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "oidc.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "oidc.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "oidc.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "oidc.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "oidc.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "oidc.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "oidc.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "oidc.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "oidc.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "oidc.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "oidc.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "oidc.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "oidc.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "omics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "omics.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "omics.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "omics.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "omics.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "omics-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "omics-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "omics.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "omics.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "omics-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "omics.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "omics-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "opsworks": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "opsworks-cm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "organizations": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "organizations.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "aws-global", Variant: fipsVariant, }: endpoint{ Hostname: "organizations-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "fips-aws-global", }: endpoint{ Hostname: "organizations-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, }, }, "osis": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "outposts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "outposts-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "outposts-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "outposts-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "outposts-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "outposts-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "outposts-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "outposts-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "outposts-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "outposts-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "outposts-fips.us-west-2.amazonaws.com", }, }, }, "participant.connect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "participant.connect-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "participant.connect-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "participant.connect-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "participant.connect-fips.us-west-2.amazonaws.com", }, }, }, "personalize": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "pi": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "pinpoint": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "mobiletargeting", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "pinpoint.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "pinpoint-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "pinpoint-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "pinpoint-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "pinpoint-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "pinpoint-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "pinpoint.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "pinpoint-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "pinpoint.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "pinpoint-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "pinpoint.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "pinpoint-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "pipes": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "polly": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "polly-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "polly-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "polly-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "polly-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "polly-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "polly-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "polly-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "polly-fips.us-west-2.amazonaws.com", }, }, }, "portal.sso": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "portal.sso.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "portal.sso.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "portal.sso.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "portal.sso.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "portal.sso.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "portal.sso.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "portal.sso.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "portal.sso.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "portal.sso.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "portal.sso.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "portal.sso.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "portal.sso.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "portal.sso.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "portal.sso.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "portal.sso.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "portal.sso.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "portal.sso.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "portal.sso.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "portal.sso.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "portal.sso.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "portal.sso.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "portal.sso.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "portal.sso.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "portal.sso.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "profile": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "profile-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "profile-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "profile-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "profile-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "profile-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "profile-fips.us-west-2.amazonaws.com", }, }, }, "projects.iot1click": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "proton": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "qbusiness": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "qbusiness.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "qbusiness.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "qbusiness.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "qbusiness.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "qbusiness.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "qbusiness.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "qbusiness.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "qbusiness.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "qbusiness.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "qbusiness.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "qbusiness.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "qbusiness.ca-central-1.api.aws", }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "qbusiness.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "qbusiness.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "qbusiness.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "qbusiness.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", }: endpoint{ Hostname: "qbusiness.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "qbusiness.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "qbusiness.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "qbusiness.eu-west-3.api.aws", }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "qbusiness.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "qbusiness.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "qbusiness.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "qbusiness.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "qbusiness.us-east-1.api.aws", }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "qbusiness.us-east-2.api.aws", }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "qbusiness.us-west-1.api.aws", }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "qbusiness.us-west-2.api.aws", }, }, }, "qldb": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "qldb-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "qldb-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "qldb-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "qldb-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "qldb-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "qldb-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "qldb-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "qldb-fips.us-west-2.amazonaws.com", }, }, }, "quicksight": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "ram": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "ram-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "ram-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ram-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ram-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ram-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ram-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ram-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ram-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ram-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ram-fips.us-west-2.amazonaws.com", }, }, }, "rbin": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "rbin-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "rbin-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "rbin-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "rbin-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "rbin-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-west-2.amazonaws.com", }, }, }, "rds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "rds-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "rds-fips.ca-central-1", }: endpoint{ Hostname: "rds-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds-fips.us-east-1", }: endpoint{ Hostname: "rds-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds-fips.us-east-2", }: endpoint{ Hostname: "rds-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds-fips.us-west-1", }: endpoint{ Hostname: "rds-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds-fips.us-west-2", }: endpoint{ Hostname: "rds-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.ca-central-1", }: endpoint{ CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-east-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-west-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{ SSLCommonName: "{service}.{dnsSuffix}", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-east-1.amazonaws.com", SSLCommonName: "{service}.{dnsSuffix}", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "rds-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "rds-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "rds-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "rds-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "rds-data": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "rds-data-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "rds-data-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "rds-data-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "rds-data-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-data-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "rds-data-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-data-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "rds-data-fips.us-west-2.amazonaws.com", }, }, }, "redshift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "redshift-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "redshift-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "redshift-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "redshift-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "redshift-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "redshift-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "redshift-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "redshift-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "redshift-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "redshift-fips.us-west-2.amazonaws.com", }, }, }, "redshift-serverless": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "rekognition": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "rekognition-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "rekognition-fips.ca-central-1", }: endpoint{ Hostname: "rekognition-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition-fips.us-east-1", }: endpoint{ Hostname: "rekognition-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition-fips.us-east-2", }: endpoint{ Hostname: "rekognition-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition-fips.us-west-1", }: endpoint{ Hostname: "rekognition-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition-fips.us-west-2", }: endpoint{ Hostname: "rekognition-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.ca-central-1", }: endpoint{ CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-east-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-west-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "rekognition-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "rekognition-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "rekognition-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "rekognition-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "resiliencehub": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "resource-explorer-2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "resource-explorer-2.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "resource-explorer-2.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "resource-explorer-2.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "resource-explorer-2.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "resource-explorer-2.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "resource-explorer-2.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "resource-explorer-2.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "resource-explorer-2.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "resource-explorer-2.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "resource-explorer-2.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "resource-explorer-2.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "resource-explorer-2.ca-central-1.api.aws", }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "resource-explorer-2.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "resource-explorer-2.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "resource-explorer-2.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "resource-explorer-2.eu-south-1.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "resource-explorer-2.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "resource-explorer-2.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "resource-explorer-2.eu-west-3.api.aws", }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "resource-explorer-2.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "resource-explorer-2.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "resource-explorer-2.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "resource-explorer-2.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "resource-explorer-2.us-east-1.api.aws", }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "resource-explorer-2.us-east-2.api.aws", }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "resource-explorer-2.us-west-1.api.aws", }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "resource-explorer-2.us-west-2.api.aws", }, }, }, "resource-groups": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "resource-groups-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "resource-groups-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "resource-groups-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "resource-groups-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "resource-groups-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "resource-groups-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "resource-groups-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "resource-groups-fips.us-west-2.amazonaws.com", }, }, }, "robomaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "rolesanywhere": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "route53": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "route53.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "aws-global", Variant: fipsVariant, }: endpoint{ Hostname: "route53-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "fips-aws-global", }: endpoint{ Hostname: "route53-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, }, }, "route53-recovery-control-config": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "route53-recovery-control-config.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "route53domains": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-east-1", }: endpoint{}, }, }, "route53resolver": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "rum": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "runtime-v2-lex": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "runtime.lex": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "lex", }, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.lex.{region}.{dnsSuffix}", CredentialScope: credentialScope{ Service: "lex", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.lex.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "runtime-fips.lex.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.lex.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "runtime-fips.lex.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "runtime.sagemaker": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.sagemaker.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "s3": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedTrue, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, defaultKey{ Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.af-south-1.amazonaws.com", }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-east-1.amazonaws.com", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "s3.ap-northeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-northeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-northeast-2.amazonaws.com", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-northeast-3.amazonaws.com", }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-south-1.amazonaws.com", }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-south-2.amazonaws.com", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "s3.ap-southeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-southeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "s3.ap-southeast-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-southeast-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-southeast-3.amazonaws.com", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ap-southeast-4.amazonaws.com", }, endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "s3.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-fips.dualstack.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.eu-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-central-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.eu-central-2.amazonaws.com", }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.eu-north-1.amazonaws.com", }, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.eu-south-1.amazonaws.com", }, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.eu-south-2.amazonaws.com", }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "s3.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.eu-west-2.amazonaws.com", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.eu-west-3.amazonaws.com", }, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "s3-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "s3-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "s3-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "s3-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "s3-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.il-central-1.amazonaws.com", }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.me-central-1.amazonaws.com", }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.me-south-1.amazonaws.com", }, endpointKey{ Region: "s3-external-1", }: endpoint{ Hostname: "s3-external-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "s3.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "s3.us-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.us-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-fips.us-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-fips.dualstack.us-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "s3-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-fips.dualstack.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "s3.us-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.us-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-fips.us-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-fips.dualstack.us-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "s3.us-west-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.us-west-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "s3-fips.us-west-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-fips.dualstack.us-west-2.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, }, }, "s3-control": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, SignatureVersions: []string{"s3v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"s3v4"}, }, defaultKey{ Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"s3v4"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "s3-control.ap-northeast-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.ap-northeast-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "s3-control.ap-northeast-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.ap-northeast-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "s3-control.ap-northeast-3.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.ap-northeast-3.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "s3-control.ap-south-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.ap-south-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "s3-control.ap-southeast-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.ap-southeast-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "s3-control.ap-southeast-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.ap-southeast-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "s3-control.ca-central-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.ca-central-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-control-fips.ca-central-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-control-fips.dualstack.ca-central-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "s3-control-fips.ca-central-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "s3-control.eu-central-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.eu-central-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "s3-control.eu-north-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.eu-north-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "s3-control.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "s3-control.eu-west-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.eu-west-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "s3-control.eu-west-3.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.eu-west-3.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "s3-control.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "s3-control.us-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.us-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-control-fips.us-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-control-fips.dualstack.us-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "s3-control-fips.us-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "s3-control.us-east-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.us-east-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "s3-control-fips.us-east-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-control-fips.dualstack.us-east-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "s3-control-fips.us-east-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "s3-control.us-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.us-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-control-fips.us-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-control-fips.dualstack.us-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "s3-control-fips.us-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "s3-control.us-west-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.us-west-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "s3-control-fips.us-west-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-control-fips.dualstack.us-west-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "s3-control-fips.us-west-2.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "s3-outposts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant | dualStackVariant, }: endpoint{}, }, }, "sagemaker-geospatial": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "savingsplans": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "savingsplans.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "scheduler": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "schemas": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "sdb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, SignatureVersions: []string{"v2"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "sdb.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "secretsmanager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-south-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-central-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-south-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Deprecated: boxedTrue, }, }, }, "securityhub": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "securityhub-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "securityhub-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "securityhub-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "securityhub-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "securityhub-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "securityhub-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "securityhub-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "securityhub-fips.us-west-2.amazonaws.com", }, }, }, "securitylake": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "serverlessrepo": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "me-south-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-east-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-east-2", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-west-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-west-2", }: endpoint{ Protocols: []string{"https"}, }, }, }, "servicecatalog": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "servicecatalog-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "servicecatalog-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "servicecatalog-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "servicecatalog-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "servicecatalog-appregistry": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com", }, }, }, "servicediscovery": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "af-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.af-south-1.api.aws", }, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-east-1.api.aws", }, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-northeast-1.api.aws", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-northeast-2.api.aws", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-northeast-3.api.aws", }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-south-1.api.aws", }, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-south-2.api.aws", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-southeast-1.api.aws", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-southeast-2.api.aws", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-southeast-3.api.aws", }, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ap-southeast-4.api.aws", }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.ca-central-1.api.aws", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "servicediscovery-fips.ca-central-1.api.aws", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.eu-central-1.api.aws", }, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-central-2", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.eu-central-2.api.aws", }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.eu-north-1.api.aws", }, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.eu-south-1.api.aws", }, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-south-2", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.eu-south-2.api.aws", }, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.eu-west-1.api.aws", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.eu-west-2.api.aws", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.eu-west-3.api.aws", }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "il-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.il-central-1.api.aws", }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.me-central-1.api.aws", }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "me-south-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.me-south-1.api.aws", }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.sa-east-1.api.aws", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-east-1.api.aws", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "servicediscovery-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-east-2.api.aws", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "servicediscovery-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-west-1.api.aws", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "servicediscovery-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-west-2.api.aws", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "servicediscovery-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "servicequotas": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "session.qldb": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "session.qldb-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "session.qldb-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "session.qldb-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "session.qldb-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "session.qldb-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "session.qldb-fips.us-west-2.amazonaws.com", }, }, }, "shield": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Defaults: endpointDefaults{ defaultKey{}: endpoint{ SSLCommonName: "shield.us-east-1.amazonaws.com", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "shield.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "aws-global", Variant: fipsVariant, }: endpoint{ Hostname: "shield-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "fips-aws-global", }: endpoint{ Hostname: "shield-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, }, }, "signer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "signer-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "signer-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "signer-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "signer-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-verification-us-east-1", }: endpoint{ Hostname: "verification.signer-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "fips-verification-us-east-2", }: endpoint{ Hostname: "verification.signer-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "fips-verification-us-west-1", }: endpoint{ Hostname: "verification.signer-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "fips-verification-us-west-2", }: endpoint{ Hostname: "verification.signer-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "signer-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "signer-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "signer-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "signer-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "verification-af-south-1", }: endpoint{ Hostname: "verification.signer.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "verification-ap-east-1", }: endpoint{ Hostname: "verification.signer.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "verification-ap-northeast-1", }: endpoint{ Hostname: "verification.signer.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "verification-ap-northeast-2", }: endpoint{ Hostname: "verification.signer.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "verification-ap-south-1", }: endpoint{ Hostname: "verification.signer.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "verification-ap-southeast-1", }: endpoint{ Hostname: "verification.signer.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "verification-ap-southeast-2", }: endpoint{ Hostname: "verification.signer.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "verification-ca-central-1", }: endpoint{ Hostname: "verification.signer.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "verification-eu-central-1", }: endpoint{ Hostname: "verification.signer.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "verification-eu-north-1", }: endpoint{ Hostname: "verification.signer.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "verification-eu-south-1", }: endpoint{ Hostname: "verification.signer.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "verification-eu-west-1", }: endpoint{ Hostname: "verification.signer.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "verification-eu-west-2", }: endpoint{ Hostname: "verification.signer.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "verification-eu-west-3", }: endpoint{ Hostname: "verification.signer.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "verification-me-south-1", }: endpoint{ Hostname: "verification.signer.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "verification-sa-east-1", }: endpoint{ Hostname: "verification.signer.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "verification-us-east-1", }: endpoint{ Hostname: "verification.signer.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "verification-us-east-2", }: endpoint{ Hostname: "verification.signer.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "verification-us-west-1", }: endpoint{ Hostname: "verification.signer.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "verification-us-west-2", }: endpoint{ Hostname: "verification.signer.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "simspaceweaver": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "sms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "sms-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "sms-fips.us-west-2.amazonaws.com", }, }, }, "sms-voice": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "sms-voice-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "sms-voice-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "sms-voice-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "sms-voice-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "sms-voice-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "sms-voice-fips.us-west-2.amazonaws.com", }, }, }, "snowball": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.ap-northeast-1.amazonaws.com", }, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.ap-northeast-2.amazonaws.com", }, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.ap-northeast-3.amazonaws.com", }, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.ap-south-1.amazonaws.com", }, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.ap-southeast-1.amazonaws.com", }, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.ap-southeast-2.amazonaws.com", }, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.eu-central-1.amazonaws.com", }, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.eu-west-1.amazonaws.com", }, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.eu-west-2.amazonaws.com", }, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "eu-west-3", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.eu-west-3.amazonaws.com", }, endpointKey{ Region: "fips-ap-northeast-1", }: endpoint{ Hostname: "snowball-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-2", }: endpoint{ Hostname: "snowball-fips.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-3", }: endpoint{ Hostname: "snowball-fips.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-south-1", }: endpoint{ Hostname: "snowball-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-1", }: endpoint{ Hostname: "snowball-fips.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-2", }: endpoint{ Hostname: "snowball-fips.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "snowball-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-central-1", }: endpoint{ Hostname: "snowball-fips.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-1", }: endpoint{ Hostname: "snowball-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-2", }: endpoint{ Hostname: "snowball-fips.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-3", }: endpoint{ Hostname: "snowball-fips.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-sa-east-1", }: endpoint{ Hostname: "snowball-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "snowball-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "snowball-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "snowball-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "snowball-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.sa-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.us-west-2.amazonaws.com", }, }, }, "sns": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "sns-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "sns-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "sns-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "sns-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "sns-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "sns-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "sns-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "sns-fips.us-west-2.amazonaws.com", }, }, }, "sqs": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ SSLCommonName: "{region}.queue.{dnsSuffix}", Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "sqs-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "sqs-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "sqs-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "sqs-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{ SSLCommonName: "queue.{dnsSuffix}", }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "sqs-fips.us-east-1.amazonaws.com", SSLCommonName: "queue.{dnsSuffix}", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "sqs-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "sqs-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "sqs-fips.us-west-2.amazonaws.com", }, }, }, "ssm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "ssm-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ssm-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ssm-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ssm-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ssm-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-fips.us-west-2.amazonaws.com", }, }, }, "ssm-contacts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ssm-contacts-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ssm-contacts-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ssm-contacts-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ssm-contacts-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-contacts-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-contacts-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-contacts-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-contacts-fips.us-west-2.amazonaws.com", }, }, }, "ssm-incidents": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-incidents-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "ssm-incidents-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ssm-incidents-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ssm-incidents-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ssm-incidents-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ssm-incidents-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-incidents-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-incidents-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-incidents-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-incidents-fips.us-west-2.amazonaws.com", }, }, }, "ssm-sap": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-sap-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "ssm-sap-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "ssm-sap-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "ssm-sap-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "ssm-sap-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "ssm-sap-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-sap-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-sap-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-sap-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "ssm-sap-fips.us-west-2.amazonaws.com", }, }, }, "sso": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "states": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "states-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "states-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "states-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "states-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "states-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "states-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "states-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "states-fips.us-west-2.amazonaws.com", }, }, }, "storagegateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "storagegateway-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "storagegateway-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "storagegateway-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "storagegateway-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "storagegateway-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "storagegateway-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "storagegateway-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "storagegateway-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "storagegateway-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "storagegateway-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "streams.dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Service: "dynamodb", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "local", }: endpoint{ Hostname: "localhost:8000", Protocols: []string{"http"}, CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "sts": service{ PartitionEndpoint: "aws-global", Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "sts.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "sts-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "sts-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "sts-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "sts-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "sts-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-1-fips", }: endpoint{ Hostname: "sts-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "sts-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "sts-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "support": service{ PartitionEndpoint: "aws-global", Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "support.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, }, }, "supportapp": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "swf": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "swf-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "swf-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "swf-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "swf-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "swf-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "swf-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "swf-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "swf-fips.us-west-2.amazonaws.com", }, }, }, "synthetics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "synthetics-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "synthetics-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "synthetics-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "synthetics-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "synthetics-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "synthetics-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "synthetics-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "synthetics-fips.us-west-2.amazonaws.com", }, }, }, "tagging": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "textract": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "textract-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "textract-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "textract-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "textract-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "textract-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "textract-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "textract-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "textract-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "textract-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "textract-fips.us-west-2.amazonaws.com", }, }, }, "thinclient": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "tnb": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "transcribe": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.{region}.{dnsSuffix}", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "fips.transcribe.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "fips.transcribe.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "fips.transcribe.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "fips.transcribe.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "fips.transcribe.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.us-west-2.amazonaws.com", }, }, }, "transcribestreaming": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "transcribestreaming-ca-central-1", }: endpoint{ CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-fips-ca-central-1", }: endpoint{ Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-fips-us-east-1", }: endpoint{ Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-fips-us-east-2", }: endpoint{ Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-fips-us-west-2", }: endpoint{ Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-us-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-us-east-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-us-west-2", }: endpoint{ CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "transcribestreaming-us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "transfer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "transfer-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "transfer-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "transfer-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "transfer-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "transfer-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "transfer-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "transfer-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "transfer-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "transfer-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "transfer-fips.us-west-2.amazonaws.com", }, }, }, "translate": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "translate-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "translate-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "translate-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-east-2-fips", }: endpoint{ Hostname: "translate-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "translate-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "translate-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "verifiedpermissions": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "voice-chime": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "voice-chime-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "ca-central-1-fips", }: endpoint{ Hostname: "voice-chime-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "voice-chime-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-1-fips", }: endpoint{ Hostname: "voice-chime-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "voice-chime-fips.us-west-2.amazonaws.com", }, endpointKey{ Region: "us-west-2-fips", }: endpoint{ Hostname: "voice-chime-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, }, }, "voiceid": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "voiceid-fips.ca-central-1.amazonaws.com", }, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "voiceid-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "voiceid-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "voiceid-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "voiceid-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "voiceid-fips.us-west-2.amazonaws.com", }, }, }, "vpc-lattice": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "waf": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws", }: endpoint{ CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "aws", Variant: fipsVariant, }: endpoint{ Hostname: "waf-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "aws-fips", }: endpoint{ Hostname: "waf-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "aws-global", }: endpoint{ Hostname: "waf.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "aws-global", Variant: fipsVariant, }: endpoint{ Hostname: "waf-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "aws-global-fips", }: endpoint{ Hostname: "waf-fips.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, }, }, "waf-regional": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "waf-regional.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "af-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "waf-regional.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "waf-regional.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "waf-regional.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "waf-regional.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-northeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "waf-regional.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "waf-regional.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, }, endpointKey{ Region: "ap-south-2", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "waf-regional.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "waf-regional.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "waf-regional.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, }, endpointKey{ Region: "ap-southeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "waf-regional.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, }, endpointKey{ Region: "ap-southeast-4", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "waf-regional.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "waf-regional.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "waf-regional.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, }, endpointKey{ Region: "eu-central-2", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "waf-regional.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-north-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "waf-regional.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "eu-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "eu-south-2", }: endpoint{ Hostname: "waf-regional.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, }, endpointKey{ Region: "eu-south-2", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "waf-regional.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "waf-regional.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "waf-regional.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "eu-west-3", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "fips-af-south-1", }: endpoint{ Hostname: "waf-regional-fips.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-east-1", }: endpoint{ Hostname: "waf-regional-fips.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-1", }: endpoint{ Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-2", }: endpoint{ Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-3", }: endpoint{ Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-south-1", }: endpoint{ Hostname: "waf-regional-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-south-2", }: endpoint{ Hostname: "waf-regional-fips.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-1", }: endpoint{ Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-2", }: endpoint{ Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-3", }: endpoint{ Hostname: "waf-regional-fips.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-4", }: endpoint{ Hostname: "waf-regional-fips.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "waf-regional-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-central-1", }: endpoint{ Hostname: "waf-regional-fips.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-central-2", }: endpoint{ Hostname: "waf-regional-fips.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-north-1", }: endpoint{ Hostname: "waf-regional-fips.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-south-1", }: endpoint{ Hostname: "waf-regional-fips.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-south-2", }: endpoint{ Hostname: "waf-regional-fips.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-1", }: endpoint{ Hostname: "waf-regional-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-2", }: endpoint{ Hostname: "waf-regional-fips.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-3", }: endpoint{ Hostname: "waf-regional-fips.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-il-central-1", }: endpoint{ Hostname: "waf-regional-fips.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-central-1", }: endpoint{ Hostname: "waf-regional-fips.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-south-1", }: endpoint{ Hostname: "waf-regional-fips.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-sa-east-1", }: endpoint{ Hostname: "waf-regional-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "waf-regional-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "waf-regional-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "waf-regional-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "waf-regional-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "waf-regional.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "il-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "waf-regional.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, }, endpointKey{ Region: "me-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "waf-regional.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "me-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "waf-regional.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "sa-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "waf-regional.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "waf-regional.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "waf-regional.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "waf-regional.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "wafv2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{ Hostname: "wafv2.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "af-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, }, endpointKey{ Region: "ap-east-1", }: endpoint{ Hostname: "wafv2.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, }, endpointKey{ Region: "ap-northeast-1", }: endpoint{ Hostname: "wafv2.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, }, endpointKey{ Region: "ap-northeast-2", }: endpoint{ Hostname: "wafv2.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, }, endpointKey{ Region: "ap-northeast-3", }: endpoint{ Hostname: "wafv2.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-northeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, }, endpointKey{ Region: "ap-south-1", }: endpoint{ Hostname: "wafv2.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, }, endpointKey{ Region: "ap-south-2", }: endpoint{ Hostname: "wafv2.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, }, endpointKey{ Region: "ap-south-2", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, }, endpointKey{ Region: "ap-southeast-1", }: endpoint{ Hostname: "wafv2.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, }, endpointKey{ Region: "ap-southeast-2", }: endpoint{ Hostname: "wafv2.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-2", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, }, endpointKey{ Region: "ap-southeast-3", }: endpoint{ Hostname: "wafv2.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, }, endpointKey{ Region: "ap-southeast-3", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, }, endpointKey{ Region: "ap-southeast-4", }: endpoint{ Hostname: "wafv2.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, }, endpointKey{ Region: "ap-southeast-4", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, }, endpointKey{ Region: "ca-central-1", }: endpoint{ Hostname: "wafv2.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "ca-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, }, endpointKey{ Region: "eu-central-1", }: endpoint{ Hostname: "wafv2.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, }, endpointKey{ Region: "eu-central-2", }: endpoint{ Hostname: "wafv2.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, }, endpointKey{ Region: "eu-central-2", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, }, endpointKey{ Region: "eu-north-1", }: endpoint{ Hostname: "wafv2.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-north-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, }, endpointKey{ Region: "eu-south-1", }: endpoint{ Hostname: "wafv2.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "eu-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, }, endpointKey{ Region: "eu-south-2", }: endpoint{ Hostname: "wafv2.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, }, endpointKey{ Region: "eu-south-2", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, }, endpointKey{ Region: "eu-west-1", }: endpoint{ Hostname: "wafv2.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, endpointKey{ Region: "eu-west-2", }: endpoint{ Hostname: "wafv2.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, }, endpointKey{ Region: "eu-west-3", }: endpoint{ Hostname: "wafv2.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "eu-west-3", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, }, endpointKey{ Region: "fips-af-south-1", }: endpoint{ Hostname: "wafv2-fips.af-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "af-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-east-1", }: endpoint{ Hostname: "wafv2-fips.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-1", }: endpoint{ Hostname: "wafv2-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-2", }: endpoint{ Hostname: "wafv2-fips.ap-northeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-northeast-3", }: endpoint{ Hostname: "wafv2-fips.ap-northeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-northeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-south-1", }: endpoint{ Hostname: "wafv2-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-south-2", }: endpoint{ Hostname: "wafv2-fips.ap-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-south-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-1", }: endpoint{ Hostname: "wafv2-fips.ap-southeast-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-2", }: endpoint{ Hostname: "wafv2-fips.ap-southeast-2.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-3", }: endpoint{ Hostname: "wafv2-fips.ap-southeast-3.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ap-southeast-4", }: endpoint{ Hostname: "wafv2-fips.ap-southeast-4.amazonaws.com", CredentialScope: credentialScope{ Region: "ap-southeast-4", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ Hostname: "wafv2-fips.ca-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "ca-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-central-1", }: endpoint{ Hostname: "wafv2-fips.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-central-2", }: endpoint{ Hostname: "wafv2-fips.eu-central-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-central-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-north-1", }: endpoint{ Hostname: "wafv2-fips.eu-north-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-north-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-south-1", }: endpoint{ Hostname: "wafv2-fips.eu-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-south-2", }: endpoint{ Hostname: "wafv2-fips.eu-south-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-south-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-1", }: endpoint{ Hostname: "wafv2-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-2", }: endpoint{ Hostname: "wafv2-fips.eu-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-eu-west-3", }: endpoint{ Hostname: "wafv2-fips.eu-west-3.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-3", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-il-central-1", }: endpoint{ Hostname: "wafv2-fips.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-central-1", }: endpoint{ Hostname: "wafv2-fips.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-me-south-1", }: endpoint{ Hostname: "wafv2-fips.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-sa-east-1", }: endpoint{ Hostname: "wafv2-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "wafv2-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "wafv2-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "wafv2-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "wafv2-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{ Hostname: "wafv2.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "il-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.il-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "il-central-1", }, }, endpointKey{ Region: "me-central-1", }: endpoint{ Hostname: "wafv2.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, }, endpointKey{ Region: "me-central-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.me-central-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-central-1", }, }, endpointKey{ Region: "me-south-1", }: endpoint{ Hostname: "wafv2.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "me-south-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.me-south-1.amazonaws.com", CredentialScope: credentialScope{ Region: "me-south-1", }, }, endpointKey{ Region: "sa-east-1", }: endpoint{ Hostname: "wafv2.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "sa-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "sa-east-1", }, }, endpointKey{ Region: "us-east-1", }: endpoint{ Hostname: "wafv2.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, endpointKey{ Region: "us-east-2", }: endpoint{ Hostname: "wafv2.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, endpointKey{ Region: "us-west-1", }: endpoint{ Hostname: "wafv2.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, }, endpointKey{ Region: "us-west-2", }: endpoint{ Hostname: "wafv2.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, }, }, "wellarchitected": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "wisdom": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "ui-ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ui-ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ui-eu-central-1", }: endpoint{}, endpointKey{ Region: "ui-eu-west-2", }: endpoint{}, endpointKey{ Region: "ui-us-east-1", }: endpoint{}, endpointKey{ Region: "ui-us-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{}, }, }, "workdocs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "workdocs-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "workdocs-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "workdocs-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "workdocs-fips.us-west-2.amazonaws.com", }, }, }, "workmail": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "workspaces": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "workspaces-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "workspaces-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "workspaces-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "workspaces-fips.us-west-2.amazonaws.com", }, }, }, "workspaces-web": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-west-2", }: endpoint{}, }, }, "xray": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "af-south-1", }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, endpointKey{ Region: "ap-northeast-2", }: endpoint{}, endpointKey{ Region: "ap-northeast-3", }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, endpointKey{ Region: "ap-south-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, endpointKey{ Region: "ap-southeast-3", }: endpoint{}, endpointKey{ Region: "ap-southeast-4", }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-2", }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, endpointKey{ Region: "eu-south-1", }: endpoint{}, endpointKey{ Region: "eu-south-2", }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, endpointKey{ Region: "fips-us-east-1", }: endpoint{ Hostname: "xray-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-east-2", }: endpoint{ Hostname: "xray-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-1", }: endpoint{ Hostname: "xray-fips.us-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ Hostname: "xray-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, Deprecated: boxedTrue, }, endpointKey{ Region: "il-central-1", }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, endpointKey{ Region: "me-south-1", }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, endpointKey{ Region: "us-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "xray-fips.us-east-1.amazonaws.com", }, endpointKey{ Region: "us-east-2", }: endpoint{}, endpointKey{ Region: "us-east-2", Variant: fipsVariant, }: endpoint{ Hostname: "xray-fips.us-east-2.amazonaws.com", }, endpointKey{ Region: "us-west-1", }: endpoint{}, endpointKey{ Region: "us-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "xray-fips.us-west-1.amazonaws.com", }, endpointKey{ Region: "us-west-2", }: endpoint{}, endpointKey{ Region: "us-west-2", Variant: fipsVariant, }: endpoint{ Hostname: "xray-fips.us-west-2.amazonaws.com", }, }, }, }, } // AwsCnPartition returns the Resolver for AWS China. func AwsCnPartition() Partition { return awscnPartition.Partition() } var awscnPartition = partition{ ID: "aws-cn", Name: "AWS China", DNSSuffix: "amazonaws.com.cn", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { reg, _ := regexp.Compile("^cn\\-\\w+\\-\\d+$") return reg }(), }, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", DNSSuffix: "api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, Regions: regions{ "cn-north-1": region{ Description: "China (Beijing)", }, "cn-northwest-1": region{ Description: "China (Ningxia)", }, }, Services: services{ "access-analyzer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "account": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "account.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "acm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "airflow": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "api.ecr": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "api.ecr.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "api.ecr.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "api.pricing": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "pricing", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "api.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "api.tunneling.iot": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "apigateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "appconfig": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "appconfigdata": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "application-autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "applicationinsights": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "appmesh": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "appmesh.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "appsync": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "arc-zonal-shift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "athena": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "autoscaling-plans": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "backup": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "backupstorage": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "batch": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "budgets": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "budgets.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "cassandra": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "ce": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "ce.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "cloudcontrolapi": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "cloudformation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "cloudfront": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "cloudfront.cn-northwest-1.amazonaws.com.cn", Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "cloudtrail": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "codebuild": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "codecommit": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "codedeploy": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "codepipeline": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "cognito-identity": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "compute-optimizer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "compute-optimizer.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "compute-optimizer.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "config": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "cur": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "data-ats.iot": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, CredentialScope: credentialScope{ Service: "iotdata", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "data.ats.iot.cn-north-1.amazonaws.com.cn", Protocols: []string{"https"}, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "data.jobs.iot": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "databrew": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "datasync": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "datazone": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.amazonwebservices.com.cn", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.amazonwebservices.com.cn", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "datazone.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "datazone.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "dax": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "directconnect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "dlm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "dms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "docdb": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "rds.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "ds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "ebs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "ec2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "ecs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "eks": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "elasticache": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "elasticbeanstalk": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "elasticfilesystem": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn", }, endpointKey{ Region: "fips-cn-north-1", }: endpoint{ Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-cn-northwest-1", }: endpoint{ Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, Deprecated: boxedTrue, }, }, }, "elasticloadbalancing": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "elasticmapreduce": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "elasticmapreduce.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "elasticmapreduce.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "emr-containers": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "emr-serverless": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "es": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "events": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "firehose": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "firehose.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "firehose.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "fms": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "fsx": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "gamelift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "glacier": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "glue": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "greengrass": service{ IsRegionalized: boxedTrue, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "guardduty": service{ IsRegionalized: boxedTrue, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "health": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, Defaults: endpointDefaults{ defaultKey{}: endpoint{ SSLCommonName: "health.cn-northwest-1.amazonaws.com.cn", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "global.health.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "iam": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "iam.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, }, }, "identitystore": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "internetmonitor": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.amazonwebservices.com.cn", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.amazonwebservices.com.cn", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "internetmonitor.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "internetmonitor.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "iot": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "iotanalytics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "iotevents": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "ioteventsdata": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "data.iotevents.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, }, }, "iotsecuredtunneling": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "iotsitewise": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "kafka": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "kendra-ranking": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.amazonwebservices.com.cn", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.amazonwebservices.com.cn", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "kendra-ranking.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "kendra-ranking.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "kinesis": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "kinesisanalytics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "kinesisvideo": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "kms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "lakeformation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "lambda": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "license-manager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "license-manager-linux-subscriptions": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "logs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "mediaconvert": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "memory-db": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "metrics.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "monitoring": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "mq": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "neptune": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "rds.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "rds.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "oam": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "oidc": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "oidc.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "oidc.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "organizations": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "organizations.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "personalize": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "pi": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "polly": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "portal.sso": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "portal.sso.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "portal.sso.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "qbusiness": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.amazonwebservices.com.cn", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.amazonwebservices.com.cn", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "qbusiness.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "qbusiness.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "ram": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "rbin": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "rds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "redshift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "redshift-serverless": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "resource-explorer-2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.amazonwebservices.com.cn", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.amazonwebservices.com.cn", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "resource-explorer-2.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "resource-explorer-2.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "resource-groups": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "rolesanywhere": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "route53": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "route53.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "route53resolver": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "runtime.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "s3": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com.cn", Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.cn-north-1.amazonaws.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.cn-northwest-1.amazonaws.com.cn", }, }, }, "s3-control": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, SignatureVersions: []string{"s3v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"s3v4"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "s3-control.cn-north-1.amazonaws.com.cn", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.cn-north-1.amazonaws.com.cn", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "s3-control.cn-northwest-1.amazonaws.com.cn", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.cn-northwest-1.amazonaws.com.cn", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "savingsplans": service{ IsRegionalized: boxedTrue, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "savingsplans.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "savingsplans.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "schemas": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "secretsmanager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{}, }, }, "securityhub": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "serverlessrepo": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Protocols: []string{"https"}, }, }, }, "servicecatalog": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "servicediscovery": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "servicequotas": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "signer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "verification-cn-north-1", }: endpoint{ Hostname: "verification.signer.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "verification-cn-northwest-1", }: endpoint{ Hostname: "verification.signer.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "sms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, }, }, "snowball": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn", }, endpointKey{ Region: "fips-cn-north-1", }: endpoint{ Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-cn-northwest-1", }: endpoint{ Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, Deprecated: boxedTrue, }, }, }, "sns": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "sqs": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ SSLCommonName: "{region}.queue.{dnsSuffix}", Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "ssm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "sso": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "states": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-north-1", Variant: dualStackVariant, }: endpoint{ Hostname: "states.cn-north-1.api.amazonwebservices.com.cn", }, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", Variant: dualStackVariant, }: endpoint{ Hostname: "states.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, "storagegateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "streams.dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Service: "dynamodb", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "sts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "support": service{ PartitionEndpoint: "aws-cn-global", Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-cn-global", }: endpoint{ Hostname: "support.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, }, }, "swf": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "synthetics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "tagging": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "transcribe": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "cn.transcribe.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "cn.transcribe.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, }, }, "transcribestreaming": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "transfer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "waf-regional": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "waf-regional.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-north-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "waf-regional.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, endpointKey{ Region: "cn-northwest-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, endpointKey{ Region: "fips-cn-north-1", }: endpoint{ Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-cn-northwest-1", }: endpoint{ Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, Deprecated: boxedTrue, }, }, }, "wafv2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{ Hostname: "wafv2.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-north-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, }, endpointKey{ Region: "cn-northwest-1", }: endpoint{ Hostname: "wafv2.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, endpointKey{ Region: "cn-northwest-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, }, endpointKey{ Region: "fips-cn-north-1", }: endpoint{ Hostname: "wafv2-fips.cn-north-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-north-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-cn-northwest-1", }: endpoint{ Hostname: "wafv2-fips.cn-northwest-1.amazonaws.com.cn", CredentialScope: credentialScope{ Region: "cn-northwest-1", }, Deprecated: boxedTrue, }, }, }, "workspaces": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, "xray": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "cn-north-1", }: endpoint{}, endpointKey{ Region: "cn-northwest-1", }: endpoint{}, }, }, }, } // AwsUsGovPartition returns the Resolver for AWS GovCloud (US). func AwsUsGovPartition() Partition { return awsusgovPartition.Partition() } var awsusgovPartition = partition{ ID: "aws-us-gov", Name: "AWS GovCloud (US)", DNSSuffix: "amazonaws.com", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { reg, _ := regexp.Compile("^us\\-gov\\-\\w+\\-\\d+$") return reg }(), }, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", DNSSuffix: "api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, Regions: regions{ "us-gov-east-1": region{ Description: "AWS GovCloud (US-East)", }, "us-gov-west-1": region{ Description: "AWS GovCloud (US-West)", }, }, Services: services{ "access-analyzer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "access-analyzer.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "access-analyzer.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "access-analyzer.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "access-analyzer.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "access-analyzer.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "access-analyzer.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "acm": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "acm.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "acm.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "acm.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "acm-pca": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "acm-pca.{region}.{dnsSuffix}", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "acm-pca.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "acm-pca.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "acm-pca.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "acm-pca.us-gov-west-1.amazonaws.com", }, }, }, "api.detective": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "api.ecr": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "dkr-us-gov-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-gov-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dkr-us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-dkr-us-gov-east-1", }: endpoint{ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-dkr-us-gov-west-1", }: endpoint{ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "api.ecr.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "api.ecr.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "api.sagemaker": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1-fips-secondary", }: endpoint{ Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1-secondary", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1-secondary", Variant: fipsVariant, }: endpoint{ Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "api.tunneling.iot": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com", }, }, }, "apigateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "appconfig": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "appconfig.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "appconfig.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "appconfig.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "appconfig.us-gov-west-1.amazonaws.com", }, }, }, "appconfigdata": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "appconfigdata.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "appconfigdata.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "appconfigdata.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "appconfigdata.us-gov-west-1.amazonaws.com", }, }, }, "application-autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Hostname: "autoscaling.{region}.amazonaws.com", Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Service: "application-autoscaling", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com", Protocols: []string{"http", "https"}, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, Deprecated: boxedTrue, }, }, }, "applicationinsights": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "applicationinsights.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "applicationinsights.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "appstream2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, CredentialScope: credentialScope{ Service: "appstream", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips", }: endpoint{ Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "appstream2-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "appstream2-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "arc-zonal-shift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "athena": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "athena-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "athena-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "athena-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "athena-fips.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "athena.us-gov-west-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "athena-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "athena-fips.us-gov-west-1.api.aws", }, }, }, "autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "autoscaling.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Protocols: []string{"http", "https"}, }, }, }, "autoscaling-plans": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Protocols: []string{"http", "https"}, }, }, }, "backup": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "backup-gateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "backupstorage": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "batch": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "batch.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "batch.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "batch.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "batch.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "batch.us-gov-west-1.amazonaws.com", }, }, }, "cassandra": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "cassandra.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cassandra.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "cassandra.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "cassandra.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cassandra.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "cassandra.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "cloudcontrolapi": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com", }, }, }, "clouddirectory": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "clouddirectory.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "clouddirectory.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "cloudformation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "cloudformation.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudformation.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "cloudformation.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "cloudformation.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudformation.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "cloudformation.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "cloudhsm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "cloudhsmv2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "cloudhsm", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "cloudtrail": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "cloudtrail.us-gov-west-1.amazonaws.com", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "cloudtrail.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "cloudtrail.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudtrail.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cloudtrail.us-gov-west-1.amazonaws.com", }, }, }, "codebuild": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "codecommit": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips", }: endpoint{ Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "codedeploy": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "codepipeline": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "codepipeline-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "codepipeline-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com", }, }, }, "codestar-connections": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, }, }, "cognito-identity": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com", }, }, }, "cognito-idp": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com", }, }, }, "comprehend": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com", }, }, }, "comprehendmedical": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com", }, }, }, "compute-optimizer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "compute-optimizer-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "compute-optimizer-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "config": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "config.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "config.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "config.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "config.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "config.us-gov-west-1.amazonaws.com", }, }, }, "connect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "connect.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "connect.us-gov-west-1.amazonaws.com", }, }, }, "controltower": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "data-ats.iot": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, CredentialScope: credentialScope{ Service: "iotdata", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "data.iot-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Service: "iotdata", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "data.iot-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Service: "iotdata", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.iot-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.iot-fips.us-gov-west-1.amazonaws.com", }, }, }, "data.jobs.iot": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com", }, }, }, "databrew": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "databrew.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "databrew.us-gov-west-1.amazonaws.com", }, }, }, "datasync": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "datasync-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "datasync-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "datasync-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "datasync-fips.us-gov-west-1.amazonaws.com", }, }, }, "datazone": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "datazone.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "datazone.us-gov-west-1.api.aws", }, }, }, "directconnect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "directconnect.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "directconnect.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "dlm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "dlm.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "dlm.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "dlm.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "dlm.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "dms": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "dms.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "dms", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dms", Variant: fipsVariant, }: endpoint{ Hostname: "dms.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dms-fips", }: endpoint{ Hostname: "dms.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "dms.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "dms.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "dms.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "dms.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "docdb": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "rds.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "drs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "drs-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "drs-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "drs-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "drs-fips.us-gov-west-1.amazonaws.com", }, }, }, "ds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "ds-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "ds-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ds-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ds-fips.us-gov-west-1.amazonaws.com", }, }, }, "dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "dynamodb.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "dynamodb.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "dynamodb.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "dynamodb.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "dynamodb.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "ebs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "ec2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "ec2.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "ec2.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "ec2.us-gov-east-1.api.aws", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "ec2.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "ec2.us-gov-west-1.api.aws", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "ecs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "ecs-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "ecs-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecs-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ecs-fips.us-gov-west-1.amazonaws.com", }, }, }, "eks": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "eks.{region}.{dnsSuffix}", Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "eks.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "eks.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "eks.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "eks.us-gov-west-1.amazonaws.com", }, }, }, "elasticache": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "elasticache.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips", }: endpoint{ Hostname: "elasticache.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticache.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "elasticache.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "elasticbeanstalk": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "elasticfilesystem": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com", }, }, }, "elasticloadbalancing": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "elasticloadbalancing.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, }, }, "elasticmapreduce": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "elasticmapreduce.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "elasticmapreduce.us-gov-west-1.api.aws", Protocols: []string{"https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com", Protocols: []string{"https"}, }, }, }, "email": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "email-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "email-fips.us-gov-west-1.amazonaws.com", }, }, }, "emr-containers": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "es": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips", }: endpoint{ Hostname: "es-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "es-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "es-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "aos.us-gov-west-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "es-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "es-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "events": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "events.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "events.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "events.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "events.us-gov-west-1.amazonaws.com", }, }, }, "firehose": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "firehose-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "firehose-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "firehose-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "firehose-fips.us-gov-west-1.amazonaws.com", }, }, }, "fms": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "fms-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "fms-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fms-fips.us-gov-west-1.amazonaws.com", }, }, }, "fsx": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-prod-us-gov-east-1", }: endpoint{ Hostname: "fsx-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-prod-us-gov-west-1", }: endpoint{ Hostname: "fsx-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "fsx-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "fsx-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-gov-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-gov-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "prod-us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fsx-fips.us-gov-west-1.amazonaws.com", }, }, }, "geo": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "geo-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "geo-fips.us-gov-west-1.amazonaws.com", }, }, }, "glacier": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "glacier.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "glacier.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "glacier.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "glacier.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, }, }, "glue": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "glue-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "glue-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "glue.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "glue-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "glue-fips.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "glue.us-gov-west-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "glue-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "glue-fips.us-gov-west-1.api.aws", }, }, }, "greengrass": service{ IsRegionalized: boxedTrue, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "dataplane-us-gov-east-1", }: endpoint{ Hostname: "greengrass-ats.iot.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "dataplane-us-gov-west-1", }: endpoint{ Hostname: "greengrass-ats.iot.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "greengrass.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "greengrass.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "greengrass.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "greengrass.us-gov-west-1.amazonaws.com", }, }, }, "guardduty": service{ IsRegionalized: boxedTrue, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "guardduty.{region}.{dnsSuffix}", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "guardduty.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "guardduty.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "guardduty.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "guardduty.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "health": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ SSLCommonName: "health.us-gov-west-1.amazonaws.com", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-us-gov-global", }: endpoint{ Hostname: "global.health.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "health-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "health-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "iam": service{ PartitionEndpoint: "aws-us-gov-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-us-gov-global", }: endpoint{ Hostname: "iam.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "aws-us-gov-global", Variant: fipsVariant, }: endpoint{ Hostname: "iam.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "aws-us-gov-global-fips", }: endpoint{ Hostname: "iam.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "iam-govcloud", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "iam-govcloud", Variant: fipsVariant, }: endpoint{ Hostname: "iam.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "iam-govcloud-fips", }: endpoint{ Hostname: "iam.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "identitystore": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "identitystore.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "identitystore.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "identitystore.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "identitystore.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "identitystore.us-gov-west-1.amazonaws.com", }, }, }, "ingest.timestream": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ingest.timestream.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "ingest.timestream.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "inspector": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "inspector-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "inspector-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "inspector-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "inspector-fips.us-gov-west-1.amazonaws.com", }, }, }, "inspector2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "inspector2-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "inspector2-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "inspector2-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "inspector2-fips.us-gov-west-1.amazonaws.com", }, }, }, "internetmonitor": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "internetmonitor.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "internetmonitor.us-gov-west-1.api.aws", }, }, }, "iot": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "iot-fips.us-gov-east-1.amazonaws.com", Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "iot-fips.us-gov-west-1.amazonaws.com", Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "iot-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "iot-fips.us-gov-west-1.amazonaws.com", }, }, }, "iotevents": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "iotevents-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "iotevents-fips.us-gov-west-1.amazonaws.com", }, }, }, "ioteventsdata": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "data.iotevents-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "data.iotevents.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "data.iotevents-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "iotsecuredtunneling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com", }, }, }, "iotsitewise": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "iotsitewise-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "iotsitewise-fips.us-gov-west-1.amazonaws.com", }, }, }, "iottwinmaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "api-us-gov-west-1", }: endpoint{ Hostname: "api.iottwinmaker.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "data-us-gov-west-1", }: endpoint{ Hostname: "data.iottwinmaker.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-api-us-gov-west-1", }: endpoint{ Hostname: "api.iottwinmaker-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-data-us-gov-west-1", }: endpoint{ Hostname: "data.iottwinmaker-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "iottwinmaker-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "iottwinmaker-fips.us-gov-west-1.amazonaws.com", }, }, }, "kafka": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "kafka.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kafka.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "kafka.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "kafka.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kafka.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "kafka.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "kendra": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "kendra-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kendra-fips.us-gov-west-1.amazonaws.com", }, }, }, "kendra-ranking": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "kendra-ranking.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "kendra-ranking.us-gov-west-1.api.aws", }, }, }, "kinesis": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "kinesis.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "kinesis.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "kinesis.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kinesis.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "kinesis.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kinesis.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "kinesisanalytics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "kms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ProdFips", }: endpoint{ Hostname: "kms-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "kms-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "kms-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "lakeformation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "lakeformation-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lakeformation.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "lakeformation-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "lakeformation-fips.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lakeformation.us-gov-west-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "lakeformation-fips.us-gov-west-1.api.aws", }, }, }, "lambda": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "lambda-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "lambda-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "lambda-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "lambda.us-gov-west-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "lambda-fips.us-gov-west-1.amazonaws.com", }, }, }, "license-manager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com", }, }, }, "license-manager-linux-subscriptions": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "logs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "logs.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "logs.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "logs.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "logs.us-gov-west-1.amazonaws.com", }, }, }, "m2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{}, }, }, "managedblockchain": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "mediaconvert": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "mediaconvert.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "mediaconvert.us-gov-west-1.amazonaws.com", }, }, }, "meetings-chime": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "meetings-chime-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "meetings-chime-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "meetings-chime-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "meetings-chime-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "metering.marketplace": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "aws-marketplace", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "metrics.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "mgn": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "mgn-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "mgn-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "mgn-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "mgn-fips.us-gov-west-1.amazonaws.com", }, }, }, "models.lex": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "lex", }, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "models-fips.lex.{region}.{dnsSuffix}", CredentialScope: credentialScope{ Service: "lex", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "monitoring": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "monitoring.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "monitoring.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "monitoring.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "monitoring.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "monitoring.us-gov-west-1.amazonaws.com", }, }, }, "mq": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "mq-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "mq-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "mq-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "mq-fips.us-gov-west-1.amazonaws.com", }, }, }, "neptune": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "rds.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "rds.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "network-firewall": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com", }, }, }, "networkmanager": service{ PartitionEndpoint: "aws-us-gov-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-us-gov-global", }: endpoint{ Hostname: "networkmanager.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "aws-us-gov-global", Variant: fipsVariant, }: endpoint{ Hostname: "networkmanager.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-aws-us-gov-global", }: endpoint{ Hostname: "networkmanager.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "oidc": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "oidc.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "oidc.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "organizations": service{ PartitionEndpoint: "aws-us-gov-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-us-gov-global", }: endpoint{ Hostname: "organizations.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "aws-us-gov-global", Variant: fipsVariant, }: endpoint{ Hostname: "organizations.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-aws-us-gov-global", }: endpoint{ Hostname: "organizations.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "outposts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "outposts.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "outposts.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "outposts.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "outposts.us-gov-west-1.amazonaws.com", }, }, }, "participant.connect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "participant.connect.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "participant.connect.us-gov-west-1.amazonaws.com", }, }, }, "pi": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "pinpoint": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "mobiletargeting", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "pinpoint.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "polly": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "polly-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "polly-fips.us-gov-west-1.amazonaws.com", }, }, }, "portal.sso": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "portal.sso.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "portal.sso.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "qbusiness": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "qbusiness.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "qbusiness.us-gov-west-1.api.aws", }, }, }, "quicksight": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "api", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "ram": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "ram.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ram.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "ram.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "ram.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ram.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "ram.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "rbin": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "rbin-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "rbin-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-gov-west-1.amazonaws.com", }, }, }, "rds": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "rds.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "rds.us-gov-east-1", }: endpoint{ Hostname: "rds.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-gov-west-1", }: endpoint{ Hostname: "rds.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "rds.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "rds.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "redshift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "redshift.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "redshift.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "rekognition": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "rekognition-fips.us-gov-west-1", }: endpoint{ Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-gov-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rekognition.us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "resiliencehub": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "resiliencehub-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "resiliencehub-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "resiliencehub-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "resiliencehub-fips.us-gov-west-1.amazonaws.com", }, }, }, "resource-explorer-2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ DNSSuffix: "api.aws", }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "api.aws", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "resource-explorer-2.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "resource-explorer-2.us-gov-west-1.api.aws", }, }, }, "resource-groups": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "resource-groups.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "resource-groups.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "resource-groups.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "resource-groups.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "resource-groups.us-gov-west-1.amazonaws.com", }, }, }, "robomaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "rolesanywhere": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "route53": service{ PartitionEndpoint: "aws-us-gov-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-us-gov-global", }: endpoint{ Hostname: "route53.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "aws-us-gov-global", Variant: fipsVariant, }: endpoint{ Hostname: "route53.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-aws-us-gov-global", }: endpoint{ Hostname: "route53.us-gov.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "route53resolver": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "route53resolver.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "route53resolver.us-gov-east-1.amazonaws.com", Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "route53resolver.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "route53resolver.us-gov-west-1.amazonaws.com", Deprecated: boxedTrue, }, }, }, "runtime.lex": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "lex", }, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.lex.{region}.{dnsSuffix}", CredentialScope: credentialScope{ Service: "lex", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "runtime.sagemaker": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "runtime.sagemaker.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "s3": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ SignatureVersions: []string{"s3", "s3v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, defaultKey{ Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "s3-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "s3-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "s3.us-gov-east-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.us-gov-east-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-fips.us-gov-east-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "s3.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3.dualstack.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-fips.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, }, }, "s3-control": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, SignatureVersions: []string{"s3v4"}, }, defaultKey{ Variant: dualStackVariant, }: endpoint{ Hostname: "{service}.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"s3v4"}, }, defaultKey{ Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}", DNSSuffix: "amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"s3v4"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "s3-control.us-gov-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.us-gov-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-control-fips.dualstack.us-gov-east-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "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", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "s3-control.us-gov-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "s3-control.dualstack.us-gov-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "s3-control-fips.dualstack.us-gov-west-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "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", }, Deprecated: boxedTrue, }, }, }, "s3-outposts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, }, }, "secretsmanager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{}, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Deprecated: boxedTrue, }, }, }, "securityhub": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com", }, }, }, "serverlessrepo": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "serverlessrepo.us-gov-east-1.amazonaws.com", Protocols: []string{"https"}, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "serverlessrepo.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "serverlessrepo.us-gov-west-1.amazonaws.com", Protocols: []string{"https"}, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "serverlessrepo.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "servicecatalog": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "servicecatalog-appregistry": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "servicecatalog-appregistry.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "servicediscovery": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "servicediscovery", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "servicediscovery", Variant: fipsVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "servicediscovery-fips", }: endpoint{ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-gov-east-1.api.aws", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: dualStackVariant, }: endpoint{ Hostname: "servicediscovery.us-gov-west-1.api.aws", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant | dualStackVariant, }: endpoint{ Hostname: "servicediscovery-fips.us-gov-west-1.api.aws", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "servicequotas": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "servicequotas.{region}.{dnsSuffix}", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "servicequotas.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "servicequotas.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicequotas.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "servicequotas.us-gov-west-1.amazonaws.com", }, }, }, "simspaceweaver": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "simspaceweaver.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "simspaceweaver.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "simspaceweaver.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "simspaceweaver.us-gov-west-1.amazonaws.com", }, }, }, "sms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "sms-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "sms-fips.us-gov-west-1.amazonaws.com", }, }, }, "sms-voice": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "sms-voice-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "sms-voice-fips.us-gov-west-1.amazonaws.com", }, }, }, "snowball": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "snowball-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "snowball-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "snowball-fips.us-gov-west-1.amazonaws.com", }, }, }, "sns": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "sns.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "sns.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "sns.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "sns.us-gov-west-1.amazonaws.com", Protocols: []string{"https"}, }, }, }, "sqs": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "sqs.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "sqs.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "sqs.us-gov-west-1.amazonaws.com", SSLCommonName: "{region}.queue.{dnsSuffix}", Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "ssm": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "ssm.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "ssm.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "ssm.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "ssm.us-gov-west-1.amazonaws.com", }, }, }, "sso": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "sso.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "sso.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "sso.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "sso.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "sso.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "sso.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "states": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "states-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "states.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "states-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "states.us-gov-west-1.amazonaws.com", }, }, }, "storagegateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips", }: endpoint{ Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "streams.dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "dynamodb", }, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "streams.dynamodb.{region}.{dnsSuffix}", CredentialScope: credentialScope{ Service: "dynamodb", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "sts": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "sts.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "sts.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "sts.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "sts.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "sts.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "support": service{ PartitionEndpoint: "aws-us-gov-global", Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-us-gov-global", }: endpoint{ Hostname: "support.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "support.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "support.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "swf": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "swf.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "swf.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1-fips", }: endpoint{ Hostname: "swf.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "swf.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "swf.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "swf.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "synthetics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "synthetics-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "synthetics-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "synthetics-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "synthetics-fips.us-gov-west-1.amazonaws.com", }, }, }, "tagging": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "textract": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "textract-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "textract-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "textract-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "textract-fips.us-gov-west-1.amazonaws.com", }, }, }, "transcribe": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.{region}.{dnsSuffix}", Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com", }, }, }, "transcribestreaming": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "transfer": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "transfer-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "transfer-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "transfer-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "transfer-fips.us-gov-west-1.amazonaws.com", }, }, }, "translate": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "translate-fips.us-gov-west-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1-fips", }: endpoint{ Hostname: "translate-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, }, }, "waf-regional": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "waf-regional.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "waf-regional.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "wafv2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "wafv2-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "wafv2-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{ Hostname: "wafv2.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, }, endpointKey{ Region: "us-gov-west-1", }: endpoint{ Hostname: "wafv2.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "wafv2-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, }, }, "wellarchitected": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, }, }, "workspaces": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "workspaces-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "workspaces-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com", }, }, }, "xray": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-gov-east-1", }: endpoint{ Hostname: "xray-fips.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-gov-west-1", }: endpoint{ Hostname: "xray-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-gov-east-1", }: endpoint{}, endpointKey{ Region: "us-gov-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "xray-fips.us-gov-east-1.amazonaws.com", }, endpointKey{ Region: "us-gov-west-1", }: endpoint{}, endpointKey{ Region: "us-gov-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "xray-fips.us-gov-west-1.amazonaws.com", }, }, }, }, } // AwsIsoPartition returns the Resolver for AWS ISO (US). func AwsIsoPartition() Partition { return awsisoPartition.Partition() } var awsisoPartition = partition{ ID: "aws-iso", Name: "AWS ISO (US)", DNSSuffix: "c2s.ic.gov", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { reg, _ := regexp.Compile("^us\\-iso\\-\\w+\\-\\d+$") return reg }(), }, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, Regions: regions{ "us-iso-east-1": region{ Description: "US ISO East", }, "us-iso-west-1": region{ Description: "US ISO WEST", }, }, Services: services{ "api.ecr": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{ Hostname: "api.ecr.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{ Hostname: "api.ecr.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, }, }, }, "api.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "apigateway": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "appconfig": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "appconfigdata": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "application-autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "athena": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "autoscaling": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "cloudcontrolapi": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "cloudformation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "cloudtrail": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "codedeploy": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "comprehend": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "config": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "datapipeline": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "datasync": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-iso-west-1", }: endpoint{ Hostname: "datasync-fips.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "datasync-fips.us-iso-west-1.c2s.ic.gov", }, }, }, "directconnect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "dlm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "dms": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "dms.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "dms", }: endpoint{ CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dms", Variant: fipsVariant, }: endpoint{ Hostname: "dms.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dms-fips", }: endpoint{ Hostname: "dms.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "dms.us-iso-east-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-east-1-fips", }: endpoint{ Hostname: "dms.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "dms.us-iso-west-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-west-1-fips", }: endpoint{ Hostname: "dms.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, }, }, "ds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "dynamodb": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "ebs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "ec2": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "ecs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "eks": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "elasticache": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "elasticfilesystem": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-iso-east-1", }: endpoint{ Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-iso-west-1", }: endpoint{ Hostname: "elasticfilesystem-fips.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-iso-west-1.c2s.ic.gov", }, }, }, "elasticloadbalancing": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "elasticmapreduce": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-iso-east-1", }: endpoint{ Hostname: "elasticmapreduce.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-iso-west-1", }: endpoint{ Hostname: "elasticmapreduce.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-east-1", }: endpoint{ Protocols: []string{"https"}, }, endpointKey{ Region: "us-iso-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce.us-iso-east-1.c2s.ic.gov", Protocols: []string{"https"}, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce.us-iso-west-1.c2s.ic.gov", }, }, }, "es": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "events": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "firehose": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "glacier": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "glue": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "health": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "iam": service{ PartitionEndpoint: "aws-iso-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-iso-global", }: endpoint{ Hostname: "iam.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, }, }, }, "kinesis": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "kms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ProdFips", }: endpoint{ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-east-1-fips", }: endpoint{ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-west-1-fips", }: endpoint{ Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, }, }, "lambda": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "license-manager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "logs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "medialive": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "mediapackage": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "metrics.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "monitoring": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "outposts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "ram": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "rbin": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-iso-east-1", }: endpoint{ Hostname: "rbin-fips.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-iso-west-1", }: endpoint{ Hostname: "rbin-fips.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-iso-east-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-iso-west-1.c2s.ic.gov", }, }, }, "rds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "rds-fips.us-iso-east-1", }: endpoint{ Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds-fips.us-iso-west-1", }: endpoint{ Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-iso-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-iso-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-iso-west-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-east-1-fips", }: endpoint{ Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-west-1-fips", }: endpoint{ Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, }, }, "redshift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-iso-east-1", }: endpoint{ Hostname: "redshift-fips.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "fips-us-iso-west-1", }: endpoint{ Hostname: "redshift-fips.us-iso-west-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-west-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "redshift-fips.us-iso-east-1.c2s.ic.gov", }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", Variant: fipsVariant, }: endpoint{ Hostname: "redshift-fips.us-iso-west-1.c2s.ic.gov", }, }, }, "resource-groups": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "route53": service{ PartitionEndpoint: "aws-iso-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-iso-global", }: endpoint{ Hostname: "route53.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, }, }, }, "route53resolver": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "runtime.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "s3": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ SignatureVersions: []string{"s3v4"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{ Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "secretsmanager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "snowball": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "sns": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "sqs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{ Protocols: []string{"http", "https"}, }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "ssm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "states": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "streams.dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "dynamodb", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "sts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "support": service{ PartitionEndpoint: "aws-iso-global", Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-iso-global", }: endpoint{ Hostname: "support.us-iso-east-1.c2s.ic.gov", CredentialScope: credentialScope{ Region: "us-iso-east-1", }, }, }, }, "swf": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "synthetics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "tagging": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, "transcribe": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "transcribestreaming": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "translate": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, }, }, "workspaces": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-iso-east-1", }: endpoint{}, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, }, }, }, } // AwsIsoBPartition returns the Resolver for AWS ISOB (US). func AwsIsoBPartition() Partition { return awsisobPartition.Partition() } var awsisobPartition = partition{ ID: "aws-iso-b", Name: "AWS ISOB (US)", DNSSuffix: "sc2s.sgov.gov", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { reg, _ := regexp.Compile("^us\\-isob\\-\\w+\\-\\d+$") return reg }(), }, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, Regions: regions{ "us-isob-east-1": region{ Description: "US ISOB East (Ohio)", }, }, Services: services{ "api.ecr": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{ Hostname: "api.ecr.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, }, }, }, "api.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "appconfig": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "appconfigdata": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "application-autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "autoscaling": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "cloudcontrolapi": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "cloudformation": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "cloudtrail": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "codedeploy": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "config": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "directconnect": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "dlm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "dms": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "dms.{region}.{dnsSuffix}", }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "dms", }: endpoint{ CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dms", Variant: fipsVariant, }: endpoint{ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "dms-fips", }: endpoint{ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-isob-east-1", }: endpoint{}, endpointKey{ Region: "us-isob-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov", }, endpointKey{ Region: "us-isob-east-1-fips", }: endpoint{ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, }, }, "ds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "ebs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "ec2": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "ecs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "eks": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "elasticache": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "elasticfilesystem": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-isob-east-1", }: endpoint{ Hostname: "elasticfilesystem-fips.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-isob-east-1", }: endpoint{}, endpointKey{ Region: "us-isob-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticfilesystem-fips.us-isob-east-1.sc2s.sgov.gov", }, }, }, "elasticloadbalancing": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{ Protocols: []string{"https"}, }, }, }, "elasticmapreduce": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-isob-east-1", }: endpoint{ Hostname: "elasticmapreduce.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-isob-east-1", }: endpoint{}, endpointKey{ Region: "us-isob-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "elasticmapreduce.us-isob-east-1.sc2s.sgov.gov", }, }, }, "es": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "events": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "glacier": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "health": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "iam": service{ PartitionEndpoint: "aws-iso-b-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-iso-b-global", }: endpoint{ Hostname: "iam.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, }, }, }, "kinesis": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "kms": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "ProdFips", }: endpoint{ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-isob-east-1", }: endpoint{}, endpointKey{ Region: "us-isob-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov", }, endpointKey{ Region: "us-isob-east-1-fips", }: endpoint{ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, }, }, "lambda": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "license-manager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "logs": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "metering.marketplace": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ CredentialScope: credentialScope{ Service: "aws-marketplace", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "metrics.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "monitoring": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "outposts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "ram": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "rbin": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-isob-east-1", }: endpoint{ Hostname: "rbin-fips.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-isob-east-1", }: endpoint{}, endpointKey{ Region: "us-isob-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rbin-fips.us-isob-east-1.sc2s.sgov.gov", }, }, }, "rds": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "rds-fips.us-isob-east-1", }: endpoint{ Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-isob-east-1", }: endpoint{ CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "rds.us-isob-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-isob-east-1", }: endpoint{}, endpointKey{ Region: "us-isob-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov", }, endpointKey{ Region: "us-isob-east-1-fips", }: endpoint{ Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, }, }, "redshift": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "fips-us-isob-east-1", }: endpoint{ Hostname: "redshift-fips.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, Deprecated: boxedTrue, }, endpointKey{ Region: "us-isob-east-1", }: endpoint{}, endpointKey{ Region: "us-isob-east-1", Variant: fipsVariant, }: endpoint{ Hostname: "redshift-fips.us-isob-east-1.sc2s.sgov.gov", }, }, }, "resource-groups": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "route53": service{ PartitionEndpoint: "aws-iso-b-global", IsRegionalized: boxedFalse, Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-iso-b-global", }: endpoint{ Hostname: "route53.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, }, }, }, "route53resolver": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "runtime.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "s3": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, SignatureVersions: []string{"s3v4"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "secretsmanager": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "snowball": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "sns": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "sqs": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ SSLCommonName: "{region}.queue.{dnsSuffix}", Protocols: []string{"http", "https"}, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "ssm": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "states": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "streams.dynamodb": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ Protocols: []string{"http", "https"}, CredentialScope: credentialScope{ Service: "dynamodb", }, }, }, Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "sts": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "support": service{ PartitionEndpoint: "aws-iso-b-global", Endpoints: serviceEndpoints{ endpointKey{ Region: "aws-iso-b-global", }: endpoint{ Hostname: "support.us-isob-east-1.sc2s.sgov.gov", CredentialScope: credentialScope{ Region: "us-isob-east-1", }, }, }, }, "swf": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "synthetics": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "tagging": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, "workspaces": service{ Endpoints: serviceEndpoints{ endpointKey{ Region: "us-isob-east-1", }: endpoint{}, }, }, }, } // AwsIsoEPartition returns the Resolver for AWS ISOE (Europe). func AwsIsoEPartition() Partition { return awsisoePartition.Partition() } var awsisoePartition = partition{ ID: "aws-iso-e", Name: "AWS ISOE (Europe)", DNSSuffix: "cloud.adc-e.uk", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { reg, _ := regexp.Compile("^eu\\-isoe\\-\\w+\\-\\d+$") return reg }(), }, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, Regions: regions{}, Services: services{}, } // AwsIsoFPartition returns the Resolver for AWS ISOF. func AwsIsoFPartition() Partition { return awsisofPartition.Partition() } var awsisofPartition = partition{ ID: "aws-iso-f", Name: "AWS ISOF", DNSSuffix: "csp.hci.ic.gov", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { reg, _ := regexp.Compile("^us\\-isof\\-\\w+\\-\\d+$") return reg }(), }, Defaults: endpointDefaults{ defaultKey{}: endpoint{ Hostname: "{service}.{region}.{dnsSuffix}", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, defaultKey{ Variant: fipsVariant, }: endpoint{ Hostname: "{service}-fips.{region}.{dnsSuffix}", DNSSuffix: "csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, Regions: regions{}, Services: services{}, } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go ================================================ package endpoints // Service identifiers // // Deprecated: Use client package's EndpointsID 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. ) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go ================================================ // Package endpoints provides the types and functionality for defining regions // and endpoints, as well as querying those definitions. // // The SDK's Regions and Endpoints metadata is code generated into the endpoints // package, and is accessible via the DefaultResolver function. This function // returns a endpoint Resolver will search the metadata and build an associated // endpoint if one is found. The default resolver will search all partitions // known by the SDK. e.g AWS Standard (aws), AWS China (aws-cn), and // AWS GovCloud (US) (aws-us-gov). // . // // # Enumerating Regions and Endpoint Metadata // // Casting the Resolver returned by DefaultResolver to a EnumPartitions interface // will allow you to get access to the list of underlying Partitions with the // Partitions method. This is helpful if you want to limit the SDK's endpoint // resolving to a single partition, or enumerate regions, services, and endpoints // in the partition. // // resolver := endpoints.DefaultResolver() // partitions := resolver.(endpoints.EnumPartitions).Partitions() // // for _, p := range partitions { // fmt.Println("Regions for", p.ID()) // for id, _ := range p.Regions() { // fmt.Println("*", id) // } // // fmt.Println("Services for", p.ID()) // for id, _ := range p.Services() { // fmt.Println("*", id) // } // } // // # Using Custom Endpoints // // The endpoints package also gives you the ability to use your own logic how // endpoints are resolved. This is a great way to define a custom endpoint // for select services, without passing that logic down through your code. // // If a type implements the Resolver interface it can be used to resolve // endpoints. To use this with the SDK's Session and Config set the value // of the type to the EndpointsResolver field of aws.Config when initializing // the session, or service client. // // In addition the ResolverFunc is a wrapper for a func matching the signature // of Resolver.EndpointFor, converting it to a type that satisfies the // Resolver interface. // // myCustomResolver := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) { // if service == endpoints.S3ServiceID { // return endpoints.ResolvedEndpoint{ // URL: "s3.custom.endpoint.com", // SigningRegion: "custom-signing-region", // }, nil // } // // return endpoints.DefaultResolver().EndpointFor(service, region, optFns...) // } // // sess := session.Must(session.NewSession(&aws.Config{ // Region: aws.String("us-west-2"), // EndpointResolver: endpoints.ResolverFunc(myCustomResolver), // })) package endpoints ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go ================================================ package endpoints import ( "fmt" "regexp" "strings" "github.com/aws/aws-sdk-go/aws/awserr" ) // A Logger is a minimalistic interface for the SDK to log messages to. type Logger interface { Log(...interface{}) } // DualStackEndpointState is a constant to describe the dual-stack endpoint resolution // behavior. type DualStackEndpointState uint const ( // DualStackEndpointStateUnset is the default value behavior for dual-stack endpoint // resolution. DualStackEndpointStateUnset DualStackEndpointState = iota // DualStackEndpointStateEnabled enable dual-stack endpoint resolution for endpoints. DualStackEndpointStateEnabled // DualStackEndpointStateDisabled disables dual-stack endpoint resolution for endpoints. DualStackEndpointStateDisabled ) // FIPSEndpointState is a constant to describe the FIPS endpoint resolution behavior. type FIPSEndpointState uint const ( // FIPSEndpointStateUnset is the default value behavior for FIPS endpoint resolution. FIPSEndpointStateUnset FIPSEndpointState = iota // FIPSEndpointStateEnabled enables FIPS endpoint resolution for service endpoints. FIPSEndpointStateEnabled // FIPSEndpointStateDisabled disables FIPS endpoint resolution for endpoints. FIPSEndpointStateDisabled ) // Options provide the configuration needed to direct how the // endpoints will be resolved. type Options struct { // DisableSSL forces the endpoint to be resolved as HTTP. // instead of HTTPS if the service supports it. DisableSSL bool // Sets the resolver to resolve the endpoint as a dualstack endpoint // for the service. If dualstack support for a service is not known and // StrictMatching is not enabled a dualstack endpoint for the service will // be returned. This endpoint may not be valid. If StrictMatching is // enabled only services that are known to support dualstack will return // dualstack endpoints. // // Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility. // UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients // moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher // precedence then this option. UseDualStack bool // Sets the resolver to resolve a dual-stack endpoint for the service. UseDualStackEndpoint DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint FIPSEndpointState // Enables strict matching of services and regions resolved endpoints. // If the partition doesn't enumerate the exact service and region an // error will be returned. This option will prevent returning endpoints // that look valid, but may not resolve to any real endpoint. StrictMatching bool // Enables resolving a service endpoint based on the region provided if the // service does not exist. The service endpoint ID will be used as the service // domain name prefix. By default the endpoint resolver requires the service // to be known when resolving endpoints. // // If resolving an endpoint on the partition list the provided region will // be used to determine which partition's domain name pattern to the service // endpoint ID with. If both the service and region are unknown and resolving // the endpoint on partition list an UnknownEndpointError error will be returned. // // If resolving and endpoint on a partition specific resolver that partition's // domain name pattern will be used with the service endpoint ID. If both // region and service do not exist when resolving an endpoint on a specific // partition the partition's domain pattern will be used to combine the // endpoint and region together. // // This option is ignored if StrictMatching is enabled. ResolveUnknownService bool // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) EC2MetadataEndpointMode EC2IMDSEndpointModeState // STS Regional Endpoint flag helps with resolving the STS endpoint STSRegionalEndpoint STSRegionalEndpoint // S3 Regional Endpoint flag helps with resolving the S3 endpoint S3UsEast1RegionalEndpoint S3UsEast1RegionalEndpoint // ResolvedRegion is the resolved region string. If provided (non-zero length) it takes priority // over the region name passed to the ResolveEndpoint call. ResolvedRegion string // Logger is the logger that will be used to log messages. Logger Logger // Determines whether logging of deprecated endpoints usage is enabled. LogDeprecated bool } func (o Options) getEndpointVariant(service string) (v endpointVariant) { const s3 = "s3" const s3Control = "s3-control" if (o.UseDualStackEndpoint == DualStackEndpointStateEnabled) || ((service == s3 || service == s3Control) && (o.UseDualStackEndpoint == DualStackEndpointStateUnset && o.UseDualStack)) { v |= dualStackVariant } if o.UseFIPSEndpoint == FIPSEndpointStateEnabled { v |= fipsVariant } return v } // EC2IMDSEndpointModeState is an enum configuration variable describing the client endpoint mode. type EC2IMDSEndpointModeState uint // Enumeration values for EC2IMDSEndpointModeState const ( EC2IMDSEndpointModeStateUnset EC2IMDSEndpointModeState = iota EC2IMDSEndpointModeStateIPv4 EC2IMDSEndpointModeStateIPv6 ) // SetFromString sets the EC2IMDSEndpointModeState based on the provided string value. Unknown values will default to EC2IMDSEndpointModeStateUnset func (e *EC2IMDSEndpointModeState) SetFromString(v string) error { v = strings.TrimSpace(v) switch { case len(v) == 0: *e = EC2IMDSEndpointModeStateUnset case strings.EqualFold(v, "IPv6"): *e = EC2IMDSEndpointModeStateIPv6 case strings.EqualFold(v, "IPv4"): *e = EC2IMDSEndpointModeStateIPv4 default: return fmt.Errorf("unknown EC2 IMDS endpoint mode, must be either IPv6 or IPv4") } return nil } // STSRegionalEndpoint is an enum for the states of the STS Regional Endpoint // options. type STSRegionalEndpoint int func (e STSRegionalEndpoint) String() string { switch e { case LegacySTSEndpoint: return "legacy" case RegionalSTSEndpoint: return "regional" case UnsetSTSEndpoint: return "" default: return "unknown" } } const ( // UnsetSTSEndpoint represents that STS Regional Endpoint flag is not specified. UnsetSTSEndpoint STSRegionalEndpoint = iota // LegacySTSEndpoint represents when STS Regional Endpoint flag is specified // to use legacy endpoints. LegacySTSEndpoint // RegionalSTSEndpoint represents when STS Regional Endpoint flag is specified // to use regional endpoints. RegionalSTSEndpoint ) // GetSTSRegionalEndpoint function returns the STSRegionalEndpointFlag based // on the input string provided in env config or shared config by the user. // // `legacy`, `regional` are the only case-insensitive valid strings for // resolving the STS regional Endpoint flag. func GetSTSRegionalEndpoint(s string) (STSRegionalEndpoint, error) { switch { case strings.EqualFold(s, "legacy"): return LegacySTSEndpoint, nil case strings.EqualFold(s, "regional"): return RegionalSTSEndpoint, nil default: return UnsetSTSEndpoint, fmt.Errorf("unable to resolve the value of STSRegionalEndpoint for %v", s) } } // S3UsEast1RegionalEndpoint is an enum for the states of the S3 us-east-1 // Regional Endpoint options. type S3UsEast1RegionalEndpoint int func (e S3UsEast1RegionalEndpoint) String() string { switch e { case LegacyS3UsEast1Endpoint: return "legacy" case RegionalS3UsEast1Endpoint: return "regional" case UnsetS3UsEast1Endpoint: return "" default: return "unknown" } } const ( // UnsetS3UsEast1Endpoint represents that S3 Regional Endpoint flag is not // specified. UnsetS3UsEast1Endpoint S3UsEast1RegionalEndpoint = iota // LegacyS3UsEast1Endpoint represents when S3 Regional Endpoint flag is // specified to use legacy endpoints. LegacyS3UsEast1Endpoint // RegionalS3UsEast1Endpoint represents when S3 Regional Endpoint flag is // specified to use regional endpoints. RegionalS3UsEast1Endpoint ) // GetS3UsEast1RegionalEndpoint function returns the S3UsEast1RegionalEndpointFlag based // on the input string provided in env config or shared config by the user. // // `legacy`, `regional` are the only case-insensitive valid strings for // resolving the S3 regional Endpoint flag. func GetS3UsEast1RegionalEndpoint(s string) (S3UsEast1RegionalEndpoint, error) { switch { case strings.EqualFold(s, "legacy"): return LegacyS3UsEast1Endpoint, nil case strings.EqualFold(s, "regional"): return RegionalS3UsEast1Endpoint, nil default: return UnsetS3UsEast1Endpoint, fmt.Errorf("unable to resolve the value of S3UsEast1RegionalEndpoint for %v", s) } } // Set combines all of the option functions together. func (o *Options) Set(optFns ...func(*Options)) { for _, fn := range optFns { fn(o) } } // DisableSSLOption sets the DisableSSL options. Can be used as a functional // option when resolving endpoints. func DisableSSLOption(o *Options) { o.DisableSSL = true } // UseDualStackOption sets the UseDualStack option. Can be used as a functional // option when resolving endpoints. // // Deprecated: UseDualStackEndpointOption should be used to enable usage of a service's dual-stack endpoint. // When DualStackEndpointState is set to a non-zero value it takes higher precedence then this option. func UseDualStackOption(o *Options) { o.UseDualStack = true } // UseDualStackEndpointOption sets the UseDualStackEndpoint option to enabled. Can be used as a functional // option when resolving endpoints. func UseDualStackEndpointOption(o *Options) { o.UseDualStackEndpoint = DualStackEndpointStateEnabled } // UseFIPSEndpointOption sets the UseFIPSEndpoint option to enabled. Can be used as a functional // option when resolving endpoints. func UseFIPSEndpointOption(o *Options) { o.UseFIPSEndpoint = FIPSEndpointStateEnabled } // StrictMatchingOption sets the StrictMatching option. Can be used as a functional // option when resolving endpoints. func StrictMatchingOption(o *Options) { o.StrictMatching = true } // ResolveUnknownServiceOption sets the ResolveUnknownService option. Can be used // as a functional option when resolving endpoints. func ResolveUnknownServiceOption(o *Options) { o.ResolveUnknownService = true } // STSRegionalEndpointOption enables the STS endpoint resolver behavior to resolve // STS endpoint to their regional endpoint, instead of the global endpoint. func STSRegionalEndpointOption(o *Options) { o.STSRegionalEndpoint = RegionalSTSEndpoint } // A Resolver provides the interface for functionality to resolve endpoints. // The build in Partition and DefaultResolver return value satisfy this interface. type Resolver interface { EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) } // ResolverFunc is a helper utility that wraps a function so it satisfies the // Resolver interface. This is useful when you want to add additional endpoint // resolving logic, or stub out specific endpoints with custom values. type ResolverFunc func(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) // EndpointFor wraps the ResolverFunc function to satisfy the Resolver interface. func (fn ResolverFunc) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) { return fn(service, region, opts...) } var schemeRE = regexp.MustCompile("^([^:]+)://") // AddScheme adds the HTTP or HTTPS schemes to a endpoint URL if there is no // scheme. If disableSSL is true HTTP will set HTTP instead of the default HTTPS. // // If disableSSL is set, it will only set the URL's scheme if the URL does not // contain a scheme. func AddScheme(endpoint string, disableSSL bool) string { if !schemeRE.MatchString(endpoint) { scheme := "https" if disableSSL { scheme = "http" } endpoint = fmt.Sprintf("%s://%s", scheme, endpoint) } return endpoint } // EnumPartitions a provides a way to retrieve the underlying partitions that // make up the SDK's default Resolver, or any resolver decoded from a model // file. // // Use this interface with DefaultResolver and DecodeModels to get the list of // Partitions. type EnumPartitions interface { Partitions() []Partition } // RegionsForService returns a map of regions for the partition and service. // If either the partition or service does not exist false will be returned // as the second parameter. // // This example shows how to get the regions for DynamoDB in the AWS partition. // // rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID) // // This is equivalent to using the partition directly. // // rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions() func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) { for _, p := range ps { if p.ID() != partitionID { continue } if _, ok := p.p.Services[serviceID]; !(ok || serviceID == Ec2metadataServiceID) { break } s := Service{ id: serviceID, p: p.p, } return s.Regions(), true } return map[string]Region{}, false } // PartitionForRegion returns the first partition which includes the region // passed in. This includes both known regions and regions which match // a pattern supported by the partition which may include regions that are // not explicitly known by the partition. Use the Regions method of the // returned Partition if explicit support is needed. func PartitionForRegion(ps []Partition, regionID string) (Partition, bool) { for _, p := range ps { if _, ok := p.p.Regions[regionID]; ok || p.p.RegionRegex.MatchString(regionID) { return p, true } } return Partition{}, false } // A Partition provides the ability to enumerate the partition's regions // and services. type Partition struct { id, dnsSuffix string p *partition } // DNSSuffix returns the base domain name of the partition. func (p Partition) DNSSuffix() string { return p.dnsSuffix } // ID returns the identifier of the partition. func (p Partition) ID() string { return p.id } // EndpointFor attempts to resolve the endpoint based on service and region. // See Options for information on configuring how the endpoint is resolved. // // If the service cannot be found in the metadata the UnknownServiceError // error will be returned. This validation will occur regardless if // StrictMatching is enabled. To enable resolving unknown services set the // "ResolveUnknownService" option to true. When StrictMatching is disabled // this option allows the partition resolver to resolve a endpoint based on // the service endpoint ID provided. // // When resolving endpoints you can choose to enable StrictMatching. This will // require the provided service and region to be known by the partition. // If the endpoint cannot be strictly resolved an error will be returned. This // mode is useful to ensure the endpoint resolved is valid. Without // StrictMatching enabled the endpoint returned may look valid but may not work. // StrictMatching requires the SDK to be updated if you want to take advantage // of new regions and services expansions. // // Errors that can be returned. // - UnknownServiceError // - UnknownEndpointError func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) { return p.p.EndpointFor(service, region, opts...) } // Regions returns a map of Regions indexed by their ID. This is useful for // enumerating over the regions in a partition. func (p Partition) Regions() map[string]Region { rs := make(map[string]Region, len(p.p.Regions)) for id, r := range p.p.Regions { rs[id] = Region{ id: id, desc: r.Description, p: p.p, } } return rs } // Services returns a map of Service indexed by their ID. This is useful for // enumerating over the services in a partition. func (p Partition) Services() map[string]Service { ss := make(map[string]Service, len(p.p.Services)) for id := range p.p.Services { ss[id] = Service{ id: id, p: p.p, } } // Since we have removed the customization that injected this into the model // we still need to pretend that this is a modeled service. if _, ok := ss[Ec2metadataServiceID]; !ok { ss[Ec2metadataServiceID] = Service{ id: Ec2metadataServiceID, p: p.p, } } return ss } // A Region provides information about a region, and ability to resolve an // endpoint from the context of a region, given a service. type Region struct { id, desc string p *partition } // ID returns the region's identifier. func (r Region) ID() string { return r.id } // Description returns the region's description. The region description // is free text, it can be empty, and it may change between SDK releases. func (r Region) Description() string { return r.desc } // ResolveEndpoint resolves an endpoint from the context of the region given // a service. See Partition.EndpointFor for usage and errors that can be returned. func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) { return r.p.EndpointFor(service, r.id, opts...) } // Services returns a list of all services that are known to be in this region. func (r Region) Services() map[string]Service { ss := map[string]Service{} for id, s := range r.p.Services { if _, ok := s.Endpoints[endpointKey{Region: r.id}]; ok { ss[id] = Service{ id: id, p: r.p, } } } return ss } // A Service provides information about a service, and ability to resolve an // endpoint from the context of a service, given a region. type Service struct { id string p *partition } // ID returns the identifier for the service. func (s Service) ID() string { return s.id } // ResolveEndpoint resolves an endpoint from the context of a service given // a region. See Partition.EndpointFor for usage and errors that can be returned. func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) { return s.p.EndpointFor(s.id, region, opts...) } // Regions returns a map of Regions that the service is present in. // // A region is the AWS region the service exists in. Whereas a Endpoint is // an URL that can be resolved to a instance of a service. func (s Service) Regions() map[string]Region { rs := map[string]Region{} service, ok := s.p.Services[s.id] // Since ec2metadata customization has been removed we need to check // if it was defined in non-standard endpoints.json file. If it's not // then we can return the empty map as there is no regional-endpoints for IMDS. // Otherwise, we iterate need to iterate the non-standard model. if s.id == Ec2metadataServiceID && !ok { return rs } for id := range service.Endpoints { if id.Variant != 0 { continue } if r, ok := s.p.Regions[id.Region]; ok { rs[id.Region] = Region{ id: id.Region, desc: r.Description, p: s.p, } } } return rs } // Endpoints returns a map of Endpoints indexed by their ID for all known // endpoints for a service. // // A region is the AWS region the service exists in. Whereas a Endpoint is // an URL that can be resolved to a instance of a service. func (s Service) Endpoints() map[string]Endpoint { es := make(map[string]Endpoint, len(s.p.Services[s.id].Endpoints)) for id := range s.p.Services[s.id].Endpoints { if id.Variant != 0 { continue } es[id.Region] = Endpoint{ id: id.Region, serviceID: s.id, p: s.p, } } return es } // A Endpoint provides information about endpoints, and provides the ability // to resolve that endpoint for the service, and the region the endpoint // represents. type Endpoint struct { id string serviceID string p *partition } // ID returns the identifier for an endpoint. func (e Endpoint) ID() string { return e.id } // ServiceID returns the identifier the endpoint belongs to. func (e Endpoint) ServiceID() string { return e.serviceID } // ResolveEndpoint resolves an endpoint from the context of a service and // region the endpoint represents. See Partition.EndpointFor for usage and // errors that can be returned. func (e Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) { return e.p.EndpointFor(e.serviceID, e.id, opts...) } // A ResolvedEndpoint is an endpoint that has been resolved based on a partition // service, and region. type ResolvedEndpoint struct { // The endpoint URL URL string // The endpoint partition PartitionID string // The region that should be used for signing requests. SigningRegion string // The service name that should be used for signing requests. SigningName string // States that the signing name for this endpoint was derived from metadata // passed in, but was not explicitly modeled. SigningNameDerived bool // The signing method that should be used for signing requests. SigningMethod string } // So that the Error interface type can be included as an anonymous field // in the requestError struct and not conflict with the error.Error() method. type awsError awserr.Error // A EndpointNotFoundError is returned when in StrictMatching mode, and the // endpoint for the service and region cannot be found in any of the partitions. type EndpointNotFoundError struct { awsError Partition string Service string Region string } // A UnknownServiceError is returned when the service does not resolve to an // endpoint. Includes a list of all known services for the partition. Returned // when a partition does not support the service. type UnknownServiceError struct { awsError Partition string Service string Known []string } // NewUnknownServiceError builds and returns UnknownServiceError. func NewUnknownServiceError(p, s string, known []string) UnknownServiceError { return UnknownServiceError{ awsError: awserr.New("UnknownServiceError", "could not resolve endpoint for unknown service", nil), Partition: p, Service: s, Known: known, } } // String returns the string representation of the error. func (e UnknownServiceError) Error() string { extra := fmt.Sprintf("partition: %q, service: %q", e.Partition, e.Service) if len(e.Known) > 0 { extra += fmt.Sprintf(", known: %v", e.Known) } return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr()) } // String returns the string representation of the error. func (e UnknownServiceError) String() string { return e.Error() } // A UnknownEndpointError is returned when in StrictMatching mode and the // service is valid, but the region does not resolve to an endpoint. Includes // a list of all known endpoints for the service. type UnknownEndpointError struct { awsError Partition string Service string Region string Known []string } // NewUnknownEndpointError builds and returns UnknownEndpointError. func NewUnknownEndpointError(p, s, r string, known []string) UnknownEndpointError { return UnknownEndpointError{ awsError: awserr.New("UnknownEndpointError", "could not resolve endpoint", nil), Partition: p, Service: s, Region: r, Known: known, } } // String returns the string representation of the error. func (e UnknownEndpointError) Error() string { extra := fmt.Sprintf("partition: %q, service: %q, region: %q", e.Partition, e.Service, e.Region) if len(e.Known) > 0 { extra += fmt.Sprintf(", known: %v", e.Known) } return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr()) } // String returns the string representation of the error. func (e UnknownEndpointError) String() string { return e.Error() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go ================================================ package endpoints var legacyGlobalRegions = map[string]map[string]struct{}{ "sts": { "ap-northeast-1": {}, "ap-south-1": {}, "ap-southeast-1": {}, "ap-southeast-2": {}, "ca-central-1": {}, "eu-central-1": {}, "eu-north-1": {}, "eu-west-1": {}, "eu-west-2": {}, "eu-west-3": {}, "sa-east-1": {}, "us-east-1": {}, "us-east-2": {}, "us-west-1": {}, "us-west-2": {}, }, "s3": { "us-east-1": {}, }, } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go ================================================ package endpoints import ( "encoding/json" "fmt" "regexp" "strconv" "strings" ) const ( ec2MetadataEndpointIPv6 = "http://[fd00:ec2::254]/latest" ec2MetadataEndpointIPv4 = "http://169.254.169.254/latest" ) const dnsSuffixTemplateKey = "{dnsSuffix}" // defaultKey is a compound map key of a variant and other values. type defaultKey struct { Variant endpointVariant ServiceVariant serviceVariant } // endpointKey is a compound map key of a region and associated variant value. type endpointKey struct { Region string Variant endpointVariant } // endpointVariant is a bit field to describe the endpoints attributes. type endpointVariant uint64 // serviceVariant is a bit field to describe the service endpoint attributes. type serviceVariant uint64 const ( // fipsVariant indicates that the endpoint is FIPS capable. fipsVariant endpointVariant = 1 << (64 - 1 - iota) // dualStackVariant indicates that the endpoint is DualStack capable. dualStackVariant ) var regionValidationRegex = regexp.MustCompile(`^[[:alnum:]]([[:alnum:]\-]*[[:alnum:]])?$`) type partitions []partition func (ps partitions) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) { var opt Options opt.Set(opts...) if len(opt.ResolvedRegion) > 0 { region = opt.ResolvedRegion } for i := 0; i < len(ps); i++ { if !ps[i].canResolveEndpoint(service, region, opt) { continue } return ps[i].EndpointFor(service, region, opts...) } // If loose matching fallback to first partition format to use // when resolving the endpoint. if !opt.StrictMatching && len(ps) > 0 { return ps[0].EndpointFor(service, region, opts...) } return ResolvedEndpoint{}, NewUnknownEndpointError("all partitions", service, region, []string{}) } // Partitions satisfies the EnumPartitions interface and returns a list // of Partitions representing each partition represented in the SDK's // endpoints model. func (ps partitions) Partitions() []Partition { parts := make([]Partition, 0, len(ps)) for i := 0; i < len(ps); i++ { parts = append(parts, ps[i].Partition()) } return parts } type endpointWithVariants struct { endpoint Variants []endpointWithTags `json:"variants"` } type endpointWithTags struct { endpoint Tags []string `json:"tags"` } type endpointDefaults map[defaultKey]endpoint func (p *endpointDefaults) UnmarshalJSON(data []byte) error { if *p == nil { *p = make(endpointDefaults) } var e endpointWithVariants if err := json.Unmarshal(data, &e); err != nil { return err } (*p)[defaultKey{Variant: 0}] = e.endpoint e.Hostname = "" e.DNSSuffix = "" for _, variant := range e.Variants { endpointVariant, unknown := parseVariantTags(variant.Tags) if unknown { continue } var ve endpoint ve.mergeIn(e.endpoint) ve.mergeIn(variant.endpoint) (*p)[defaultKey{Variant: endpointVariant}] = ve } return nil } func parseVariantTags(tags []string) (ev endpointVariant, unknown bool) { if len(tags) == 0 { unknown = true return } for _, tag := range tags { switch { case strings.EqualFold("fips", tag): ev |= fipsVariant case strings.EqualFold("dualstack", tag): ev |= dualStackVariant default: unknown = true } } return ev, unknown } type partition struct { ID string `json:"partition"` Name string `json:"partitionName"` DNSSuffix string `json:"dnsSuffix"` RegionRegex regionRegex `json:"regionRegex"` Defaults endpointDefaults `json:"defaults"` Regions regions `json:"regions"` Services services `json:"services"` } func (p partition) Partition() Partition { return Partition{ dnsSuffix: p.DNSSuffix, id: p.ID, p: &p, } } func (p partition) canResolveEndpoint(service, region string, options Options) bool { s, hasService := p.Services[service] _, hasEndpoint := s.Endpoints[endpointKey{ Region: region, Variant: options.getEndpointVariant(service), }] if hasEndpoint && hasService { return true } if options.StrictMatching { return false } return p.RegionRegex.MatchString(region) } func allowLegacyEmptyRegion(service string) bool { legacy := map[string]struct{}{ "budgets": {}, "ce": {}, "chime": {}, "cloudfront": {}, "ec2metadata": {}, "iam": {}, "importexport": {}, "organizations": {}, "route53": {}, "sts": {}, "support": {}, "waf": {}, } _, allowed := legacy[service] return allowed } func (p partition) EndpointFor(service, region string, opts ...func(*Options)) (resolved ResolvedEndpoint, err error) { var opt Options opt.Set(opts...) if len(opt.ResolvedRegion) > 0 { region = opt.ResolvedRegion } s, hasService := p.Services[service] if service == Ec2metadataServiceID && !hasService { endpoint := getEC2MetadataEndpoint(p.ID, service, opt.EC2MetadataEndpointMode) return endpoint, nil } if len(service) == 0 || !(hasService || opt.ResolveUnknownService) { // Only return error if the resolver will not fallback to creating // endpoint based on service endpoint ID passed in. return resolved, NewUnknownServiceError(p.ID, service, serviceList(p.Services)) } if len(region) == 0 && allowLegacyEmptyRegion(service) && len(s.PartitionEndpoint) != 0 { region = s.PartitionEndpoint } if r, ok := isLegacyGlobalRegion(service, region, opt); ok { region = r } variant := opt.getEndpointVariant(service) endpoints := s.Endpoints serviceDefaults, hasServiceDefault := s.Defaults[defaultKey{Variant: variant}] // If we searched for a variant which may have no explicit service defaults, // then we need to inherit the standard service defaults except the hostname and dnsSuffix if variant != 0 && !hasServiceDefault { serviceDefaults = s.Defaults[defaultKey{}] serviceDefaults.Hostname = "" serviceDefaults.DNSSuffix = "" } partitionDefaults, hasPartitionDefault := p.Defaults[defaultKey{Variant: variant}] var dnsSuffix string if len(serviceDefaults.DNSSuffix) > 0 { dnsSuffix = serviceDefaults.DNSSuffix } else if variant == 0 { // For legacy reasons the partition dnsSuffix is not in the defaults, so if we looked for // a non-variant endpoint then we need to set the dnsSuffix. dnsSuffix = p.DNSSuffix } noDefaults := !hasServiceDefault && !hasPartitionDefault e, hasEndpoint := s.endpointForRegion(region, endpoints, variant) if len(region) == 0 || (!hasEndpoint && (opt.StrictMatching || noDefaults)) { return resolved, NewUnknownEndpointError(p.ID, service, region, endpointList(endpoints, variant)) } defs := []endpoint{partitionDefaults, serviceDefaults} return e.resolve(service, p.ID, region, dnsSuffixTemplateKey, dnsSuffix, defs, opt) } func getEC2MetadataEndpoint(partitionID, service string, mode EC2IMDSEndpointModeState) ResolvedEndpoint { switch mode { case EC2IMDSEndpointModeStateIPv6: return ResolvedEndpoint{ URL: ec2MetadataEndpointIPv6, PartitionID: partitionID, SigningRegion: "aws-global", SigningName: service, SigningNameDerived: true, SigningMethod: "v4", } case EC2IMDSEndpointModeStateIPv4: fallthrough default: return ResolvedEndpoint{ URL: ec2MetadataEndpointIPv4, PartitionID: partitionID, SigningRegion: "aws-global", SigningName: service, SigningNameDerived: true, SigningMethod: "v4", } } } func isLegacyGlobalRegion(service string, region string, opt Options) (string, bool) { if opt.getEndpointVariant(service) != 0 { return "", false } const ( sts = "sts" s3 = "s3" awsGlobal = "aws-global" ) switch { case service == sts && opt.STSRegionalEndpoint == RegionalSTSEndpoint: return region, false case service == s3 && opt.S3UsEast1RegionalEndpoint == RegionalS3UsEast1Endpoint: return region, false default: if _, ok := legacyGlobalRegions[service][region]; ok { return awsGlobal, true } } return region, false } func serviceList(ss services) []string { list := make([]string, 0, len(ss)) for k := range ss { list = append(list, k) } return list } func endpointList(es serviceEndpoints, variant endpointVariant) []string { list := make([]string, 0, len(es)) for k := range es { if k.Variant != variant { continue } list = append(list, k.Region) } return list } type regionRegex struct { *regexp.Regexp } func (rr *regionRegex) UnmarshalJSON(b []byte) (err error) { // Strip leading and trailing quotes regex, err := strconv.Unquote(string(b)) if err != nil { return fmt.Errorf("unable to strip quotes from regex, %v", err) } rr.Regexp, err = regexp.Compile(regex) if err != nil { return fmt.Errorf("unable to unmarshal region regex, %v", err) } return nil } type regions map[string]region type region struct { Description string `json:"description"` } type services map[string]service type service struct { PartitionEndpoint string `json:"partitionEndpoint"` IsRegionalized boxedBool `json:"isRegionalized,omitempty"` Defaults endpointDefaults `json:"defaults"` Endpoints serviceEndpoints `json:"endpoints"` } func (s *service) endpointForRegion(region string, endpoints serviceEndpoints, variant endpointVariant) (endpoint, bool) { if e, ok := endpoints[endpointKey{Region: region, Variant: variant}]; ok { return e, true } if s.IsRegionalized == boxedFalse { return endpoints[endpointKey{Region: s.PartitionEndpoint, Variant: variant}], region == s.PartitionEndpoint } // Unable to find any matching endpoint, return // blank that will be used for generic endpoint creation. return endpoint{}, false } type serviceEndpoints map[endpointKey]endpoint func (s *serviceEndpoints) UnmarshalJSON(data []byte) error { if *s == nil { *s = make(serviceEndpoints) } var regionToEndpoint map[string]endpointWithVariants if err := json.Unmarshal(data, ®ionToEndpoint); err != nil { return err } for region, e := range regionToEndpoint { (*s)[endpointKey{Region: region}] = e.endpoint e.Hostname = "" e.DNSSuffix = "" for _, variant := range e.Variants { endpointVariant, unknown := parseVariantTags(variant.Tags) if unknown { continue } var ve endpoint ve.mergeIn(e.endpoint) ve.mergeIn(variant.endpoint) (*s)[endpointKey{Region: region, Variant: endpointVariant}] = ve } } return nil } type endpoint struct { Hostname string `json:"hostname"` Protocols []string `json:"protocols"` CredentialScope credentialScope `json:"credentialScope"` DNSSuffix string `json:"dnsSuffix"` // Signature Version not used SignatureVersions []string `json:"signatureVersions"` // SSLCommonName not used. SSLCommonName string `json:"sslCommonName"` Deprecated boxedBool `json:"deprecated"` } // isZero returns whether the endpoint structure is an empty (zero) value. func (e endpoint) isZero() bool { switch { case len(e.Hostname) != 0: return false case len(e.Protocols) != 0: return false case e.CredentialScope != (credentialScope{}): return false case len(e.SignatureVersions) != 0: return false case len(e.SSLCommonName) != 0: return false } return true } const ( defaultProtocol = "https" defaultSigner = "v4" ) var ( protocolPriority = []string{"https", "http"} signerPriority = []string{"v4", "v2"} ) func getByPriority(s []string, p []string, def string) string { if len(s) == 0 { return def } for i := 0; i < len(p); i++ { for j := 0; j < len(s); j++ { if s[j] == p[i] { return s[j] } } } return s[0] } func (e endpoint) resolve(service, partitionID, region, dnsSuffixTemplateVariable, dnsSuffix string, defs []endpoint, opts Options) (ResolvedEndpoint, error) { var merged endpoint for _, def := range defs { merged.mergeIn(def) } merged.mergeIn(e) e = merged signingRegion := e.CredentialScope.Region if len(signingRegion) == 0 { signingRegion = region } signingName := e.CredentialScope.Service var signingNameDerived bool if len(signingName) == 0 { signingName = service signingNameDerived = true } hostname := e.Hostname if !validateInputRegion(region) { return ResolvedEndpoint{}, fmt.Errorf("invalid region identifier format provided") } if len(merged.DNSSuffix) > 0 { dnsSuffix = merged.DNSSuffix } u := strings.Replace(hostname, "{service}", service, 1) u = strings.Replace(u, "{region}", region, 1) u = strings.Replace(u, dnsSuffixTemplateVariable, dnsSuffix, 1) scheme := getEndpointScheme(e.Protocols, opts.DisableSSL) u = fmt.Sprintf("%s://%s", scheme, u) if e.Deprecated == boxedTrue && opts.LogDeprecated && opts.Logger != nil { opts.Logger.Log(fmt.Sprintf("endpoint identifier %q, url %q marked as deprecated", region, u)) } return ResolvedEndpoint{ URL: u, PartitionID: partitionID, SigningRegion: signingRegion, SigningName: signingName, SigningNameDerived: signingNameDerived, SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), }, nil } func getEndpointScheme(protocols []string, disableSSL bool) string { if disableSSL { return "http" } return getByPriority(protocols, protocolPriority, defaultProtocol) } func (e *endpoint) mergeIn(other endpoint) { if len(other.Hostname) > 0 { e.Hostname = other.Hostname } if len(other.Protocols) > 0 { e.Protocols = other.Protocols } if len(other.SignatureVersions) > 0 { e.SignatureVersions = other.SignatureVersions } if len(other.CredentialScope.Region) > 0 { e.CredentialScope.Region = other.CredentialScope.Region } if len(other.CredentialScope.Service) > 0 { e.CredentialScope.Service = other.CredentialScope.Service } if len(other.SSLCommonName) > 0 { e.SSLCommonName = other.SSLCommonName } if len(other.DNSSuffix) > 0 { e.DNSSuffix = other.DNSSuffix } if other.Deprecated != boxedBoolUnset { e.Deprecated = other.Deprecated } } type credentialScope struct { Region string `json:"region"` Service string `json:"service"` } type boxedBool int func (b *boxedBool) UnmarshalJSON(buf []byte) error { v, err := strconv.ParseBool(string(buf)) if err != nil { return err } if v { *b = boxedTrue } else { *b = boxedFalse } return nil } const ( boxedBoolUnset boxedBool = iota boxedFalse boxedTrue ) func validateInputRegion(region string) bool { return regionValidationRegex.MatchString(region) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go ================================================ //go:build codegen // +build codegen package endpoints import ( "fmt" "io" "reflect" "strings" "text/template" "unicode" ) // A CodeGenOptions are the options for code generating the endpoints into // Go code from the endpoints model definition. 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 func (d *CodeGenOptions) Set(optFns ...func(*CodeGenOptions)) { for _, fn := range optFns { fn(d) } } // CodeGenModel given a endpoints model file will decode it and attempt to // generate Go code from the model definition. Error will be returned if // the code is unable to be generated, or decoded. func CodeGenModel(modelFile io.Reader, outFile io.Writer, optFns ...func(*CodeGenOptions)) error { var opts CodeGenOptions opts.Set(optFns...) resolver, err := DecodeModel(modelFile, func(d *DecodeModelOptions) { *d = opts.DecodeModelOptions }) if err != nil { 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", v); err != nil { return fmt.Errorf("failed to execute template, %v", err) } return nil } func toSymbol(v string) string { out := []rune{} for _, c := range strings.Title(v) { if !(unicode.IsNumber(c) || unicode.IsLetter(c)) { continue } out = append(out, c) } return string(out) } func quoteString(v string) string { return fmt.Sprintf("%q", v) } func regionConstName(p, r string) string { return toSymbol(p) + toSymbol(r) } func partitionGetter(id string) string { return fmt.Sprintf("%sPartition", toSymbol(id)) } func partitionVarName(id string) string { return fmt.Sprintf("%sPartition", strings.ToLower(toSymbol(id))) } func listPartitionNames(ps partitions) string { names := []string{} switch len(ps) { case 1: return ps[0].Name case 2: return fmt.Sprintf("%s and %s", ps[0].Name, ps[1].Name) default: for i, p := range ps { if i == len(ps)-1 { names = append(names, "and "+p.Name) } else { names = append(names, p.Name) } } return strings.Join(names, ", ") } } func boxedBoolIfSet(msg string, v boxedBool) string { switch v { case boxedTrue: return fmt.Sprintf(msg, "boxedTrue") case boxedFalse: return fmt.Sprintf(msg, "boxedFalse") default: return "" } } func stringIfSet(msg, v string) string { if len(v) == 0 { return "" } return fmt.Sprintf(msg, v) } func stringSliceIfSet(msg string, vs []string) string { if len(vs) == 0 { return "" } names := []string{} for _, v := range vs { names = append(names, `"`+v+`"`) } return fmt.Sprintf(msg, strings.Join(names, ",")) } func endpointIsSet(v endpoint) bool { return !reflect.DeepEqual(v, endpoint{}) } func serviceSet(ps partitions) map[string]struct{} { set := map[string]struct{}{} for _, p := range ps { for id := range p.Services { set[id] = struct{}{} } } return set } func endpointVariantSetter(variant endpointVariant) (string, error) { if variant == 0 { return "0", nil } if variant > (fipsVariant | dualStackVariant) { return "", fmt.Errorf("unknown endpoint variant") } var symbols []string if variant&fipsVariant != 0 { symbols = append(symbols, "fipsVariant") } if variant&dualStackVariant != 0 { symbols = append(symbols, "dualStackVariant") } v := strings.Join(symbols, "|") return v, nil } func endpointKeySetter(e endpointKey) (string, error) { var sb strings.Builder sb.WriteString("endpointKey{\n") sb.WriteString(fmt.Sprintf("Region: %q,\n", e.Region)) if e.Variant != 0 { variantSetter, err := endpointVariantSetter(e.Variant) if err != nil { return "", err } sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter)) } sb.WriteString("}") return sb.String(), nil } func defaultKeySetter(e defaultKey) (string, error) { var sb strings.Builder sb.WriteString("defaultKey{\n") if e.Variant != 0 { variantSetter, err := endpointVariantSetter(e.Variant) if err != nil { return "", err } sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter)) } sb.WriteString("}") return sb.String(), nil } var funcMap = template.FuncMap{ "ToSymbol": toSymbol, "QuoteString": quoteString, "RegionConst": regionConstName, "PartitionGetter": partitionGetter, "PartitionVarName": partitionVarName, "ListPartitionNames": listPartitionNames, "BoxedBoolIfSet": boxedBoolIfSet, "StringIfSet": stringIfSet, "StringSliceIfSet": stringSliceIfSet, "EndpointIsSet": endpointIsSet, "ServicesSet": serviceSet, "EndpointVariantSetter": endpointVariantSetter, "EndpointKeySetter": endpointKeySetter, "DefaultKeySetter": defaultKeySetter, } const v3Tmpl = ` {{ define "defaults" -}} // Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT. package endpoints import ( "regexp" ) {{ template "partition consts" $.Resolver }} {{ range $_, $partition := $.Resolver }} {{ template "partition region consts" $partition }} {{ end }} {{ if not $.DisableGenerateServiceIDs -}} {{ template "service consts" $.Resolver }} {{- end }} {{ template "endpoint resolvers" $.Resolver }} {{- end }} {{ define "partition consts" }} // Partition identifiers const ( {{ range $_, $p := . -}} {{ ToSymbol $p.ID }}PartitionID = {{ QuoteString $p.ID }} // {{ $p.Name }} partition. {{ end -}} ) {{- end }} {{ define "partition region consts" }} // {{ .Name }} partition's regions. const ( {{ range $id, $region := .Regions -}} {{ ToSymbol $id }}RegionID = {{ QuoteString $id }} // {{ $region.Description }}. {{ end -}} ) {{- end }} {{ define "service consts" }} // Service identifiers const ( {{ $serviceSet := ServicesSet . -}} {{ range $id, $_ := $serviceSet -}} {{ ToSymbol $id }}ServiceID = {{ QuoteString $id }} // {{ ToSymbol $id }}. {{ end -}} ) {{- end }} {{ define "endpoint resolvers" }} // DefaultResolver returns an Endpoint resolver that will be able // to resolve endpoints for: {{ ListPartitionNames . }}. // // Use DefaultPartitions() to get the list of the default partitions. func DefaultResolver() Resolver { return defaultPartitions } // DefaultPartitions returns a list of the partitions the SDK is bundled // with. The available partitions are: {{ ListPartitionNames . }}. // // partitions := endpoints.DefaultPartitions // for _, p := range partitions { // // ... inspect partitions // } func DefaultPartitions() []Partition { return defaultPartitions.Partitions() } var defaultPartitions = partitions{ {{ range $_, $partition := . -}} {{ PartitionVarName $partition.ID }}, {{ end }} } {{ range $_, $partition := . -}} {{ $name := PartitionGetter $partition.ID -}} // {{ $name }} returns the Resolver for {{ $partition.Name }}. func {{ $name }}() Partition { return {{ PartitionVarName $partition.ID }}.Partition() } var {{ PartitionVarName $partition.ID }} = {{ template "gocode Partition" $partition }} {{ end }} {{ end }} {{ define "default partitions" }} func DefaultPartitions() []Partition { return []partition{ {{ range $_, $partition := . -}} // {{ ToSymbol $partition.ID}}Partition(), {{ end }} } } {{ end }} {{ define "gocode Partition" -}} partition{ {{ StringIfSet "ID: %q,\n" .ID -}} {{ StringIfSet "Name: %q,\n" .Name -}} {{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}} RegionRegex: {{ template "gocode RegionRegex" .RegionRegex }}, {{ if (gt (len .Defaults) 0) -}} Defaults: {{ template "gocode Defaults" .Defaults -}}, {{ end -}} Regions: {{ template "gocode Regions" .Regions }}, Services: {{ template "gocode Services" .Services }}, } {{- end }} {{ define "gocode RegionRegex" -}} regionRegex{ Regexp: func() *regexp.Regexp{ reg, _ := regexp.Compile({{ QuoteString .Regexp.String }}) return reg }(), } {{- end }} {{ define "gocode Regions" -}} regions{ {{ range $id, $region := . -}} "{{ $id }}": {{ template "gocode Region" $region }}, {{ end -}} } {{- end }} {{ define "gocode Region" -}} region{ {{ StringIfSet "Description: %q,\n" .Description -}} } {{- end }} {{ define "gocode Services" -}} services{ {{ range $id, $service := . -}} "{{ $id }}": {{ template "gocode Service" $service }}, {{ end }} } {{- end }} {{ define "gocode Service" -}} service{ {{ StringIfSet "PartitionEndpoint: %q,\n" .PartitionEndpoint -}} {{ BoxedBoolIfSet "IsRegionalized: %s,\n" .IsRegionalized -}} {{ if (gt (len .Defaults) 0) -}} Defaults: {{ template "gocode Defaults" .Defaults -}}, {{ end -}} {{ if .Endpoints -}} Endpoints: {{ template "gocode Endpoints" .Endpoints }}, {{- end }} } {{- end }} {{ define "gocode Defaults" -}} endpointDefaults{ {{ range $id, $endpoint := . -}} {{ DefaultKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }}, {{ end }} } {{- end }} {{ define "gocode Endpoints" -}} serviceEndpoints{ {{ range $id, $endpoint := . -}} {{ EndpointKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }}, {{ end }} } {{- end }} {{ define "gocode Endpoint" -}} endpoint{ {{ StringIfSet "Hostname: %q,\n" .Hostname -}} {{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}} {{ StringIfSet "SSLCommonName: %q,\n" .SSLCommonName -}} {{ StringSliceIfSet "Protocols: []string{%s},\n" .Protocols -}} {{ StringSliceIfSet "SignatureVersions: []string{%s},\n" .SignatureVersions -}} {{ if or .CredentialScope.Region .CredentialScope.Service -}} CredentialScope: credentialScope{ {{ StringIfSet "Region: %q,\n" .CredentialScope.Region -}} {{ StringIfSet "Service: %q,\n" .CredentialScope.Service -}} }, {{- end }} {{ BoxedBoolIfSet "Deprecated: %s,\n" .Deprecated -}} } {{- end }} ` ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/errors.go ================================================ package aws import "github.com/aws/aws-sdk-go/aws/awserr" var ( // ErrMissingRegion is an error that is returned if region configuration is // not found. 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. ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil) ) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go ================================================ package aws // JSONValue is a representation of a grab bag type that will be marshaled // into a json string. This type can be used just like any other map. // // Example: // // values := aws.JSONValue{ // "Foo": "Bar", // } // values["Baz"] = "Qux" type JSONValue map[string]interface{} ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/logger.go ================================================ package aws import ( "log" "os" ) // A LogLevelType defines the level logging should be performed at. Used to instruct // the SDK which statements should be logged. type LogLevelType uint // LogLevel returns the pointer to a LogLevel. Should be used to workaround // not being able to take the address of a non-composite literal. func LogLevel(l LogLevelType) *LogLevelType { return &l } // Value returns the LogLevel value or the default value LogOff if the LogLevel // is nil. Safe to use on nil value LogLevelTypes. func (l *LogLevelType) Value() LogLevelType { if l != nil { return *l } return LogOff } // Matches returns true if the v LogLevel is enabled by this LogLevel. Should be // used with logging sub levels. Is safe to use on nil value LogLevelTypes. If // LogLevel is nil, will default to LogOff comparison. func (l *LogLevelType) Matches(v LogLevelType) bool { c := l.Value() return c&v == v } // AtLeast returns true if this LogLevel is at least high enough to satisfies v. // Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default // to LogOff comparison. func (l *LogLevelType) AtLeast(v LogLevelType) bool { c := l.Value() return c >= v } const ( // LogOff states that no logging should be performed by the SDK. This is the // default state of the SDK, and should be use to disable all logging. LogOff LogLevelType = iota * 0x1000 // LogDebug state that debug output should be logged by the SDK. This should // be used to inspect request made and responses received. LogDebug ) // Debug Logging Sub Levels const ( // LogDebugWithSigning states that the SDK should log request signing and // presigning events. This should be used to log the signing details of // requests for debugging. Will also enable LogDebug. LogDebugWithSigning LogLevelType = LogDebug | (1 << iota) // LogDebugWithHTTPBody states the SDK should log HTTP request and response // HTTP bodys in addition to the headers and path. This should be used to // see the body content of requests and responses made while using the SDK // Will also enable LogDebug. LogDebugWithHTTPBody // LogDebugWithRequestRetries states the SDK should log when service requests will // be retried. This should be used to log when you want to log when service // requests are being retried. Will also enable LogDebug. LogDebugWithRequestRetries // LogDebugWithRequestErrors states the SDK should log when service requests fail // to build, send, validate, or unmarshal. LogDebugWithRequestErrors // LogDebugWithEventStreamBody states the SDK should log EventStream // request and response bodys. This should be used to log the EventStream // wire unmarshaled message content of requests and responses made while // using the SDK Will also enable LogDebug. LogDebugWithEventStreamBody // LogDebugWithDeprecated states the SDK should log details about deprecated functionality. LogDebugWithDeprecated ) // A Logger is a minimalistic interface for the SDK to log messages to. Should // be used to provide custom logging writers for the SDK to use. type Logger interface { Log(...interface{}) } // A LoggerFunc is a convenience type to convert a function taking a variadic // list of arguments and wrap it so the Logger interface can be used. // // Example: // s3.New(sess, &aws.Config{Logger: aws.LoggerFunc(func(args ...interface{}) { // fmt.Fprintln(os.Stdout, args...) // })}) type LoggerFunc func(...interface{}) // Log calls the wrapped function with the arguments provided func (f LoggerFunc) Log(args ...interface{}) { f(args...) } // NewDefaultLogger returns a Logger which will write log messages to stdout, and // use same formatting runes as the stdlib log.Logger func NewDefaultLogger() Logger { return &defaultLogger{ logger: log.New(os.Stdout, "", log.LstdFlags), } } // A defaultLogger provides a minimalistic logger satisfying the Logger interface. type defaultLogger struct { logger *log.Logger } // Log logs the parameters to the stdlib logger. See log.Println. func (l defaultLogger) Log(args ...interface{}) { l.logger.Println(args...) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go ================================================ package request import ( "strings" ) func isErrConnectionReset(err error) bool { if strings.Contains(err.Error(), "read: connection reset") { return false } if strings.Contains(err.Error(), "use of closed network connection") || strings.Contains(err.Error(), "connection reset") || strings.Contains(err.Error(), "broken pipe") { return true } return false } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go ================================================ package request import ( "fmt" "strings" ) // A Handlers provides a collection of request handlers for various // stages of handling requests. type Handlers struct { Validate HandlerList Build HandlerList BuildStream HandlerList Sign HandlerList Send HandlerList ValidateResponse HandlerList Unmarshal HandlerList UnmarshalStream HandlerList UnmarshalMeta HandlerList UnmarshalError HandlerList Retry HandlerList AfterRetry HandlerList CompleteAttempt HandlerList Complete HandlerList } // Copy returns a copy of this handler's lists. func (h *Handlers) Copy() Handlers { return Handlers{ Validate: h.Validate.copy(), Build: h.Build.copy(), BuildStream: h.BuildStream.copy(), Sign: h.Sign.copy(), Send: h.Send.copy(), ValidateResponse: h.ValidateResponse.copy(), Unmarshal: h.Unmarshal.copy(), UnmarshalStream: h.UnmarshalStream.copy(), UnmarshalError: h.UnmarshalError.copy(), UnmarshalMeta: h.UnmarshalMeta.copy(), Retry: h.Retry.copy(), AfterRetry: h.AfterRetry.copy(), CompleteAttempt: h.CompleteAttempt.copy(), Complete: h.Complete.copy(), } } // Clear removes callback functions for all handlers. func (h *Handlers) Clear() { h.Validate.Clear() h.Build.Clear() h.BuildStream.Clear() h.Send.Clear() h.Sign.Clear() h.Unmarshal.Clear() h.UnmarshalStream.Clear() h.UnmarshalMeta.Clear() h.UnmarshalError.Clear() h.ValidateResponse.Clear() h.Retry.Clear() h.AfterRetry.Clear() h.CompleteAttempt.Clear() h.Complete.Clear() } // IsEmpty returns if there are no handlers in any of the handlerlists. func (h *Handlers) IsEmpty() bool { if h.Validate.Len() != 0 { return false } if h.Build.Len() != 0 { return false } if h.BuildStream.Len() != 0 { return false } if h.Send.Len() != 0 { return false } if h.Sign.Len() != 0 { return false } if h.Unmarshal.Len() != 0 { return false } if h.UnmarshalStream.Len() != 0 { return false } if h.UnmarshalMeta.Len() != 0 { return false } if h.UnmarshalError.Len() != 0 { return false } if h.ValidateResponse.Len() != 0 { return false } if h.Retry.Len() != 0 { return false } if h.AfterRetry.Len() != 0 { return false } if h.CompleteAttempt.Len() != 0 { return false } if h.Complete.Len() != 0 { return false } return true } // A HandlerListRunItem represents an entry in the HandlerList which // is being run. type HandlerListRunItem struct { Index int Handler NamedHandler Request *Request } // A HandlerList manages zero or more handlers in a list. type HandlerList struct { list []NamedHandler // Called after each request handler in the list is called. If set // and the func returns true the HandlerList will continue to iterate // over the request handlers. If false is returned the HandlerList // will stop iterating. // // Should be used if extra logic to be performed between each handler // in the list. This can be used to terminate a list's iteration // based on a condition such as error like, HandlerListStopOnError. // Or for logging like HandlerListLogItem. AfterEachFn func(item HandlerListRunItem) bool } // A NamedHandler is a struct that contains a name and function callback. type NamedHandler struct { Name string Fn func(*Request) } // copy creates a copy of the handler list. func (l *HandlerList) copy() HandlerList { n := HandlerList{ AfterEachFn: l.AfterEachFn, } if len(l.list) == 0 { return n } n.list = append(make([]NamedHandler, 0, len(l.list)), l.list...) return n } // Clear clears the handler list. func (l *HandlerList) Clear() { l.list = l.list[0:0] } // Len returns the number of handlers in the list. func (l *HandlerList) Len() int { return len(l.list) } // PushBack pushes handler f to the back of the handler list. func (l *HandlerList) PushBack(f func(*Request)) { l.PushBackNamed(NamedHandler{"__anonymous", f}) } // PushBackNamed pushes named handler f to the back of the handler list. func (l *HandlerList) PushBackNamed(n NamedHandler) { if cap(l.list) == 0 { l.list = make([]NamedHandler, 0, 5) } l.list = append(l.list, n) } // PushFront pushes handler f to the front of the handler list. func (l *HandlerList) PushFront(f func(*Request)) { l.PushFrontNamed(NamedHandler{"__anonymous", f}) } // PushFrontNamed pushes named handler f to the front of the handler list. func (l *HandlerList) PushFrontNamed(n NamedHandler) { if cap(l.list) == len(l.list) { // Allocating new list required l.list = append([]NamedHandler{n}, l.list...) } else { // Enough room to prepend into list. l.list = append(l.list, NamedHandler{}) copy(l.list[1:], l.list) l.list[0] = n } } // Remove removes a NamedHandler n func (l *HandlerList) Remove(n NamedHandler) { l.RemoveByName(n.Name) } // RemoveByName removes a NamedHandler by name. func (l *HandlerList) RemoveByName(name string) { for i := 0; i < len(l.list); i++ { m := l.list[i] if m.Name == name { // Shift array preventing creating new arrays copy(l.list[i:], l.list[i+1:]) l.list[len(l.list)-1] = NamedHandler{} l.list = l.list[:len(l.list)-1] // decrement list so next check to length is correct i-- } } } // SwapNamed will swap out any existing handlers with the same name as the // passed in NamedHandler returning true if handlers were swapped. False is // returned otherwise. func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) { for i := 0; i < len(l.list); i++ { if l.list[i].Name == n.Name { l.list[i].Fn = n.Fn swapped = true } } return swapped } // Swap will swap out all handlers matching the name passed in. The matched // handlers will be swapped in. True is returned if the handlers were swapped. func (l *HandlerList) Swap(name string, replace NamedHandler) bool { var swapped bool for i := 0; i < len(l.list); i++ { if l.list[i].Name == name { l.list[i] = replace swapped = true } } return swapped } // SetBackNamed will replace the named handler if it exists in the handler list. // If the handler does not exist the handler will be added to the end of the list. func (l *HandlerList) SetBackNamed(n NamedHandler) { if !l.SwapNamed(n) { l.PushBackNamed(n) } } // SetFrontNamed will replace the named handler if it exists in the handler list. // If the handler does not exist the handler will be added to the beginning of // the list. func (l *HandlerList) SetFrontNamed(n NamedHandler) { if !l.SwapNamed(n) { l.PushFrontNamed(n) } } // Run executes all handlers in the list with a given request object. func (l *HandlerList) Run(r *Request) { for i, h := range l.list { h.Fn(r) item := HandlerListRunItem{ Index: i, Handler: h, Request: r, } if l.AfterEachFn != nil && !l.AfterEachFn(item) { return } } } // HandlerListLogItem logs the request handler and the state of the // request's Error value. Always returns true to continue iterating // request handlers in a HandlerList. func HandlerListLogItem(item HandlerListRunItem) bool { if item.Request.Config.Logger == nil { return true } item.Request.Config.Logger.Log("DEBUG: RequestHandler", item.Index, item.Handler.Name, item.Request.Error) return true } // HandlerListStopOnError returns false to stop the HandlerList iterating // over request handlers if Request.Error is not nil. True otherwise // to continue iterating. func HandlerListStopOnError(item HandlerListRunItem) bool { return item.Request.Error == nil } // WithAppendUserAgent will add a string to the user agent prefixed with a // single white space. func WithAppendUserAgent(s string) Option { return func(r *Request) { r.Handlers.Build.PushBack(func(r2 *Request) { AddToUserAgent(r, s) }) } } // MakeAddToUserAgentHandler will add the name/version pair to the User-Agent request // header. If the extra parameters are provided they will be added as metadata to the // name/version pair resulting in the following format. // "name/version (extra0; extra1; ...)" // The user agent part will be concatenated with this current request's user agent string. func MakeAddToUserAgentHandler(name, version string, extra ...string) func(*Request) { ua := fmt.Sprintf("%s/%s", name, version) if len(extra) > 0 { ua += fmt.Sprintf(" (%s)", strings.Join(extra, "; ")) } return func(r *Request) { AddToUserAgent(r, ua) } } // MakeAddToUserAgentFreeFormHandler adds the input to the User-Agent request header. // The input string will be concatenated with the current request's user agent string. func MakeAddToUserAgentFreeFormHandler(s string) func(*Request) { return func(r *Request) { AddToUserAgent(r, s) } } // WithSetRequestHeaders updates the operation request's HTTP header to contain // the header key value pairs provided. If the header key already exists in the // request's HTTP header set, the existing value(s) will be replaced. // // Header keys added will be added as canonical format with title casing // applied via http.Header.Set method. func WithSetRequestHeaders(h map[string]string) Option { return withRequestHeader(h).SetRequestHeaders } type withRequestHeader map[string]string func (h withRequestHeader) SetRequestHeaders(r *Request) { for k, v := range h { r.HTTPRequest.Header.Set(k, v) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go ================================================ package request import ( "io" "net/http" "net/url" ) func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request { req := new(http.Request) *req = *r req.URL = &url.URL{} *req.URL = *r.URL req.Body = body req.Header = http.Header{} for k, v := range r.Header { for _, vv := range v { req.Header.Add(k, vv) } } return req } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go ================================================ package request import ( "io" "sync" "github.com/aws/aws-sdk-go/internal/sdkio" ) // offsetReader is a thread-safe io.ReadCloser to prevent racing // with retrying requests type offsetReader struct { buf io.ReadSeeker lock sync.Mutex closed bool } func newOffsetReader(buf io.ReadSeeker, offset int64) (*offsetReader, error) { reader := &offsetReader{} _, err := buf.Seek(offset, sdkio.SeekStart) if err != nil { return nil, err } reader.buf = buf return reader, nil } // Close will close the instance of the offset reader's access to // the underlying io.ReadSeeker. func (o *offsetReader) Close() error { o.lock.Lock() defer o.lock.Unlock() o.closed = true return nil } // Read is a thread-safe read of the underlying io.ReadSeeker func (o *offsetReader) Read(p []byte) (int, error) { o.lock.Lock() defer o.lock.Unlock() if o.closed { return 0, io.EOF } return o.buf.Read(p) } // Seek is a thread-safe seeking operation. func (o *offsetReader) Seek(offset int64, whence int) (int64, error) { o.lock.Lock() defer o.lock.Unlock() return o.buf.Seek(offset, whence) } // CloseAndCopy will return a new offsetReader with a copy of the old buffer // and close the old buffer. func (o *offsetReader) CloseAndCopy(offset int64) (*offsetReader, error) { if err := o.Close(); err != nil { return nil, err } return newOffsetReader(o.buf, offset) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/request.go ================================================ package request import ( "bytes" "fmt" "io" "io/ioutil" "net/http" "net/url" "reflect" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/internal/sdkio" ) const ( // ErrCodeSerialization is the serialization error code that is received // during protocol unmarshaling. ErrCodeSerialization = "SerializationError" // ErrCodeRead is an error that is returned during HTTP reads. ErrCodeRead = "ReadError" // ErrCodeResponseTimeout is the connection timeout error that is received // during body reads. ErrCodeResponseTimeout = "ResponseTimeout" // ErrCodeInvalidPresignExpire is returned when the expire time provided to // presign is invalid ErrCodeInvalidPresignExpire = "InvalidPresignExpireError" // CanceledErrorCode is the error code that will be returned by an // API request that was canceled. Requests given a aws.Context may // return this error when canceled. CanceledErrorCode = "RequestCanceled" // ErrCodeRequestError is an error preventing the SDK from continuing to // process the request. ErrCodeRequestError = "RequestError" ) // A Request is the service request to be made. type Request struct { Config aws.Config ClientInfo metadata.ClientInfo Handlers Handlers Retryer AttemptTime time.Time Time time.Time Operation *Operation HTTPRequest *http.Request HTTPResponse *http.Response Body io.ReadSeeker streamingBody io.ReadCloser BodyStart int64 // offset from beginning of Body that the request body starts Params interface{} Error error Data interface{} RequestID string RetryCount int Retryable *bool RetryDelay time.Duration NotHoist bool SignedHeaderVals http.Header LastSignedAt time.Time DisableFollowRedirects bool // Additional API error codes that should be retried. IsErrorRetryable // will consider these codes in addition to its built in cases. RetryErrorCodes []string // Additional API error codes that should be retried with throttle backoff // delay. IsErrorThrottle will consider these codes in addition to its // built in cases. ThrottleErrorCodes []string // A value greater than 0 instructs the request to be signed as Presigned URL // You should not set this field directly. Instead use Request's // Presign or PresignRequest methods. ExpireTime time.Duration context aws.Context built bool // Need to persist an intermediate body between the input Body and HTTP // request body because the HTTP Client's transport can maintain a reference // to the HTTP request's body after the client has returned. This value is // safe to use concurrently and wrap the input Body for each HTTP request. safeBody *offsetReader } // An Operation is the service API operation to be made. type Operation struct { Name string HTTPMethod string HTTPPath string *Paginator BeforePresignFn func(r *Request) error } // New returns a new Request pointer for the service API operation and // parameters. // // A Retryer should be provided to direct how the request is retried. If // Retryer is nil, a default no retry value will be used. You can use // NoOpRetryer in the Client package to disable retry behavior directly. // // Params is any value of input parameters to be the request payload. // Data is pointer value to an object which the request's response // payload will be deserialized to. func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers, retryer Retryer, operation *Operation, params interface{}, data interface{}) *Request { if retryer == nil { retryer = noOpRetryer{} } method := operation.HTTPMethod if method == "" { method = "POST" } httpReq, _ := http.NewRequest(method, "", nil) var err error httpReq.URL, err = url.Parse(clientInfo.Endpoint) if err != nil { httpReq.URL = &url.URL{} err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err) } if len(operation.HTTPPath) != 0 { opHTTPPath := operation.HTTPPath var opQueryString string if idx := strings.Index(opHTTPPath, "?"); idx >= 0 { opQueryString = opHTTPPath[idx+1:] opHTTPPath = opHTTPPath[:idx] } if strings.HasSuffix(httpReq.URL.Path, "/") && strings.HasPrefix(opHTTPPath, "/") { opHTTPPath = opHTTPPath[1:] } httpReq.URL.Path += opHTTPPath httpReq.URL.RawQuery = opQueryString } r := &Request{ Config: cfg, ClientInfo: clientInfo, Handlers: handlers.Copy(), Retryer: retryer, Time: time.Now(), ExpireTime: 0, Operation: operation, HTTPRequest: httpReq, Body: nil, Params: params, Error: err, Data: data, } r.SetBufferBody([]byte{}) return r } // A Option is a functional option that can augment or modify a request when // using a WithContext API operation method. type Option func(*Request) // WithGetResponseHeader builds a request Option which will retrieve a single // header value from the HTTP Response. If there are multiple values for the // header key use WithGetResponseHeaders instead to access the http.Header // map directly. The passed in val pointer must be non-nil. // // This Option can be used multiple times with a single API operation. // // var id2, versionID string // svc.PutObjectWithContext(ctx, params, // request.WithGetResponseHeader("x-amz-id-2", &id2), // request.WithGetResponseHeader("x-amz-version-id", &versionID), // ) func WithGetResponseHeader(key string, val *string) Option { return func(r *Request) { r.Handlers.Complete.PushBack(func(req *Request) { *val = req.HTTPResponse.Header.Get(key) }) } } // WithGetResponseHeaders builds a request Option which will retrieve the // headers from the HTTP response and assign them to the passed in headers // variable. The passed in headers pointer must be non-nil. // // var headers http.Header // svc.PutObjectWithContext(ctx, params, request.WithGetResponseHeaders(&headers)) func WithGetResponseHeaders(headers *http.Header) Option { return func(r *Request) { r.Handlers.Complete.PushBack(func(req *Request) { *headers = req.HTTPResponse.Header }) } } // WithLogLevel is a request option that will set the request to use a specific // log level when the request is made. // // svc.PutObjectWithContext(ctx, params, request.WithLogLevel(aws.LogDebugWithHTTPBody) func WithLogLevel(l aws.LogLevelType) Option { return func(r *Request) { r.Config.LogLevel = aws.LogLevel(l) } } // ApplyOptions will apply each option to the request calling them in the order // the were provided. func (r *Request) ApplyOptions(opts ...Option) { for _, opt := range opts { opt(r) } } // Context will always returns a non-nil context. If Request does not have a // context aws.BackgroundContext will be returned. func (r *Request) Context() aws.Context { if r.context != nil { return r.context } return aws.BackgroundContext() } // SetContext adds a Context to the current request that can be used to cancel // a in-flight request. The Context value must not be nil, or this method will // panic. // // Unlike http.Request.WithContext, SetContext does not return a copy of the // Request. It is not safe to use use a single Request value for multiple // requests. A new Request should be created for each API operation request. // // Go 1.6 and below: // The http.Request's Cancel field will be set to the Done() value of // the context. This will overwrite the Cancel field's value. // // Go 1.7 and above: // The http.Request.WithContext will be used to set the context on the underlying // http.Request. This will create a shallow copy of the http.Request. The SDK // may create sub contexts in the future for nested requests such as retries. func (r *Request) SetContext(ctx aws.Context) { if ctx == nil { panic("context cannot be nil") } setRequestContext(r, ctx) } // WillRetry returns if the request's can be retried. func (r *Request) WillRetry() bool { if !aws.IsReaderSeekable(r.Body) && r.HTTPRequest.Body != NoBody { return false } return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries() } func fmtAttemptCount(retryCount, maxRetries int) string { return fmt.Sprintf("attempt %v/%v", retryCount, maxRetries) } // ParamsFilled returns if the request's parameters have been populated // and the parameters are valid. False is returned if no parameters are // provided or invalid. func (r *Request) ParamsFilled() bool { return r.Params != nil && reflect.ValueOf(r.Params).Elem().IsValid() } // DataFilled returns true if the request's data for response deserialization // target has been set and is a valid. False is returned if data is not // set, or is invalid. func (r *Request) DataFilled() bool { return r.Data != nil && reflect.ValueOf(r.Data).Elem().IsValid() } // SetBufferBody will set the request's body bytes that will be sent to // the service API. func (r *Request) SetBufferBody(buf []byte) { r.SetReaderBody(bytes.NewReader(buf)) } // SetStringBody sets the body of the request to be backed by a string. func (r *Request) SetStringBody(s string) { r.SetReaderBody(strings.NewReader(s)) } // SetReaderBody will set the request's body reader. func (r *Request) SetReaderBody(reader io.ReadSeeker) { r.Body = reader if aws.IsReaderSeekable(reader) { var err error // Get the Bodies current offset so retries will start from the same // initial position. r.BodyStart, err = reader.Seek(0, sdkio.SeekCurrent) if err != nil { r.Error = awserr.New(ErrCodeSerialization, "failed to determine start of request body", err) return } } r.ResetBody() } // SetStreamingBody set the reader to be used for the request that will stream // bytes to the server. Request's Body must not be set to any reader. func (r *Request) SetStreamingBody(reader io.ReadCloser) { r.streamingBody = reader r.SetReaderBody(aws.ReadSeekCloser(reader)) } // Presign returns the request's signed URL. Error will be returned // if the signing fails. The expire parameter is only used for presigned Amazon // S3 API requests. All other AWS services will use a fixed expiration // time of 15 minutes. // // It is invalid to create a presigned URL with a expire duration 0 or less. An // error is returned if expire duration is 0 or less. func (r *Request) Presign(expire time.Duration) (string, error) { r = r.copy() // Presign requires all headers be hoisted. There is no way to retrieve // the signed headers not hoisted without this. Making the presigned URL // useless. r.NotHoist = false u, _, err := getPresignedURL(r, expire) return u, err } // PresignRequest behaves just like presign, with the addition of returning a // set of headers that were signed. The expire parameter is only used for // presigned Amazon S3 API requests. All other AWS services will use a fixed // expiration time of 15 minutes. // // It is invalid to create a presigned URL with a expire duration 0 or less. An // error is returned if expire duration is 0 or less. // // Returns the URL string for the API operation with signature in the query string, // and the HTTP headers that were included in the signature. These headers must // be included in any HTTP request made with the presigned URL. // // To prevent hoisting any headers to the query string set NotHoist to true on // this Request value prior to calling PresignRequest. func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) { r = r.copy() return getPresignedURL(r, expire) } // IsPresigned returns true if the request represents a presigned API url. func (r *Request) IsPresigned() bool { return r.ExpireTime != 0 } func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) { if expire <= 0 { return "", nil, awserr.New( ErrCodeInvalidPresignExpire, "presigned URL requires an expire duration greater than 0", nil, ) } r.ExpireTime = expire if r.Operation.BeforePresignFn != nil { if err := r.Operation.BeforePresignFn(r); err != nil { return "", nil, err } } if err := r.Sign(); err != nil { return "", nil, err } return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil } const ( notRetrying = "not retrying" ) func debugLogReqError(r *Request, stage, retryStr string, err error) { if !r.Config.LogLevel.Matches(aws.LogDebugWithRequestErrors) { return } r.Config.Logger.Log(fmt.Sprintf("DEBUG: %s %s/%s failed, %s, error %v", stage, r.ClientInfo.ServiceName, r.Operation.Name, retryStr, err)) } // Build will build the request's object so it can be signed and sent // to the service. Build will also validate all the request's parameters. // Any additional build Handlers set on this request will be run // in the order they were set. // // The request will only be built once. Multiple calls to build will have // no effect. // // If any Validate or Build errors occur the build will stop and the error // which occurred will be returned. func (r *Request) Build() error { if !r.built { r.Handlers.Validate.Run(r) if r.Error != nil { debugLogReqError(r, "Validate Request", notRetrying, r.Error) return r.Error } r.Handlers.Build.Run(r) if r.Error != nil { debugLogReqError(r, "Build Request", notRetrying, r.Error) return r.Error } r.built = true } return r.Error } // Sign will sign the request, returning error if errors are encountered. // // Sign will build the request prior to signing. All Sign Handlers will // be executed in the order they were set. func (r *Request) Sign() error { r.Build() if r.Error != nil { debugLogReqError(r, "Build Request", notRetrying, r.Error) return r.Error } SanitizeHostForHeader(r.HTTPRequest) r.Handlers.Sign.Run(r) return r.Error } func (r *Request) getNextRequestBody() (body io.ReadCloser, err error) { if r.streamingBody != nil { return r.streamingBody, nil } if r.safeBody != nil { r.safeBody.Close() } r.safeBody, err = newOffsetReader(r.Body, r.BodyStart) if err != nil { return nil, awserr.New(ErrCodeSerialization, "failed to get next request body reader", err) } // Go 1.8 tightened and clarified the rules code needs to use when building // requests with the http package. Go 1.8 removed the automatic detection // of if the Request.Body was empty, or actually had bytes in it. The SDK // always sets the Request.Body even if it is empty and should not actually // be sent. This is incorrect. // // Go 1.8 did add a http.NoBody value that the SDK can use to tell the http // client that the request really should be sent without a body. The // Request.Body cannot be set to nil, which is preferable, because the // field is exported and could introduce nil pointer dereferences for users // of the SDK if they used that field. // // Related golang/go#18257 l, err := aws.SeekerLen(r.Body) if err != nil { return nil, awserr.New(ErrCodeSerialization, "failed to compute request body size", err) } if l == 0 { body = NoBody } else if l > 0 { body = r.safeBody } else { // Hack to prevent sending bodies for methods where the body // should be ignored by the server. Sending bodies on these // methods without an associated ContentLength will cause the // request to socket timeout because the server does not handle // Transfer-Encoding: chunked bodies for these methods. // // This would only happen if a aws.ReaderSeekerCloser was used with // a io.Reader that was not also an io.Seeker, or did not implement // Len() method. switch r.Operation.HTTPMethod { case "GET", "HEAD", "DELETE": body = NoBody default: body = r.safeBody } } return body, nil } // GetBody will return an io.ReadSeeker of the Request's underlying // input body with a concurrency safe wrapper. func (r *Request) GetBody() io.ReadSeeker { return r.safeBody } // Send will send the request, returning error if errors are encountered. // // Send will sign the request prior to sending. All Send Handlers will // be executed in the order they were set. // // Canceling a request is non-deterministic. If a request has been canceled, // then the transport will choose, randomly, one of the state channels during // reads or getting the connection. // // readLoop() and getConn(req *Request, cm connectMethod) // https://github.com/golang/go/blob/master/src/net/http/transport.go // // Send will not close the request.Request's body. func (r *Request) Send() error { defer func() { // Ensure a non-nil HTTPResponse parameter is set to ensure handlers // checking for HTTPResponse values, don't fail. if r.HTTPResponse == nil { r.HTTPResponse = &http.Response{ Header: http.Header{}, Body: ioutil.NopCloser(&bytes.Buffer{}), } } // Regardless of success or failure of the request trigger the Complete // request handlers. r.Handlers.Complete.Run(r) }() if err := r.Error; err != nil { return err } for { r.Error = nil r.AttemptTime = time.Now() if err := r.Sign(); err != nil { debugLogReqError(r, "Sign Request", notRetrying, err) return err } if err := r.sendRequest(); err == nil { return nil } r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil || !aws.BoolValue(r.Retryable) { return r.Error } if err := r.prepareRetry(); err != nil { r.Error = err return err } } } func (r *Request) prepareRetry() error { 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() if err := r.Error; err != nil { return awserr.New(ErrCodeSerialization, "failed to prepare body for retry", err) } // 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() } return nil } 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", fmtAttemptCount(r.RetryCount, r.MaxRetries()), 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", fmtAttemptCount(r.RetryCount, r.MaxRetries()), r.Error) return r.Error } r.Handlers.Unmarshal.Run(r) if r.Error != nil { debugLogReqError(r, "Unmarshal Response", fmtAttemptCount(r.RetryCount, r.MaxRetries()), r.Error) return r.Error } return nil } // copy will copy a request which will allow for local manipulation of the // request. func (r *Request) copy() *Request { req := &Request{} *req = *r req.Handlers = r.Handlers.Copy() op := *r.Operation req.Operation = &op return req } // AddToUserAgent adds the string to the end of the request's current user agent. func AddToUserAgent(r *Request, s string) { curUA := r.HTTPRequest.Header.Get("User-Agent") if len(curUA) > 0 { s = curUA + " " + s } r.HTTPRequest.Header.Set("User-Agent", s) } // SanitizeHostForHeader removes default port from host and updates request.Host func SanitizeHostForHeader(r *http.Request) { host := getHost(r) port := portOnly(host) if port != "" && isDefaultPort(r.URL.Scheme, port) { r.Host = stripPort(host) } } // Returns host from request func getHost(r *http.Request) string { if r.Host != "" { return r.Host } if r.URL == nil { return "" } return r.URL.Host } // Hostname returns u.Host, without any port number. // // If Host is an IPv6 literal with a port number, Hostname returns the // IPv6 literal without the square brackets. IPv6 literals may include // a zone identifier. // // Copied from the Go 1.8 standard library (net/url) func stripPort(hostport string) string { colon := strings.IndexByte(hostport, ':') if colon == -1 { return hostport } if i := strings.IndexByte(hostport, ']'); i != -1 { return strings.TrimPrefix(hostport[:i], "[") } return hostport[:colon] } // Port returns the port part of u.Host, without the leading colon. // If u.Host doesn't contain a port, Port returns an empty string. // // Copied from the Go 1.8 standard library (net/url) func portOnly(hostport string) string { colon := strings.IndexByte(hostport, ':') if colon == -1 { return "" } if i := strings.Index(hostport, "]:"); i != -1 { return hostport[i+len("]:"):] } if strings.Contains(hostport, "]") { return "" } return hostport[colon+len(":"):] } // Returns true if the specified URI is using the standard port // (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs) func isDefaultPort(scheme, port string) bool { if port == "" { return true } lowerCaseScheme := strings.ToLower(scheme) if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") { return true } return false } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go ================================================ //go:build !go1.8 // +build !go1.8 package request import "io" // NoBody is an io.ReadCloser with no bytes. Read always returns EOF // and Close always returns nil. It can be used in an outgoing client // request to explicitly signal that a request has zero bytes. // An alternative, however, is to simply set Request.Body to nil. // // Copy of Go 1.8 NoBody type from net/http/http.go type noBody struct{} func (noBody) Read([]byte) (int, error) { return 0, io.EOF } func (noBody) Close() error { return nil } func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil } // NoBody is an empty reader that will trigger the Go HTTP client to not include // and body in the HTTP request. var NoBody = noBody{} // ResetBody rewinds the request body back to its starting position, and // sets the HTTP Request body reference. When the body is read prior // to being sent in the HTTP request it will need to be rewound. // // ResetBody will automatically be called by the SDK's build handler, but if // the request is being used directly ResetBody must be called before the request // is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically // call ResetBody. func (r *Request) ResetBody() { body, err := r.getNextRequestBody() if err != nil { r.Error = err return } r.HTTPRequest.Body = body } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go ================================================ //go:build go1.8 // +build go1.8 package request import ( "net/http" "github.com/aws/aws-sdk-go/aws/awserr" ) // NoBody is a http.NoBody reader instructing Go HTTP client to not include // and body in the HTTP request. var NoBody = http.NoBody // ResetBody rewinds the request body back to its starting position, and // sets the HTTP Request body reference. When the body is read prior // to being sent in the HTTP request it will need to be rewound. // // ResetBody will automatically be called by the SDK's build handler, but if // the request is being used directly ResetBody must be called before the request // is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically // call ResetBody. // // Will also set the Go 1.8's http.Request.GetBody member to allow retrying // PUT/POST redirects. func (r *Request) ResetBody() { body, err := r.getNextRequestBody() if err != nil { r.Error = awserr.New(ErrCodeSerialization, "failed to reset request body", err) return } r.HTTPRequest.Body = body r.HTTPRequest.GetBody = r.getNextRequestBody } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go ================================================ //go:build go1.7 // +build go1.7 package request import "github.com/aws/aws-sdk-go/aws" // setContext updates the Request to use the passed in context for cancellation. // Context will also be used for request retry delay. // // Creates shallow copy of the http.Request with the WithContext method. func setRequestContext(r *Request, ctx aws.Context) { r.context = ctx r.HTTPRequest = r.HTTPRequest.WithContext(ctx) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go ================================================ //go:build !go1.7 // +build !go1.7 package request import "github.com/aws/aws-sdk-go/aws" // setContext updates the Request to use the passed in context for cancellation. // Context will also be used for request retry delay. // // Creates shallow copy of the http.Request with the WithContext method. func setRequestContext(r *Request, ctx aws.Context) { r.context = ctx r.HTTPRequest.Cancel = ctx.Done() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go ================================================ package request import ( "reflect" "sync/atomic" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" ) // A Pagination provides paginating of SDK API operations which are paginatable. // Generally you should not use this type directly, but use the "Pages" API // operations method to automatically perform pagination for you. Such as, // "S3.ListObjectsPages", and "S3.ListObjectsPagesWithContext" methods. // // Pagination differs from a Paginator type in that pagination is the type that // does the pagination between API operations, and Paginator defines the // configuration that will be used per page request. // // for p.Next() { // data := p.Page().(*s3.ListObjectsOutput) // // process the page's data // // ... // // break out of loop to stop fetching additional pages // } // // return p.Err() // // See service client API operation Pages methods for examples how the SDK will // use the Pagination type. type Pagination struct { // Function to return a Request value for each pagination request. // Any configuration or handlers that need to be applied to the request // prior to getting the next page should be done here before the request // returned. // // NewRequest should always be built from the same API operations. It is // undefined if different API operations are returned on subsequent calls. NewRequest func() (*Request, error) // EndPageOnSameToken, when enabled, will allow the paginator to stop on // token that are the same as its previous tokens. EndPageOnSameToken bool started bool prevTokens []interface{} nextTokens []interface{} err error curPage interface{} } // HasNextPage will return true if Pagination is able to determine that the API // operation has additional pages. False will be returned if there are no more // pages remaining. // // Will always return true if Next has not been called yet. func (p *Pagination) HasNextPage() bool { if !p.started { return true } hasNextPage := len(p.nextTokens) != 0 if p.EndPageOnSameToken { return hasNextPage && !awsutil.DeepEqual(p.nextTokens, p.prevTokens) } return hasNextPage } // Err returns the error Pagination encountered when retrieving the next page. func (p *Pagination) Err() error { return p.err } // Page returns the current page. Page should only be called after a successful // call to Next. It is undefined what Page will return if Page is called after // Next returns false. func (p *Pagination) Page() interface{} { return p.curPage } // Next will attempt to retrieve the next page for the API operation. When a page // is retrieved true will be returned. If the page cannot be retrieved, or there // are no more pages false will be returned. // // Use the Page method to retrieve the current page data. The data will need // to be cast to the API operation's output type. // // Use the Err method to determine if an error occurred if Page returns false. func (p *Pagination) Next() bool { if !p.HasNextPage() { return false } req, err := p.NewRequest() if err != nil { p.err = err return false } if p.started { for i, intok := range req.Operation.InputTokens { awsutil.SetValueAtPath(req.Params, intok, p.nextTokens[i]) } } p.started = true err = req.Send() if err != nil { p.err = err return false } p.prevTokens = p.nextTokens p.nextTokens = req.nextPageTokens() p.curPage = req.Data return true } // A Paginator is the configuration data that defines how an API operation // should be paginated. This type is used by the API service models to define // the generated pagination config for service APIs. // // The Pagination type is what provides iterating between pages of an API. It // is only used to store the token metadata the SDK should use for performing // pagination. type Paginator struct { InputTokens []string OutputTokens []string LimitToken string TruncationToken string } // nextPageTokens returns the tokens to use when asking for the next page of data. func (r *Request) nextPageTokens() []interface{} { if r.Operation.Paginator == nil { return nil } if r.Operation.TruncationToken != "" { tr, _ := awsutil.ValuesAtPath(r.Data, r.Operation.TruncationToken) if len(tr) == 0 { return nil } switch v := tr[0].(type) { case *bool: if !aws.BoolValue(v) { return nil } case bool: if !v { return nil } } } tokens := []interface{}{} tokenAdded := false for _, outToken := range r.Operation.OutputTokens { vs, _ := awsutil.ValuesAtPath(r.Data, outToken) if len(vs) == 0 { tokens = append(tokens, nil) continue } v := vs[0] switch tv := v.(type) { case *string: if len(aws.StringValue(tv)) == 0 { tokens = append(tokens, nil) continue } case string: if len(tv) == 0 { tokens = append(tokens, nil) continue } } tokenAdded = true tokens = append(tokens, v) } if !tokenAdded { return nil } return tokens } // Ensure a deprecated item is only logged once instead of each time its used. func logDeprecatedf(logger aws.Logger, flag *int32, msg string) { if logger == nil { return } if atomic.CompareAndSwapInt32(flag, 0, 1) { logger.Log(msg) } } var ( logDeprecatedHasNextPage int32 logDeprecatedNextPage int32 logDeprecatedEachPage int32 ) // HasNextPage returns true if this request has more pages of data available. // // Deprecated Use Pagination type for configurable pagination of API operations func (r *Request) HasNextPage() bool { logDeprecatedf(r.Config.Logger, &logDeprecatedHasNextPage, "Request.HasNextPage deprecated. Use Pagination type for configurable pagination of API operations") return len(r.nextPageTokens()) > 0 } // NextPage returns a new Request that can be executed to return the next // page of result data. Call .Send() on this request to execute it. // // Deprecated Use Pagination type for configurable pagination of API operations func (r *Request) NextPage() *Request { logDeprecatedf(r.Config.Logger, &logDeprecatedNextPage, "Request.NextPage deprecated. Use Pagination type for configurable pagination of API operations") tokens := r.nextPageTokens() if len(tokens) == 0 { return nil } data := reflect.New(reflect.TypeOf(r.Data).Elem()).Interface() nr := New(r.Config, r.ClientInfo, r.Handlers, r.Retryer, r.Operation, awsutil.CopyOf(r.Params), data) for i, intok := range nr.Operation.InputTokens { awsutil.SetValueAtPath(nr.Params, intok, tokens[i]) } return nr } // EachPage iterates over each page of a paginated request object. The fn // parameter should be a function with the following sample signature: // // func(page *T, lastPage bool) bool { // return true // return false to stop iterating // } // // Where "T" is the structure type matching the output structure of the given // operation. For example, a request object generated by // DynamoDB.ListTablesRequest() would expect to see dynamodb.ListTablesOutput // as the structure "T". The lastPage value represents whether the page is // the last page of data or not. The return value of this function should // return true to keep iterating or false to stop. // // Deprecated Use Pagination type for configurable pagination of API operations func (r *Request) EachPage(fn func(data interface{}, isLastPage bool) (shouldContinue bool)) error { logDeprecatedf(r.Config.Logger, &logDeprecatedEachPage, "Request.EachPage deprecated. Use Pagination type for configurable pagination of API operations") for page := r; page != nil; page = page.NextPage() { if err := page.Send(); err != nil { return err } if getNextPage := fn(page.Data, !page.HasNextPage()); !getNextPage { return page.Error } } return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go ================================================ package request import ( "net" "net/url" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" ) // Retryer provides the interface drive the SDK's request retry behavior. The // Retryer implementation is responsible for implementing exponential backoff, // and determine if a request API error should be retried. // // client.DefaultRetryer is the SDK's default implementation of the Retryer. It // uses the Request.IsErrorRetryable and Request.IsErrorThrottle methods to // determine if the request is retried. type Retryer interface { // RetryRules return the retry delay that should be used by the SDK before // making another request attempt for the failed request. RetryRules(*Request) time.Duration // ShouldRetry returns if the failed request is retryable. // // Implementations may consider request attempt count when determining if a // request is retryable, but the SDK will use MaxRetries to limit the // number of attempts a request are made. ShouldRetry(*Request) bool // MaxRetries is the number of times a request may be retried before // failing. MaxRetries() int } // WithRetryer sets a Retryer value to the given Config returning the Config // value for chaining. The value must not be nil. func WithRetryer(cfg *aws.Config, retryer Retryer) *aws.Config { if retryer == nil { if cfg.Logger != nil { cfg.Logger.Log("ERROR: Request.WithRetryer called with nil retryer. Replacing with retry disabled Retryer.") } retryer = noOpRetryer{} } cfg.Retryer = retryer return cfg } // noOpRetryer is a internal no op retryer used when a request is created // without a retryer. // // Provides a retryer that performs no retries. // It should be used when we do not want retries to be performed. type noOpRetryer struct{} // MaxRetries returns the number of maximum returns the service will use to make // an individual API; For NoOpRetryer the MaxRetries will always be zero. func (d noOpRetryer) MaxRetries() int { return 0 } // ShouldRetry will always return false for NoOpRetryer, as it should never retry. func (d noOpRetryer) ShouldRetry(_ *Request) bool { return false } // RetryRules returns the delay duration before retrying this request again; // since NoOpRetryer does not retry, RetryRules always returns 0. func (d noOpRetryer) RetryRules(_ *Request) time.Duration { return 0 } // retryableCodes is a collection of service response codes which are retry-able // without any further action. var retryableCodes = map[string]struct{}{ ErrCodeRequestError: {}, "RequestTimeout": {}, ErrCodeResponseTimeout: {}, "RequestTimeoutException": {}, // Glacier's flavor of RequestTimeout } var throttleCodes = map[string]struct{}{ "ProvisionedThroughputExceededException": {}, "ThrottledException": {}, // SNS, XRay, ResourceGroupsTagging API "Throttling": {}, "ThrottlingException": {}, "RequestLimitExceeded": {}, "RequestThrottled": {}, "RequestThrottledException": {}, "TooManyRequestsException": {}, // Lambda functions "PriorRequestNotComplete": {}, // Route53 "TransactionInProgressException": {}, "EC2ThrottledException": {}, // EC2 } // credsExpiredCodes is a collection of error codes which signify the credentials // need to be refreshed. Expired tokens require refreshing of credentials, and // resigning before the request can be retried. var credsExpiredCodes = map[string]struct{}{ "ExpiredToken": {}, "ExpiredTokenException": {}, "RequestExpired": {}, // EC2 Only } func isCodeThrottle(code string) bool { _, ok := throttleCodes[code] return ok } func isCodeRetryable(code string) bool { if _, ok := retryableCodes[code]; ok { return true } return isCodeExpiredCreds(code) } func isCodeExpiredCreds(code string) bool { _, ok := credsExpiredCodes[code] return ok } var validParentCodes = map[string]struct{}{ ErrCodeSerialization: {}, ErrCodeRead: {}, } func isNestedErrorRetryable(parentErr awserr.Error) bool { if parentErr == nil { return false } if _, ok := validParentCodes[parentErr.Code()]; !ok { return false } err := parentErr.OrigErr() if err == nil { return false } if aerr, ok := err.(awserr.Error); ok { return isCodeRetryable(aerr.Code()) } if t, ok := err.(temporary); ok { return t.Temporary() || isErrConnectionReset(err) } return isErrConnectionReset(err) } // IsErrorRetryable returns whether the error is retryable, based on its Code. // Returns false if error is nil. func IsErrorRetryable(err error) bool { if err == nil { return false } return shouldRetryError(err) } type temporary interface { Temporary() bool } func shouldRetryError(origErr error) bool { switch err := origErr.(type) { case awserr.Error: if err.Code() == CanceledErrorCode { return false } if isNestedErrorRetryable(err) { return true } origErr := err.OrigErr() var shouldRetry bool if origErr != nil { shouldRetry = shouldRetryError(origErr) if err.Code() == ErrCodeRequestError && !shouldRetry { return false } } if isCodeRetryable(err.Code()) { return true } return shouldRetry case *url.Error: if strings.Contains(err.Error(), "connection refused") { // Refused connections should be retried as the service may not yet // be running on the port. Go TCP dial considers refused // connections as not temporary. return true } // *url.Error only implements Temporary after golang 1.6 but since // url.Error only wraps the error: return shouldRetryError(err.Err) case temporary: if netErr, ok := err.(*net.OpError); ok && netErr.Op == "dial" { return true } // If the error is temporary, we want to allow continuation of the // retry process return err.Temporary() || isErrConnectionReset(origErr) case nil: // `awserr.Error.OrigErr()` can be nil, meaning there was an error but // because we don't know the cause, it is marked as retryable. See // TestRequest4xxUnretryable for an example. return true default: switch err.Error() { case "net/http: request canceled", "net/http: request canceled while waiting for connection": // known 1.5 error case when an http request is cancelled return false } // here we don't know the error; so we allow a retry. return true } } // IsErrorThrottle returns whether the error is to be throttled based on its code. // Returns false if error is nil. func IsErrorThrottle(err error) bool { if aerr, ok := err.(awserr.Error); ok && aerr != nil { return isCodeThrottle(aerr.Code()) } return false } // IsErrorExpiredCreds returns whether the error code is a credential expiry // error. Returns false if error is nil. func IsErrorExpiredCreds(err error) bool { if aerr, ok := err.(awserr.Error); ok && aerr != nil { return isCodeExpiredCreds(aerr.Code()) } return false } // IsErrorRetryable returns whether the error is retryable, based on its Code. // Returns false if the request has no Error set. // // Alias for the utility function IsErrorRetryable func (r *Request) IsErrorRetryable() bool { if isErrCode(r.Error, r.RetryErrorCodes) { return true } // HTTP response status code 501 should not be retried. // 501 represents Not Implemented which means the request method is not // supported by the server and cannot be handled. if r.HTTPResponse != nil { // HTTP response status code 500 represents internal server error and // should be retried without any throttle. if r.HTTPResponse.StatusCode == 500 { return true } } return IsErrorRetryable(r.Error) } // IsErrorThrottle returns whether the error is to be throttled based on its // code. Returns false if the request has no Error set. // // Alias for the utility function IsErrorThrottle func (r *Request) IsErrorThrottle() bool { if isErrCode(r.Error, r.ThrottleErrorCodes) { return true } if r.HTTPResponse != nil { switch r.HTTPResponse.StatusCode { case 429, // error caused due to too many requests 502, // Bad Gateway error should be throttled 503, // caused when service is unavailable 504: // error occurred due to gateway timeout return true } } return IsErrorThrottle(r.Error) } func isErrCode(err error, codes []string) bool { if aerr, ok := err.(awserr.Error); ok && aerr != nil { for _, code := range codes { if code == aerr.Code() { return true } } } return false } // IsErrorExpired returns whether the error code is a credential expiry error. // Returns false if the request has no Error set. // // Alias for the utility function IsErrorExpiredCreds func (r *Request) IsErrorExpired() bool { return IsErrorExpiredCreds(r.Error) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go ================================================ package request import ( "io" "time" "github.com/aws/aws-sdk-go/aws/awserr" ) var timeoutErr = awserr.New( ErrCodeResponseTimeout, "read on body has reached the timeout limit", nil, ) type readResult struct { n int err error } // timeoutReadCloser will handle body reads that take too long. // We will return a ErrReadTimeout error if a timeout occurs. type timeoutReadCloser struct { reader io.ReadCloser duration time.Duration } // Read will spin off a goroutine to call the reader's Read method. We will // select on the timer's channel or the read's channel. Whoever completes first // will be returned. func (r *timeoutReadCloser) Read(b []byte) (int, error) { timer := time.NewTimer(r.duration) c := make(chan readResult, 1) go func() { n, err := r.reader.Read(b) timer.Stop() c <- readResult{n: n, err: err} }() select { case data := <-c: return data.n, data.err case <-timer.C: return 0, timeoutErr } } func (r *timeoutReadCloser) Close() error { return r.reader.Close() } const ( // HandlerResponseTimeout is what we use to signify the name of the // response timeout handler. HandlerResponseTimeout = "ResponseTimeoutHandler" ) // adaptToResponseTimeoutError is a handler that will replace any top level error // to a ErrCodeResponseTimeout, if its child is that. func adaptToResponseTimeoutError(req *Request) { if err, ok := req.Error.(awserr.Error); ok { aerr, ok := err.OrigErr().(awserr.Error) if ok && aerr.Code() == ErrCodeResponseTimeout { req.Error = aerr } } } // WithResponseReadTimeout is a request option that will wrap the body in a timeout read closer. // This will allow for per read timeouts. If a timeout occurred, we will return the // ErrCodeResponseTimeout. // // svc.PutObjectWithContext(ctx, params, request.WithTimeoutReadCloser(30 * time.Second) func WithResponseReadTimeout(duration time.Duration) Option { return func(r *Request) { var timeoutHandler = NamedHandler{ HandlerResponseTimeout, func(req *Request) { req.HTTPResponse.Body = &timeoutReadCloser{ reader: req.HTTPResponse.Body, duration: duration, } }} // remove the handler so we are not stomping over any new durations. r.Handlers.Send.RemoveByName(HandlerResponseTimeout) r.Handlers.Send.PushBackNamed(timeoutHandler) r.Handlers.Unmarshal.PushBack(adaptToResponseTimeoutError) r.Handlers.UnmarshalError.PushBack(adaptToResponseTimeoutError) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/validation.go ================================================ package request import ( "bytes" "fmt" "github.com/aws/aws-sdk-go/aws/awserr" ) const ( // InvalidParameterErrCode is the error code for invalid parameters errors InvalidParameterErrCode = "InvalidParameter" // ParamRequiredErrCode is the error code for required parameter errors ParamRequiredErrCode = "ParamRequiredError" // ParamMinValueErrCode is the error code for fields with too low of a // number value. ParamMinValueErrCode = "ParamMinValueError" // ParamMinLenErrCode is the error code for fields without enough elements. ParamMinLenErrCode = "ParamMinLenError" // ParamMaxLenErrCode is the error code for value being too long. ParamMaxLenErrCode = "ParamMaxLenError" // ParamFormatErrCode is the error code for a field with invalid // format or characters. ParamFormatErrCode = "ParamFormatInvalidError" ) // Validator provides a way for types to perform validation logic on their // input values that external code can use to determine if a type's values // are valid. type Validator interface { Validate() error } // An ErrInvalidParams provides wrapping of invalid parameter errors found when // validating API operation input parameters. type ErrInvalidParams struct { // Context is the base context of the invalid parameter group. Context string errs []ErrInvalidParam } // Add adds a new invalid parameter error to the collection of invalid // parameters. The context of the invalid parameter will be updated to reflect // this collection. func (e *ErrInvalidParams) Add(err ErrInvalidParam) { err.SetContext(e.Context) e.errs = append(e.errs, err) } // AddNested adds the invalid parameter errors from another ErrInvalidParams // value into this collection. The nested errors will have their nested context // updated and base context to reflect the merging. // // Use for nested validations errors. func (e *ErrInvalidParams) AddNested(nestedCtx string, nested ErrInvalidParams) { for _, err := range nested.errs { err.SetContext(e.Context) err.AddNestedContext(nestedCtx) e.errs = append(e.errs, err) } } // Len returns the number of invalid parameter errors func (e ErrInvalidParams) Len() int { return len(e.errs) } // Code returns the code of the error func (e ErrInvalidParams) Code() string { return InvalidParameterErrCode } // Message returns the message of the error func (e ErrInvalidParams) Message() string { return fmt.Sprintf("%d validation error(s) found.", len(e.errs)) } // Error returns the string formatted form of the invalid parameters. func (e ErrInvalidParams) Error() string { w := &bytes.Buffer{} fmt.Fprintf(w, "%s: %s\n", e.Code(), e.Message()) for _, err := range e.errs { fmt.Fprintf(w, "- %s\n", err.Message()) } return w.String() } // OrigErr returns the invalid parameters as a awserr.BatchedErrors value func (e ErrInvalidParams) OrigErr() error { return awserr.NewBatchError( InvalidParameterErrCode, e.Message(), e.OrigErrs()) } // OrigErrs returns a slice of the invalid parameters func (e ErrInvalidParams) OrigErrs() []error { errs := make([]error, len(e.errs)) for i := 0; i < len(errs); i++ { errs[i] = e.errs[i] } return errs } // An ErrInvalidParam represents an invalid parameter error type. type ErrInvalidParam interface { awserr.Error // Field name the error occurred on. Field() string // SetContext updates the context of the error. SetContext(string) // AddNestedContext updates the error's context to include a nested level. AddNestedContext(string) } type errInvalidParam struct { context string nestedContext string field string code string msg string } // Code returns the error code for the type of invalid parameter. func (e *errInvalidParam) Code() string { return e.code } // Message returns the reason the parameter was invalid, and its context. func (e *errInvalidParam) Message() string { return fmt.Sprintf("%s, %s.", e.msg, e.Field()) } // Error returns the string version of the invalid parameter error. func (e *errInvalidParam) Error() string { return fmt.Sprintf("%s: %s", e.code, e.Message()) } // OrigErr returns nil, Implemented for awserr.Error interface. func (e *errInvalidParam) OrigErr() error { return nil } // Field Returns the field and context the error occurred. func (e *errInvalidParam) Field() string { field := e.context if len(field) > 0 { field += "." } if len(e.nestedContext) > 0 { field += fmt.Sprintf("%s.", e.nestedContext) } field += e.field return field } // SetContext updates the base context of the error. func (e *errInvalidParam) SetContext(ctx string) { e.context = ctx } // AddNestedContext prepends a context to the field's path. func (e *errInvalidParam) AddNestedContext(ctx string) { if len(e.nestedContext) == 0 { e.nestedContext = ctx } else { e.nestedContext = fmt.Sprintf("%s.%s", ctx, e.nestedContext) } } // An ErrParamRequired represents an required parameter error. type ErrParamRequired struct { errInvalidParam } // NewErrParamRequired creates a new required parameter error. func NewErrParamRequired(field string) *ErrParamRequired { return &ErrParamRequired{ errInvalidParam{ code: ParamRequiredErrCode, field: field, msg: fmt.Sprintf("missing required field"), }, } } // An ErrParamMinValue represents a minimum value parameter error. type ErrParamMinValue struct { errInvalidParam min float64 } // NewErrParamMinValue creates a new minimum value parameter error. func NewErrParamMinValue(field string, min float64) *ErrParamMinValue { return &ErrParamMinValue{ errInvalidParam: errInvalidParam{ code: ParamMinValueErrCode, field: field, msg: fmt.Sprintf("minimum field value of %v", min), }, min: min, } } // MinValue returns the field's require minimum value. // // float64 is returned for both int and float min values. func (e *ErrParamMinValue) MinValue() float64 { return e.min } // An ErrParamMinLen represents a minimum length parameter error. type ErrParamMinLen struct { errInvalidParam min int } // NewErrParamMinLen creates a new minimum length parameter error. func NewErrParamMinLen(field string, min int) *ErrParamMinLen { return &ErrParamMinLen{ errInvalidParam: errInvalidParam{ code: ParamMinLenErrCode, field: field, msg: fmt.Sprintf("minimum field size of %v", min), }, min: min, } } // MinLen returns the field's required minimum length. func (e *ErrParamMinLen) MinLen() int { return e.min } // An ErrParamMaxLen represents a maximum length parameter error. type ErrParamMaxLen struct { errInvalidParam max int } // NewErrParamMaxLen creates a new maximum length parameter error. func NewErrParamMaxLen(field string, max int, value string) *ErrParamMaxLen { return &ErrParamMaxLen{ errInvalidParam: errInvalidParam{ code: ParamMaxLenErrCode, field: field, msg: fmt.Sprintf("maximum size of %v, %v", max, value), }, max: max, } } // MaxLen returns the field's required minimum length. func (e *ErrParamMaxLen) MaxLen() int { return e.max } // An ErrParamFormat represents a invalid format parameter error. type ErrParamFormat struct { errInvalidParam format string } // NewErrParamFormat creates a new invalid format parameter error. func NewErrParamFormat(field string, format, value string) *ErrParamFormat { return &ErrParamFormat{ errInvalidParam: errInvalidParam{ code: ParamFormatErrCode, field: field, msg: fmt.Sprintf("format %v, %v", format, value), }, format: format, } } // Format returns the field's required format. func (e *ErrParamFormat) Format() string { return e.format } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go ================================================ package request import ( "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" ) // WaiterResourceNotReadyErrorCode is the error code returned by a waiter when // the waiter's max attempts have been exhausted. const WaiterResourceNotReadyErrorCode = "ResourceNotReady" // A WaiterOption is a function that will update the Waiter value's fields to // configure the waiter. type WaiterOption func(*Waiter) // WithWaiterMaxAttempts returns the maximum number of times the waiter should // attempt to check the resource for the target state. func WithWaiterMaxAttempts(max int) WaiterOption { return func(w *Waiter) { w.MaxAttempts = max } } // WaiterDelay will return a delay the waiter should pause between attempts to // check the resource state. The passed in attempt is the number of times the // Waiter has checked the resource state. // // Attempt is the number of attempts the Waiter has made checking the resource // state. type WaiterDelay func(attempt int) time.Duration // ConstantWaiterDelay returns a WaiterDelay that will always return a constant // delay the waiter should use between attempts. It ignores the number of // attempts made. func ConstantWaiterDelay(delay time.Duration) WaiterDelay { return func(attempt int) time.Duration { return delay } } // WithWaiterDelay will set the Waiter to use the WaiterDelay passed in. func WithWaiterDelay(delayer WaiterDelay) WaiterOption { return func(w *Waiter) { w.Delay = delayer } } // WithWaiterLogger returns a waiter option to set the logger a waiter // should use to log warnings and errors to. func WithWaiterLogger(logger aws.Logger) WaiterOption { return func(w *Waiter) { w.Logger = logger } } // WithWaiterRequestOptions returns a waiter option setting the request // options for each request the waiter makes. Appends to waiter's request // options already set. func WithWaiterRequestOptions(opts ...Option) WaiterOption { return func(w *Waiter) { w.RequestOptions = append(w.RequestOptions, opts...) } } // A Waiter provides the functionality to perform a blocking call which will // wait for a resource state to be satisfied by a service. // // This type should not be used directly. The API operations provided in the // service packages prefixed with "WaitUntil" should be used instead. type Waiter struct { Name string Acceptors []WaiterAcceptor Logger aws.Logger MaxAttempts int Delay WaiterDelay RequestOptions []Option NewRequest func([]Option) (*Request, error) SleepWithContext func(aws.Context, time.Duration) error } // ApplyOptions updates the waiter with the list of waiter options provided. func (w *Waiter) ApplyOptions(opts ...WaiterOption) { for _, fn := range opts { fn(w) } } // WaiterState are states the waiter uses based on WaiterAcceptor definitions // to identify if the resource state the waiter is waiting on has occurred. type WaiterState int // String returns the string representation of the waiter state. func (s WaiterState) String() string { switch s { case SuccessWaiterState: return "success" case FailureWaiterState: return "failure" case RetryWaiterState: return "retry" default: return "unknown waiter state" } } // States the waiter acceptors will use to identify target resource states. const ( SuccessWaiterState WaiterState = iota // waiter successful FailureWaiterState // waiter failed RetryWaiterState // waiter needs to be retried ) // WaiterMatchMode is the mode that the waiter will use to match the WaiterAcceptor // definition's Expected attribute. type WaiterMatchMode int // Modes the waiter will use when inspecting API response to identify target // resource states. const ( PathAllWaiterMatch WaiterMatchMode = iota // match on all paths PathWaiterMatch // match on specific path PathAnyWaiterMatch // match on any path PathListWaiterMatch // match on list of paths StatusWaiterMatch // match on status code ErrorWaiterMatch // match on error ) // String returns the string representation of the waiter match mode. func (m WaiterMatchMode) String() string { switch m { case PathAllWaiterMatch: return "pathAll" case PathWaiterMatch: return "path" case PathAnyWaiterMatch: return "pathAny" case PathListWaiterMatch: return "pathList" case StatusWaiterMatch: return "status" case ErrorWaiterMatch: return "error" default: return "unknown waiter match mode" } } // WaitWithContext will make requests for the API operation using NewRequest to // build API requests. The request's response will be compared against the // Waiter's Acceptors to determine the successful state of the resource the // waiter is inspecting. // // The passed in context must not be nil. If it is nil a panic will occur. The // Context will be used to cancel the waiter's pending requests and retry delays. // Use aws.BackgroundContext if no context is available. // // The waiter will continue until the target state defined by the Acceptors, // or the max attempts expires. // // Will return the WaiterResourceNotReadyErrorCode error code if the waiter's // retryer ShouldRetry returns false. This normally will happen when the max // wait attempts expires. func (w Waiter) WaitWithContext(ctx aws.Context) error { for attempt := 1; ; attempt++ { req, err := w.NewRequest(w.RequestOptions) if err != nil { waiterLogf(w.Logger, "unable to create request %v", err) return err } req.Handlers.Build.PushBack(MakeAddToUserAgentFreeFormHandler("Waiter")) err = req.Send() // See if any of the acceptors match the request's response, or error for _, a := range w.Acceptors { if matched, matchErr := a.match(w.Name, w.Logger, req, err); matched { return matchErr } } // The Waiter should only check the resource state MaxAttempts times // This is here instead of in the for loop above to prevent delaying // unnecessary when the waiter will not retry. if attempt == w.MaxAttempts { break } // Delay to wait before inspecting the resource again delay := w.Delay(attempt) if sleepFn := req.Config.SleepDelay; sleepFn != nil { // Support SleepDelay for backwards compatibility and testing sleepFn(delay) } else { sleepCtxFn := w.SleepWithContext if sleepCtxFn == nil { sleepCtxFn = aws.SleepWithContext } if err := sleepCtxFn(ctx, delay); err != nil { return awserr.New(CanceledErrorCode, "waiter context canceled", err) } } } return awserr.New(WaiterResourceNotReadyErrorCode, "exceeded wait attempts", nil) } // A WaiterAcceptor provides the information needed to wait for an API operation // to complete. type WaiterAcceptor struct { State WaiterState Matcher WaiterMatchMode Argument string Expected interface{} } // match returns if the acceptor found a match with the passed in request // or error. True is returned if the acceptor made a match, error is returned // if there was an error attempting to perform the match. func (a *WaiterAcceptor) match(name string, l aws.Logger, req *Request, err error) (bool, error) { result := false var vals []interface{} switch a.Matcher { case PathAllWaiterMatch, PathWaiterMatch: // Require all matches to be equal for result to match vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument) if len(vals) == 0 { break } result = true for _, val := range vals { if !awsutil.DeepEqual(val, a.Expected) { result = false break } } case PathAnyWaiterMatch: // Only a single match needs to equal for the result to match vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument) for _, val := range vals { if awsutil.DeepEqual(val, a.Expected) { result = true break } } case PathListWaiterMatch: // ignored matcher case StatusWaiterMatch: s := a.Expected.(int) result = s == req.HTTPResponse.StatusCode case ErrorWaiterMatch: if aerr, ok := err.(awserr.Error); ok { result = aerr.Code() == a.Expected.(string) } default: waiterLogf(l, "WARNING: Waiter %s encountered unexpected matcher: %s", name, a.Matcher) } if !result { // If there was no matching result found there is nothing more to do // for this response, retry the request. return false, nil } switch a.State { case SuccessWaiterState: // waiter completed return true, nil case FailureWaiterState: // Waiter failure state triggered return true, awserr.New(WaiterResourceNotReadyErrorCode, "failed waiting for successful resource state", err) case RetryWaiterState: // clear the error and retry the operation return false, nil default: waiterLogf(l, "WARNING: Waiter %s encountered unexpected state: %s", name, a.State) return false, nil } } func waiterLogf(logger aws.Logger, msg string, args ...interface{}) { if logger != nil { logger.Log(fmt.Sprintf(msg, args...)) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go ================================================ package session import ( "fmt" "os" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/processcreds" "github.com/aws/aws-sdk-go/aws/credentials/ssocreds" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/shareddefaults" "github.com/aws/aws-sdk-go/service/ssooidc" "github.com/aws/aws-sdk-go/service/sts" ) // CredentialsProviderOptions specifies additional options for configuring // credentials providers. type CredentialsProviderOptions struct { // WebIdentityRoleProviderOptions configures a WebIdentityRoleProvider, // such as setting its ExpiryWindow. WebIdentityRoleProviderOptions func(*stscreds.WebIdentityRoleProvider) // ProcessProviderOptions configures a ProcessProvider, // such as setting its Timeout. ProcessProviderOptions func(*processcreds.ProcessProvider) } func resolveCredentials(cfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers, sessOpts Options, ) (*credentials.Credentials, error) { switch { case len(sessOpts.Profile) != 0: // User explicitly provided a Profile in the session's configuration // so load that profile from shared config first. // Github(aws/aws-sdk-go#2727) return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts) case envCfg.Creds.HasKeys(): // Environment credentials return credentials.NewStaticCredentialsFromCreds(envCfg.Creds), nil case len(envCfg.WebIdentityTokenFilePath) != 0: // Web identity token from environment, RoleARN required to also be // set. return assumeWebIdentity(cfg, handlers, envCfg.WebIdentityTokenFilePath, envCfg.RoleARN, envCfg.RoleSessionName, sessOpts.CredentialsProviderOptions, ) default: // Fallback to the "default" credential resolution chain. return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts) } } // WebIdentityEmptyRoleARNErr will occur if 'AWS_WEB_IDENTITY_TOKEN_FILE' was set but // 'AWS_ROLE_ARN' was not set. var WebIdentityEmptyRoleARNErr = awserr.New(stscreds.ErrCodeWebIdentity, "role ARN is not set", nil) // WebIdentityEmptyTokenFilePathErr will occur if 'AWS_ROLE_ARN' was set but // 'AWS_WEB_IDENTITY_TOKEN_FILE' was not set. var WebIdentityEmptyTokenFilePathErr = awserr.New(stscreds.ErrCodeWebIdentity, "token file path is not set", nil) func assumeWebIdentity(cfg *aws.Config, handlers request.Handlers, filepath string, roleARN, sessionName string, credOptions *CredentialsProviderOptions, ) (*credentials.Credentials, error) { if len(filepath) == 0 { return nil, WebIdentityEmptyTokenFilePathErr } if len(roleARN) == 0 { return nil, WebIdentityEmptyRoleARNErr } svc := sts.New(&Session{ Config: cfg, Handlers: handlers.Copy(), }) var optFns []func(*stscreds.WebIdentityRoleProvider) if credOptions != nil && credOptions.WebIdentityRoleProviderOptions != nil { optFns = append(optFns, credOptions.WebIdentityRoleProviderOptions) } p := stscreds.NewWebIdentityRoleProviderWithOptions(svc, roleARN, sessionName, stscreds.FetchTokenPath(filepath), optFns...) return credentials.NewCredentials(p), nil } func resolveCredsFromProfile(cfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers, sessOpts Options, ) (creds *credentials.Credentials, err error) { switch { case sharedCfg.SourceProfile != nil: // Assume IAM role with credentials source from a different profile. creds, err = resolveCredsFromProfile(cfg, envCfg, *sharedCfg.SourceProfile, handlers, sessOpts, ) case sharedCfg.Creds.HasKeys(): // Static Credentials from Shared Config/Credentials file. creds = credentials.NewStaticCredentialsFromCreds( sharedCfg.Creds, ) case len(sharedCfg.CredentialSource) != 0: creds, err = resolveCredsFromSource(cfg, envCfg, sharedCfg, handlers, sessOpts, ) case len(sharedCfg.WebIdentityTokenFile) != 0: // Credentials from Assume Web Identity token require an IAM Role, and // that roll will be assumed. May be wrapped with another assume role // via SourceProfile. return assumeWebIdentity(cfg, handlers, sharedCfg.WebIdentityTokenFile, sharedCfg.RoleARN, sharedCfg.RoleSessionName, sessOpts.CredentialsProviderOptions, ) case sharedCfg.hasSSOConfiguration(): creds, err = resolveSSOCredentials(cfg, sharedCfg, handlers) case len(sharedCfg.CredentialProcess) != 0: // Get credentials from CredentialProcess var optFns []func(*processcreds.ProcessProvider) if sessOpts.CredentialsProviderOptions != nil && sessOpts.CredentialsProviderOptions.ProcessProviderOptions != nil { optFns = append(optFns, sessOpts.CredentialsProviderOptions.ProcessProviderOptions) } creds = processcreds.NewCredentials(sharedCfg.CredentialProcess, optFns...) default: // Fallback to default credentials provider, include mock errors for // the credential chain so user can identify why credentials failed to // be retrieved. creds = credentials.NewCredentials(&credentials.ChainProvider{ VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors), Providers: []credentials.Provider{ &credProviderError{ Err: awserr.New("EnvAccessKeyNotFound", "failed to find credentials in the environment.", nil), }, &credProviderError{ Err: awserr.New("SharedCredsLoad", fmt.Sprintf("failed to load profile, %s.", envCfg.Profile), nil), }, defaults.RemoteCredProvider(*cfg, handlers), }, }) } if err != nil { return nil, err } if len(sharedCfg.RoleARN) > 0 { cfgCp := *cfg cfgCp.Credentials = creds return credsFromAssumeRole(cfgCp, handlers, sharedCfg, sessOpts) } return creds, nil } func resolveSSOCredentials(cfg *aws.Config, sharedCfg sharedConfig, handlers request.Handlers) (*credentials.Credentials, error) { if err := sharedCfg.validateSSOConfiguration(); err != nil { return nil, err } var optFns []func(provider *ssocreds.Provider) cfgCopy := cfg.Copy() if sharedCfg.SSOSession != nil { cfgCopy.Region = &sharedCfg.SSOSession.SSORegion cachedPath, err := ssocreds.StandardCachedTokenFilepath(sharedCfg.SSOSession.Name) if err != nil { return nil, err } // create oidcClient with AnonymousCredentials to avoid recursively resolving credentials mySession := Must(NewSession(&aws.Config{ Credentials: credentials.AnonymousCredentials, })) oidcClient := ssooidc.New(mySession, cfgCopy) tokenProvider := ssocreds.NewSSOTokenProvider(oidcClient, cachedPath) optFns = append(optFns, func(p *ssocreds.Provider) { p.TokenProvider = tokenProvider p.CachedTokenFilepath = cachedPath }) } else { cfgCopy.Region = &sharedCfg.SSORegion } return ssocreds.NewCredentials( &Session{ Config: cfgCopy, Handlers: handlers.Copy(), }, sharedCfg.SSOAccountID, sharedCfg.SSORoleName, sharedCfg.SSOStartURL, optFns..., ), nil } // valid credential source values const ( credSourceEc2Metadata = "Ec2InstanceMetadata" credSourceEnvironment = "Environment" credSourceECSContainer = "EcsContainer" ) func resolveCredsFromSource(cfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers, sessOpts Options, ) (creds *credentials.Credentials, err error) { switch sharedCfg.CredentialSource { case credSourceEc2Metadata: p := defaults.RemoteCredProvider(*cfg, handlers) creds = credentials.NewCredentials(p) case credSourceEnvironment: creds = credentials.NewStaticCredentialsFromCreds(envCfg.Creds) case credSourceECSContainer: if len(os.Getenv(shareddefaults.ECSCredsProviderEnvVar)) == 0 { return nil, ErrSharedConfigECSContainerEnvVarEmpty } p := defaults.RemoteCredProvider(*cfg, handlers) creds = credentials.NewCredentials(p) default: return nil, ErrSharedConfigInvalidCredSource } return creds, nil } func credsFromAssumeRole(cfg aws.Config, handlers request.Handlers, sharedCfg sharedConfig, sessOpts Options, ) (*credentials.Credentials, error) { if len(sharedCfg.MFASerial) != 0 && sessOpts.AssumeRoleTokenProvider == nil { // AssumeRole Token provider is required if doing Assume Role // with MFA. return nil, AssumeRoleTokenProviderNotSetError{} } return stscreds.NewCredentials( &Session{ Config: &cfg, Handlers: handlers.Copy(), }, sharedCfg.RoleARN, func(opt *stscreds.AssumeRoleProvider) { opt.RoleSessionName = sharedCfg.RoleSessionName if sessOpts.AssumeRoleDuration == 0 && sharedCfg.AssumeRoleDuration != nil && *sharedCfg.AssumeRoleDuration/time.Minute > 15 { opt.Duration = *sharedCfg.AssumeRoleDuration } else if sessOpts.AssumeRoleDuration != 0 { opt.Duration = sessOpts.AssumeRoleDuration } // Assume role with external ID if len(sharedCfg.ExternalID) > 0 { opt.ExternalID = aws.String(sharedCfg.ExternalID) } // Assume role with MFA if len(sharedCfg.MFASerial) > 0 { opt.SerialNumber = aws.String(sharedCfg.MFASerial) opt.TokenProvider = sessOpts.AssumeRoleTokenProvider } }, ), nil } // AssumeRoleTokenProviderNotSetError is an error returned when creating a // session when the MFAToken option is not set when shared config is configured // load assume a role with an MFA token. type AssumeRoleTokenProviderNotSetError struct{} // Code is the short id of the error. func (e AssumeRoleTokenProviderNotSetError) Code() string { return "AssumeRoleTokenProviderNotSetError" } // Message is the description of the error func (e AssumeRoleTokenProviderNotSetError) Message() string { return fmt.Sprintf("assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.") } // OrigErr is the underlying error that caused the failure. func (e AssumeRoleTokenProviderNotSetError) OrigErr() error { return nil } // Error satisfies the error interface. func (e AssumeRoleTokenProviderNotSetError) Error() string { return awserr.SprintError(e.Code(), e.Message(), "", nil) } type credProviderError struct { Err error } func (c credProviderError) Retrieve() (credentials.Value, error) { return credentials.Value{}, c.Err } func (c credProviderError) IsExpired() bool { return true } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go ================================================ //go:build go1.13 // +build go1.13 package session import ( "net" "net/http" "time" ) // Transport that should be used when a custom CA bundle is specified with the // SDK. func getCustomTransport() *http.Transport { return &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, DualStack: true, }).DialContext, ForceAttemptHTTP2: true, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go ================================================ //go:build !go1.13 && go1.7 // +build !go1.13,go1.7 package session import ( "net" "net/http" "time" ) // Transport that should be used when a custom CA bundle is specified with the // SDK. func getCustomTransport() *http.Transport { return &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, DualStack: true, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go ================================================ //go:build !go1.6 && go1.5 // +build !go1.6,go1.5 package session import ( "net" "net/http" "time" ) // Transport that should be used when a custom CA bundle is specified with the // SDK. func getCustomTransport() *http.Transport { return &http.Transport{ Proxy: http.ProxyFromEnvironment, Dial: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, }).Dial, TLSHandshakeTimeout: 10 * time.Second, } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go ================================================ //go:build !go1.7 && go1.6 // +build !go1.7,go1.6 package session import ( "net" "net/http" "time" ) // Transport that should be used when a custom CA bundle is specified with the // SDK. func getCustomTransport() *http.Transport { return &http.Transport{ Proxy: http.ProxyFromEnvironment, Dial: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, }).Dial, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/doc.go ================================================ /* Package session provides configuration for the SDK's service clients. Sessions can be shared across service clients that share the same base configuration. Sessions are safe to use concurrently as long as the Session is not being modified. Sessions should be cached when possible, because creating a new Session will load all configuration values from the environment, and config files each time the Session is created. Sharing the Session value across all of your service clients will ensure the configuration is loaded the fewest number of times possible. Sessions options from Shared Config By default NewSession will only load credentials from the shared credentials file (~/.aws/credentials). If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value the Session will be created from the configuration values from the shared config (~/.aws/config) and shared credentials (~/.aws/credentials) files. Using the NewSessionWithOptions with SharedConfigState set to SharedConfigEnable will create the session as if the AWS_SDK_LOAD_CONFIG environment variable was set. Credential and config loading order The Session will attempt to load configuration and credentials from the environment, configuration files, and other credential sources. The order configuration is loaded in is: * Environment Variables * Shared Credentials file * Shared Configuration file (if SharedConfig is enabled) * EC2 Instance Metadata (credentials only) The Environment variables for credentials will have precedence over shared config even if SharedConfig is enabled. To override this behavior, and use shared config credentials instead specify the session.Options.Profile, (e.g. when using credential_source=Environment to assume a role). sess, err := session.NewSessionWithOptions(session.Options{ Profile: "myProfile", }) Creating Sessions Creating a Session without additional options will load credentials region, and profile loaded from the environment and shared config automatically. See, "Environment Variables" section for information on environment variables used by Session. // Create Session sess, err := session.NewSession() When creating Sessions optional aws.Config values can be passed in that will override the default, or loaded, config values the Session is being created with. This allows you to provide additional, or case based, configuration as needed. // Create a Session with a custom region sess, err := session.NewSession(&aws.Config{ Region: aws.String("us-west-2"), }) Use NewSessionWithOptions to provide additional configuration driving how the Session's configuration will be loaded. Such as, specifying shared config profile, or override the shared config state, (AWS_SDK_LOAD_CONFIG). // Equivalent to session.NewSession() sess, err := session.NewSessionWithOptions(session.Options{ // Options }) sess, err := session.NewSessionWithOptions(session.Options{ // Specify profile to load for the session's config Profile: "profile_name", // Provide SDK Config options, such as Region. Config: aws.Config{ Region: aws.String("us-west-2"), }, // Force enable Shared Config support SharedConfigState: session.SharedConfigEnable, }) Adding Handlers You can add handlers to a session to decorate API operation, (e.g. adding HTTP headers). All clients that use the Session receive a copy of the Session's handlers. For example, the following request handler added to the Session logs every requests made. // Create a session, and add additional handlers for all service // clients created with the Session to inherit. Adds logging handler. sess := session.Must(session.NewSession()) sess.Handlers.Send.PushFront(func(r *request.Request) { // Log every request made and its payload logger.Printf("Request: %s/%s, Params: %s", r.ClientInfo.ServiceName, r.Operation, r.Params) }) Shared Config Fields By default the SDK will only load the shared credentials file's (~/.aws/credentials) credentials values, and all other config is provided by the environment variables, SDK defaults, and user provided aws.Config values. If the AWS_SDK_LOAD_CONFIG environment variable is set, or SharedConfigEnable option is used to create the Session the full shared config values will be loaded. This includes credentials, region, and support for assume role. In addition the Session will load its configuration from both the shared config file (~/.aws/config) and shared credentials file (~/.aws/credentials). Both files have the same format. If both config files are present the configuration from both files will be read. The Session will be created from configuration values from the shared credentials file (~/.aws/credentials) over those in the shared config file (~/.aws/config). Credentials are the values the SDK uses to authenticating requests with AWS Services. When specified in a file, both aws_access_key_id and aws_secret_access_key must be provided together in the same file to be considered valid. They will be ignored if both are not present. aws_session_token is an optional field that can be provided in addition to the other two fields. aws_access_key_id = AKID aws_secret_access_key = SECRET aws_session_token = TOKEN ; region only supported if SharedConfigEnabled. region = us-east-1 Assume Role configuration The role_arn field allows you to configure the SDK to assume an IAM role using a set of credentials from another source. Such as when paired with static credentials, "profile_source", "credential_process", or "credential_source" fields. If "role_arn" is provided, a source of credentials must also be specified, such as "source_profile", "credential_source", or "credential_process". role_arn = arn:aws:iam:::role/ source_profile = profile_with_creds external_id = 1234 mfa_serial = role_session_name = session_name The SDK supports assuming a role with MFA token. If "mfa_serial" is set, you must also set the Session Option.AssumeRoleTokenProvider. The Session will fail to load if the AssumeRoleTokenProvider is not specified. sess := session.Must(session.NewSessionWithOptions(session.Options{ AssumeRoleTokenProvider: stscreds.StdinTokenProvider, })) To setup Assume Role outside of a session see the stscreds.AssumeRoleProvider documentation. Environment Variables When a Session is created several environment variables can be set to adjust how the SDK functions, and what configuration data it loads when creating Sessions. All environment values are optional, but some values like credentials require multiple of the values to set or the partial values will be ignored. All environment variable values are strings unless otherwise noted. Environment configuration values. If set both Access Key ID and Secret Access Key must be provided. Session Token and optionally also be provided, but is not required. # Access Key ID AWS_ACCESS_KEY_ID=AKID AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set. # Secret Access Key AWS_SECRET_ACCESS_KEY=SECRET AWS_SECRET_KEY=SECRET=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set. # Session Token AWS_SESSION_TOKEN=TOKEN Region value will instruct the SDK where to make service API requests to. If is not provided in the environment the region must be provided before a service client request is made. AWS_REGION=us-east-1 # AWS_DEFAULT_REGION is only read if AWS_SDK_LOAD_CONFIG is also set, # and AWS_REGION is not also set. AWS_DEFAULT_REGION=us-east-1 Profile name the SDK should load use when loading shared config from the configuration files. If not provided "default" will be used as the profile name. AWS_PROFILE=my_profile # AWS_DEFAULT_PROFILE is only read if AWS_SDK_LOAD_CONFIG is also set, # and AWS_PROFILE is not also set. AWS_DEFAULT_PROFILE=my_profile SDK load config instructs the SDK to load the shared config in addition to shared credentials. This also expands the configuration loaded so the shared credentials will have parity with the shared config file. This also enables Region and Profile support for the AWS_DEFAULT_REGION and AWS_DEFAULT_PROFILE env values as well. AWS_SDK_LOAD_CONFIG=1 Custom Shared Config and Credential Files Shared credentials file path can be set to instruct the SDK to use an alternative file for the shared credentials. If not set the file will be loaded from $HOME/.aws/credentials on Linux/Unix based systems, and %USERPROFILE%\.aws\credentials on Windows. AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials Shared config file path can be set to instruct the SDK to use an alternative file for the shared config. If not set the file will be loaded from $HOME/.aws/config on Linux/Unix based systems, and %USERPROFILE%\.aws\config on Windows. AWS_CONFIG_FILE=$HOME/my_shared_config Custom CA Bundle Path to a custom Credentials Authority (CA) bundle PEM file that the SDK will use instead of the default system's root CA bundle. Use this only if you want to replace the CA bundle the SDK uses for TLS requests. AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle Enabling this option will attempt to merge the Transport into the SDK's HTTP client. If the client's Transport is not a http.Transport an error will be returned. If the Transport's TLS config is set this option will cause the SDK to overwrite the Transport's TLS config's RootCAs value. If the CA bundle file contains multiple certificates all of them will be loaded. The Session option CustomCABundle is also available when creating sessions to also enable this feature. CustomCABundle session option field has priority over the AWS_CA_BUNDLE environment variable, and will be used if both are set. Setting a custom HTTPClient in the aws.Config options will override this setting. To use this option and custom HTTP client, the HTTP client needs to be provided when creating the session. Not the service client. Custom Client TLS Certificate The SDK supports the environment and session option being configured with Client TLS certificates that are sent as a part of the client's TLS handshake for client authentication. If used, both Cert and Key values are required. If one is missing, or either fail to load the contents of the file an error will be returned. HTTP Client's Transport concrete implementation must be a http.Transport or creating the session will fail. AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert This can also be configured via the session.Options ClientTLSCert and ClientTLSKey. sess, err := session.NewSessionWithOptions(session.Options{ ClientTLSCert: myCertFile, ClientTLSKey: myKeyFile, }) Custom EC2 IMDS Endpoint The endpoint of the EC2 IMDS client can be configured via the environment variable, AWS_EC2_METADATA_SERVICE_ENDPOINT when creating the client with a Session. See Options.EC2IMDSEndpoint for more details. AWS_EC2_METADATA_SERVICE_ENDPOINT=http://169.254.169.254 If using an URL with an IPv6 address literal, the IPv6 address component must be enclosed in square brackets. AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1] The custom EC2 IMDS endpoint can also be specified via the Session options. sess, err := session.NewSessionWithOptions(session.Options{ EC2MetadataEndpoint: "http://[::1]", }) FIPS and DualStack Endpoints The SDK can be configured to resolve an endpoint with certain capabilities such as FIPS and DualStack. You can configure a FIPS endpoint using an environment variable, shared config ($HOME/.aws/config), or programmatically. To configure a FIPS endpoint set the environment variable set the AWS_USE_FIPS_ENDPOINT to true or false to enable or disable FIPS endpoint resolution. AWS_USE_FIPS_ENDPOINT=true To configure a FIPS endpoint using shared config, set use_fips_endpoint to true or false to enable or disable FIPS endpoint resolution. [profile myprofile] region=us-west-2 use_fips_endpoint=true To configure a FIPS endpoint programmatically // Option 1: Configure it on a session for all clients sess, err := session.NewSessionWithOptions(session.Options{ UseFIPSEndpoint: endpoints.FIPSEndpointStateEnabled, }) if err != nil { // handle error } client := s3.New(sess) // Option 2: Configure it per client sess, err := session.NewSession() if err != nil { // handle error } client := s3.New(sess, &aws.Config{ UseFIPSEndpoint: endpoints.FIPSEndpointStateEnabled, }) You can configure a DualStack endpoint using an environment variable, shared config ($HOME/.aws/config), or programmatically. To configure a DualStack endpoint set the environment variable set the AWS_USE_DUALSTACK_ENDPOINT to true or false to enable or disable DualStack endpoint resolution. AWS_USE_DUALSTACK_ENDPOINT=true To configure a DualStack endpoint using shared config, set use_dualstack_endpoint to true or false to enable or disable DualStack endpoint resolution. [profile myprofile] region=us-west-2 use_dualstack_endpoint=true To configure a DualStack endpoint programmatically // Option 1: Configure it on a session for all clients sess, err := session.NewSessionWithOptions(session.Options{ UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled, }) if err != nil { // handle error } client := s3.New(sess) // Option 2: Configure it per client sess, err := session.NewSession() if err != nil { // handle error } client := s3.New(sess, &aws.Config{ UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled, }) */ package session ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go ================================================ package session import ( "fmt" "os" "strconv" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/endpoints" ) // EnvProviderName provides a name of the provider when config is loaded from environment. const EnvProviderName = "EnvConfigCredentials" // envConfig is a collection of environment values the SDK will read // setup config from. All environment values are optional. But some values // such as credentials require multiple values to be complete or the values // will be ignored. type envConfig struct { // Environment configuration values. If set both Access Key ID and Secret Access // Key must be provided. Session Token and optionally also be provided, but is // not required. // // # Access Key ID // AWS_ACCESS_KEY_ID=AKID // AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set. // // # Secret Access Key // AWS_SECRET_ACCESS_KEY=SECRET // AWS_SECRET_KEY=SECRET=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set. // // # Session Token // AWS_SESSION_TOKEN=TOKEN Creds credentials.Value // Region value will instruct the SDK where to make service API requests to. If is // not provided in the environment the region must be provided before a service // client request is made. // // AWS_REGION=us-east-1 // // # AWS_DEFAULT_REGION is only read if AWS_SDK_LOAD_CONFIG is also set, // # and AWS_REGION is not also set. // AWS_DEFAULT_REGION=us-east-1 Region string // Profile name the SDK should load use when loading shared configuration from the // shared configuration files. If not provided "default" will be used as the // profile name. // // AWS_PROFILE=my_profile // // # AWS_DEFAULT_PROFILE is only read if AWS_SDK_LOAD_CONFIG is also set, // # and AWS_PROFILE is not also set. // AWS_DEFAULT_PROFILE=my_profile Profile string // SDK load config instructs the SDK to load the shared config in addition to // shared credentials. This also expands the configuration loaded from the shared // credentials to have parity with the shared config file. This also enables // Region and Profile support for the AWS_DEFAULT_REGION and AWS_DEFAULT_PROFILE // env values as well. // // AWS_SDK_LOAD_CONFIG=1 EnableSharedConfig bool // Shared credentials file path can be set to instruct the SDK to use an alternate // file for the shared credentials. If not set the file will be loaded from // $HOME/.aws/credentials on Linux/Unix based systems, and // %USERPROFILE%\.aws\credentials on Windows. // // AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials SharedCredentialsFile string // Shared config file path can be set to instruct the SDK to use an alternate // file for the shared config. If not set the file will be loaded from // $HOME/.aws/config on Linux/Unix based systems, and // %USERPROFILE%\.aws\config on Windows. // // AWS_CONFIG_FILE=$HOME/my_shared_config SharedConfigFile string // Sets the path to a custom Credentials Authority (CA) Bundle PEM file // that the SDK will use instead of the system's root CA bundle. // Only use this if you want to configure the SDK to use a custom set // of CAs. // // Enabling this option will attempt to merge the Transport // into the SDK's HTTP client. If the client's Transport is // not a http.Transport an error will be returned. If the // Transport's TLS config is set this option will cause the // SDK to overwrite the Transport's TLS config's RootCAs value. // // Setting a custom HTTPClient in the aws.Config options will override this setting. // To use this option and custom HTTP client, the HTTP client needs to be provided // when creating the session. Not the service client. // // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle CustomCABundle string // Sets the TLC client certificate that should be used by the SDK's HTTP transport // when making requests. The certificate must be paired with a TLS client key file. // // AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert ClientTLSCert string // Sets the TLC client key that should be used by the SDK's HTTP transport // when making requests. The key must be paired with a TLS client certificate file. // // AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key ClientTLSKey string csmEnabled string CSMEnabled *bool CSMPort string CSMHost string CSMClientID string // Enables endpoint discovery via environment variables. // // AWS_ENABLE_ENDPOINT_DISCOVERY=true EnableEndpointDiscovery *bool enableEndpointDiscovery string // Specifies the WebIdentity token the SDK should use to assume a role // with. // // AWS_WEB_IDENTITY_TOKEN_FILE=file_path WebIdentityTokenFilePath string // Specifies the IAM role arn to use when assuming an role. // // AWS_ROLE_ARN=role_arn RoleARN string // Specifies the IAM role session name to use when assuming a role. // // AWS_ROLE_SESSION_NAME=session_name RoleSessionName string // Specifies the STS Regional Endpoint flag for the SDK to resolve the endpoint // for a service. // // AWS_STS_REGIONAL_ENDPOINTS=regional // This can take value as `regional` or `legacy` STSRegionalEndpoint endpoints.STSRegionalEndpoint // Specifies the S3 Regional Endpoint flag for the SDK to resolve the // endpoint for a service. // // AWS_S3_US_EAST_1_REGIONAL_ENDPOINT=regional // This can take value as `regional` or `legacy` S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint // Specifies if the S3 service should allow ARNs to direct the region // the client's requests are sent to. // // AWS_S3_USE_ARN_REGION=true S3UseARNRegion bool // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode. // // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1] EC2IMDSEndpoint string // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) // // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6 EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState // Specifies that IMDS clients should not fallback to IMDSv1 if token // requests fail. // // AWS_EC2_METADATA_V1_DISABLED=true EC2IMDSv1Disabled *bool // Specifies that SDK clients must resolve a dual-stack endpoint for // services. // // AWS_USE_DUALSTACK_ENDPOINT=true UseDualStackEndpoint endpoints.DualStackEndpointState // Specifies that SDK clients must resolve a FIPS endpoint for // services. // // AWS_USE_FIPS_ENDPOINT=true UseFIPSEndpoint endpoints.FIPSEndpointState } var ( csmEnabledEnvKey = []string{ "AWS_CSM_ENABLED", } csmHostEnvKey = []string{ "AWS_CSM_HOST", } csmPortEnvKey = []string{ "AWS_CSM_PORT", } csmClientIDEnvKey = []string{ "AWS_CSM_CLIENT_ID", } credAccessEnvKey = []string{ "AWS_ACCESS_KEY_ID", "AWS_ACCESS_KEY", } credSecretEnvKey = []string{ "AWS_SECRET_ACCESS_KEY", "AWS_SECRET_KEY", } credSessionEnvKey = []string{ "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 } profileEnvKeys = []string{ "AWS_PROFILE", "AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set } sharedCredsFileEnvKey = []string{ "AWS_SHARED_CREDENTIALS_FILE", } sharedConfigFileEnvKey = []string{ "AWS_CONFIG_FILE", } webIdentityTokenFilePathEnvKey = []string{ "AWS_WEB_IDENTITY_TOKEN_FILE", } roleARNEnvKey = []string{ "AWS_ROLE_ARN", } roleSessionNameEnvKey = []string{ "AWS_ROLE_SESSION_NAME", } stsRegionalEndpointKey = []string{ "AWS_STS_REGIONAL_ENDPOINTS", } s3UsEast1RegionalEndpoint = []string{ "AWS_S3_US_EAST_1_REGIONAL_ENDPOINT", } s3UseARNRegionEnvKey = []string{ "AWS_S3_USE_ARN_REGION", } ec2IMDSEndpointEnvKey = []string{ "AWS_EC2_METADATA_SERVICE_ENDPOINT", } ec2IMDSEndpointModeEnvKey = []string{ "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE", } ec2MetadataV1DisabledEnvKey = []string{ "AWS_EC2_METADATA_V1_DISABLED", } useCABundleKey = []string{ "AWS_CA_BUNDLE", } useClientTLSCert = []string{ "AWS_SDK_GO_CLIENT_TLS_CERT", } useClientTLSKey = []string{ "AWS_SDK_GO_CLIENT_TLS_KEY", } awsUseDualStackEndpoint = []string{ "AWS_USE_DUALSTACK_ENDPOINT", } awsUseFIPSEndpoint = []string{ "AWS_USE_FIPS_ENDPOINT", } ) // loadEnvConfig retrieves the SDK's environment configuration. // See `envConfig` for the values that will be retrieved. // // If the environment variable `AWS_SDK_LOAD_CONFIG` is set to a truthy value // the shared SDK config will be loaded in addition to the SDK's specific // configuration values. func loadEnvConfig() (envConfig, error) { enableSharedConfig, _ := strconv.ParseBool(os.Getenv("AWS_SDK_LOAD_CONFIG")) return envConfigLoad(enableSharedConfig) } // loadEnvSharedConfig retrieves the SDK's environment configuration, and the // SDK shared config. See `envConfig` for the values that will be retrieved. // // Loads the shared configuration in addition to the SDK's specific configuration. // This will load the same values as `loadEnvConfig` if the `AWS_SDK_LOAD_CONFIG` // environment variable is set. func loadSharedEnvConfig() (envConfig, error) { return envConfigLoad(true) } func envConfigLoad(enableSharedConfig bool) (envConfig, error) { cfg := envConfig{} cfg.EnableSharedConfig = enableSharedConfig // Static environment credentials var creds credentials.Value setFromEnvVal(&creds.AccessKeyID, credAccessEnvKey) setFromEnvVal(&creds.SecretAccessKey, credSecretEnvKey) setFromEnvVal(&creds.SessionToken, credSessionEnvKey) if creds.HasKeys() { // Require logical grouping of credentials creds.ProviderName = EnvProviderName cfg.Creds = creds } // Role Metadata setFromEnvVal(&cfg.RoleARN, roleARNEnvKey) setFromEnvVal(&cfg.RoleSessionName, roleSessionNameEnvKey) // Web identity environment variables setFromEnvVal(&cfg.WebIdentityTokenFilePath, webIdentityTokenFilePathEnvKey) // CSM environment variables setFromEnvVal(&cfg.csmEnabled, csmEnabledEnvKey) setFromEnvVal(&cfg.CSMHost, csmHostEnvKey) setFromEnvVal(&cfg.CSMPort, csmPortEnvKey) setFromEnvVal(&cfg.CSMClientID, csmClientIDEnvKey) if len(cfg.csmEnabled) != 0 { v, _ := strconv.ParseBool(cfg.csmEnabled) cfg.CSMEnabled = &v } regionKeys := regionEnvKeys profileKeys := profileEnvKeys if !cfg.EnableSharedConfig { regionKeys = regionKeys[:1] profileKeys = profileKeys[:1] } 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) if len(cfg.SharedCredentialsFile) == 0 { cfg.SharedCredentialsFile = defaults.SharedCredentialsFilename() } if len(cfg.SharedConfigFile) == 0 { cfg.SharedConfigFile = defaults.SharedConfigFilename() } setFromEnvVal(&cfg.CustomCABundle, useCABundleKey) setFromEnvVal(&cfg.ClientTLSCert, useClientTLSCert) setFromEnvVal(&cfg.ClientTLSKey, useClientTLSKey) var err error // STS Regional Endpoint variable for _, k := range stsRegionalEndpointKey { if v := os.Getenv(k); len(v) != 0 { cfg.STSRegionalEndpoint, err = endpoints.GetSTSRegionalEndpoint(v) if err != nil { return cfg, fmt.Errorf("failed to load, %v from env config, %v", k, err) } } } // S3 Regional Endpoint variable for _, k := range s3UsEast1RegionalEndpoint { if v := os.Getenv(k); len(v) != 0 { cfg.S3UsEast1RegionalEndpoint, err = endpoints.GetS3UsEast1RegionalEndpoint(v) if err != nil { return cfg, fmt.Errorf("failed to load, %v from env config, %v", k, err) } } } var s3UseARNRegion string setFromEnvVal(&s3UseARNRegion, s3UseARNRegionEnvKey) if len(s3UseARNRegion) != 0 { switch { case strings.EqualFold(s3UseARNRegion, "false"): cfg.S3UseARNRegion = false case strings.EqualFold(s3UseARNRegion, "true"): cfg.S3UseARNRegion = true default: return envConfig{}, fmt.Errorf( "invalid value for environment variable, %s=%s, need true or false", s3UseARNRegionEnvKey[0], s3UseARNRegion) } } setFromEnvVal(&cfg.EC2IMDSEndpoint, ec2IMDSEndpointEnvKey) if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, ec2IMDSEndpointModeEnvKey); err != nil { return envConfig{}, err } setBoolPtrFromEnvVal(&cfg.EC2IMDSv1Disabled, ec2MetadataV1DisabledEnvKey) if err := setUseDualStackEndpointFromEnvVal(&cfg.UseDualStackEndpoint, awsUseDualStackEndpoint); err != nil { return cfg, err } if err := setUseFIPSEndpointFromEnvVal(&cfg.UseFIPSEndpoint, awsUseFIPSEndpoint); err != nil { return cfg, err } return cfg, nil } func setFromEnvVal(dst *string, keys []string) { for _, k := range keys { if v := os.Getenv(k); len(v) != 0 { *dst = v break } } } func setBoolPtrFromEnvVal(dst **bool, keys []string) { for _, k := range keys { value := os.Getenv(k) if len(value) == 0 { continue } switch { case strings.EqualFold(value, "false"): *dst = new(bool) **dst = false case strings.EqualFold(value, "true"): *dst = new(bool) **dst = true } } } func setEC2IMDSEndpointMode(mode *endpoints.EC2IMDSEndpointModeState, keys []string) error { for _, k := range keys { value := os.Getenv(k) if len(value) == 0 { continue } if err := mode.SetFromString(value); err != nil { return fmt.Errorf("invalid value for environment variable, %s=%s, %v", k, value, err) } return nil } return nil } func setUseDualStackEndpointFromEnvVal(dst *endpoints.DualStackEndpointState, keys []string) error { for _, k := range keys { value := os.Getenv(k) if len(value) == 0 { continue // skip if empty } switch { case strings.EqualFold(value, "true"): *dst = endpoints.DualStackEndpointStateEnabled case strings.EqualFold(value, "false"): *dst = endpoints.DualStackEndpointStateDisabled default: return fmt.Errorf( "invalid value for environment variable, %s=%s, need true, false", k, value) } } return nil } func setUseFIPSEndpointFromEnvVal(dst *endpoints.FIPSEndpointState, keys []string) error { for _, k := range keys { value := os.Getenv(k) if len(value) == 0 { continue // skip if empty } switch { case strings.EqualFold(value, "true"): *dst = endpoints.FIPSEndpointStateEnabled case strings.EqualFold(value, "false"): *dst = endpoints.FIPSEndpointStateDisabled default: return fmt.Errorf( "invalid value for environment variable, %s=%s, need true, false", k, value) } } return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/session.go ================================================ package session import ( "crypto/tls" "crypto/x509" "fmt" "io" "io/ioutil" "net/http" "os" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/csm" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" ) const ( // ErrCodeSharedConfig represents an error that occurs in the shared // configuration logic ErrCodeSharedConfig = "SharedConfigErr" // ErrCodeLoadCustomCABundle error code for unable to load custom CA bundle. ErrCodeLoadCustomCABundle = "LoadCustomCABundleError" // ErrCodeLoadClientTLSCert error code for unable to load client TLS // certificate or key ErrCodeLoadClientTLSCert = "LoadClientTLSCertError" ) // ErrSharedConfigSourceCollision will be returned if a section contains both // source_profile and credential_source var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only one credential type may be specified per profile: source profile, credential source, credential process, web identity token", nil) // ErrSharedConfigECSContainerEnvVarEmpty will be returned if the environment // variables are empty and Environment was set as the credential source var ErrSharedConfigECSContainerEnvVarEmpty = awserr.New(ErrCodeSharedConfig, "EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set", nil) // ErrSharedConfigInvalidCredSource will be returned if an invalid credential source was provided var ErrSharedConfigInvalidCredSource = awserr.New(ErrCodeSharedConfig, "credential source values must be EcsContainer, Ec2InstanceMetadata, or Environment", nil) // A Session provides a central location to create service clients from and // store configurations and request handlers for those services. // // Sessions are safe to create service clients concurrently, but it is not safe // to mutate the Session concurrently. // // The Session satisfies the service client's client.ConfigProvider. type Session struct { Config *aws.Config Handlers request.Handlers options Options } // New creates a new instance of the handlers merging in the provided configs // on top of the SDK's default configurations. Once the Session is created it // can be mutated to modify the Config or Handlers. The Session is safe to be // read concurrently, but it should not be written to concurrently. // // If the AWS_SDK_LOAD_CONFIG environment is set to a truthy value, the New // method could now encounter an error when loading the configuration. When // The environment variable is set, and an error occurs, New will return a // session that will fail all requests reporting the error that occurred while // loading the session. Use NewSession to get the error when creating the // session. // // If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value // the shared config file (~/.aws/config) will also be loaded, in addition to // the shared credentials file (~/.aws/credentials). Values set in both the // shared config, and shared credentials will be taken from the shared // credentials file. // // Deprecated: Use NewSession functions to create sessions instead. NewSession // has the same functionality as New except an error can be returned when the // func is called instead of waiting to receive an error until a request is made. func New(cfgs ...*aws.Config) *Session { // load initial config from environment envCfg, envErr := loadEnvConfig() if envCfg.EnableSharedConfig { var cfg aws.Config cfg.MergeIn(cfgs...) s, err := NewSessionWithOptions(Options{ Config: cfg, SharedConfigState: SharedConfigEnable, }) if err != nil { // Old session.New expected all errors to be discovered when // a request is made, and would report the errors then. This // needs to be replicated if an error occurs while creating // the session. msg := "failed to create session with AWS_SDK_LOAD_CONFIG enabled. " + "Use session.NewSession to handle errors occurring during session creation." // Session creation failed, need to report the error and prevent // any requests from succeeding. s = &Session{Config: defaults.Config()} s.logDeprecatedNewSessionError(msg, err, cfgs) } return s } s := deprecatedNewSession(envCfg, cfgs...) if envErr != nil { msg := "failed to load env config" s.logDeprecatedNewSessionError(msg, envErr, cfgs) } if csmCfg, err := loadCSMConfig(envCfg, []string{}); err != nil { if l := s.Config.Logger; l != nil { l.Log(fmt.Sprintf("ERROR: failed to load CSM configuration, %v", err)) } } else if csmCfg.Enabled { err := enableCSM(&s.Handlers, csmCfg, s.Config.Logger) if err != nil { msg := "failed to enable CSM" s.logDeprecatedNewSessionError(msg, err, cfgs) } } return s } // NewSession returns a new Session created from SDK defaults, config files, // environment, and user provided config files. Once the Session is created // it can be mutated to modify the Config or Handlers. The Session is safe to // be read concurrently, but it should not be written to concurrently. // // If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value // the shared config file (~/.aws/config) will also be loaded in addition to // the shared credentials file (~/.aws/credentials). Values set in both the // shared config, and shared credentials will be taken from the shared // credentials file. Enabling the Shared Config will also allow the Session // to be built with retrieving credentials with AssumeRole set in the config. // // See the NewSessionWithOptions func for information on how to override or // control through code how the Session will be created, such as specifying the // config profile, and controlling if shared config is enabled or not. func NewSession(cfgs ...*aws.Config) (*Session, error) { opts := Options{} opts.Config.MergeIn(cfgs...) return NewSessionWithOptions(opts) } // SharedConfigState provides the ability to optionally override the state // of the session's creation based on the shared config being enabled or // disabled. type SharedConfigState int const ( // SharedConfigStateFromEnv does not override any state of the // AWS_SDK_LOAD_CONFIG env var. It is the default value of the // SharedConfigState type. SharedConfigStateFromEnv SharedConfigState = iota // SharedConfigDisable overrides the AWS_SDK_LOAD_CONFIG env var value // and disables the shared config functionality. SharedConfigDisable // SharedConfigEnable overrides the AWS_SDK_LOAD_CONFIG env var value // and enables the shared config functionality. SharedConfigEnable ) // Options provides the means to control how a Session is created and what // configuration values will be loaded. type Options struct { // Provides config values for the SDK to use when creating service clients // and making API requests to services. Any value set in with this field // will override the associated value provided by the SDK defaults, // environment or config files where relevant. // // If not set, configuration values from from SDK defaults, environment, // config will be used. Config aws.Config // Overrides the config profile the Session should be created from. If not // set the value of the environment variable will be loaded (AWS_PROFILE, // or AWS_DEFAULT_PROFILE if the Shared Config is enabled). // // If not set and environment variables are not set the "default" // (DefaultSharedConfigProfile) will be used as the profile to load the // session config from. Profile string // Instructs how the Session will be created based on the AWS_SDK_LOAD_CONFIG // environment variable. By default a Session will be created using the // value provided by the AWS_SDK_LOAD_CONFIG environment variable. // // Setting this value to SharedConfigEnable or SharedConfigDisable // will allow you to override the AWS_SDK_LOAD_CONFIG environment variable // and enable or disable the shared config functionality. SharedConfigState SharedConfigState // Ordered list of files the session will load configuration from. // It will override environment variable AWS_SHARED_CREDENTIALS_FILE, AWS_CONFIG_FILE. SharedConfigFiles []string // When the SDK's shared config is configured to assume a role with MFA // this option is required in order to provide the mechanism that will // retrieve the MFA token. There is no default value for this field. If // it is not set an error will be returned when creating the session. // // This token provider will be called when ever the assumed role's // credentials need to be refreshed. Within the context of service clients // all sharing the same session the SDK will ensure calls to the token // provider are atomic. When sharing a token provider across multiple // sessions additional synchronization logic is needed to ensure the // token providers do not introduce race conditions. It is recommend to // share the session where possible. // // stscreds.StdinTokenProvider is a basic implementation that will prompt // from stdin for the MFA token code. // // This field is only used if the shared configuration is enabled, and // the config enables assume role with MFA via the mfa_serial field. AssumeRoleTokenProvider func() (string, error) // When the SDK's shared config is configured to assume a role this option // may be provided to set the expiry duration of the STS credentials. // Defaults to 15 minutes if not set as documented in the // stscreds.AssumeRoleProvider. AssumeRoleDuration time.Duration // Reader for a custom Credentials Authority (CA) bundle in PEM format that // the SDK will use instead of the default system's root CA bundle. Use this // only if you want to replace the CA bundle the SDK uses for TLS requests. // // HTTP Client's Transport concrete implementation must be a http.Transport // or creating the session will fail. // // If the Transport's TLS config is set this option will cause the SDK // to overwrite the Transport's TLS config's RootCAs value. If the CA // bundle reader contains multiple certificates all of them will be loaded. // // Can also be specified via the environment variable: // // AWS_CA_BUNDLE=$HOME/ca_bundle // // Can also be specified via the shared config field: // // ca_bundle = $HOME/ca_bundle CustomCABundle io.Reader // Reader for the TLC client certificate that should be used by the SDK's // HTTP transport when making requests. The certificate must be paired with // a TLS client key file. Will be ignored if both are not provided. // // HTTP Client's Transport concrete implementation must be a http.Transport // or creating the session will fail. // // Can also be specified via the environment variable: // // AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert ClientTLSCert io.Reader // Reader for the TLC client key that should be used by the SDK's HTTP // transport when making requests. The key must be paired with a TLS client // certificate file. Will be ignored if both are not provided. // // HTTP Client's Transport concrete implementation must be a http.Transport // or creating the session will fail. // // Can also be specified via the environment variable: // // AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key ClientTLSKey io.Reader // The handlers that the session and all API clients will be created with. // This must be a complete set of handlers. Use the defaults.Handlers() // function to initialize this value before changing the handlers to be // used by the SDK. Handlers request.Handlers // Allows specifying a custom endpoint to be used by the EC2 IMDS client // when making requests to the EC2 IMDS API. The endpoint value should // include the URI scheme. If the scheme is not present it will be defaulted to http. // // If unset, will the EC2 IMDS client will use its default endpoint. // // Can also be specified via the environment variable, // AWS_EC2_METADATA_SERVICE_ENDPOINT. // // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://169.254.169.254 // // If using an URL with an IPv6 address literal, the IPv6 address // component must be enclosed in square brackets. // // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1] EC2IMDSEndpoint string // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) // // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6 EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState // Specifies options for creating credential providers. // These are only used if the aws.Config does not already // include credentials. CredentialsProviderOptions *CredentialsProviderOptions } // NewSessionWithOptions returns a new Session created from SDK defaults, config files, // environment, and user provided config files. This func uses the Options // values to configure how the Session is created. // // If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value // the shared config file (~/.aws/config) will also be loaded in addition to // the shared credentials file (~/.aws/credentials). Values set in both the // shared config, and shared credentials will be taken from the shared // credentials file. Enabling the Shared Config will also allow the Session // to be built with retrieving credentials with AssumeRole set in the config. // // // Equivalent to session.New // sess := session.Must(session.NewSessionWithOptions(session.Options{})) // // // Specify profile to load for the session's config // sess := session.Must(session.NewSessionWithOptions(session.Options{ // Profile: "profile_name", // })) // // // Specify profile for config and region for requests // sess := session.Must(session.NewSessionWithOptions(session.Options{ // Config: aws.Config{Region: aws.String("us-east-1")}, // Profile: "profile_name", // })) // // // Force enable Shared Config support // sess := session.Must(session.NewSessionWithOptions(session.Options{ // SharedConfigState: session.SharedConfigEnable, // })) func NewSessionWithOptions(opts Options) (*Session, error) { var envCfg envConfig var err error if opts.SharedConfigState == SharedConfigEnable { envCfg, err = loadSharedEnvConfig() if err != nil { return nil, fmt.Errorf("failed to load shared config, %v", err) } } else { envCfg, err = loadEnvConfig() if err != nil { return nil, fmt.Errorf("failed to load environment config, %v", err) } } if len(opts.Profile) != 0 { envCfg.Profile = opts.Profile } switch opts.SharedConfigState { case SharedConfigDisable: envCfg.EnableSharedConfig = false case SharedConfigEnable: envCfg.EnableSharedConfig = true } return newSession(opts, envCfg, &opts.Config) } // Must is a helper function to ensure the Session is valid and there was no // error when calling a NewSession function. // // This helper is intended to be used in variable initialization to load the // Session and configuration at startup. Such as: // // var sess = session.Must(session.NewSession()) func Must(sess *Session, err error) *Session { if err != nil { panic(err) } return sess } // Wraps the endpoint resolver with a resolver that will return a custom // endpoint for EC2 IMDS. func wrapEC2IMDSEndpoint(resolver endpoints.Resolver, endpoint string, mode endpoints.EC2IMDSEndpointModeState) endpoints.Resolver { return endpoints.ResolverFunc( func(service, region string, opts ...func(*endpoints.Options)) ( endpoints.ResolvedEndpoint, error, ) { if service == ec2MetadataServiceID && len(endpoint) > 0 { return endpoints.ResolvedEndpoint{ URL: endpoint, SigningName: ec2MetadataServiceID, SigningRegion: region, }, nil } else if service == ec2MetadataServiceID { opts = append(opts, func(o *endpoints.Options) { o.EC2MetadataEndpointMode = mode }) } return resolver.EndpointFor(service, region, opts...) }) } func deprecatedNewSession(envCfg envConfig, cfgs ...*aws.Config) *Session { cfg := defaults.Config() handlers := defaults.Handlers() // Apply the passed in configs so the configuration can be applied to the // default credential chain cfg.MergeIn(cfgs...) if cfg.EndpointResolver == nil { // An endpoint resolver is required for a session to be able to provide // endpoints for service client configurations. cfg.EndpointResolver = endpoints.DefaultResolver() } if !(len(envCfg.EC2IMDSEndpoint) == 0 && envCfg.EC2IMDSEndpointMode == endpoints.EC2IMDSEndpointModeStateUnset) { cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, envCfg.EC2IMDSEndpoint, envCfg.EC2IMDSEndpointMode) } cfg.Credentials = defaults.CredChain(cfg, handlers) // Reapply any passed in configs to override credentials if set cfg.MergeIn(cfgs...) s := &Session{ Config: cfg, Handlers: handlers, options: Options{ EC2IMDSEndpoint: envCfg.EC2IMDSEndpoint, }, } initHandlers(s) return s } func enableCSM(handlers *request.Handlers, cfg csmConfig, logger aws.Logger) error { if logger != nil { logger.Log("Enabling CSM") } r, err := csm.Start(cfg.ClientID, csm.AddressWithDefaults(cfg.Host, cfg.Port)) if err != nil { return err } r.InjectHandlers(handlers) return nil } func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, error) { cfg := defaults.Config() handlers := opts.Handlers if handlers.IsEmpty() { handlers = defaults.Handlers() } // Get a merged version of the user provided config to determine if // credentials were. userCfg := &aws.Config{} userCfg.MergeIn(cfgs...) cfg.MergeIn(userCfg) // Ordered config files will be loaded in with later files overwriting // previous config file values. var cfgFiles []string if opts.SharedConfigFiles != nil { cfgFiles = opts.SharedConfigFiles } else { cfgFiles = []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile} if !envCfg.EnableSharedConfig { // The shared config file (~/.aws/config) is only loaded if instructed // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG). cfgFiles = cfgFiles[1:] } } // Load additional config from file(s) sharedCfg, err := loadSharedConfig(envCfg.Profile, cfgFiles, envCfg.EnableSharedConfig) if err != nil { if len(envCfg.Profile) == 0 && !envCfg.EnableSharedConfig && (envCfg.Creds.HasKeys() || userCfg.Credentials != nil) { // Special case where the user has not explicitly specified an AWS_PROFILE, // or session.Options.profile, shared config is not enabled, and the // environment has credentials, allow the shared config file to fail to // load since the user has already provided credentials, and nothing else // is required to be read file. Github(aws/aws-sdk-go#2455) } else if _, ok := err.(SharedConfigProfileNotExistsError); !ok { return nil, err } } if err := mergeConfigSrcs(cfg, userCfg, envCfg, sharedCfg, handlers, opts); err != nil { return nil, err } if err := setTLSOptions(&opts, cfg, envCfg, sharedCfg); err != nil { return nil, err } s := &Session{ Config: cfg, Handlers: handlers, options: opts, } initHandlers(s) if csmCfg, err := loadCSMConfig(envCfg, cfgFiles); err != nil { if l := s.Config.Logger; l != nil { l.Log(fmt.Sprintf("ERROR: failed to load CSM configuration, %v", err)) } } else if csmCfg.Enabled { err = enableCSM(&s.Handlers, csmCfg, s.Config.Logger) if err != nil { return nil, err } } return s, nil } type csmConfig struct { Enabled bool Host string Port string ClientID string } var csmProfileName = "aws_csm" func loadCSMConfig(envCfg envConfig, cfgFiles []string) (csmConfig, error) { if envCfg.CSMEnabled != nil { if *envCfg.CSMEnabled { return csmConfig{ Enabled: true, ClientID: envCfg.CSMClientID, Host: envCfg.CSMHost, Port: envCfg.CSMPort, }, nil } return csmConfig{}, nil } sharedCfg, err := loadSharedConfig(csmProfileName, cfgFiles, false) if err != nil { if _, ok := err.(SharedConfigProfileNotExistsError); !ok { return csmConfig{}, err } } if sharedCfg.CSMEnabled != nil && *sharedCfg.CSMEnabled == true { return csmConfig{ Enabled: true, ClientID: sharedCfg.CSMClientID, Host: sharedCfg.CSMHost, Port: sharedCfg.CSMPort, }, nil } return csmConfig{}, nil } func setTLSOptions(opts *Options, cfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig) error { // CA Bundle can be specified in both environment variable shared config file. var caBundleFilename = envCfg.CustomCABundle if len(caBundleFilename) == 0 { caBundleFilename = sharedCfg.CustomCABundle } // Only use environment value if session option is not provided. customTLSOptions := map[string]struct { filename string field *io.Reader errCode string }{ "custom CA bundle PEM": {filename: caBundleFilename, field: &opts.CustomCABundle, errCode: ErrCodeLoadCustomCABundle}, "custom client TLS cert": {filename: envCfg.ClientTLSCert, field: &opts.ClientTLSCert, errCode: ErrCodeLoadClientTLSCert}, "custom client TLS key": {filename: envCfg.ClientTLSKey, field: &opts.ClientTLSKey, errCode: ErrCodeLoadClientTLSCert}, } for name, v := range customTLSOptions { if len(v.filename) != 0 && *v.field == nil { f, err := os.Open(v.filename) if err != nil { return awserr.New(v.errCode, fmt.Sprintf("failed to open %s file", name), err) } defer f.Close() *v.field = f } } // Setup HTTP client with custom cert bundle if enabled if opts.CustomCABundle != nil { if err := loadCustomCABundle(cfg.HTTPClient, opts.CustomCABundle); err != nil { return err } } // Setup HTTP client TLS certificate and key for client TLS authentication. if opts.ClientTLSCert != nil && opts.ClientTLSKey != nil { if err := loadClientTLSCert(cfg.HTTPClient, opts.ClientTLSCert, opts.ClientTLSKey); err != nil { return err } } else if opts.ClientTLSCert == nil && opts.ClientTLSKey == nil { // Do nothing if neither values are available. } else { return awserr.New(ErrCodeLoadClientTLSCert, fmt.Sprintf("client TLS cert(%t) and key(%t) must both be provided", opts.ClientTLSCert != nil, opts.ClientTLSKey != nil), nil) } return nil } func getHTTPTransport(client *http.Client) (*http.Transport, error) { var t *http.Transport switch v := client.Transport.(type) { case *http.Transport: t = v default: if client.Transport != nil { return nil, fmt.Errorf("unsupported transport, %T", client.Transport) } } if t == nil { // Nil transport implies `http.DefaultTransport` should be used. Since // the SDK cannot modify, nor copy the `DefaultTransport` specifying // the values the next closest behavior. t = getCustomTransport() } return t, nil } func loadCustomCABundle(client *http.Client, bundle io.Reader) error { t, err := getHTTPTransport(client) if err != nil { return awserr.New(ErrCodeLoadCustomCABundle, "unable to load custom CA bundle, HTTPClient's transport unsupported type", err) } p, err := loadCertPool(bundle) if err != nil { return err } if t.TLSClientConfig == nil { t.TLSClientConfig = &tls.Config{} } t.TLSClientConfig.RootCAs = p client.Transport = t return nil } func loadCertPool(r io.Reader) (*x509.CertPool, error) { b, err := ioutil.ReadAll(r) if err != nil { return nil, awserr.New(ErrCodeLoadCustomCABundle, "failed to read custom CA bundle PEM file", err) } p := x509.NewCertPool() if !p.AppendCertsFromPEM(b) { return nil, awserr.New(ErrCodeLoadCustomCABundle, "failed to load custom CA bundle PEM file", err) } return p, nil } func loadClientTLSCert(client *http.Client, certFile, keyFile io.Reader) error { t, err := getHTTPTransport(client) if err != nil { return awserr.New(ErrCodeLoadClientTLSCert, "unable to get usable HTTP transport from client", err) } cert, err := ioutil.ReadAll(certFile) if err != nil { return awserr.New(ErrCodeLoadClientTLSCert, "unable to get read client TLS cert file", err) } key, err := ioutil.ReadAll(keyFile) if err != nil { return awserr.New(ErrCodeLoadClientTLSCert, "unable to get read client TLS key file", err) } clientCert, err := tls.X509KeyPair(cert, key) if err != nil { return awserr.New(ErrCodeLoadClientTLSCert, "unable to load x509 key pair from client cert", err) } tlsCfg := t.TLSClientConfig if tlsCfg == nil { tlsCfg = &tls.Config{} } tlsCfg.Certificates = append(tlsCfg.Certificates, clientCert) t.TLSClientConfig = tlsCfg client.Transport = t return nil } func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers, sessOpts Options, ) error { // Region if not already set by user if len(aws.StringValue(cfg.Region)) == 0 { if len(envCfg.Region) > 0 { cfg.WithRegion(envCfg.Region) } else if envCfg.EnableSharedConfig && len(sharedCfg.Region) > 0 { cfg.WithRegion(sharedCfg.Region) } } if cfg.EnableEndpointDiscovery == nil { if envCfg.EnableEndpointDiscovery != nil { cfg.WithEndpointDiscovery(*envCfg.EnableEndpointDiscovery) } else if envCfg.EnableSharedConfig && sharedCfg.EnableEndpointDiscovery != nil { cfg.WithEndpointDiscovery(*sharedCfg.EnableEndpointDiscovery) } } // Regional Endpoint flag for STS endpoint resolving mergeSTSRegionalEndpointConfig(cfg, []endpoints.STSRegionalEndpoint{ userCfg.STSRegionalEndpoint, envCfg.STSRegionalEndpoint, sharedCfg.STSRegionalEndpoint, endpoints.LegacySTSEndpoint, }) // Regional Endpoint flag for S3 endpoint resolving mergeS3UsEast1RegionalEndpointConfig(cfg, []endpoints.S3UsEast1RegionalEndpoint{ userCfg.S3UsEast1RegionalEndpoint, envCfg.S3UsEast1RegionalEndpoint, sharedCfg.S3UsEast1RegionalEndpoint, endpoints.LegacyS3UsEast1Endpoint, }) var ec2IMDSEndpoint string for _, v := range []string{ sessOpts.EC2IMDSEndpoint, envCfg.EC2IMDSEndpoint, sharedCfg.EC2IMDSEndpoint, } { if len(v) != 0 { ec2IMDSEndpoint = v break } } var endpointMode endpoints.EC2IMDSEndpointModeState for _, v := range []endpoints.EC2IMDSEndpointModeState{ sessOpts.EC2IMDSEndpointMode, envCfg.EC2IMDSEndpointMode, sharedCfg.EC2IMDSEndpointMode, } { if v != endpoints.EC2IMDSEndpointModeStateUnset { endpointMode = v break } } if len(ec2IMDSEndpoint) != 0 || endpointMode != endpoints.EC2IMDSEndpointModeStateUnset { cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, ec2IMDSEndpoint, endpointMode) } cfg.EC2MetadataEnableFallback = userCfg.EC2MetadataEnableFallback if cfg.EC2MetadataEnableFallback == nil && envCfg.EC2IMDSv1Disabled != nil { cfg.EC2MetadataEnableFallback = aws.Bool(!*envCfg.EC2IMDSv1Disabled) } if cfg.EC2MetadataEnableFallback == nil && sharedCfg.EC2IMDSv1Disabled != nil { cfg.EC2MetadataEnableFallback = aws.Bool(!*sharedCfg.EC2IMDSv1Disabled) } cfg.S3UseARNRegion = userCfg.S3UseARNRegion if cfg.S3UseARNRegion == nil { cfg.S3UseARNRegion = &envCfg.S3UseARNRegion } if cfg.S3UseARNRegion == nil { cfg.S3UseARNRegion = &sharedCfg.S3UseARNRegion } for _, v := range []endpoints.DualStackEndpointState{userCfg.UseDualStackEndpoint, envCfg.UseDualStackEndpoint, sharedCfg.UseDualStackEndpoint} { if v != endpoints.DualStackEndpointStateUnset { cfg.UseDualStackEndpoint = v break } } for _, v := range []endpoints.FIPSEndpointState{userCfg.UseFIPSEndpoint, envCfg.UseFIPSEndpoint, sharedCfg.UseFIPSEndpoint} { if v != endpoints.FIPSEndpointStateUnset { cfg.UseFIPSEndpoint = v break } } // Configure credentials if not already set by the user when creating the Session. // Credentials are resolved last such that all _resolved_ config values are propagated to credential providers. // ticket: P83606045 if cfg.Credentials == credentials.AnonymousCredentials && userCfg.Credentials == nil { creds, err := resolveCredentials(cfg, envCfg, sharedCfg, handlers, sessOpts) if err != nil { return err } cfg.Credentials = creds } return nil } func mergeSTSRegionalEndpointConfig(cfg *aws.Config, values []endpoints.STSRegionalEndpoint) { for _, v := range values { if v != endpoints.UnsetSTSEndpoint { cfg.STSRegionalEndpoint = v break } } } func mergeS3UsEast1RegionalEndpointConfig(cfg *aws.Config, values []endpoints.S3UsEast1RegionalEndpoint) { for _, v := range values { if v != endpoints.UnsetS3UsEast1Endpoint { cfg.S3UsEast1RegionalEndpoint = v break } } } func initHandlers(s *Session) { // Add the Validate parameter handler if it is not disabled. s.Handlers.Validate.Remove(corehandlers.ValidateParametersHandler) if !aws.BoolValue(s.Config.DisableParamValidation) { s.Handlers.Validate.PushBackNamed(corehandlers.ValidateParametersHandler) } } // Copy creates and returns a copy of the current Session, copying the config // and handlers. If any additional configs are provided they will be merged // on top of the Session's copied config. // // // Create a copy of the current Session, configured for the us-west-2 region. // sess.Copy(&aws.Config{Region: aws.String("us-west-2")}) func (s *Session) Copy(cfgs ...*aws.Config) *Session { newSession := &Session{ Config: s.Config.Copy(cfgs...), Handlers: s.Handlers.Copy(), options: s.options, } initHandlers(newSession) return newSession } // ClientConfig satisfies the client.ConfigProvider interface and is used to // configure the service client instances. Passing the Session to the service // client's constructor (New) will use this method to configure the client. func (s *Session) ClientConfig(service string, cfgs ...*aws.Config) client.Config { s = s.Copy(cfgs...) resolvedRegion := normalizeRegion(s.Config) region := aws.StringValue(s.Config.Region) resolved, err := s.resolveEndpoint(service, region, resolvedRegion, s.Config) if err != nil { s.Handlers.Validate.PushBack(func(r *request.Request) { if len(r.ClientInfo.Endpoint) != 0 { // Error occurred while resolving endpoint, but the request // being invoked has had an endpoint specified after the client // was created. return } r.Error = err }) } return client.Config{ Config: s.Config, Handlers: s.Handlers, PartitionID: resolved.PartitionID, Endpoint: resolved.URL, SigningRegion: resolved.SigningRegion, SigningNameDerived: resolved.SigningNameDerived, SigningName: resolved.SigningName, ResolvedRegion: resolvedRegion, } } const ec2MetadataServiceID = "ec2metadata" func (s *Session) resolveEndpoint(service, region, resolvedRegion string, cfg *aws.Config) (endpoints.ResolvedEndpoint, error) { if ep := aws.StringValue(cfg.Endpoint); len(ep) != 0 { return endpoints.ResolvedEndpoint{ URL: endpoints.AddScheme(ep, aws.BoolValue(cfg.DisableSSL)), SigningRegion: region, }, nil } resolved, err := cfg.EndpointResolver.EndpointFor(service, region, func(opt *endpoints.Options) { opt.DisableSSL = aws.BoolValue(cfg.DisableSSL) opt.UseDualStack = aws.BoolValue(cfg.UseDualStack) opt.UseDualStackEndpoint = cfg.UseDualStackEndpoint opt.UseFIPSEndpoint = cfg.UseFIPSEndpoint // Support for STSRegionalEndpoint where the STSRegionalEndpoint is // provided in envConfig or sharedConfig with envConfig getting // precedence. opt.STSRegionalEndpoint = cfg.STSRegionalEndpoint // Support for S3UsEast1RegionalEndpoint where the S3UsEast1RegionalEndpoint is // provided in envConfig or sharedConfig with envConfig getting // precedence. opt.S3UsEast1RegionalEndpoint = cfg.S3UsEast1RegionalEndpoint // Support the condition where the service is modeled but its // endpoint metadata is not available. opt.ResolveUnknownService = true opt.ResolvedRegion = resolvedRegion opt.Logger = cfg.Logger opt.LogDeprecated = cfg.LogLevel.Matches(aws.LogDebugWithDeprecated) }, ) if err != nil { return endpoints.ResolvedEndpoint{}, err } return resolved, nil } // ClientConfigNoResolveEndpoint is the same as ClientConfig with the exception // that the EndpointResolver will not be used to resolve the endpoint. The only // endpoint set must come from the aws.Config.Endpoint field. func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Config { s = s.Copy(cfgs...) resolvedRegion := normalizeRegion(s.Config) var resolved endpoints.ResolvedEndpoint if ep := aws.StringValue(s.Config.Endpoint); len(ep) > 0 { resolved.URL = endpoints.AddScheme(ep, aws.BoolValue(s.Config.DisableSSL)) resolved.SigningRegion = aws.StringValue(s.Config.Region) } return client.Config{ Config: s.Config, Handlers: s.Handlers, Endpoint: resolved.URL, SigningRegion: resolved.SigningRegion, SigningNameDerived: resolved.SigningNameDerived, SigningName: resolved.SigningName, ResolvedRegion: resolvedRegion, } } // logDeprecatedNewSessionError function enables error handling for session func (s *Session) logDeprecatedNewSessionError(msg string, err error, cfgs []*aws.Config) { // Session creation failed, need to report the error and prevent // any requests from succeeding. s.Config.MergeIn(cfgs...) s.Config.Logger.Log("ERROR:", msg, "Error:", err) s.Handlers.Validate.PushBack(func(r *request.Request) { r.Error = err }) } // normalizeRegion resolves / normalizes the configured region (converts pseudo fips regions), and modifies the provided // config to have the equivalent options for resolution and returns the resolved region name. func normalizeRegion(cfg *aws.Config) (resolved string) { const fipsInfix = "-fips-" const fipsPrefix = "-fips" const fipsSuffix = "fips-" region := aws.StringValue(cfg.Region) if strings.Contains(region, fipsInfix) || strings.Contains(region, fipsPrefix) || strings.Contains(region, fipsSuffix) { resolved = strings.Replace(strings.Replace(strings.Replace( region, fipsInfix, "-", -1), fipsPrefix, "", -1), fipsSuffix, "", -1) cfg.UseFIPSEndpoint = endpoints.FIPSEndpointStateEnabled } return resolved } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go ================================================ package session import ( "fmt" "strings" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/internal/ini" ) const ( // Static Credentials group accessKeyIDKey = `aws_access_key_id` // group required secretAccessKey = `aws_secret_access_key` // group required sessionTokenKey = `aws_session_token` // optional // Assume Role Credentials group roleArnKey = `role_arn` // group required sourceProfileKey = `source_profile` // group required (or credential_source) credentialSourceKey = `credential_source` // group required (or source_profile) externalIDKey = `external_id` // optional mfaSerialKey = `mfa_serial` // optional roleSessionNameKey = `role_session_name` // optional roleDurationSecondsKey = "duration_seconds" // optional // Prefix to be used for SSO sections. These are supposed to only exist in // the shared config file, not the credentials file. ssoSectionPrefix = `sso-session ` // AWS Single Sign-On (AWS SSO) group ssoSessionNameKey = "sso_session" // AWS Single Sign-On (AWS SSO) group ssoAccountIDKey = "sso_account_id" ssoRegionKey = "sso_region" ssoRoleNameKey = "sso_role_name" ssoStartURL = "sso_start_url" // CSM options csmEnabledKey = `csm_enabled` csmHostKey = `csm_host` csmPortKey = `csm_port` csmClientIDKey = `csm_client_id` // Additional Config fields regionKey = `region` // custom CA Bundle filename customCABundleKey = `ca_bundle` // endpoint discovery group enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional // External Credential Process credentialProcessKey = `credential_process` // optional // Web Identity Token File webIdentityTokenFileKey = `web_identity_token_file` // optional // Additional config fields for regional or legacy endpoints stsRegionalEndpointSharedKey = `sts_regional_endpoints` // Additional config fields for regional or legacy endpoints s3UsEast1RegionalSharedKey = `s3_us_east_1_regional_endpoint` // DefaultSharedConfigProfile is the default profile to be used when // loading configuration from the config files if another profile name // is not provided. DefaultSharedConfigProfile = `default` // S3 ARN Region Usage s3UseARNRegionKey = "s3_use_arn_region" // EC2 IMDS Endpoint Mode ec2MetadataServiceEndpointModeKey = "ec2_metadata_service_endpoint_mode" // EC2 IMDS Endpoint ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint" // ECS IMDSv1 disable fallback ec2MetadataV1DisabledKey = "ec2_metadata_v1_disabled" // Use DualStack Endpoint Resolution useDualStackEndpoint = "use_dualstack_endpoint" // Use FIPS Endpoint Resolution useFIPSEndpointKey = "use_fips_endpoint" ) // sharedConfig represents the configuration fields of the SDK config files. type sharedConfig struct { Profile string // Credentials values from the config file. Both aws_access_key_id and // aws_secret_access_key must be provided together in the same file to be // considered valid. The values will be ignored if not a complete group. // aws_session_token is an optional field that can be provided if both of // the other two fields are also provided. // // aws_access_key_id // aws_secret_access_key // aws_session_token Creds credentials.Value CredentialSource string CredentialProcess string WebIdentityTokenFile string // SSO session options SSOSessionName string SSOSession *ssoSession SSOAccountID string SSORegion string SSORoleName string SSOStartURL string RoleARN string RoleSessionName string ExternalID string MFASerial string AssumeRoleDuration *time.Duration SourceProfileName string SourceProfile *sharedConfig // Region is the region the SDK should use for looking up AWS service // endpoints and signing requests. // // region Region string // CustomCABundle is the file path to a PEM file the SDK will read and // use to configure the HTTP transport with additional CA certs that are // not present in the platforms default CA store. // // This value will be ignored if the file does not exist. // // ca_bundle CustomCABundle string // EnableEndpointDiscovery can be enabled in the shared config by setting // endpoint_discovery_enabled to true // // endpoint_discovery_enabled = true EnableEndpointDiscovery *bool // CSM Options CSMEnabled *bool CSMHost string CSMPort string CSMClientID string // Specifies the Regional Endpoint flag for the SDK to resolve the endpoint for a service // // sts_regional_endpoints = regional // This can take value as `LegacySTSEndpoint` or `RegionalSTSEndpoint` STSRegionalEndpoint endpoints.STSRegionalEndpoint // Specifies the Regional Endpoint flag for the SDK to resolve the endpoint for a service // // s3_us_east_1_regional_endpoint = regional // This can take value as `LegacyS3UsEast1Endpoint` or `RegionalS3UsEast1Endpoint` S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint // Specifies if the S3 service should allow ARNs to direct the region // the client's requests are sent to. // // s3_use_arn_region=true S3UseARNRegion bool // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) // // ec2_metadata_service_endpoint_mode=IPv6 EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode. // // ec2_metadata_service_endpoint=http://fd00:ec2::254 EC2IMDSEndpoint string // Specifies that IMDS clients should not fallback to IMDSv1 if token // requests fail. // // ec2_metadata_v1_disabled=true EC2IMDSv1Disabled *bool // Specifies that SDK clients must resolve a dual-stack endpoint for // services. // // use_dualstack_endpoint=true UseDualStackEndpoint endpoints.DualStackEndpointState // Specifies that SDK clients must resolve a FIPS endpoint for // services. // // use_fips_endpoint=true UseFIPSEndpoint endpoints.FIPSEndpointState } type sharedConfigFile struct { Filename string IniData ini.Sections } // SSOSession provides the shared configuration parameters of the sso-session // section. type ssoSession struct { Name string SSORegion string SSOStartURL string } func (s *ssoSession) setFromIniSection(section ini.Section) { updateString(&s.Name, section, ssoSessionNameKey) updateString(&s.SSORegion, section, ssoRegionKey) updateString(&s.SSOStartURL, section, ssoStartURL) } // loadSharedConfig retrieves the configuration from the list of files using // the profile provided. The order the files are listed will determine // precedence. Values in subsequent files will overwrite values defined in // earlier files. // // For example, given two files A and B. Both define credentials. If the order // of the files are A then B, B's credential values will be used instead of // A's. // // See sharedConfig.setFromFile for information how the config files // will be loaded. func loadSharedConfig(profile string, filenames []string, exOpts bool) (sharedConfig, error) { if len(profile) == 0 { profile = DefaultSharedConfigProfile } files, err := loadSharedConfigIniFiles(filenames) if err != nil { return sharedConfig{}, err } cfg := sharedConfig{} profiles := map[string]struct{}{} if err = cfg.setFromIniFiles(profiles, profile, files, exOpts); err != nil { return sharedConfig{}, err } return cfg, nil } func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) { files := make([]sharedConfigFile, 0, len(filenames)) for _, filename := range filenames { 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 } else if err != nil { return nil, SharedConfigLoadError{Filename: filename, Err: err} } files = append(files, sharedConfigFile{ Filename: filename, IniData: sections, }) } return files, nil } func (cfg *sharedConfig) setFromIniFiles(profiles map[string]struct{}, profile string, files []sharedConfigFile, exOpts bool) error { cfg.Profile = profile // Trim files from the list that don't exist. var skippedFiles int var profileNotFoundErr error for _, f := range files { if err := cfg.setFromIniFile(profile, f, exOpts); err != nil { if _, ok := err.(SharedConfigProfileNotExistsError); ok { // Ignore profiles not defined in individual files. profileNotFoundErr = err skippedFiles++ continue } return err } } if skippedFiles == len(files) { // If all files were skipped because the profile is not found, return // the original profile not found error. return profileNotFoundErr } if _, ok := profiles[profile]; ok { // if this is the second instance of the profile the Assume Role // options must be cleared because they are only valid for the // first reference of a profile. The self linked instance of the // profile only have credential provider options. cfg.clearAssumeRoleOptions() } else { // First time a profile has been seen. Assert if the credential type // requires a role ARN, the ARN is also set if err := cfg.validateCredentialsConfig(profile); err != nil { return err } } profiles[profile] = struct{}{} if err := cfg.validateCredentialType(); err != nil { return err } // Link source profiles for assume roles if len(cfg.SourceProfileName) != 0 { // Linked profile via source_profile ignore credential provider // options, the source profile must provide the credentials. cfg.clearCredentialOptions() srcCfg := &sharedConfig{} err := srcCfg.setFromIniFiles(profiles, cfg.SourceProfileName, files, exOpts) if err != nil { // SourceProfile that doesn't exist is an error in configuration. if _, ok := err.(SharedConfigProfileNotExistsError); ok { err = SharedConfigAssumeRoleError{ RoleARN: cfg.RoleARN, SourceProfile: cfg.SourceProfileName, } } return err } if !srcCfg.hasCredentials() { return SharedConfigAssumeRoleError{ RoleARN: cfg.RoleARN, SourceProfile: cfg.SourceProfileName, } } cfg.SourceProfile = srcCfg } // If the profile contains an SSO session parameter, the session MUST exist // as a section in the config file. Load the SSO session using the name // provided. If the session section is not found or incomplete an error // will be returned. if cfg.hasSSOTokenProviderConfiguration() { skippedFiles = 0 for _, f := range files { section, ok := f.IniData.GetSection(fmt.Sprintf(ssoSectionPrefix + strings.TrimSpace(cfg.SSOSessionName))) if ok { var ssoSession ssoSession ssoSession.setFromIniSection(section) ssoSession.Name = cfg.SSOSessionName cfg.SSOSession = &ssoSession break } skippedFiles++ } if skippedFiles == len(files) { // If all files were skipped because the sso session section is not found, return // the sso section not found error. return fmt.Errorf("failed to find SSO session section, %v", cfg.SSOSessionName) } } return nil } // setFromFile loads the configuration from the file using the profile // provided. A sharedConfig pointer type value is used so that multiple config // file loadings can be chained. // // Only loads complete logically grouped values, and will not set fields in cfg // for incomplete grouped values in the config. Such as credentials. For // example 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, exOpts bool) error { section, ok := file.IniData.GetSection(profile) if !ok { // Fallback to to alternate profile name: profile section, ok = file.IniData.GetSection(fmt.Sprintf("profile %s", profile)) if !ok { return SharedConfigProfileNotExistsError{Profile: profile, Err: nil} } } if exOpts { // Assume Role Parameters updateString(&cfg.RoleARN, section, roleArnKey) updateString(&cfg.ExternalID, section, externalIDKey) updateString(&cfg.MFASerial, section, mfaSerialKey) updateString(&cfg.RoleSessionName, section, roleSessionNameKey) updateString(&cfg.SourceProfileName, section, sourceProfileKey) updateString(&cfg.CredentialSource, section, credentialSourceKey) updateString(&cfg.Region, section, regionKey) updateString(&cfg.CustomCABundle, section, customCABundleKey) // we're retaining a behavioral quirk with this field that existed before // the removal of literal parsing for (aws-sdk-go-v2/#2276): // - if the key is missing, the config field will not be set // - if the key is set to a non-numeric, the config field will be set to 0 if section.Has(roleDurationSecondsKey) { var d time.Duration if v, ok := section.Int(roleDurationSecondsKey); ok { d = time.Duration(v) * time.Second } cfg.AssumeRoleDuration = &d } if v := section.String(stsRegionalEndpointSharedKey); len(v) != 0 { sre, err := endpoints.GetSTSRegionalEndpoint(v) if err != nil { return fmt.Errorf("failed to load %s from shared config, %s, %v", stsRegionalEndpointSharedKey, file.Filename, err) } cfg.STSRegionalEndpoint = sre } if v := section.String(s3UsEast1RegionalSharedKey); len(v) != 0 { sre, err := endpoints.GetS3UsEast1RegionalEndpoint(v) if err != nil { return fmt.Errorf("failed to load %s from shared config, %s, %v", s3UsEast1RegionalSharedKey, file.Filename, err) } cfg.S3UsEast1RegionalEndpoint = sre } // AWS Single Sign-On (AWS SSO) // SSO session options updateString(&cfg.SSOSessionName, section, ssoSessionNameKey) // AWS Single Sign-On (AWS SSO) updateString(&cfg.SSOAccountID, section, ssoAccountIDKey) updateString(&cfg.SSORegion, section, ssoRegionKey) updateString(&cfg.SSORoleName, section, ssoRoleNameKey) updateString(&cfg.SSOStartURL, section, ssoStartURL) if err := updateEC2MetadataServiceEndpointMode(&cfg.EC2IMDSEndpointMode, section, ec2MetadataServiceEndpointModeKey); err != nil { return fmt.Errorf("failed to load %s from shared config, %s, %v", ec2MetadataServiceEndpointModeKey, file.Filename, err) } updateString(&cfg.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey) updateBoolPtr(&cfg.EC2IMDSv1Disabled, section, ec2MetadataV1DisabledKey) updateUseDualStackEndpoint(&cfg.UseDualStackEndpoint, section, useDualStackEndpoint) updateUseFIPSEndpoint(&cfg.UseFIPSEndpoint, section, useFIPSEndpointKey) } updateString(&cfg.CredentialProcess, section, credentialProcessKey) updateString(&cfg.WebIdentityTokenFile, section, webIdentityTokenFileKey) // Shared Credentials creds := credentials.Value{ AccessKeyID: section.String(accessKeyIDKey), SecretAccessKey: section.String(secretAccessKey), SessionToken: section.String(sessionTokenKey), ProviderName: fmt.Sprintf("SharedConfigCredentials: %s", file.Filename), } if creds.HasKeys() { cfg.Creds = creds } // Endpoint discovery updateBoolPtr(&cfg.EnableEndpointDiscovery, section, enableEndpointDiscoveryKey) // CSM options updateBoolPtr(&cfg.CSMEnabled, section, csmEnabledKey) updateString(&cfg.CSMHost, section, csmHostKey) updateString(&cfg.CSMPort, section, csmPortKey) updateString(&cfg.CSMClientID, section, csmClientIDKey) updateBool(&cfg.S3UseARNRegion, section, s3UseARNRegionKey) return nil } func updateEC2MetadataServiceEndpointMode(endpointMode *endpoints.EC2IMDSEndpointModeState, section ini.Section, key string) error { if !section.Has(key) { return nil } value := section.String(key) return endpointMode.SetFromString(value) } func (cfg *sharedConfig) validateCredentialsConfig(profile string) error { if err := cfg.validateCredentialsRequireARN(profile); err != nil { return err } return nil } func (cfg *sharedConfig) validateCredentialsRequireARN(profile string) error { var credSource string switch { case len(cfg.SourceProfileName) != 0: credSource = sourceProfileKey case len(cfg.CredentialSource) != 0: credSource = credentialSourceKey case len(cfg.WebIdentityTokenFile) != 0: credSource = webIdentityTokenFileKey } if len(credSource) != 0 && len(cfg.RoleARN) == 0 { return CredentialRequiresARNError{ Type: credSource, Profile: profile, } } return nil } func (cfg *sharedConfig) validateCredentialType() error { // Only one or no credential type can be defined. if !oneOrNone( len(cfg.SourceProfileName) != 0, len(cfg.CredentialSource) != 0, len(cfg.CredentialProcess) != 0, len(cfg.WebIdentityTokenFile) != 0, ) { return ErrSharedConfigSourceCollision } return nil } func (cfg *sharedConfig) validateSSOConfiguration() error { if cfg.hasSSOTokenProviderConfiguration() { err := cfg.validateSSOTokenProviderConfiguration() if err != nil { return err } return nil } if cfg.hasLegacySSOConfiguration() { err := cfg.validateLegacySSOConfiguration() if err != nil { return err } } return nil } func (cfg *sharedConfig) hasCredentials() bool { switch { case len(cfg.SourceProfileName) != 0: case len(cfg.CredentialSource) != 0: case len(cfg.CredentialProcess) != 0: case len(cfg.WebIdentityTokenFile) != 0: case cfg.hasSSOConfiguration(): case cfg.Creds.HasKeys(): default: return false } return true } func (cfg *sharedConfig) clearCredentialOptions() { cfg.CredentialSource = "" cfg.CredentialProcess = "" cfg.WebIdentityTokenFile = "" cfg.Creds = credentials.Value{} cfg.SSOAccountID = "" cfg.SSORegion = "" cfg.SSORoleName = "" cfg.SSOStartURL = "" } func (cfg *sharedConfig) clearAssumeRoleOptions() { cfg.RoleARN = "" cfg.ExternalID = "" cfg.MFASerial = "" cfg.RoleSessionName = "" cfg.SourceProfileName = "" } func (cfg *sharedConfig) hasSSOConfiguration() bool { return cfg.hasSSOTokenProviderConfiguration() || cfg.hasLegacySSOConfiguration() } func (c *sharedConfig) hasSSOTokenProviderConfiguration() bool { return len(c.SSOSessionName) > 0 } func (c *sharedConfig) hasLegacySSOConfiguration() bool { return len(c.SSORegion) > 0 || len(c.SSOAccountID) > 0 || len(c.SSOStartURL) > 0 || len(c.SSORoleName) > 0 } func (c *sharedConfig) validateSSOTokenProviderConfiguration() error { var missing []string if len(c.SSOSessionName) == 0 { missing = append(missing, ssoSessionNameKey) } if c.SSOSession == nil { missing = append(missing, ssoSectionPrefix) } else { if len(c.SSOSession.SSORegion) == 0 { missing = append(missing, ssoRegionKey) } if len(c.SSOSession.SSOStartURL) == 0 { missing = append(missing, ssoStartURL) } } if len(missing) > 0 { return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", c.Profile, strings.Join(missing, ", ")) } if len(c.SSORegion) > 0 && c.SSORegion != c.SSOSession.SSORegion { return fmt.Errorf("%s in profile %q must match %s in %s", ssoRegionKey, c.Profile, ssoRegionKey, ssoSectionPrefix) } if len(c.SSOStartURL) > 0 && c.SSOStartURL != c.SSOSession.SSOStartURL { return fmt.Errorf("%s in profile %q must match %s in %s", ssoStartURL, c.Profile, ssoStartURL, ssoSectionPrefix) } return nil } func (c *sharedConfig) validateLegacySSOConfiguration() error { var missing []string if len(c.SSORegion) == 0 { missing = append(missing, ssoRegionKey) } if len(c.SSOStartURL) == 0 { missing = append(missing, ssoStartURL) } if len(c.SSOAccountID) == 0 { missing = append(missing, ssoAccountIDKey) } if len(c.SSORoleName) == 0 { missing = append(missing, ssoRoleNameKey) } if len(missing) > 0 { return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", c.Profile, strings.Join(missing, ", ")) } return nil } func oneOrNone(bs ...bool) bool { var count int for _, b := range bs { if b { count++ if count > 1 { return false } } } return true } // updateString will only update the dst with the value in the section key, key // is present in the section. func updateString(dst *string, section ini.Section, key string) { if !section.Has(key) { return } *dst = section.String(key) } // updateBool will only update the dst with the value in the section key, key // is present in the section. func updateBool(dst *bool, section ini.Section, key string) { if !section.Has(key) { return } // retains pre-(aws-sdk-go-v2#2276) behavior where non-bool value would resolve to false v, _ := section.Bool(key) *dst = v } // updateBoolPtr will only update the dst with the value in the section key, // key is present in the section. func updateBoolPtr(dst **bool, section ini.Section, key string) { if !section.Has(key) { return } // retains pre-(aws-sdk-go-v2#2276) behavior where non-bool value would resolve to false v, _ := section.Bool(key) *dst = new(bool) **dst = v } // SharedConfigLoadError is an error for the shared config file failed to load. type SharedConfigLoadError struct { Filename string Err error } // Code is the short id of the error. func (e SharedConfigLoadError) Code() string { return "SharedConfigLoadError" } // Message is the description of the error func (e SharedConfigLoadError) Message() string { return fmt.Sprintf("failed to load config file, %s", e.Filename) } // OrigErr is the underlying error that caused the failure. func (e SharedConfigLoadError) OrigErr() error { return e.Err } // Error satisfies the error interface. func (e SharedConfigLoadError) Error() string { return awserr.SprintError(e.Code(), e.Message(), "", e.Err) } // SharedConfigProfileNotExistsError is an error for the shared config when // the profile was not find in the config file. type SharedConfigProfileNotExistsError struct { Profile string Err error } // Code is the short id of the error. func (e SharedConfigProfileNotExistsError) Code() string { return "SharedConfigProfileNotExistsError" } // Message is the description of the error func (e SharedConfigProfileNotExistsError) Message() string { return fmt.Sprintf("failed to get profile, %s", e.Profile) } // OrigErr is the underlying error that caused the failure. func (e SharedConfigProfileNotExistsError) OrigErr() error { return e.Err } // Error satisfies the error interface. func (e SharedConfigProfileNotExistsError) Error() string { return awserr.SprintError(e.Code(), e.Message(), "", e.Err) } // SharedConfigAssumeRoleError is an error for the shared config when the // profile contains assume role information, but that information is invalid // or not complete. type SharedConfigAssumeRoleError struct { RoleARN string SourceProfile string } // Code is the short id of the error. func (e SharedConfigAssumeRoleError) Code() string { return "SharedConfigAssumeRoleError" } // Message is the description of the error func (e SharedConfigAssumeRoleError) Message() string { return fmt.Sprintf( "failed to load assume role for %s, source profile %s has no shared credentials", e.RoleARN, e.SourceProfile, ) } // OrigErr is the underlying error that caused the failure. func (e SharedConfigAssumeRoleError) OrigErr() error { return nil } // Error satisfies the error interface. func (e SharedConfigAssumeRoleError) Error() string { return awserr.SprintError(e.Code(), e.Message(), "", nil) } // CredentialRequiresARNError provides the error for shared config credentials // that are incorrectly configured in the shared config or credentials file. type CredentialRequiresARNError struct { // type of credentials that were configured. Type string // Profile name the credentials were in. Profile string } // Code is the short id of the error. func (e CredentialRequiresARNError) Code() string { return "CredentialRequiresARNError" } // Message is the description of the error func (e CredentialRequiresARNError) Message() string { return fmt.Sprintf( "credential type %s requires role_arn, profile %s", e.Type, e.Profile, ) } // OrigErr is the underlying error that caused the failure. func (e CredentialRequiresARNError) OrigErr() error { return nil } // Error satisfies the error interface. func (e CredentialRequiresARNError) Error() string { return awserr.SprintError(e.Code(), e.Message(), "", nil) } // updateEndpointDiscoveryType will only update the dst with the value in the section, if // a valid key and corresponding EndpointDiscoveryType is found. func updateUseDualStackEndpoint(dst *endpoints.DualStackEndpointState, section ini.Section, key string) { if !section.Has(key) { return } // retains pre-(aws-sdk-go-v2/#2276) behavior where non-bool value would resolve to false if v, _ := section.Bool(key); v { *dst = endpoints.DualStackEndpointStateEnabled } else { *dst = endpoints.DualStackEndpointStateDisabled } return } // updateEndpointDiscoveryType will only update the dst with the value in the section, if // a valid key and corresponding EndpointDiscoveryType is found. func updateUseFIPSEndpoint(dst *endpoints.FIPSEndpointState, section ini.Section, key string) { if !section.Has(key) { return } // retains pre-(aws-sdk-go-v2/#2276) behavior where non-bool value would resolve to false if v, _ := section.Bool(key); v { *dst = endpoints.FIPSEndpointStateEnabled } else { *dst = endpoints.FIPSEndpointStateDisabled } return } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go ================================================ package v4 import ( "github.com/aws/aws-sdk-go/internal/strings" ) // validator houses a set of rule needed for validation of a // string value type rules []rule // rule interface allows for more flexible rules and just simply // checks whether or not a value adheres to that rule type rule interface { IsValid(value string) bool } // IsValid will iterate through all rules and see if any rules // apply to the value and supports nested rules func (r rules) IsValid(value string) bool { for _, rule := range r { if rule.IsValid(value) { return true } } return false } // mapRule generic rule for maps type mapRule map[string]struct{} // IsValid for the map rule satisfies whether it exists in the map func (m mapRule) IsValid(value string) bool { _, ok := m[value] return ok } // allowList is a generic rule for allow listing type allowList struct { rule } // IsValid for allow list checks if the value is within the allow list func (w allowList) IsValid(value string) bool { return w.rule.IsValid(value) } // excludeList is a generic rule for exclude listing type excludeList struct { rule } // IsValid for exclude list checks if the value is within the exclude list func (b excludeList) IsValid(value string) bool { return !b.rule.IsValid(value) } type patterns []string // IsValid for patterns checks each pattern and returns if a match has // been found func (p patterns) IsValid(value string) bool { for _, pattern := range p { if strings.HasPrefixFold(value, pattern) { return true } } return false } // inclusiveRules rules allow for rules to depend on one another type inclusiveRules []rule // IsValid will return true if all rules are true func (r inclusiveRules) IsValid(value string) bool { for _, rule := range r { if !rule.IsValid(value) { return false } } return true } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go ================================================ package v4 // WithUnsignedPayload will enable and set the UnsignedPayload field to // true of the signer. func WithUnsignedPayload(v4 *Signer) { v4.UnsignedPayload = true } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.5.go ================================================ //go:build !go1.7 // +build !go1.7 package v4 import ( "net/http" "github.com/aws/aws-sdk-go/aws" ) func requestContext(r *http.Request) aws.Context { return aws.BackgroundContext() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.7.go ================================================ //go:build go1.7 // +build go1.7 package v4 import ( "net/http" "github.com/aws/aws-sdk-go/aws" ) func requestContext(r *http.Request) aws.Context { return r.Context() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/signer/v4/stream.go ================================================ package v4 import ( "encoding/hex" "strings" "time" "github.com/aws/aws-sdk-go/aws/credentials" ) type credentialValueProvider interface { Get() (credentials.Value, error) } // StreamSigner implements signing of event stream encoded payloads type StreamSigner struct { region string service string credentials credentialValueProvider prevSig []byte } // NewStreamSigner creates a SigV4 signer used to sign Event Stream encoded messages func NewStreamSigner(region, service string, seedSignature []byte, credentials *credentials.Credentials) *StreamSigner { return &StreamSigner{ region: region, service: service, credentials: credentials, prevSig: seedSignature, } } // GetSignature takes an event stream encoded headers and payload and returns a signature func (s *StreamSigner) GetSignature(headers, payload []byte, date time.Time) ([]byte, error) { credValue, err := s.credentials.Get() if err != nil { return nil, err } sigKey := deriveSigningKey(s.region, s.service, credValue.SecretAccessKey, date) keyPath := buildSigningScope(s.region, s.service, date) stringToSign := buildEventStreamStringToSign(headers, payload, s.prevSig, keyPath, date) signature := hmacSHA256(sigKey, []byte(stringToSign)) s.prevSig = signature return signature, nil } func buildEventStreamStringToSign(headers, payload, prevSig []byte, scope string, date time.Time) string { return strings.Join([]string{ "AWS4-HMAC-SHA256-PAYLOAD", formatTime(date), scope, hex.EncodeToString(prevSig), hex.EncodeToString(hashSHA256(headers)), hex.EncodeToString(hashSHA256(payload)), }, "\n") } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go ================================================ //go:build go1.5 // +build go1.5 package v4 import ( "net/url" "strings" ) func getURIPath(u *url.URL) string { var uri string if len(u.Opaque) > 0 { uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/") } else { uri = u.EscapedPath() } if len(uri) == 0 { uri = "/" } return uri } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go ================================================ // Package v4 implements signing for AWS V4 signer // // Provides request signing for request that need to be signed with // AWS V4 Signatures. // // # Standalone Signer // // Generally using the signer outside of the SDK should not require any additional // logic when using Go v1.5 or higher. The signer does this by taking advantage // of the URL.EscapedPath method. If your request URI requires additional escaping // you may need to use the URL.Opaque to define what the raw URI should be sent // to the service as. // // The signer will first check the URL.Opaque field, and use its value if set. // The signer does require the URL.Opaque field to be set in the form of: // // "///" // // // e.g. // "//example.com/some/path" // // The leading "//" and hostname are required or the URL.Opaque escaping will // not work correctly. // // If URL.Opaque is not set the signer will fallback to the URL.EscapedPath() // method and using the returned value. If you're using Go v1.4 you must set // URL.Opaque if the URI path needs escaping. If URL.Opaque is not set with // Go v1.5 the signer will fallback to URL.Path. // // AWS v4 signature validation requires that the canonical string's URI path // element must be the URI escaped form of the HTTP request's path. // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html // // The Go HTTP client will perform escaping automatically on the request. Some // of these escaping may cause signature validation errors because the HTTP // request differs from the URI path or query that the signature was generated. // https://golang.org/pkg/net/url/#URL.EscapedPath // // Because of this, it is recommended that when using the signer outside of the // SDK that explicitly escaping the request prior to being signed is preferable, // and will help prevent signature validation errors. This can be done by setting // the URL.Opaque or URL.RawPath. The SDK will use URL.Opaque first and then // call URL.EscapedPath() if Opaque is not set. // // If signing a request intended for HTTP2 server, and you're using Go 1.6.2 // through 1.7.4 you should use the URL.RawPath as the pre-escaped form of the // request URL. https://github.com/golang/go/issues/16847 points to a bug in // Go pre 1.8 that fails to make HTTP2 requests using absolute URL in the HTTP // message. URL.Opaque generally will force Go to make requests with absolute URL. // URL.RawPath does not do this, but RawPath must be a valid escaping of Path // or url.EscapedPath will ignore the RawPath escaping. // // Test `TestStandaloneSign` provides a complete example of using the signer // outside of the SDK and pre-escaping the URI path. package v4 import ( "crypto/hmac" "crypto/sha256" "encoding/hex" "fmt" "io" "io/ioutil" "net/http" "net/url" "sort" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/sdkio" "github.com/aws/aws-sdk-go/private/protocol/rest" ) const ( authorizationHeader = "Authorization" authHeaderSignatureElem = "Signature=" signatureQueryKey = "X-Amz-Signature" authHeaderPrefix = "AWS4-HMAC-SHA256" timeFormat = "20060102T150405Z" shortTimeFormat = "20060102" awsV4Request = "aws4_request" // emptyStringSHA256 is a SHA256 of an empty string emptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` ) var ignoredHeaders = rules{ excludeList{ mapRule{ authorizationHeader: struct{}{}, "User-Agent": struct{}{}, "X-Amzn-Trace-Id": struct{}{}, }, }, } // requiredSignedHeaders is a allow list for build canonical headers. var requiredSignedHeaders = rules{ allowList{ 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{}{}, "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{}{}, "X-Amz-Expected-Bucket-Owner": struct{}{}, "X-Amz-Grant-Full-control": struct{}{}, "X-Amz-Grant-Read": struct{}{}, "X-Amz-Grant-Read-Acp": struct{}{}, "X-Amz-Grant-Write": struct{}{}, "X-Amz-Grant-Write-Acp": struct{}{}, "X-Amz-Metadata-Directive": struct{}{}, "X-Amz-Mfa": struct{}{}, "X-Amz-Request-Payer": struct{}{}, "X-Amz-Server-Side-Encryption": struct{}{}, "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{}, "X-Amz-Server-Side-Encryption-Context": struct{}{}, "X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{}, "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{}{}, }, }, patterns{"X-Amz-Meta-"}, patterns{"X-Amz-Object-Lock-"}, } // allowedHoisting is a allow list for build query headers. The boolean value // represents whether or not it is a pattern. var allowedQueryHoisting = inclusiveRules{ excludeList{requiredSignedHeaders}, patterns{"X-Amz-"}, } // Signer applies AWS v4 signing to given request. Use this to sign requests // that need to be signed with AWS V4 Signatures. type Signer struct { // The authentication credentials the request will be signed against. // This value must be set to sign requests. Credentials *credentials.Credentials // Sets the log level the signer should use when reporting information to // the logger. If the logger is nil nothing will be logged. See // aws.LogLevelType for more information on available logging levels // // By default nothing will be logged. Debug aws.LogLevelType // The logger loging information will be written to. If there the logger // is nil, nothing will be logged. Logger aws.Logger // Disables the Signer's moving HTTP header key/value pairs from the HTTP // request header to the request's query string. This is most commonly used // with pre-signed requests preventing headers from being added to the // request's query string. DisableHeaderHoisting bool // Disables the automatic escaping of the URI path of the request for the // siganture's canonical string's path. For services that do not need additional // escaping then use this to disable the signer escaping the path. // // S3 is an example of a service that does not need additional escaping. // // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html DisableURIPathEscaping bool // Disables the automatical setting of the HTTP request's Body field with the // io.ReadSeeker passed in to the signer. This is useful if you're using a // custom wrapper around the body for the io.ReadSeeker and want to preserve // the Body value on the Request.Body. // // This does run the risk of signing a request with a body that will not be // sent in the request. Need to ensure that the underlying data of the Body // values are the same. DisableRequestBodyOverwrite bool // currentTimeFn returns the time value which represents the current time. // This value should only be used for testing. If it is nil the default // time.Now will be used. currentTimeFn func() time.Time // UnsignedPayload will prevent signing of the payload. This will only // work for services that have support for this. UnsignedPayload bool } // NewSigner returns a Signer pointer configured with the credentials and optional // option values provided. If not options are provided the Signer will use its // default configuration. func NewSigner(credentials *credentials.Credentials, options ...func(*Signer)) *Signer { v4 := &Signer{ Credentials: credentials, } for _, option := range options { option(v4) } return v4 } type signingCtx struct { ServiceName string Region string Request *http.Request Body io.ReadSeeker Query url.Values Time time.Time ExpireTime time.Duration SignedHeaderVals http.Header DisableURIPathEscaping bool credValues credentials.Value isPresign bool unsignedPayload bool bodyDigest string signedHeaders string canonicalHeaders string canonicalString string credentialString string stringToSign string signature string authorization string } // Sign signs AWS v4 requests with the provided body, service name, region the // request is made to, and time the request is signed at. The signTime allows // you to specify that a request is signed for the future, and cannot be // used until then. // // Returns a list of HTTP headers that were included in the signature or an // error if signing the request failed. Generally for signed requests this value // is not needed as the full request context will be captured by the http.Request // value. It is included for reference though. // // Sign will set the request's Body to be the `body` parameter passed in. If // the body is not already an io.ReadCloser, it will be wrapped within one. If // a `nil` body parameter passed to Sign, the request's Body field will be // also set to nil. Its important to note that this functionality will not // change the request's ContentLength of the request. // // Sign differs from Presign in that it will sign the request using HTTP // header values. This type of signing is intended for http.Request values that // will not be shared, or are shared in a way the header values on the request // will not be lost. // // The requests body is an io.ReadSeeker so the SHA256 of the body can be // generated. To bypass the signer computing the hash you can set the // "X-Amz-Content-Sha256" header with a precomputed value. The signer will // only compute the hash if the request header value is empty. func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error) { return v4.signWithBody(r, body, service, region, 0, false, signTime) } // Presign signs AWS v4 requests with the provided body, service name, region // the request is made to, and time the request is signed at. The signTime // allows you to specify that a request is signed for the future, and cannot // be used until then. // // Returns a list of HTTP headers that were included in the signature or an // error if signing the request failed. For presigned requests these headers // and their values must be included on the HTTP request when it is made. This // is helpful to know what header values need to be shared with the party the // presigned request will be distributed to. // // Presign differs from Sign in that it will sign the request using query string // instead of header values. This allows you to share the Presigned Request's // URL with third parties, or distribute it throughout your system with minimal // dependencies. // // Presign also takes an exp value which is the duration the // signed request will be valid after the signing time. This is allows you to // set when the request will expire. // // The requests body is an io.ReadSeeker so the SHA256 of the body can be // generated. To bypass the signer computing the hash you can set the // "X-Amz-Content-Sha256" header with a precomputed value. The signer will // only compute the hash if the request header value is empty. // // Presigning a S3 request will not compute the body's SHA256 hash by default. // This is done due to the general use case for S3 presigned URLs is to share // PUT/GET capabilities. If you would like to include the body's SHA256 in the // presigned request's signature you can set the "X-Amz-Content-Sha256" // HTTP header and that will be included in the request's signature. func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) { return v4.signWithBody(r, body, service, region, exp, true, signTime) } func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) { currentTimeFn := v4.currentTimeFn if currentTimeFn == nil { currentTimeFn = time.Now } ctx := &signingCtx{ Request: r, Body: body, Query: r.URL.Query(), Time: signTime, ExpireTime: exp, isPresign: isPresign, ServiceName: service, Region: region, DisableURIPathEscaping: v4.DisableURIPathEscaping, unsignedPayload: v4.UnsignedPayload, } for key := range ctx.Query { sort.Strings(ctx.Query[key]) } if ctx.isRequestSigned() { ctx.Time = currentTimeFn() ctx.handlePresignRemoval() } var err error ctx.credValues, err = v4.Credentials.GetWithContext(requestContext(r)) if err != nil { return http.Header{}, err } ctx.sanitizeHostForHeader() ctx.assignAmzQueryValues() if err := ctx.build(v4.DisableHeaderHoisting); err != nil { return nil, err } // If the request is not presigned the body should be attached to it. This // prevents the confusion of wanting to send a signed request without // the body the request was signed for attached. if !(v4.DisableRequestBodyOverwrite || ctx.isPresign) { var reader io.ReadCloser if body != nil { var ok bool if reader, ok = body.(io.ReadCloser); !ok { reader = ioutil.NopCloser(body) } } r.Body = reader } if v4.Debug.Matches(aws.LogDebugWithSigning) { v4.logSigningInfo(ctx) } return ctx.SignedHeaderVals, nil } func (ctx *signingCtx) sanitizeHostForHeader() { request.SanitizeHostForHeader(ctx.Request) } func (ctx *signingCtx) handlePresignRemoval() { if !ctx.isPresign { return } // The credentials have expired for this request. The current signing // is invalid, and needs to be request because the request will fail. ctx.removePresign() // Update the request's query string to ensure the values stays in // sync in the case retrieving the new credentials fails. ctx.Request.URL.RawQuery = ctx.Query.Encode() } func (ctx *signingCtx) assignAmzQueryValues() { if ctx.isPresign { ctx.Query.Set("X-Amz-Algorithm", authHeaderPrefix) if ctx.credValues.SessionToken != "" { ctx.Query.Set("X-Amz-Security-Token", ctx.credValues.SessionToken) } else { ctx.Query.Del("X-Amz-Security-Token") } return } if ctx.credValues.SessionToken != "" { ctx.Request.Header.Set("X-Amz-Security-Token", ctx.credValues.SessionToken) } } // SignRequestHandler is a named request handler the SDK will use to sign // service client request with using the V4 signature. var SignRequestHandler = request.NamedHandler{ Name: "v4.SignRequestHandler", Fn: SignSDKRequest, } // SignSDKRequest signs an AWS request with the V4 signature. This // request handler should only be used with the SDK's built in service client's // API operation requests. // // This function should not be used on its own, but in conjunction with // an AWS service client's API operation call. To sign a standalone request // not created by a service client's API operation method use the "Sign" or // "Presign" functions of the "Signer" type. // // If the credentials of the request's config are set to // credentials.AnonymousCredentials the request will not be signed. func SignSDKRequest(req *request.Request) { SignSDKRequestWithCurrentTime(req, time.Now) } // BuildNamedHandler will build a generic handler for signing. func BuildNamedHandler(name string, opts ...func(*Signer)) request.NamedHandler { return request.NamedHandler{ Name: name, Fn: func(req *request.Request) { SignSDKRequestWithCurrentTime(req, time.Now, opts...) }, } } // 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 { return } region := req.ClientInfo.SigningRegion if region == "" { region = aws.StringValue(req.Config.Region) } name := req.ClientInfo.SigningName if name == "" { name = req.ClientInfo.ServiceName } v4 := NewSigner(req.Config.Credentials, func(v4 *Signer) { v4.Debug = req.Config.LogLevel.Value() v4.Logger = req.Config.Logger v4.DisableHeaderHoisting = req.NotHoist v4.currentTimeFn = curTimeFn if name == "s3" { // S3 service should not have any escaping applied v4.DisableURIPathEscaping = true } // Prevents setting the HTTPRequest's Body. Since the Body could be // wrapped in a custom io.Closer that we do not want to be stompped // on top of by the signer. v4.DisableRequestBodyOverwrite = true }) for _, opt := range opts { opt(v4) } curTime := curTimeFn() signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(), name, region, req.ExpireTime, req.ExpireTime > 0, curTime, ) if err != nil { req.Error = err req.SignedHeaderVals = nil return } req.SignedHeaderVals = signedHeaders req.LastSignedAt = curTime } const logSignInfoMsg = `DEBUG: Request Signature: ---[ CANONICAL STRING ]----------------------------- %s ---[ STRING TO SIGN ]-------------------------------- %s%s -----------------------------------------------------` const logSignedURLMsg = ` ---[ SIGNED URL ]------------------------------------ %s` func (v4 *Signer) logSigningInfo(ctx *signingCtx) { signedURLMsg := "" if ctx.isPresign { signedURLMsg = fmt.Sprintf(logSignedURLMsg, ctx.Request.URL.String()) } msg := fmt.Sprintf(logSignInfoMsg, ctx.canonicalString, ctx.stringToSign, signedURLMsg) v4.Logger.Log(msg) } func (ctx *signingCtx) build(disableHeaderHoisting bool) error { ctx.buildTime() // no depends ctx.buildCredentialString() // no depends if err := ctx.buildBodyDigest(); err != nil { return err } unsignedHeaders := ctx.Request.Header if ctx.isPresign { if !disableHeaderHoisting { urlValues := url.Values{} urlValues, unsignedHeaders = buildQuery(allowedQueryHoisting, unsignedHeaders) // no depends for k := range urlValues { ctx.Query[k] = urlValues[k] } } } ctx.buildCanonicalHeaders(ignoredHeaders, unsignedHeaders) ctx.buildCanonicalString() // depends on canon headers / signed headers ctx.buildStringToSign() // depends on canon string ctx.buildSignature() // depends on string to sign if ctx.isPresign { ctx.Request.URL.RawQuery += "&" + signatureQueryKey + "=" + ctx.signature } else { parts := []string{ authHeaderPrefix + " Credential=" + ctx.credValues.AccessKeyID + "/" + ctx.credentialString, "SignedHeaders=" + ctx.signedHeaders, authHeaderSignatureElem + ctx.signature, } ctx.Request.Header.Set(authorizationHeader, strings.Join(parts, ", ")) } return nil } // GetSignedRequestSignature attempts to extract the signature of the request. // Returning an error if the request is unsigned, or unable to extract the // signature. func GetSignedRequestSignature(r *http.Request) ([]byte, error) { if auth := r.Header.Get(authorizationHeader); len(auth) != 0 { ps := strings.Split(auth, ", ") for _, p := range ps { if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 { sig := p[len(authHeaderSignatureElem):] if len(sig) == 0 { return nil, fmt.Errorf("invalid request signature authorization header") } return hex.DecodeString(sig) } } } if sig := r.URL.Query().Get("X-Amz-Signature"); len(sig) != 0 { return hex.DecodeString(sig) } return nil, fmt.Errorf("request not signed") } func (ctx *signingCtx) buildTime() { if ctx.isPresign { duration := int64(ctx.ExpireTime / time.Second) ctx.Query.Set("X-Amz-Date", formatTime(ctx.Time)) ctx.Query.Set("X-Amz-Expires", strconv.FormatInt(duration, 10)) } else { ctx.Request.Header.Set("X-Amz-Date", formatTime(ctx.Time)) } } func (ctx *signingCtx) buildCredentialString() { ctx.credentialString = buildSigningScope(ctx.Region, ctx.ServiceName, ctx.Time) if ctx.isPresign { ctx.Query.Set("X-Amz-Credential", ctx.credValues.AccessKeyID+"/"+ctx.credentialString) } } func buildQuery(r rule, header http.Header) (url.Values, http.Header) { query := url.Values{} unsignedHeaders := http.Header{} for k, h := range header { if r.IsValid(k) { query[k] = h } else { unsignedHeaders[k] = h } } return query, unsignedHeaders } func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) { var headers []string headers = append(headers, "host") for k, v := range header { if !r.IsValid(k) { continue // ignored header } if ctx.SignedHeaderVals == nil { ctx.SignedHeaderVals = make(http.Header) } lowerCaseKey := strings.ToLower(k) if _, ok := ctx.SignedHeaderVals[lowerCaseKey]; ok { // include additional values ctx.SignedHeaderVals[lowerCaseKey] = append(ctx.SignedHeaderVals[lowerCaseKey], v...) continue } headers = append(headers, lowerCaseKey) ctx.SignedHeaderVals[lowerCaseKey] = v } sort.Strings(headers) ctx.signedHeaders = strings.Join(headers, ";") if ctx.isPresign { ctx.Query.Set("X-Amz-SignedHeaders", ctx.signedHeaders) } headerItems := make([]string, len(headers)) for i, k := range headers { if k == "host" { if ctx.Request.Host != "" { headerItems[i] = "host:" + ctx.Request.Host } else { headerItems[i] = "host:" + ctx.Request.URL.Host } } else { headerValues := make([]string, len(ctx.SignedHeaderVals[k])) for i, v := range ctx.SignedHeaderVals[k] { headerValues[i] = strings.TrimSpace(v) } headerItems[i] = k + ":" + strings.Join(headerValues, ",") } } stripExcessSpaces(headerItems) ctx.canonicalHeaders = strings.Join(headerItems, "\n") } func (ctx *signingCtx) buildCanonicalString() { ctx.Request.URL.RawQuery = strings.Replace(ctx.Query.Encode(), "+", "%20", -1) uri := getURIPath(ctx.Request.URL) if !ctx.DisableURIPathEscaping { uri = rest.EscapePath(uri, false) } ctx.canonicalString = strings.Join([]string{ ctx.Request.Method, uri, ctx.Request.URL.RawQuery, ctx.canonicalHeaders + "\n", ctx.signedHeaders, ctx.bodyDigest, }, "\n") } func (ctx *signingCtx) buildStringToSign() { ctx.stringToSign = strings.Join([]string{ authHeaderPrefix, formatTime(ctx.Time), ctx.credentialString, hex.EncodeToString(hashSHA256([]byte(ctx.canonicalString))), }, "\n") } func (ctx *signingCtx) buildSignature() { creds := deriveSigningKey(ctx.Region, ctx.ServiceName, ctx.credValues.SecretAccessKey, ctx.Time) signature := hmacSHA256(creds, []byte(ctx.stringToSign)) ctx.signature = hex.EncodeToString(signature) } func (ctx *signingCtx) buildBodyDigest() error { hash := ctx.Request.Header.Get("X-Amz-Content-Sha256") if hash == "" { includeSHA256Header := ctx.unsignedPayload || ctx.ServiceName == "s3" || ctx.ServiceName == "s3-object-lambda" || ctx.ServiceName == "glacier" || ctx.ServiceName == "s3-outposts" s3Presign := ctx.isPresign && (ctx.ServiceName == "s3" || ctx.ServiceName == "s3-object-lambda") if ctx.unsignedPayload || s3Presign { hash = "UNSIGNED-PAYLOAD" includeSHA256Header = !s3Presign } else if ctx.Body == nil { hash = emptyStringSHA256 } else { if !aws.IsReaderSeekable(ctx.Body) { return fmt.Errorf("cannot use unseekable request body %T, for signed request with body", ctx.Body) } hashBytes, err := makeSha256Reader(ctx.Body) if err != nil { return err } hash = hex.EncodeToString(hashBytes) } if includeSHA256Header { ctx.Request.Header.Set("X-Amz-Content-Sha256", hash) } } ctx.bodyDigest = hash return nil } // isRequestSigned returns if the request is currently signed or presigned func (ctx *signingCtx) isRequestSigned() bool { if ctx.isPresign && ctx.Query.Get("X-Amz-Signature") != "" { return true } if ctx.Request.Header.Get("Authorization") != "" { return true } return false } // unsign removes signing flags for both signed and presigned requests. func (ctx *signingCtx) removePresign() { ctx.Query.Del("X-Amz-Algorithm") ctx.Query.Del("X-Amz-Signature") ctx.Query.Del("X-Amz-Security-Token") ctx.Query.Del("X-Amz-Date") ctx.Query.Del("X-Amz-Expires") ctx.Query.Del("X-Amz-Credential") ctx.Query.Del("X-Amz-SignedHeaders") } func hmacSHA256(key []byte, data []byte) []byte { hash := hmac.New(sha256.New, key) hash.Write(data) return hash.Sum(nil) } func hashSHA256(data []byte) []byte { hash := sha256.New() hash.Write(data) return hash.Sum(nil) } func makeSha256Reader(reader io.ReadSeeker) (hashBytes []byte, err error) { hash := sha256.New() start, err := reader.Seek(0, sdkio.SeekCurrent) if err != nil { return nil, err } defer func() { // ensure error is return if unable to seek back to start of payload. _, err = reader.Seek(start, sdkio.SeekStart) }() // Use CopyN to avoid allocating the 32KB buffer in io.Copy for bodies // smaller than 32KB. Fall back to io.Copy if we fail to determine the size. size, err := aws.SeekerLen(reader) if err != nil { io.Copy(hash, reader) } else { io.CopyN(hash, reader, size) } return hash.Sum(nil), nil } const doubleSpace = " " // stripExcessSpaces will rewrite the passed in slice's string values to not // contain multiple side-by-side spaces. func stripExcessSpaces(vals []string) { var j, k, l, m, spaces int for i, str := range vals { // Trim trailing spaces for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- { } // Trim leading spaces for k = 0; k < j && str[k] == ' '; k++ { } str = str[k : j+1] // Strip multiple spaces. j = strings.Index(str, doubleSpace) if j < 0 { vals[i] = str continue } buf := []byte(str) for k, m, l = j, j, len(buf); k < l; k++ { if buf[k] == ' ' { if spaces == 0 { // First space. buf[m] = buf[k] m++ } spaces++ } else { // End of multiple spaces. spaces = 0 buf[m] = buf[k] m++ } } vals[i] = string(buf[:m]) } } func buildSigningScope(region, service string, dt time.Time) string { return strings.Join([]string{ formatShortTime(dt), region, service, awsV4Request, }, "/") } func deriveSigningKey(region, service, secretKey string, dt time.Time) []byte { kDate := hmacSHA256([]byte("AWS4"+secretKey), []byte(formatShortTime(dt))) kRegion := hmacSHA256(kDate, []byte(region)) kService := hmacSHA256(kRegion, []byte(service)) signingKey := hmacSHA256(kService, []byte(awsV4Request)) return signingKey } func formatShortTime(dt time.Time) string { return dt.UTC().Format(shortTimeFormat) } func formatTime(dt time.Time) string { return dt.UTC().Format(timeFormat) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/types.go ================================================ package aws import ( "io" "strings" "sync" "github.com/aws/aws-sdk-go/internal/sdkio" ) // ReadSeekCloser wraps a io.Reader returning a ReaderSeekerCloser. Allows the // SDK to accept an io.Reader that is not also an io.Seeker for unsigned // streaming payload API operations. // // A ReadSeekCloser wrapping an nonseekable io.Reader used in an API // operation's input will prevent that operation being retried in the case of // network errors, and cause operation requests to fail if the operation // requires payload signing. // // Note: If using With S3 PutObject to stream an object upload The SDK's S3 // Upload manager (s3manager.Uploader) provides support for streaming with the // ability to retry network errors. func ReadSeekCloser(r io.Reader) ReaderSeekerCloser { return ReaderSeekerCloser{r} } // ReaderSeekerCloser represents a reader that can also delegate io.Seeker and // io.Closer interfaces to the underlying object if they are available. type ReaderSeekerCloser struct { r io.Reader } // IsReaderSeekable returns if the underlying reader type can be seeked. A // io.Reader might not actually be seekable if it is the ReaderSeekerCloser // type. func IsReaderSeekable(r io.Reader) bool { switch v := r.(type) { case ReaderSeekerCloser: return v.IsSeeker() case *ReaderSeekerCloser: return v.IsSeeker() case io.ReadSeeker: return true default: return false } } // Read reads from the reader up to size of p. The number of bytes read, and // error if it occurred will be returned. // // If the reader is not an io.Reader zero bytes read, and nil error will be // returned. // // Performs the same functionality as io.Reader Read func (r ReaderSeekerCloser) Read(p []byte) (int, error) { switch t := r.r.(type) { case io.Reader: return t.Read(p) } return 0, nil } // Seek sets the offset for the next Read to offset, interpreted according to // whence: 0 means relative to the origin of the file, 1 means relative to the // current offset, and 2 means relative to the end. Seek returns the new offset // and an error, if any. // // If the ReaderSeekerCloser is not an io.Seeker nothing will be done. func (r ReaderSeekerCloser) Seek(offset int64, whence int) (int64, error) { switch t := r.r.(type) { case io.Seeker: return t.Seek(offset, whence) } return int64(0), nil } // IsSeeker returns if the underlying reader is also a seeker. func (r ReaderSeekerCloser) IsSeeker() bool { _, ok := r.r.(io.Seeker) return ok } // HasLen returns the length of the underlying reader if the value implements // the Len() int method. func (r ReaderSeekerCloser) HasLen() (int, bool) { type lenner interface { Len() int } if lr, ok := r.r.(lenner); ok { return lr.Len(), true } return 0, false } // GetLen returns the length of the bytes remaining in the underlying reader. // Checks first for Len(), then io.Seeker to determine the size of the // underlying reader. // // Will return -1 if the length cannot be determined. func (r ReaderSeekerCloser) GetLen() (int64, error) { if l, ok := r.HasLen(); ok { return int64(l), nil } if s, ok := r.r.(io.Seeker); ok { return seekerLen(s) } return -1, nil } // SeekerLen attempts to get the number of bytes remaining at the seeker's // current position. Returns the number of bytes remaining or error. func SeekerLen(s io.Seeker) (int64, error) { // Determine if the seeker is actually seekable. ReaderSeekerCloser // hides the fact that a io.Readers might not actually be seekable. switch v := s.(type) { case ReaderSeekerCloser: return v.GetLen() case *ReaderSeekerCloser: return v.GetLen() } return seekerLen(s) } func seekerLen(s io.Seeker) (int64, error) { curOffset, err := s.Seek(0, sdkio.SeekCurrent) if err != nil { return 0, err } endOffset, err := s.Seek(0, sdkio.SeekEnd) if err != nil { return 0, err } _, err = s.Seek(curOffset, sdkio.SeekStart) if err != nil { return 0, err } return endOffset - curOffset, nil } // Close closes the ReaderSeekerCloser. // // If the ReaderSeekerCloser is not an io.Closer nothing will be done. func (r ReaderSeekerCloser) Close() error { switch t := r.r.(type) { case io.Closer: return t.Close() } return nil } // A WriteAtBuffer provides a in memory buffer supporting the io.WriterAt interface // Can be used with the s3manager.Downloader to download content to a buffer // in memory. Safe to use concurrently. type WriteAtBuffer struct { buf []byte m sync.Mutex // GrowthCoeff defines the growth rate of the internal buffer. By // default, the growth rate is 1, where expanding the internal // buffer will allocate only enough capacity to fit the new expected // length. GrowthCoeff float64 } // NewWriteAtBuffer creates a WriteAtBuffer with an internal buffer // provided by buf. func NewWriteAtBuffer(buf []byte) *WriteAtBuffer { return &WriteAtBuffer{buf: buf} } // WriteAt writes a slice of bytes to a buffer starting at the position provided // The number of bytes written will be returned, or error. Can overwrite previous // written slices if the write ats overlap. func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error) { pLen := len(p) expLen := pos + int64(pLen) b.m.Lock() defer b.m.Unlock() if int64(len(b.buf)) < expLen { if int64(cap(b.buf)) < expLen { if b.GrowthCoeff < 1 { b.GrowthCoeff = 1 } newBuf := make([]byte, expLen, int64(b.GrowthCoeff*float64(expLen))) copy(newBuf, b.buf) b.buf = newBuf } b.buf = b.buf[:expLen] } copy(b.buf[pos:], p) return pLen, nil } // Bytes returns a slice of bytes written to the buffer. func (b *WriteAtBuffer) Bytes() []byte { b.m.Lock() defer b.m.Unlock() return b.buf } // MultiCloser is a utility to close multiple io.Closers within a single // statement. type MultiCloser []io.Closer // Close closes all of the io.Closers making up the MultiClosers. Any // errors that occur while closing will be returned in the order they // occur. func (m MultiCloser) Close() error { var errs errors for _, c := range m { err := c.Close() if err != nil { errs = append(errs, err) } } if len(errs) != 0 { return errs } return nil } type errors []error func (es errors) Error() string { var parts []string for _, e := range es { parts = append(parts, e.Error()) } return strings.Join(parts, "\n") } // CopySeekableBody copies the seekable body to an io.Writer func CopySeekableBody(dst io.Writer, src io.ReadSeeker) (int64, error) { curPos, err := src.Seek(0, sdkio.SeekCurrent) if err != nil { return 0, err } // copy errors may be assumed to be from the body. n, err := io.Copy(dst, src) if err != nil { return n, err } // seek back to the first position after reading to reset // the body for transmission. _, err = src.Seek(curPos, sdkio.SeekStart) if err != nil { return n, err } return n, nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/url.go ================================================ //go:build go1.8 // +build go1.8 package aws import "net/url" // URLHostname will extract the Hostname without port from the URL value. // // Wrapper of net/url#URL.Hostname for backwards Go version compatibility. func URLHostname(url *url.URL) string { return url.Hostname() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go ================================================ //go:build !go1.8 // +build !go1.8 package aws import ( "net/url" "strings" ) // URLHostname will extract the Hostname without port from the URL value. // // Copy of Go 1.8's net/url#URL.Hostname functionality. func URLHostname(url *url.URL) string { return stripPort(url.Host) } // stripPort is copy of Go 1.8 url#URL.Hostname functionality. // https://golang.org/src/net/url/url.go func stripPort(hostport string) string { colon := strings.IndexByte(hostport, ':') if colon == -1 { return hostport } if i := strings.IndexByte(hostport, ']'); i != -1 { return strings.TrimPrefix(hostport[:i], "[") } return hostport[:colon] } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/aws/version.go ================================================ // Package aws provides core functionality for making requests to AWS services. package aws // SDKName is the name of this AWS SDK const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK const SDKVersion = "1.48.16" ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/context/background_go1.5.go ================================================ //go:build !go1.7 // +build !go1.7 package context import "time" // An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to // provide a 1.6 and 1.5 safe version of context that is compatible with Go // 1.7's Context. // // An emptyCtx is never canceled, has no values, and has no deadline. It is not // struct{}, since vars of this type must have distinct addresses. type emptyCtx int func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { return } func (*emptyCtx) Done() <-chan struct{} { return nil } func (*emptyCtx) Err() error { return nil } func (*emptyCtx) Value(key interface{}) interface{} { return nil } func (e *emptyCtx) String() string { switch e { case BackgroundCtx: return "aws.BackgroundContext" } return "unknown empty Context" } // BackgroundCtx is the common base context. var BackgroundCtx = new(emptyCtx) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go ================================================ 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{}) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go ================================================ package ini var commaRunes = []rune(",") func isComma(b rune) bool { return b == ',' } func newCommaToken() Token { return newToken(TokenComma, commaRunes, NoneType) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go ================================================ 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go ================================================ // 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 -> section | stmt' // stmt' -> epsilon | expr // expr -> value (stmt)* | equal_expr (stmt)* // equal_expr -> value ( ':' | '=' ) equal_expr' // equal_expr' -> number | string | quoted_string // quoted_string -> " quoted_string' // quoted_string' -> string quoted_string_end // quoted_string_end -> " // // section -> [ section' // section' -> section_value section_close // section_value -> number | string_subset | boolean | quoted_string_subset // quoted_string_subset -> " quoted_string_subset' // quoted_string_subset' -> string_subset quoted_string_end // quoted_string_subset -> " // section_close -> ] // // value -> number | string_subset | boolean // string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ? // string_subset -> ? Code-points excepted by grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ? // // SkipState will skip (NL WS)+ // // comment -> # comment' | ; comment' // comment' -> epsilon | value package ini ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go ================================================ package ini // emptyToken is used to satisfy the Token interface var emptyToken = newToken(TokenNone, []rune{}, NoneType) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go ================================================ 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()) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go ================================================ //go:build gofuzz // +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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go ================================================ 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go ================================================ 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go ================================================ package ini import ( "fmt" "io" ) // ParseState represents the current state of the parser. type ParseState uint // State enums for the parse table const ( InvalidState ParseState = 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]ParseState{ ASTKindStart: { TokenLit: StatementState, TokenSep: OpenScopeState, TokenWS: SkipTokenState, TokenNL: SkipTokenState, TokenComment: CommentState, TokenNone: TerminalState, }, ASTKindCommentStatement: { TokenLit: StatementState, TokenSep: OpenScopeState, TokenWS: SkipTokenState, TokenNL: SkipTokenState, TokenComment: CommentState, TokenNone: MarkCompleteState, }, ASTKindExpr: { TokenOp: StatementPrimeState, TokenLit: ValueState, TokenSep: OpenScopeState, TokenWS: ValueState, TokenNL: SkipState, TokenComment: CommentState, TokenNone: MarkCompleteState, }, ASTKindEqualExpr: { TokenLit: ValueState, TokenSep: ValueState, TokenOp: ValueState, TokenWS: SkipTokenState, TokenNL: SkipState, TokenNone: SkipState, }, ASTKindStatement: { TokenLit: SectionState, TokenSep: CloseScopeState, TokenWS: SkipTokenState, TokenNL: SkipTokenState, TokenComment: CommentState, TokenNone: MarkCompleteState, }, ASTKindExprStatement: { TokenLit: ValueState, TokenSep: ValueState, TokenOp: ValueState, TokenWS: ValueState, TokenNL: MarkCompleteState, TokenComment: CommentState, TokenNone: TerminalState, TokenComma: SkipState, }, ASTKindSectionStatement: { TokenLit: SectionState, TokenOp: SectionState, TokenSep: CloseScopeState, TokenWS: SectionState, TokenNL: SkipTokenState, }, ASTKindCompletedSectionStatement: { TokenWS: SkipTokenState, TokenNL: SkipTokenState, TokenLit: StatementState, TokenSep: OpenScopeState, TokenComment: CommentState, TokenNone: MarkCompleteState, }, ASTKindSkipStatement: { 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 } // if should skip is true, we skip the tokens until should skip is set to false. 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. switch k.Kind { case ASTKindEqualExpr: // assigning 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 root.SetChildren(children) stack.Push(k) } case OpenScopeState: if !runeCompare(tok.Raw(), openBrace) { return nil, NewParseError("expected '['") } // If OpenScopeState is not at the start, we must mark the previous ast as complete // // for example: if previous ast was a skip statement; // we should mark it as complete before we create a new statement if k.Kind != ASTKindStart { stack.MarkComplete(k) } 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.Type())) } 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 ini expression")) } // returns a sublist which excludes the start symbol return stack.List(), nil } // trimSpaces will trim spaces on the left and right hand side of // the literal. func trimSpaces(k AST) AST { // trim left hand side of spaces for i := 0; i < len(k.Root.raw); i++ { if !isWhitespace(k.Root.raw[i]) { break } k.Root.raw = k.Root.raw[1:] i-- } // trim right hand side of spaces for i := len(k.Root.raw) - 1; i >= 0; i-- { if !isWhitespace(k.Root.raw[i]) { break } k.Root.raw = k.Root.raw[:len(k.Root.raw)-1] } return k } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go ================================================ package ini import ( "fmt" "strconv" "strings" "unicode" ) var ( runesTrue = []rune("true") runesFalse = []rune("false") ) var literalValues = [][]rune{ runesTrue, runesFalse, } func isBoolValue(b []rune) bool { for _, lv := range literalValues { if isCaselessLitValue(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 } // isCaselessLitValue is a caseless value comparison, assumes want is already lower-cased for efficiency. func isCaselessLitValue(want, have []rune) bool { if len(have) < len(want) { return false } for i := 0; i < len(want); i++ { if want[i] != unicode.ToLower(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 // deprecated IntegerType // deprecated StringType QuotedStringType BoolType // deprecated ) // Value is a union container type Value struct { Type ValueType raw []rune integer int64 // deprecated decimal float64 // deprecated boolean bool // deprecated 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 = isCaselessLitValue(runesTrue, v.raw) } // 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 { n, err = getValue(b) token = newToken(TokenLit, b[:n], StringType) } return token, n, err } // IntValue returns an integer value func (v Value) IntValue() (int64, bool) { i, err := strconv.ParseInt(string(v.raw), 0, 64) if err != nil { return 0, false } return i, true } // FloatValue returns a float value func (v Value) FloatValue() (float64, bool) { f, err := strconv.ParseFloat(string(v.raw), 64) if err != nil { return 0, false } return f, true } // BoolValue returns a bool value func (v Value) BoolValue() (bool, bool) { // we don't use ParseBool as it recognizes more than what we've // historically supported if isCaselessLitValue(runesTrue, v.raw) { return true, true } else if isCaselessLitValue(runesFalse, v.raw) { return false, true } return false, false } 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go ================================================ 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go ================================================ 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() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go ================================================ 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go ================================================ 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()) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go ================================================ 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() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go ================================================ 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go ================================================ 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 { // should skip state will be modified only if previous token was new line (NL); // and the current token is not WhiteSpace (WS). 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 } func (s *skipper) Continue() { s.shouldSkip = false // empty token is assigned as we return to default state, when should skip is false s.prevTok = emptyToken } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go ================================================ package ini // Statement is an empty AST mostly used for transitioning states. func newStatement() AST { return newAST(ASTKindStatement, AST{}) } // SectionStatement represents a section AST func newSectionStatement(tok Token) AST { return newASTWithRootToken(ASTKindSectionStatement, tok) } // ExprStatement represents a completed expression AST func newExprStatement(ast AST) AST { return newAST(ASTKindExprStatement, ast) } // CommentStatement represents a comment in the ini definition. // // grammar: // comment -> #comment' | ;comment' // comment' -> epsilon | value func newCommentStatement(tok Token) AST { return newAST(ASTKindCommentStatement, newExpression(tok)) } // CompletedSectionStatement represents a completed section func newCompletedSectionStatement(ast AST) AST { return newAST(ASTKindCompletedSectionStatement, ast) } // SkipStatement is used to skip whole statements func newSkipStatement(ast AST) AST { return newAST(ASTKindSkipStatement, ast) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go ================================================ 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 isCaselessLitValue(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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go ================================================ 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] // The right-hand value side the equality expression is allowed to contain '[', ']', ':', '=' in the values. // If the token is not either a literal or one of the token types that identifies those four additional // tokens then error. if !(rhs.Root.Type() == TokenLit || rhs.Root.Type() == TokenOp || rhs.Root.Type() == TokenSep) { return NewParseError("unexpected token type") } 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, bool) { return t.values[k].BoolValue() } // Int returns an integer value at k func (t Section) Int(k string) (int64, bool) { return t.values[k].IntValue() } // Float64 returns a float value at k func (t Section) Float64(k string) (float64, bool) { 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() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go ================================================ 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go ================================================ 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go ================================================ package sdkio const ( // Byte is 8 bits Byte int64 = 1 // KibiByte (KiB) is 1024 Bytes KibiByte = Byte * 1024 // MebiByte (MiB) is 1024 KiB MebiByte = KibiByte * 1024 // GibiByte (GiB) is 1024 MiB GibiByte = MebiByte * 1024 ) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go ================================================ //go:build !go1.7 // +build !go1.7 package sdkio // Copy of Go 1.7 io package's Seeker constants. const ( SeekStart = 0 // seek relative to the origin of the file SeekCurrent = 1 // seek relative to the current offset SeekEnd = 2 // seek relative to the end ) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go ================================================ //go:build go1.7 // +build go1.7 package sdkio import "io" // Alias for Go 1.7 io package Seeker constants const ( SeekStart = io.SeekStart // seek relative to the origin of the file SeekCurrent = io.SeekCurrent // seek relative to the current offset SeekEnd = io.SeekEnd // seek relative to the end ) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go ================================================ //go:build go1.10 // +build go1.10 package sdkmath import "math" // Round returns the nearest integer, rounding half away from zero. // // Special cases are: // Round(±0) = ±0 // Round(±Inf) = ±Inf // Round(NaN) = NaN func Round(x float64) float64 { return math.Round(x) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go ================================================ //go:build !go1.10 // +build !go1.10 package sdkmath import "math" // Copied from the Go standard library's (Go 1.12) math/floor.go for use in // Go version prior to Go 1.10. const ( uvone = 0x3FF0000000000000 mask = 0x7FF shift = 64 - 11 - 1 bias = 1023 signMask = 1 << 63 fracMask = 1<= 0.5 { // return t + Copysign(1, x) // } // return t // } bits := math.Float64bits(x) e := uint(bits>>shift) & mask if e < bias { // Round abs(x) < 1 including denormals. bits &= signMask // +-0 if e == bias-1 { bits |= uvone // +-1 } } else if e < bias+shift { // Round any abs(x) >= 1 containing a fractional component [0,1). // // Numbers with larger exponents are returned unchanged since they // must be either an integer, infinity, or NaN. const half = 1 << (shift - 1) e -= bias bits += half >> e bits &^= fracMask >> e } return math.Float64frombits(bits) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go ================================================ package sdkrand import ( "math/rand" "sync" "time" ) // lockedSource is a thread-safe implementation of rand.Source type lockedSource struct { lk sync.Mutex src rand.Source } func (r *lockedSource) Int63() (n int64) { r.lk.Lock() n = r.src.Int63() r.lk.Unlock() return } func (r *lockedSource) Seed(seed int64) { r.lk.Lock() r.src.Seed(seed) r.lk.Unlock() } // SeededRand is a new RNG using a thread safe implementation of rand.Source var SeededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())}) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go ================================================ //go:build go1.6 // +build go1.6 package sdkrand import "math/rand" // Read provides the stub for math.Rand.Read method support for go version's // 1.6 and greater. func Read(r *rand.Rand, p []byte) (int, error) { return r.Read(p) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go ================================================ //go:build !go1.6 // +build !go1.6 package sdkrand import "math/rand" // Read backfills Go 1.6's math.Rand.Reader for Go 1.5 func Read(r *rand.Rand, p []byte) (n int, err error) { // Copy of Go standard libraries math package's read function not added to // standard library until Go 1.6. var pos int8 var val int64 for n = 0; n < len(p); n++ { if pos == 0 { val = r.Int63() pos = 7 } p[n] = byte(val) val >>= 8 pos-- } return n, err } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go ================================================ package sdkuri import ( "path" "strings" ) // PathJoin will join the elements of the path delimited by the "/" // character. Similar to path.Join with the exception the trailing "/" // character is preserved if present. func PathJoin(elems ...string) string { if len(elems) == 0 { return "" } hasTrailing := strings.HasSuffix(elems[len(elems)-1], "/") str := path.Join(elems...) if hasTrailing && str != "/" { str += "/" } return str } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go ================================================ package shareddefaults const ( // ECSCredsProviderEnvVar is an environmental variable key used to // determine which path needs to be hit. ECSCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" ) // ECSContainerCredentialsURI is the endpoint to retrieve container // credentials. This can be overridden to test to ensure the credential process // is behaving correctly. var ECSContainerCredentialsURI = "http://169.254.170.2" ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go ================================================ package shareddefaults import ( "os/user" "path/filepath" ) // SharedCredentialsFilename returns the SDK's default file path // for the shared credentials file. // // Builds the shared config file path based on the OS's platform. // // - Linux/Unix: $HOME/.aws/credentials // - Windows: %USERPROFILE%\.aws\credentials func SharedCredentialsFilename() string { return filepath.Join(UserHomeDir(), ".aws", "credentials") } // SharedConfigFilename returns the SDK's default file path for // the shared config file. // // Builds the shared config file path based on the OS's platform. // // - Linux/Unix: $HOME/.aws/config // - Windows: %USERPROFILE%\.aws\config func SharedConfigFilename() string { return filepath.Join(UserHomeDir(), ".aws", "config") } // UserHomeDir returns the home directory for the user the process is // running under. func UserHomeDir() string { var home string home = userHomeDir() if len(home) > 0 { return home } currUser, _ := user.Current() if currUser != nil { home = currUser.HomeDir } return home } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_resolve_home.go ================================================ //go:build !go1.12 // +build !go1.12 package shareddefaults import ( "os" "runtime" ) func userHomeDir() string { if runtime.GOOS == "windows" { // Windows return os.Getenv("USERPROFILE") } // *nix return os.Getenv("HOME") } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config_resolve_home_go1.12.go ================================================ //go:build go1.12 // +build go1.12 package shareddefaults import ( "os" ) func userHomeDir() string { home, _ := os.UserHomeDir() return home } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go ================================================ package strings import ( "strings" ) // HasPrefixFold tests whether the string s begins with prefix, interpreted as UTF-8 strings, // under Unicode case-folding. func HasPrefixFold(s, prefix string) bool { return len(s) >= len(prefix) && strings.EqualFold(s[0:len(prefix)], prefix) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE ================================================ Copyright (c) 2009 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go ================================================ // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package singleflight provides a duplicate function call suppression // mechanism. package singleflight import "sync" // call is an in-flight or completed singleflight.Do call type call struct { wg sync.WaitGroup // These fields are written once before the WaitGroup is done // and are only read after the WaitGroup is done. val interface{} err error // forgotten indicates whether Forget was called with this call's key // while the call was still in flight. forgotten bool // These fields are read and written with the singleflight // mutex held before the WaitGroup is done, and are read but // not written after the WaitGroup is done. dups int chans []chan<- Result } // Group represents a class of work and forms a namespace in // which units of work can be executed with duplicate suppression. type Group struct { mu sync.Mutex // protects m m map[string]*call // lazily initialized } // Result holds the results of Do, so they can be passed // on a channel. type Result struct { Val interface{} Err error Shared bool } // Do executes and returns the results of the given function, making // sure that only one execution is in-flight for a given key at a // time. If a duplicate comes in, the duplicate caller waits for the // original to complete and receives the same results. // The return value shared indicates whether v was given to multiple callers. func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) { g.mu.Lock() if g.m == nil { g.m = make(map[string]*call) } if c, ok := g.m[key]; ok { c.dups++ g.mu.Unlock() c.wg.Wait() return c.val, c.err, true } c := new(call) c.wg.Add(1) g.m[key] = c g.mu.Unlock() g.doCall(c, key, fn) return c.val, c.err, c.dups > 0 } // DoChan is like Do but returns a channel that will receive the // results when they are ready. func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result { ch := make(chan Result, 1) g.mu.Lock() if g.m == nil { g.m = make(map[string]*call) } if c, ok := g.m[key]; ok { c.dups++ c.chans = append(c.chans, ch) g.mu.Unlock() return ch } c := &call{chans: []chan<- Result{ch}} c.wg.Add(1) g.m[key] = c g.mu.Unlock() go g.doCall(c, key, fn) return ch } // doCall handles the single call for a key. func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) { c.val, c.err = fn() c.wg.Done() g.mu.Lock() if !c.forgotten { delete(g.m, key) } for _, ch := range c.chans { ch <- Result{c.val, c.err, c.dups > 0} } g.mu.Unlock() } // Forget tells the singleflight to forget about a key. Future calls // to Do for this key will call the function rather than waiting for // an earlier call to complete. func (g *Group) Forget(key string) { g.mu.Lock() if c, ok := g.m[key]; ok { c.forgotten = true } delete(g.m, key) g.mu.Unlock() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/host.go ================================================ package protocol import ( "github.com/aws/aws-sdk-go/aws/request" "net" "strconv" "strings" ) // 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} var hostname string var port string var err error if strings.Contains(host, ":") { hostname, port, err = net.SplitHostPort(host) if err != nil { paramErrs.Add(request.NewErrParamFormat("endpoint", err.Error(), host)) } if !ValidPortNumber(port) { paramErrs.Add(request.NewErrParamFormat("endpoint port number", "[0-65535]", port)) } } else { hostname = host } labels := strings.Split(hostname, ".") for i, label := range labels { if i == len(labels)-1 && len(label) == 0 { // Allow trailing dot for FQDN hosts. continue } if !ValidHostLabel(label) { paramErrs.Add(request.NewErrParamFormat( "endpoint host label", "[a-zA-Z0-9-]{1,63}", label)) } } if len(hostname) == 0 { paramErrs.Add(request.NewErrParamMinLen("endpoint host", 1)) } if len(hostname) > 255 { paramErrs.Add(request.NewErrParamMaxLen( "endpoint host", 255, host, )) } if paramErrs.Len() > 0 { return paramErrs } return nil } // ValidHostLabel returns if the label is a valid RFC 3986 host label. func ValidHostLabel(label string) bool { if l := len(label); l == 0 || l > 63 { return false } for _, r := range label { switch { case r >= '0' && r <= '9': case r >= 'A' && r <= 'Z': case r >= 'a' && r <= 'z': case r == '-': default: return false } } return true } // ValidPortNumber return if the port is valid RFC 3986 port func ValidPortNumber(port string) bool { i, err := strconv.Atoi(port) if err != nil { return false } if i < 0 || i > 65535 { return false } return true } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go ================================================ 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 } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go ================================================ package protocol import ( "crypto/rand" "fmt" "reflect" ) // RandReader is the random reader the protocol package will use to read // random bytes from. This is exported for testing, and should not be used. var RandReader = rand.Reader const idempotencyTokenFillTag = `idempotencyToken` // CanSetIdempotencyToken returns true if the struct field should be // automatically populated with a Idempotency token. // // Only *string and string type fields that are tagged with idempotencyToken // which are not already set can be auto filled. func CanSetIdempotencyToken(v reflect.Value, f reflect.StructField) bool { switch u := v.Interface().(type) { // To auto fill an Idempotency token the field must be a string, // tagged for auto fill, and have a zero value. case *string: return u == nil && len(f.Tag.Get(idempotencyTokenFillTag)) != 0 case string: return len(u) == 0 && len(f.Tag.Get(idempotencyTokenFillTag)) != 0 } return false } // GetIdempotencyToken returns a randomly generated idempotency token. func GetIdempotencyToken() string { b := make([]byte, 16) RandReader.Read(b) return UUIDVersion4(b) } // SetIdempotencyToken will set the value provided with a Idempotency Token. // Given that the value can be set. Will panic if value is not setable. func SetIdempotencyToken(v reflect.Value) { if v.Kind() == reflect.Ptr { if v.IsNil() && v.CanSet() { v.Set(reflect.New(v.Type().Elem())) } v = v.Elem() } v = reflect.Indirect(v) if !v.CanSet() { panic(fmt.Sprintf("unable to set idempotnecy token %v", v)) } b := make([]byte, 16) _, err := rand.Read(b) if err != nil { // TODO handle error return } v.Set(reflect.ValueOf(UUIDVersion4(b))) } // UUIDVersion4 returns a Version 4 random UUID from the byte slice provided func UUIDVersion4(u []byte) string { // https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29 // 13th character is "4" u[6] = (u[6] | 0x40) & 0x4F // 17th character is "8", "9", "a", or "b" u[8] = (u[8] | 0x80) & 0xBF return fmt.Sprintf(`%X-%X-%X-%X-%X`, u[0:4], u[4:6], u[6:8], u[8:10], u[10:]) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go ================================================ // Package jsonutil provides JSON serialization of AWS requests and responses. package jsonutil import ( "bytes" "encoding/base64" "fmt" "math" "reflect" "sort" "strconv" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/private/protocol" ) const ( floatNaN = "NaN" floatInf = "Infinity" floatNegInf = "-Infinity" ) var timeType = reflect.ValueOf(time.Time{}).Type() var byteSliceType = reflect.ValueOf([]byte{}).Type() // BuildJSON builds a JSON string for a given object v. func BuildJSON(v interface{}) ([]byte, error) { var buf bytes.Buffer err := buildAny(reflect.ValueOf(v), &buf, "") return buf.Bytes(), err } func buildAny(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error { origVal := value value = reflect.Indirect(value) if !value.IsValid() { return nil } vtype := value.Type() t := tag.Get("type") if t == "" { switch vtype.Kind() { case reflect.Struct: // also it can't be a time object if value.Type() != timeType { t = "structure" } case reflect.Slice: // also it can't be a byte slice if _, ok := value.Interface().([]byte); !ok { t = "list" } case reflect.Map: // cannot be a JSONValue map if _, ok := value.Interface().(aws.JSONValue); !ok { t = "map" } } } switch t { case "structure": if field, ok := vtype.FieldByName("_"); ok { tag = field.Tag } return buildStruct(value, buf, tag) case "list": return buildList(value, buf, tag) case "map": return buildMap(value, buf, tag) default: return buildScalar(origVal, buf, tag) } } func buildStruct(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error { if !value.IsValid() { return nil } // unwrap payloads if payload := tag.Get("payload"); payload != "" { field, _ := value.Type().FieldByName(payload) tag = field.Tag value = elemOf(value.FieldByName(payload)) if !value.IsValid() && tag.Get("type") != "structure" { return nil } } buf.WriteByte('{') defer buf.WriteString("}") if !value.IsValid() { return nil } t := value.Type() first := true for i := 0; i < t.NumField(); i++ { member := value.Field(i) // This allocates the most memory. // Additionally, we cannot skip nil fields due to // idempotency auto filling. field := t.Field(i) if field.PkgPath != "" { continue // ignore unexported fields } if field.Tag.Get("json") == "-" { continue } if field.Tag.Get("location") != "" { continue // ignore non-body elements } if field.Tag.Get("ignore") != "" { continue } if protocol.CanSetIdempotencyToken(member, field) { token := protocol.GetIdempotencyToken() member = reflect.ValueOf(&token) } if (member.Kind() == reflect.Ptr || member.Kind() == reflect.Slice || member.Kind() == reflect.Map) && member.IsNil() { continue // ignore unset fields } if first { first = false } else { buf.WriteByte(',') } // figure out what this field is called name := field.Name if locName := field.Tag.Get("locationName"); locName != "" { name = locName } writeString(name, buf) buf.WriteString(`:`) err := buildAny(member, buf, field.Tag) if err != nil { return err } } return nil } func buildList(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error { buf.WriteString("[") for i := 0; i < value.Len(); i++ { buildAny(value.Index(i), buf, "") if i < value.Len()-1 { buf.WriteString(",") } } buf.WriteString("]") return nil } type sortedValues []reflect.Value func (sv sortedValues) Len() int { return len(sv) } func (sv sortedValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] } func (sv sortedValues) Less(i, j int) bool { return sv[i].String() < sv[j].String() } func buildMap(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error { buf.WriteString("{") sv := sortedValues(value.MapKeys()) sort.Sort(sv) for i, k := range sv { if i > 0 { buf.WriteByte(',') } writeString(k.String(), buf) buf.WriteString(`:`) buildAny(value.MapIndex(k), buf, "") } buf.WriteString("}") return nil } func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error { // prevents allocation on the heap. scratch := [64]byte{} switch value := reflect.Indirect(v); value.Kind() { case reflect.String: writeString(value.String(), buf) case reflect.Bool: if value.Bool() { buf.WriteString("true") } else { buf.WriteString("false") } case reflect.Int64: buf.Write(strconv.AppendInt(scratch[:0], value.Int(), 10)) case reflect.Float64: f := value.Float() switch { case math.IsNaN(f): writeString(floatNaN, buf) case math.IsInf(f, 1): writeString(floatInf, buf) case math.IsInf(f, -1): writeString(floatNegInf, buf) default: buf.Write(strconv.AppendFloat(scratch[:0], f, 'f', -1, 64)) } default: switch converted := value.Interface().(type) { case time.Time: format := tag.Get("timestampFormat") if len(format) == 0 { format = protocol.UnixTimeFormatName } ts := protocol.FormatTime(format, converted) if format != protocol.UnixTimeFormatName { ts = `"` + ts + `"` } buf.WriteString(ts) case []byte: if !value.IsNil() { buf.WriteByte('"') if len(converted) < 1024 { // for small buffers, using Encode directly is much faster. dst := make([]byte, base64.StdEncoding.EncodedLen(len(converted))) base64.StdEncoding.Encode(dst, converted) buf.Write(dst) } else { // for large buffers, avoid unnecessary extra temporary // buffer space. enc := base64.NewEncoder(base64.StdEncoding, buf) enc.Write(converted) enc.Close() } buf.WriteByte('"') } case aws.JSONValue: str, err := protocol.EncodeJSONValue(converted, protocol.QuotedEscape) if err != nil { return fmt.Errorf("unable to encode JSONValue, %v", err) } buf.WriteString(str) default: return fmt.Errorf("unsupported JSON value %v (%s)", value.Interface(), value.Type()) } } return nil } var hex = "0123456789abcdef" func writeString(s string, buf *bytes.Buffer) { buf.WriteByte('"') for i := 0; i < len(s); i++ { if s[i] == '"' { buf.WriteString(`\"`) } else if s[i] == '\\' { buf.WriteString(`\\`) } else if s[i] == '\b' { buf.WriteString(`\b`) } else if s[i] == '\f' { buf.WriteString(`\f`) } else if s[i] == '\r' { buf.WriteString(`\r`) } else if s[i] == '\t' { buf.WriteString(`\t`) } else if s[i] == '\n' { buf.WriteString(`\n`) } else if s[i] < 32 { buf.WriteString("\\u00") buf.WriteByte(hex[s[i]>>4]) buf.WriteByte(hex[s[i]&0xF]) } else { buf.WriteByte(s[i]) } } buf.WriteByte('"') } // Returns the reflection element of a value, if it is a pointer. func elemOf(value reflect.Value) reflect.Value { for value.Kind() == reflect.Ptr { value = value.Elem() } return value } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go ================================================ package jsonutil import ( "bytes" "encoding/base64" "encoding/json" "fmt" "io" "math" "math/big" "reflect" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/private/protocol" ) var millisecondsFloat = new(big.Float).SetInt64(1e3) // UnmarshalJSONError unmarshal's the reader's JSON document into the passed in // type. The value to unmarshal the json document into must be a pointer to the // type. func UnmarshalJSONError(v interface{}, stream io.Reader) error { var errBuf bytes.Buffer body := io.TeeReader(stream, &errBuf) err := json.NewDecoder(body).Decode(v) if err != nil { msg := "failed decoding error message" if err == io.EOF { msg = "error message missing" err = nil } return awserr.NewUnmarshalError(err, msg, errBuf.Bytes()) } return nil } // UnmarshalJSON reads a stream and unmarshals the results in object v. func UnmarshalJSON(v interface{}, stream io.Reader) error { var out interface{} decoder := json.NewDecoder(stream) decoder.UseNumber() err := decoder.Decode(&out) if err == io.EOF { return nil } else if err != nil { return err } return unmarshaler{}.unmarshalAny(reflect.ValueOf(v), out, "") } // UnmarshalJSONCaseInsensitive reads a stream and unmarshals the result into the // object v. Ignores casing for structure members. func UnmarshalJSONCaseInsensitive(v interface{}, stream io.Reader) error { var out interface{} decoder := json.NewDecoder(stream) decoder.UseNumber() err := decoder.Decode(&out) if err == io.EOF { return nil } else if err != nil { return err } return unmarshaler{ caseInsensitive: true, }.unmarshalAny(reflect.ValueOf(v), out, "") } type unmarshaler struct { caseInsensitive bool } func (u unmarshaler) unmarshalAny(value reflect.Value, data interface{}, tag reflect.StructTag) error { vtype := value.Type() if vtype.Kind() == reflect.Ptr { vtype = vtype.Elem() // check kind of actual element type } t := tag.Get("type") if t == "" { switch vtype.Kind() { case reflect.Struct: // also it can't be a time object if _, ok := value.Interface().(*time.Time); !ok { t = "structure" } case reflect.Slice: // also it can't be a byte slice if _, ok := value.Interface().([]byte); !ok { t = "list" } case reflect.Map: // cannot be a JSONValue map if _, ok := value.Interface().(aws.JSONValue); !ok { t = "map" } } } switch t { case "structure": if field, ok := vtype.FieldByName("_"); ok { tag = field.Tag } return u.unmarshalStruct(value, data, tag) case "list": return u.unmarshalList(value, data, tag) case "map": return u.unmarshalMap(value, data, tag) default: return u.unmarshalScalar(value, data, tag) } } func (u unmarshaler) unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTag) error { if data == nil { return nil } mapData, ok := data.(map[string]interface{}) if !ok { return fmt.Errorf("JSON value is not a structure (%#v)", data) } t := value.Type() if value.Kind() == reflect.Ptr { if value.IsNil() { // create the structure if it's nil s := reflect.New(value.Type().Elem()) value.Set(s) value = s } value = value.Elem() t = t.Elem() } // unwrap any payloads if payload := tag.Get("payload"); payload != "" { field, _ := t.FieldByName(payload) return u.unmarshalAny(value.FieldByName(payload), data, field.Tag) } for i := 0; i < t.NumField(); i++ { field := t.Field(i) if field.PkgPath != "" { continue // ignore unexported fields } // figure out what this field is called name := field.Name if locName := field.Tag.Get("locationName"); locName != "" { name = locName } if u.caseInsensitive { if _, ok := mapData[name]; !ok { // Fallback to uncased name search if the exact name didn't match. for kn, v := range mapData { if strings.EqualFold(kn, name) { mapData[name] = v } } } } member := value.FieldByIndex(field.Index) err := u.unmarshalAny(member, mapData[name], field.Tag) if err != nil { return err } } return nil } func (u unmarshaler) unmarshalList(value reflect.Value, data interface{}, tag reflect.StructTag) error { if data == nil { return nil } listData, ok := data.([]interface{}) if !ok { return fmt.Errorf("JSON value is not a list (%#v)", data) } if value.IsNil() { l := len(listData) value.Set(reflect.MakeSlice(value.Type(), l, l)) } for i, c := range listData { err := u.unmarshalAny(value.Index(i), c, "") if err != nil { return err } } return nil } func (u unmarshaler) unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag) error { if data == nil { return nil } mapData, ok := data.(map[string]interface{}) if !ok { return fmt.Errorf("JSON value is not a map (%#v)", data) } if value.IsNil() { value.Set(reflect.MakeMap(value.Type())) } for k, v := range mapData { kvalue := reflect.ValueOf(k) vvalue := reflect.New(value.Type().Elem()).Elem() u.unmarshalAny(vvalue, v, "") value.SetMapIndex(kvalue, vvalue) } return nil } func (u unmarshaler) unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTag) error { switch d := data.(type) { case nil: return nil // nothing to do here case string: switch value.Interface().(type) { case *string: value.Set(reflect.ValueOf(&d)) case []byte: b, err := base64.StdEncoding.DecodeString(d) if err != nil { return err } value.Set(reflect.ValueOf(b)) case *time.Time: format := tag.Get("timestampFormat") if len(format) == 0 { format = protocol.ISO8601TimeFormatName } t, err := protocol.ParseTime(format, d) if err != nil { return err } value.Set(reflect.ValueOf(&t)) case aws.JSONValue: // No need to use escaping as the value is a non-quoted string. v, err := protocol.DecodeJSONValue(d, protocol.NoEscape) if err != nil { return err } value.Set(reflect.ValueOf(v)) case *float64: // These are regular strings when parsed by encoding/json's unmarshaler. switch { case strings.EqualFold(d, floatNaN): value.Set(reflect.ValueOf(aws.Float64(math.NaN()))) case strings.EqualFold(d, floatInf): value.Set(reflect.ValueOf(aws.Float64(math.Inf(1)))) case strings.EqualFold(d, floatNegInf): value.Set(reflect.ValueOf(aws.Float64(math.Inf(-1)))) default: return fmt.Errorf("unknown JSON number value: %s", d) } default: return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } case json.Number: switch value.Interface().(type) { case *int64: // Retain the old behavior where we would just truncate the float64 // calling d.Int64() here could cause an invalid syntax error due to the usage of strconv.ParseInt f, err := d.Float64() if err != nil { return err } di := int64(f) value.Set(reflect.ValueOf(&di)) case *float64: f, err := d.Float64() if err != nil { return err } value.Set(reflect.ValueOf(&f)) case *time.Time: float, ok := new(big.Float).SetString(d.String()) if !ok { return fmt.Errorf("unsupported float time representation: %v", d.String()) } float = float.Mul(float, millisecondsFloat) ms, _ := float.Int64() t := time.Unix(0, ms*1e6).UTC() value.Set(reflect.ValueOf(&t)) default: return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } case bool: switch value.Interface().(type) { case *bool: value.Set(reflect.ValueOf(&d)) default: return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } default: return fmt.Errorf("unsupported JSON value (%v)", data) } return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go ================================================ // Package jsonrpc provides JSON RPC utilities for serialization of AWS // requests and responses. package jsonrpc //go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/json.json build_test.go //go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/json.json unmarshal_test.go import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" "github.com/aws/aws-sdk-go/private/protocol/rest" ) var emptyJSON = []byte("{}") // BuildHandler is a named request handler for building jsonrpc protocol // requests var BuildHandler = request.NamedHandler{ Name: "awssdk.jsonrpc.Build", Fn: Build, } // UnmarshalHandler is a named request handler for unmarshaling jsonrpc // protocol requests var UnmarshalHandler = request.NamedHandler{ Name: "awssdk.jsonrpc.Unmarshal", Fn: Unmarshal, } // UnmarshalMetaHandler is a named request handler for unmarshaling jsonrpc // protocol request metadata var UnmarshalMetaHandler = request.NamedHandler{ Name: "awssdk.jsonrpc.UnmarshalMeta", Fn: UnmarshalMeta, } // Build builds a JSON payload for a JSON RPC request. func Build(req *request.Request) { var buf []byte var err error if req.ParamsFilled() { buf, err = jsonutil.BuildJSON(req.Params) if err != nil { req.Error = awserr.New(request.ErrCodeSerialization, "failed encoding JSON RPC request", err) return } } else { buf = emptyJSON } // Always serialize the body, don't suppress it. req.SetBufferBody(buf) if req.ClientInfo.TargetPrefix != "" { target := req.ClientInfo.TargetPrefix + "." + req.Operation.Name req.HTTPRequest.Header.Add("X-Amz-Target", target) } // Only set the content type if one is not already specified and an // JSONVersion is specified. if ct, v := req.HTTPRequest.Header.Get("Content-Type"), req.ClientInfo.JSONVersion; len(ct) == 0 && len(v) != 0 { jsonVersion := req.ClientInfo.JSONVersion req.HTTPRequest.Header.Set("Content-Type", "application/x-amz-json-"+jsonVersion) } } // Unmarshal unmarshals a response for a JSON RPC service. func Unmarshal(req *request.Request) { defer req.HTTPResponse.Body.Close() if req.DataFilled() { err := jsonutil.UnmarshalJSON(req.Data, req.HTTPResponse.Body) if err != nil { req.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, "failed decoding JSON RPC response", err), req.HTTPResponse.StatusCode, req.RequestID, ) } } return } // UnmarshalMeta unmarshals headers from a response for a JSON RPC service. func UnmarshalMeta(req *request.Request) { rest.UnmarshalMeta(req) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_error.go ================================================ package jsonrpc import ( "bytes" "io" "io/ioutil" "net/http" "strings" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" ) const ( awsQueryError = "x-amzn-query-error" // A valid header example - "x-amzn-query-error": ";" awsQueryErrorPartsCount = 2 ) // UnmarshalTypedError provides unmarshaling errors API response errors // for both typed and untyped errors. type UnmarshalTypedError struct { exceptions map[string]func(protocol.ResponseMetadata) error queryExceptions map[string]func(protocol.ResponseMetadata, string) error } // NewUnmarshalTypedError returns an UnmarshalTypedError initialized for the // set of exception names to the error unmarshalers func NewUnmarshalTypedError(exceptions map[string]func(protocol.ResponseMetadata) error) *UnmarshalTypedError { return &UnmarshalTypedError{ exceptions: exceptions, queryExceptions: map[string]func(protocol.ResponseMetadata, string) error{}, } } // NewUnmarshalTypedErrorWithOptions works similar to NewUnmarshalTypedError applying options to the UnmarshalTypedError // before returning it func NewUnmarshalTypedErrorWithOptions(exceptions map[string]func(protocol.ResponseMetadata) error, optFns ...func(*UnmarshalTypedError)) *UnmarshalTypedError { unmarshaledError := NewUnmarshalTypedError(exceptions) for _, fn := range optFns { fn(unmarshaledError) } return unmarshaledError } // WithQueryCompatibility is a helper function to construct a functional option for use with NewUnmarshalTypedErrorWithOptions. // The queryExceptions given act as an override for unmarshalling errors when query compatible error codes are found. // See also [awsQueryCompatible trait] // // [awsQueryCompatible trait]: https://smithy.io/2.0/aws/protocols/aws-query-protocol.html#aws-protocols-awsquerycompatible-trait func WithQueryCompatibility(queryExceptions map[string]func(protocol.ResponseMetadata, string) error) func(*UnmarshalTypedError) { return func(typedError *UnmarshalTypedError) { typedError.queryExceptions = queryExceptions } } // UnmarshalError attempts to unmarshal the HTTP response error as a known // error type. If unable to unmarshal the error type, the generic SDK error // type will be used. func (u *UnmarshalTypedError) UnmarshalError( resp *http.Response, respMeta protocol.ResponseMetadata, ) (error, error) { var buf bytes.Buffer var jsonErr jsonErrorResponse teeReader := io.TeeReader(resp.Body, &buf) err := jsonutil.UnmarshalJSONError(&jsonErr, teeReader) if err != nil { return nil, err } body := ioutil.NopCloser(&buf) // Code may be separated by hash(#), with the last element being the code // used by the SDK. codeParts := strings.SplitN(jsonErr.Code, "#", 2) code := codeParts[len(codeParts)-1] msg := jsonErr.Message queryCodeParts := queryCodeParts(resp, u) if fn, ok := u.exceptions[code]; ok { // If query-compatible exceptions are found and query-error-header is found, // then use associated constructor to get exception with query error code. // // If exception code is known, use associated constructor to get a value // for the exception that the JSON body can be unmarshaled into. var v error queryErrFn, queryExceptionsFound := u.queryExceptions[code] if len(queryCodeParts) == awsQueryErrorPartsCount && queryExceptionsFound { v = queryErrFn(respMeta, queryCodeParts[0]) } else { v = fn(respMeta) } err := jsonutil.UnmarshalJSONCaseInsensitive(v, body) if err != nil { return nil, err } return v, nil } if len(queryCodeParts) == awsQueryErrorPartsCount && len(u.queryExceptions) > 0 { code = queryCodeParts[0] } // fallback to unmodeled generic exceptions return awserr.NewRequestFailure( awserr.New(code, msg, nil), respMeta.StatusCode, respMeta.RequestID, ), nil } // A valid header example - "x-amzn-query-error": ";" func queryCodeParts(resp *http.Response, u *UnmarshalTypedError) []string { queryCodeHeader := resp.Header.Get(awsQueryError) var queryCodeParts []string if queryCodeHeader != "" && len(u.queryExceptions) > 0 { queryCodeParts = strings.Split(queryCodeHeader, ";") } return queryCodeParts } // UnmarshalErrorHandler is a named request handler for unmarshaling jsonrpc // protocol request errors var UnmarshalErrorHandler = request.NamedHandler{ Name: "awssdk.jsonrpc.UnmarshalError", Fn: UnmarshalError, } // UnmarshalError unmarshals an error response for a JSON RPC service. func UnmarshalError(req *request.Request) { defer req.HTTPResponse.Body.Close() var jsonErr jsonErrorResponse err := jsonutil.UnmarshalJSONError(&jsonErr, req.HTTPResponse.Body) if err != nil { req.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, "failed to unmarshal error message", err), req.HTTPResponse.StatusCode, req.RequestID, ) return } codes := strings.SplitN(jsonErr.Code, "#", 2) req.Error = awserr.NewRequestFailure( awserr.New(codes[len(codes)-1], jsonErr.Message, nil), req.HTTPResponse.StatusCode, req.RequestID, ) } type jsonErrorResponse struct { Code string `json:"__type"` Message string `json:"message"` } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go ================================================ package protocol import ( "encoding/base64" "encoding/json" "fmt" "strconv" "github.com/aws/aws-sdk-go/aws" ) // EscapeMode is the mode that should be use for escaping a value type EscapeMode uint // The modes for escaping a value before it is marshaled, and unmarshaled. const ( NoEscape EscapeMode = iota Base64Escape QuotedEscape ) // EncodeJSONValue marshals the value into a JSON string, and optionally base64 // encodes the string before returning it. // // Will panic if the escape mode is unknown. func EncodeJSONValue(v aws.JSONValue, escape EscapeMode) (string, error) { b, err := json.Marshal(v) if err != nil { return "", err } switch escape { case NoEscape: return string(b), nil case Base64Escape: return base64.StdEncoding.EncodeToString(b), nil case QuotedEscape: return strconv.Quote(string(b)), nil } panic(fmt.Sprintf("EncodeJSONValue called with unknown EscapeMode, %v", escape)) } // DecodeJSONValue will attempt to decode the string input as a JSONValue. // Optionally decoding base64 the value first before JSON unmarshaling. // // Will panic if the escape mode is unknown. func DecodeJSONValue(v string, escape EscapeMode) (aws.JSONValue, error) { var b []byte var err error switch escape { case NoEscape: b = []byte(v) case Base64Escape: b, err = base64.StdEncoding.DecodeString(v) case QuotedEscape: var u string u, err = strconv.Unquote(v) b = []byte(u) default: panic(fmt.Sprintf("DecodeJSONValue called with unknown EscapeMode, %v", escape)) } if err != nil { return nil, err } m := aws.JSONValue{} err = json.Unmarshal(b, &m) if err != nil { return nil, err } return m, nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go ================================================ package protocol import ( "io" "io/ioutil" "net/http" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/request" ) // PayloadUnmarshaler provides the interface for unmarshaling a payload's // reader into a SDK shape. type PayloadUnmarshaler interface { UnmarshalPayload(io.Reader, interface{}) error } // HandlerPayloadUnmarshal implements the PayloadUnmarshaler from a // HandlerList. This provides the support for unmarshaling a payload reader to // a shape without needing a SDK request first. type HandlerPayloadUnmarshal struct { Unmarshalers request.HandlerList } // UnmarshalPayload unmarshals the io.Reader payload into the SDK shape using // the Unmarshalers HandlerList provided. Returns an error if unable // unmarshaling fails. func (h HandlerPayloadUnmarshal) UnmarshalPayload(r io.Reader, v interface{}) error { req := &request.Request{ HTTPRequest: &http.Request{}, HTTPResponse: &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(r), }, Data: v, } h.Unmarshalers.Run(req) return req.Error } // PayloadMarshaler provides the interface for marshaling a SDK shape into and // io.Writer. type PayloadMarshaler interface { MarshalPayload(io.Writer, interface{}) error } // HandlerPayloadMarshal implements the PayloadMarshaler from a HandlerList. // This provides support for marshaling a SDK shape into an io.Writer without // needing a SDK request first. type HandlerPayloadMarshal struct { Marshalers request.HandlerList } // MarshalPayload marshals the SDK shape into the io.Writer using the // Marshalers HandlerList provided. Returns an error if unable if marshal // fails. func (h HandlerPayloadMarshal) MarshalPayload(w io.Writer, v interface{}) error { req := request.New( aws.Config{}, metadata.ClientInfo{}, request.Handlers{}, nil, &request.Operation{HTTPMethod: "PUT"}, v, nil, ) h.Marshalers.Run(req) if req.Error != nil { return req.Error } io.Copy(w, req.GetBody()) return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/protocol.go ================================================ package protocol import ( "fmt" "strings" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" ) // RequireHTTPMinProtocol request handler is used to enforce that // the target endpoint supports the given major and minor HTTP protocol version. type RequireHTTPMinProtocol struct { Major, Minor int } // Handler will mark the request.Request with an error if the // target endpoint did not connect with the required HTTP protocol // major and minor version. func (p RequireHTTPMinProtocol) Handler(r *request.Request) { if r.Error != nil || r.HTTPResponse == nil { return } if !strings.HasPrefix(r.HTTPResponse.Proto, "HTTP") { r.Error = newMinHTTPProtoError(p.Major, p.Minor, r) } if r.HTTPResponse.ProtoMajor < p.Major || r.HTTPResponse.ProtoMinor < p.Minor { r.Error = newMinHTTPProtoError(p.Major, p.Minor, r) } } // ErrCodeMinimumHTTPProtocolError error code is returned when the target endpoint // did not match the required HTTP major and minor protocol version. const ErrCodeMinimumHTTPProtocolError = "MinimumHTTPProtocolError" func newMinHTTPProtoError(major, minor int, r *request.Request) error { return awserr.NewRequestFailure( awserr.New("MinimumHTTPProtocolError", fmt.Sprintf( "operation requires minimum HTTP protocol of HTTP/%d.%d, but was %s", major, minor, r.HTTPResponse.Proto, ), nil, ), r.HTTPResponse.StatusCode, r.RequestID, ) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go ================================================ // Package query provides serialization of AWS query requests, and responses. package query //go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/query.json build_test.go import ( "net/url" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol/query/queryutil" ) // BuildHandler is a named request handler for building query protocol requests var BuildHandler = request.NamedHandler{Name: "awssdk.query.Build", Fn: Build} // Build builds a request for an AWS Query service. func Build(r *request.Request) { body := url.Values{ "Action": {r.Operation.Name}, "Version": {r.ClientInfo.APIVersion}, } if err := queryutil.Parse(body, r.Params, false); err != nil { r.Error = awserr.New(request.ErrCodeSerialization, "failed encoding Query request", err) return } if !r.IsPresigned() { r.HTTPRequest.Method = "POST" r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8") r.SetBufferBody([]byte(body.Encode())) } else { // This is a pre-signed request r.HTTPRequest.Method = "GET" r.HTTPRequest.URL.RawQuery = body.Encode() } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go ================================================ package queryutil import ( "encoding/base64" "fmt" "math" "net/url" "reflect" "sort" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/private/protocol" ) const ( floatNaN = "NaN" floatInf = "Infinity" floatNegInf = "-Infinity" ) // Parse parses an object i and fills a url.Values object. The isEC2 flag // indicates if this is the EC2 Query sub-protocol. func Parse(body url.Values, i interface{}, isEC2 bool) error { q := queryParser{isEC2: isEC2} return q.parseValue(body, reflect.ValueOf(i), "", "") } func elemOf(value reflect.Value) reflect.Value { for value.Kind() == reflect.Ptr { value = value.Elem() } return value } type queryParser struct { isEC2 bool } func (q *queryParser) parseValue(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error { value = elemOf(value) // no need to handle zero values if !value.IsValid() { return nil } t := tag.Get("type") if t == "" { switch value.Kind() { case reflect.Struct: t = "structure" case reflect.Slice: t = "list" case reflect.Map: t = "map" } } switch t { case "structure": return q.parseStruct(v, value, prefix) case "list": return q.parseList(v, value, prefix, tag) case "map": return q.parseMap(v, value, prefix, tag) default: return q.parseScalar(v, value, prefix, tag) } } func (q *queryParser) parseStruct(v url.Values, value reflect.Value, prefix string) error { if !value.IsValid() { return nil } t := value.Type() for i := 0; i < value.NumField(); i++ { elemValue := elemOf(value.Field(i)) field := t.Field(i) if field.PkgPath != "" { continue // ignore unexported fields } if field.Tag.Get("ignore") != "" { continue } if protocol.CanSetIdempotencyToken(value.Field(i), field) { token := protocol.GetIdempotencyToken() elemValue = reflect.ValueOf(token) } var name string if q.isEC2 { name = field.Tag.Get("queryName") } if name == "" { if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" { name = field.Tag.Get("locationNameList") } else if locName := field.Tag.Get("locationName"); locName != "" { name = locName } if name != "" && q.isEC2 { name = strings.ToUpper(name[0:1]) + name[1:] } } if name == "" { name = field.Name } if prefix != "" { name = prefix + "." + name } if err := q.parseValue(v, elemValue, name, field.Tag); err != nil { return err } } return nil } func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error { // If it's empty, generate an empty value if !value.IsNil() && value.Len() == 0 { v.Set(prefix, "") return nil } if _, ok := value.Interface().([]byte); ok { return q.parseScalar(v, value, prefix, tag) } // check for unflattened list member if !q.isEC2 && tag.Get("flattened") == "" { if listName := tag.Get("locationNameList"); listName == "" { prefix += ".member" } else { prefix += "." + listName } } for i := 0; i < value.Len(); i++ { slicePrefix := prefix if slicePrefix == "" { slicePrefix = strconv.Itoa(i + 1) } else { slicePrefix = slicePrefix + "." + strconv.Itoa(i+1) } if err := q.parseValue(v, value.Index(i), slicePrefix, ""); err != nil { return err } } return nil } func (q *queryParser) parseMap(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error { // If it's empty, generate an empty value if !value.IsNil() && value.Len() == 0 { v.Set(prefix, "") return nil } // check for unflattened list member if !q.isEC2 && tag.Get("flattened") == "" { prefix += ".entry" } // sort keys for improved serialization consistency. // this is not strictly necessary for protocol support. mapKeyValues := value.MapKeys() mapKeys := map[string]reflect.Value{} mapKeyNames := make([]string, len(mapKeyValues)) for i, mapKey := range mapKeyValues { name := mapKey.String() mapKeys[name] = mapKey mapKeyNames[i] = name } sort.Strings(mapKeyNames) for i, mapKeyName := range mapKeyNames { mapKey := mapKeys[mapKeyName] mapValue := value.MapIndex(mapKey) kname := tag.Get("locationNameKey") if kname == "" { kname = "key" } vname := tag.Get("locationNameValue") if vname == "" { vname = "value" } // serialize key var keyName string if prefix == "" { keyName = strconv.Itoa(i+1) + "." + kname } else { keyName = prefix + "." + strconv.Itoa(i+1) + "." + kname } if err := q.parseValue(v, mapKey, keyName, ""); err != nil { return err } // serialize value var valueName string if prefix == "" { valueName = strconv.Itoa(i+1) + "." + vname } else { valueName = prefix + "." + strconv.Itoa(i+1) + "." + vname } if err := q.parseValue(v, mapValue, valueName, ""); err != nil { return err } } return nil } func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, tag reflect.StructTag) error { switch value := r.Interface().(type) { case string: v.Set(name, value) case []byte: if !r.IsNil() { v.Set(name, base64.StdEncoding.EncodeToString(value)) } case bool: v.Set(name, strconv.FormatBool(value)) case int64: v.Set(name, strconv.FormatInt(value, 10)) case int: v.Set(name, strconv.Itoa(value)) case float64: var str string switch { case math.IsNaN(value): str = floatNaN case math.IsInf(value, 1): str = floatInf case math.IsInf(value, -1): str = floatNegInf default: str = strconv.FormatFloat(value, 'f', -1, 64) } v.Set(name, str) case float32: asFloat64 := float64(value) var str string switch { case math.IsNaN(asFloat64): str = floatNaN case math.IsInf(asFloat64, 1): str = floatInf case math.IsInf(asFloat64, -1): str = floatNegInf default: str = strconv.FormatFloat(asFloat64, 'f', -1, 32) } v.Set(name, str) case time.Time: const ISO8601UTC = "2006-01-02T15:04:05Z" format := tag.Get("timestampFormat") if len(format) == 0 { format = protocol.ISO8601TimeFormatName } v.Set(name, protocol.FormatTime(format, value)) default: return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name()) } return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go ================================================ package query //go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/query.json unmarshal_test.go import ( "encoding/xml" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" ) // UnmarshalHandler is a named request handler for unmarshaling query protocol requests var UnmarshalHandler = request.NamedHandler{Name: "awssdk.query.Unmarshal", Fn: Unmarshal} // UnmarshalMetaHandler is a named request handler for unmarshaling query protocol request metadata var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.query.UnmarshalMeta", Fn: UnmarshalMeta} // Unmarshal unmarshals a response for an AWS Query service. func Unmarshal(r *request.Request) { defer r.HTTPResponse.Body.Close() if r.DataFilled() { decoder := xml.NewDecoder(r.HTTPResponse.Body) err := xmlutil.UnmarshalXML(r.Data, decoder, r.Operation.Name+"Result") if err != nil { r.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, "failed decoding Query response", err), r.HTTPResponse.StatusCode, r.RequestID, ) return } } } // UnmarshalMeta unmarshals header response values for an AWS Query service. func UnmarshalMeta(r *request.Request) { r.RequestID = r.HTTPResponse.Header.Get("X-Amzn-Requestid") } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go ================================================ package query import ( "encoding/xml" "fmt" "strings" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" ) // UnmarshalErrorHandler is a name request handler to unmarshal request errors var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.query.UnmarshalError", Fn: UnmarshalError} type xmlErrorResponse struct { Code string `xml:"Error>Code"` Message string `xml:"Error>Message"` RequestID string `xml:"RequestId"` } type xmlResponseError struct { xmlErrorResponse } func (e *xmlResponseError) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { const svcUnavailableTagName = "ServiceUnavailableException" const errorResponseTagName = "ErrorResponse" switch start.Name.Local { case svcUnavailableTagName: e.Code = svcUnavailableTagName e.Message = "service is unavailable" return d.Skip() case errorResponseTagName: return d.DecodeElement(&e.xmlErrorResponse, &start) default: return fmt.Errorf("unknown error response tag, %v", start) } } // UnmarshalError unmarshals an error response for an AWS Query service. func UnmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() var respErr xmlResponseError err := xmlutil.UnmarshalXMLError(&respErr, r.HTTPResponse.Body) if err != nil { r.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, "failed to unmarshal error message", err), r.HTTPResponse.StatusCode, r.RequestID, ) return } reqID := respErr.RequestID if len(reqID) == 0 { reqID = r.RequestID } r.Error = awserr.NewRequestFailure( awserr.New(strings.TrimSpace(respErr.Code), strings.TrimSpace(respErr.Message), nil), r.HTTPResponse.StatusCode, reqID, ) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go ================================================ // Package rest provides RESTful serialization of AWS requests and responses. package rest import ( "bytes" "encoding/base64" "fmt" "io" "math" "net/http" "net/url" "path" "reflect" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" ) const ( floatNaN = "NaN" floatInf = "Infinity" floatNegInf = "-Infinity" ) // Whether the byte value can be sent without escaping in AWS URLs var noEscape [256]bool var errValueNotSet = fmt.Errorf("value not set") var byteSliceType = reflect.TypeOf([]byte{}) func init() { for i := 0; i < len(noEscape); i++ { // AWS expects every character except these to be escaped noEscape[i] = (i >= 'A' && i <= 'Z') || (i >= 'a' && i <= 'z') || (i >= '0' && i <= '9') || i == '-' || i == '.' || i == '_' || i == '~' } } // BuildHandler is a named request handler for building rest protocol requests var BuildHandler = request.NamedHandler{Name: "awssdk.rest.Build", Fn: Build} // Build builds the REST component of a service request. func Build(r *request.Request) { if r.ParamsFilled() { v := reflect.ValueOf(r.Params).Elem() buildLocationElements(r, v, false) buildBody(r, v) } } // BuildAsGET builds the REST component of a service request with the ability to hoist // data from the body. func BuildAsGET(r *request.Request) { if r.ParamsFilled() { v := reflect.ValueOf(r.Params).Elem() buildLocationElements(r, v, true) buildBody(r, v) } } func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bool) { query := r.HTTPRequest.URL.Query() // Setup the raw path to match the base path pattern. This is needed // so that when the path is mutated a custom escaped version can be // stored in RawPath that will be used by the Go client. r.HTTPRequest.URL.RawPath = r.HTTPRequest.URL.Path for i := 0; i < v.NumField(); i++ { m := v.Field(i) if n := v.Type().Field(i).Name; n[0:1] == strings.ToLower(n[0:1]) { continue } if m.IsValid() { field := v.Type().Field(i) name := field.Tag.Get("locationName") if name == "" { name = field.Name } if kind := m.Kind(); kind == reflect.Ptr { m = m.Elem() } else if kind == reflect.Interface { if !m.Elem().IsValid() { continue } } if !m.IsValid() { continue } if field.Tag.Get("ignore") != "" { continue } // Support the ability to customize values to be marshaled as a // blob even though they were modeled as a string. Required for S3 // API operations like SSECustomerKey is modeled as string but // required to be base64 encoded in request. if field.Tag.Get("marshal-as") == "blob" { m = m.Convert(byteSliceType) } var err error switch field.Tag.Get("location") { case "headers": // header maps err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag) case "header": err = buildHeader(&r.HTTPRequest.Header, m, name, field.Tag) case "uri": err = buildURI(r.HTTPRequest.URL, m, name, field.Tag) case "querystring": err = buildQueryString(query, m, name, field.Tag) default: if buildGETQuery { err = buildQueryString(query, m, name, field.Tag) } } r.Error = err } if r.Error != nil { return } } r.HTTPRequest.URL.RawQuery = query.Encode() if !aws.BoolValue(r.Config.DisableRestProtocolURICleaning) { cleanPath(r.HTTPRequest.URL) } } func buildBody(r *request.Request, v reflect.Value) { if field, ok := v.Type().FieldByName("_"); ok { if payloadName := field.Tag.Get("payload"); payloadName != "" { pfield, _ := v.Type().FieldByName(payloadName) if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" { payload := reflect.Indirect(v.FieldByName(payloadName)) if payload.IsValid() && payload.Interface() != nil { switch reader := payload.Interface().(type) { case io.ReadSeeker: r.SetReaderBody(reader) case []byte: r.SetBufferBody(reader) case string: r.SetStringBody(reader) default: r.Error = awserr.New(request.ErrCodeSerialization, "failed to encode REST request", fmt.Errorf("unknown payload type %s", payload.Type())) } } } } } } func buildHeader(header *http.Header, v reflect.Value, name string, tag reflect.StructTag) error { str, err := convertType(v, tag) if err == errValueNotSet { return nil } else if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err) } name = strings.TrimSpace(name) str = strings.TrimSpace(str) header.Add(name, str) return nil } func buildHeaderMap(header *http.Header, v reflect.Value, tag reflect.StructTag) error { prefix := tag.Get("locationName") for _, key := range v.MapKeys() { str, err := convertType(v.MapIndex(key), tag) if err == errValueNotSet { continue } else if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err) } keyStr := strings.TrimSpace(key.String()) str = strings.TrimSpace(str) header.Add(prefix+keyStr, str) } return nil } func buildURI(u *url.URL, v reflect.Value, name string, tag reflect.StructTag) error { value, err := convertType(v, tag) if err == errValueNotSet { return nil } else if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err) } u.Path = strings.Replace(u.Path, "{"+name+"}", value, -1) u.Path = strings.Replace(u.Path, "{"+name+"+}", value, -1) u.RawPath = strings.Replace(u.RawPath, "{"+name+"}", EscapePath(value, true), -1) u.RawPath = strings.Replace(u.RawPath, "{"+name+"+}", EscapePath(value, false), -1) return nil } func buildQueryString(query url.Values, v reflect.Value, name string, tag reflect.StructTag) error { switch value := v.Interface().(type) { case []*string: for _, item := range value { query.Add(name, *item) } case map[string]*string: for key, item := range value { query.Add(key, *item) } case map[string][]*string: for key, items := range value { for _, item := range items { query.Add(key, *item) } } default: str, err := convertType(v, tag) if err == errValueNotSet { return nil } else if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err) } query.Set(name, str) } return nil } func cleanPath(u *url.URL) { hasSlash := strings.HasSuffix(u.Path, "/") // clean up path, removing duplicate `/` u.Path = path.Clean(u.Path) u.RawPath = path.Clean(u.RawPath) if hasSlash && !strings.HasSuffix(u.Path, "/") { u.Path += "/" u.RawPath += "/" } } // EscapePath escapes part of a URL path in Amazon style func EscapePath(path string, encodeSep bool) string { var buf bytes.Buffer for i := 0; i < len(path); i++ { c := path[i] if noEscape[c] || (c == '/' && !encodeSep) { buf.WriteByte(c) } else { fmt.Fprintf(&buf, "%%%02X", c) } } return buf.String() } func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error) { v = reflect.Indirect(v) if !v.IsValid() { return "", errValueNotSet } switch value := v.Interface().(type) { case string: if tag.Get("suppressedJSONValue") == "true" && tag.Get("location") == "header" { value = base64.StdEncoding.EncodeToString([]byte(value)) } str = value case []*string: if tag.Get("location") != "header" || tag.Get("enum") == "" { return "", fmt.Errorf("%T is only supported with location header and enum shapes", value) } if len(value) == 0 { return "", errValueNotSet } buff := &bytes.Buffer{} for i, sv := range value { if sv == nil || len(*sv) == 0 { continue } if i != 0 { buff.WriteRune(',') } item := *sv if strings.Index(item, `,`) != -1 || strings.Index(item, `"`) != -1 { item = strconv.Quote(item) } buff.WriteString(item) } str = string(buff.Bytes()) case []byte: str = base64.StdEncoding.EncodeToString(value) case bool: str = strconv.FormatBool(value) case int64: str = strconv.FormatInt(value, 10) case float64: switch { case math.IsNaN(value): str = floatNaN case math.IsInf(value, 1): str = floatInf case math.IsInf(value, -1): str = floatNegInf default: str = strconv.FormatFloat(value, 'f', -1, 64) } case time.Time: format := tag.Get("timestampFormat") if len(format) == 0 { format = protocol.RFC822TimeFormatName if tag.Get("location") == "querystring" { format = protocol.ISO8601TimeFormatName } } str = protocol.FormatTime(format, value) case aws.JSONValue: if len(value) == 0 { return "", errValueNotSet } escaping := protocol.NoEscape if tag.Get("location") == "header" { escaping = protocol.Base64Escape } str, err = protocol.EncodeJSONValue(value, escaping) if err != nil { return "", fmt.Errorf("unable to encode JSONValue, %v", err) } default: err := fmt.Errorf("unsupported value for param %v (%s)", v.Interface(), v.Type()) return "", err } return str, nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go ================================================ package rest import "reflect" // PayloadMember returns the payload field member of i if there is one, or nil. func PayloadMember(i interface{}) interface{} { if i == nil { return nil } v := reflect.ValueOf(i).Elem() if !v.IsValid() { return nil } if field, ok := v.Type().FieldByName("_"); ok { if payloadName := field.Tag.Get("payload"); payloadName != "" { field, _ := v.Type().FieldByName(payloadName) if field.Tag.Get("type") != "structure" { return nil } payload := v.FieldByName(payloadName) if payload.IsValid() || (payload.Kind() == reflect.Ptr && !payload.IsNil()) { return payload.Interface() } } } return nil } const nopayloadPayloadType = "nopayload" // PayloadType returns the type of a payload field member of i if there is one, // or "". func PayloadType(i interface{}) string { v := reflect.Indirect(reflect.ValueOf(i)) if !v.IsValid() { return "" } if field, ok := v.Type().FieldByName("_"); ok { if noPayload := field.Tag.Get(nopayloadPayloadType); noPayload != "" { return nopayloadPayloadType } if payloadName := field.Tag.Get("payload"); payloadName != "" { if member, ok := v.Type().FieldByName(payloadName); ok { return member.Tag.Get("type") } } } return "" } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go ================================================ package rest import ( "bytes" "encoding/base64" "fmt" "io" "io/ioutil" "math" "net/http" "reflect" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" awsStrings "github.com/aws/aws-sdk-go/internal/strings" "github.com/aws/aws-sdk-go/private/protocol" ) // UnmarshalHandler is a named request handler for unmarshaling rest protocol requests var UnmarshalHandler = request.NamedHandler{Name: "awssdk.rest.Unmarshal", Fn: Unmarshal} // UnmarshalMetaHandler is a named request handler for unmarshaling rest protocol request metadata var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.rest.UnmarshalMeta", Fn: UnmarshalMeta} // Unmarshal unmarshals the REST component of a response in a REST service. func Unmarshal(r *request.Request) { if r.DataFilled() { v := reflect.Indirect(reflect.ValueOf(r.Data)) if err := unmarshalBody(r, v); err != nil { r.Error = err } } } // UnmarshalMeta unmarshals the REST metadata of a response in a REST service func UnmarshalMeta(r *request.Request) { r.RequestID = r.HTTPResponse.Header.Get("X-Amzn-Requestid") if r.RequestID == "" { // Alternative version of request id in the header r.RequestID = r.HTTPResponse.Header.Get("X-Amz-Request-Id") } if r.DataFilled() { if err := UnmarshalResponse(r.HTTPResponse, r.Data, aws.BoolValue(r.Config.LowerCaseHeaderMaps)); err != nil { r.Error = err } } } // UnmarshalResponse attempts to unmarshal the REST response headers to // the data type passed in. The type must be a pointer. An error is returned // with any error unmarshaling the response into the target datatype. func UnmarshalResponse(resp *http.Response, data interface{}, lowerCaseHeaderMaps bool) error { v := reflect.Indirect(reflect.ValueOf(data)) return unmarshalLocationElements(resp, v, lowerCaseHeaderMaps) } func unmarshalBody(r *request.Request, v reflect.Value) error { if field, ok := v.Type().FieldByName("_"); ok { if payloadName := field.Tag.Get("payload"); payloadName != "" { pfield, _ := v.Type().FieldByName(payloadName) if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" { payload := v.FieldByName(payloadName) if payload.IsValid() { switch payload.Interface().(type) { case []byte: defer r.HTTPResponse.Body.Close() b, err := ioutil.ReadAll(r.HTTPResponse.Body) if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err) } payload.Set(reflect.ValueOf(b)) case *string: defer r.HTTPResponse.Body.Close() b, err := ioutil.ReadAll(r.HTTPResponse.Body) if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err) } str := string(b) payload.Set(reflect.ValueOf(&str)) default: switch payload.Type().String() { case "io.ReadCloser": payload.Set(reflect.ValueOf(r.HTTPResponse.Body)) case "io.ReadSeeker": b, err := ioutil.ReadAll(r.HTTPResponse.Body) if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to read response body", err) } payload.Set(reflect.ValueOf(ioutil.NopCloser(bytes.NewReader(b)))) default: io.Copy(ioutil.Discard, r.HTTPResponse.Body) r.HTTPResponse.Body.Close() return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", fmt.Errorf("unknown payload type %s", payload.Type())) } } } } } } return nil } func unmarshalLocationElements(resp *http.Response, v reflect.Value, lowerCaseHeaderMaps bool) error { for i := 0; i < v.NumField(); i++ { m, field := v.Field(i), v.Type().Field(i) if n := field.Name; n[0:1] == strings.ToLower(n[0:1]) { continue } if m.IsValid() { name := field.Tag.Get("locationName") if name == "" { name = field.Name } switch field.Tag.Get("location") { case "statusCode": unmarshalStatusCode(m, resp.StatusCode) case "header": err := unmarshalHeader(m, resp.Header.Get(name), field.Tag) if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err) } case "headers": prefix := field.Tag.Get("locationName") err := unmarshalHeaderMap(m, resp.Header, prefix, lowerCaseHeaderMaps) if err != nil { return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err) } } } } return nil } func unmarshalStatusCode(v reflect.Value, statusCode int) { if !v.IsValid() { return } switch v.Interface().(type) { case *int64: s := int64(statusCode) v.Set(reflect.ValueOf(&s)) } } func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string, normalize bool) error { if len(headers) == 0 { return nil } switch r.Interface().(type) { case map[string]*string: // we only support string map value types out := map[string]*string{} for k, v := range headers { if awsStrings.HasPrefixFold(k, prefix) { if normalize == true { k = strings.ToLower(k) } else { k = http.CanonicalHeaderKey(k) } out[k[len(prefix):]] = &v[0] } } if len(out) != 0 { r.Set(reflect.ValueOf(out)) } } return nil } func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) error { switch tag.Get("type") { case "jsonvalue": if len(header) == 0 { return nil } case "blob": if len(header) == 0 { return nil } default: if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) { return nil } } switch v.Interface().(type) { case *string: if tag.Get("suppressedJSONValue") == "true" && tag.Get("location") == "header" { b, err := base64.StdEncoding.DecodeString(header) if err != nil { return fmt.Errorf("failed to decode JSONValue, %v", err) } header = string(b) } v.Set(reflect.ValueOf(&header)) case []byte: b, err := base64.StdEncoding.DecodeString(header) if err != nil { return err } v.Set(reflect.ValueOf(b)) case *bool: b, err := strconv.ParseBool(header) if err != nil { return err } v.Set(reflect.ValueOf(&b)) case *int64: i, err := strconv.ParseInt(header, 10, 64) if err != nil { return err } v.Set(reflect.ValueOf(&i)) case *float64: var f float64 switch { case strings.EqualFold(header, floatNaN): f = math.NaN() case strings.EqualFold(header, floatInf): f = math.Inf(1) case strings.EqualFold(header, floatNegInf): f = math.Inf(-1) default: var err error f, err = strconv.ParseFloat(header, 64) if err != nil { return err } } v.Set(reflect.ValueOf(&f)) case *time.Time: format := tag.Get("timestampFormat") if len(format) == 0 { format = protocol.RFC822TimeFormatName } t, err := protocol.ParseTime(format, header) if err != nil { return err } v.Set(reflect.ValueOf(&t)) case aws.JSONValue: escaping := protocol.NoEscape if tag.Get("location") == "header" { escaping = protocol.Base64Escape } m, err := protocol.DecodeJSONValue(header, escaping) if err != nil { return err } v.Set(reflect.ValueOf(m)) default: err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type()) return err } return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go ================================================ // Package restjson provides RESTful JSON serialization of AWS // requests and responses. package restjson //go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/rest-json.json build_test.go //go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/rest-json.json unmarshal_test.go import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" "github.com/aws/aws-sdk-go/private/protocol/rest" ) // BuildHandler is a named request handler for building restjson protocol // requests var BuildHandler = request.NamedHandler{ Name: "awssdk.restjson.Build", Fn: Build, } // UnmarshalHandler is a named request handler for unmarshaling restjson // protocol requests var UnmarshalHandler = request.NamedHandler{ Name: "awssdk.restjson.Unmarshal", Fn: Unmarshal, } // UnmarshalMetaHandler is a named request handler for unmarshaling restjson // protocol request metadata var UnmarshalMetaHandler = request.NamedHandler{ Name: "awssdk.restjson.UnmarshalMeta", Fn: UnmarshalMeta, } // Build builds a request for the REST JSON protocol. func Build(r *request.Request) { rest.Build(r) if t := rest.PayloadType(r.Params); t == "structure" || t == "" { if v := r.HTTPRequest.Header.Get("Content-Type"); len(v) == 0 { r.HTTPRequest.Header.Set("Content-Type", "application/json") } jsonrpc.Build(r) } } // Unmarshal unmarshals a response body for the REST JSON protocol. func Unmarshal(r *request.Request) { if t := rest.PayloadType(r.Data); t == "structure" || t == "" { jsonrpc.Unmarshal(r) } else { rest.Unmarshal(r) } } // UnmarshalMeta unmarshals response headers for the REST JSON protocol. func UnmarshalMeta(r *request.Request) { rest.UnmarshalMeta(r) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go ================================================ package restjson import ( "bytes" "encoding/json" "io" "io/ioutil" "net/http" "strings" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" "github.com/aws/aws-sdk-go/private/protocol/rest" ) const ( errorTypeHeader = "X-Amzn-Errortype" errorMessageHeader = "X-Amzn-Errormessage" ) // UnmarshalTypedError provides unmarshaling errors API response errors // for both typed and untyped errors. type UnmarshalTypedError struct { exceptions map[string]func(protocol.ResponseMetadata) error } // NewUnmarshalTypedError returns an UnmarshalTypedError initialized for the // set of exception names to the error unmarshalers func NewUnmarshalTypedError(exceptions map[string]func(protocol.ResponseMetadata) error) *UnmarshalTypedError { return &UnmarshalTypedError{ exceptions: exceptions, } } // UnmarshalError attempts to unmarshal the HTTP response error as a known // error type. If unable to unmarshal the error type, the generic SDK error // type will be used. func (u *UnmarshalTypedError) UnmarshalError( resp *http.Response, respMeta protocol.ResponseMetadata, ) (error, error) { code, msg, err := unmarshalErrorInfo(resp) if err != nil { return nil, err } fn, ok := u.exceptions[code] if !ok { return awserr.NewRequestFailure( awserr.New(code, msg, nil), respMeta.StatusCode, respMeta.RequestID, ), nil } v := fn(respMeta) if err := jsonutil.UnmarshalJSONCaseInsensitive(v, resp.Body); err != nil { return nil, err } if err := rest.UnmarshalResponse(resp, v, true); err != nil { return nil, err } return v, nil } // UnmarshalErrorHandler is a named request handler for unmarshaling restjson // protocol request errors var UnmarshalErrorHandler = request.NamedHandler{ Name: "awssdk.restjson.UnmarshalError", Fn: UnmarshalError, } // UnmarshalError unmarshals a response error for the REST JSON protocol. func UnmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() code, msg, err := unmarshalErrorInfo(r.HTTPResponse) if err != nil { r.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, "failed to unmarshal response error", err), r.HTTPResponse.StatusCode, r.RequestID, ) return } r.Error = awserr.NewRequestFailure( awserr.New(code, msg, nil), r.HTTPResponse.StatusCode, r.RequestID, ) } type jsonErrorResponse struct { Type string `json:"__type"` Code string `json:"code"` Message string `json:"message"` } func (j *jsonErrorResponse) SanitizedCode() string { code := j.Code if len(j.Type) > 0 { code = j.Type } return sanitizeCode(code) } // Remove superfluous components from a restJson error code. // - If a : character is present, then take only the contents before the // first : character in the value. // - If a # character is present, then take only the contents after the first // # character in the value. // // All of the following error values resolve to FooError: // - FooError // - FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/ // - aws.protocoltests.restjson#FooError // - aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/ func sanitizeCode(code string) string { noColon := strings.SplitN(code, ":", 2)[0] hashSplit := strings.SplitN(noColon, "#", 2) return hashSplit[len(hashSplit)-1] } // attempt to garner error details from the response, preferring header values // when present func unmarshalErrorInfo(resp *http.Response) (code string, msg string, err error) { code = sanitizeCode(resp.Header.Get(errorTypeHeader)) msg = resp.Header.Get(errorMessageHeader) if len(code) > 0 && len(msg) > 0 { return } // a modeled error will have to be re-deserialized later, so the body must // be preserved var buf bytes.Buffer tee := io.TeeReader(resp.Body, &buf) defer func() { resp.Body = ioutil.NopCloser(&buf) }() var jsonErr jsonErrorResponse if decodeErr := json.NewDecoder(tee).Decode(&jsonErr); decodeErr != nil && decodeErr != io.EOF { err = awserr.NewUnmarshalError(decodeErr, "failed to decode response body", buf.Bytes()) return } if len(code) == 0 { code = jsonErr.SanitizedCode() } if len(msg) == 0 { msg = jsonErr.Message } return } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go ================================================ package protocol import ( "bytes" "fmt" "math" "strconv" "time" "github.com/aws/aws-sdk-go/internal/sdkmath" ) // Names of time formats supported by the SDK const ( RFC822TimeFormatName = "rfc822" ISO8601TimeFormatName = "iso8601" UnixTimeFormatName = "unixTimestamp" ) // Time formats supported by the SDK // Output time is intended to not contain decimals const ( // RFC 7231#section-7.1.1.1 timetamp format. e.g Tue, 29 Apr 2014 18:30:38 GMT RFC822TimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT" rfc822TimeFormatSingleDigitDay = "Mon, _2 Jan 2006 15:04:05 GMT" rfc822TimeFormatSingleDigitDayTwoDigitYear = "Mon, _2 Jan 06 15:04:05 GMT" // This format is used for output time without seconds precision RFC822OutputTimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT" // RFC3339 a subset of the ISO8601 timestamp format. e.g 2014-04-29T18:30:38Z ISO8601TimeFormat = "2006-01-02T15:04:05.999999999Z" iso8601TimeFormatNoZ = "2006-01-02T15:04:05.999999999" // This format is used for output time with fractional second precision up to milliseconds ISO8601OutputTimeFormat = "2006-01-02T15:04:05.999999999Z" ) // IsKnownTimestampFormat returns if the timestamp format name // is know to the SDK's protocols. func IsKnownTimestampFormat(name string) bool { switch name { case RFC822TimeFormatName: fallthrough case ISO8601TimeFormatName: fallthrough case UnixTimeFormatName: return true default: return false } } // FormatTime returns a string value of the time. func FormatTime(name string, t time.Time) string { t = t.UTC().Truncate(time.Millisecond) switch name { case RFC822TimeFormatName: return t.Format(RFC822OutputTimeFormat) case ISO8601TimeFormatName: return t.Format(ISO8601OutputTimeFormat) case UnixTimeFormatName: ms := t.UnixNano() / int64(time.Millisecond) return strconv.FormatFloat(float64(ms)/1e3, 'f', -1, 64) default: panic("unknown timestamp format name, " + name) } } // ParseTime attempts to parse the time given the format. Returns // the time if it was able to be parsed, and fails otherwise. func ParseTime(formatName, value string) (time.Time, error) { switch formatName { case RFC822TimeFormatName: // Smithy HTTPDate format return tryParse(value, RFC822TimeFormat, rfc822TimeFormatSingleDigitDay, rfc822TimeFormatSingleDigitDayTwoDigitYear, time.RFC850, time.ANSIC, ) case ISO8601TimeFormatName: // Smithy DateTime format return tryParse(value, ISO8601TimeFormat, iso8601TimeFormatNoZ, time.RFC3339Nano, time.RFC3339, ) case UnixTimeFormatName: v, err := strconv.ParseFloat(value, 64) _, dec := math.Modf(v) dec = sdkmath.Round(dec*1e3) / 1e3 //Rounds 0.1229999 to 0.123 if err != nil { return time.Time{}, err } return time.Unix(int64(v), int64(dec*(1e9))), nil default: panic("unknown timestamp format name, " + formatName) } } func tryParse(v string, formats ...string) (time.Time, error) { var errs parseErrors for _, f := range formats { t, err := time.Parse(f, v) if err != nil { errs = append(errs, parseError{ Format: f, Err: err, }) continue } return t, nil } return time.Time{}, fmt.Errorf("unable to parse time string, %v", errs) } type parseErrors []parseError func (es parseErrors) Error() string { var s bytes.Buffer for _, e := range es { fmt.Fprintf(&s, "\n * %q: %v", e.Format, e.Err) } return "parse errors:" + s.String() } type parseError struct { Format string Err error } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go ================================================ package protocol import ( "io" "io/ioutil" "github.com/aws/aws-sdk-go/aws/request" ) // UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody} // UnmarshalDiscardBody is a request handler to empty a response's body and closing it. func UnmarshalDiscardBody(r *request.Request) { if r.HTTPResponse == nil || r.HTTPResponse.Body == nil { return } io.Copy(ioutil.Discard, r.HTTPResponse.Body) r.HTTPResponse.Body.Close() } // ResponseMetadata provides the SDK response metadata attributes. type ResponseMetadata struct { StatusCode int RequestID string } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal_error.go ================================================ package protocol import ( "net/http" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" ) // UnmarshalErrorHandler provides unmarshaling errors API response errors for // both typed and untyped errors. type UnmarshalErrorHandler struct { unmarshaler ErrorUnmarshaler } // ErrorUnmarshaler is an abstract interface for concrete implementations to // unmarshal protocol specific response errors. type ErrorUnmarshaler interface { UnmarshalError(*http.Response, ResponseMetadata) (error, error) } // NewUnmarshalErrorHandler returns an UnmarshalErrorHandler // initialized for the set of exception names to the error unmarshalers func NewUnmarshalErrorHandler(unmarshaler ErrorUnmarshaler) *UnmarshalErrorHandler { return &UnmarshalErrorHandler{ unmarshaler: unmarshaler, } } // UnmarshalErrorHandlerName is the name of the named handler. const UnmarshalErrorHandlerName = "awssdk.protocol.UnmarshalError" // NamedHandler returns a NamedHandler for the unmarshaler using the set of // errors the unmarshaler was initialized for. func (u *UnmarshalErrorHandler) NamedHandler() request.NamedHandler { return request.NamedHandler{ Name: UnmarshalErrorHandlerName, Fn: u.UnmarshalError, } } // UnmarshalError will attempt to unmarshal the API response's error message // into either a generic SDK error type, or a typed error corresponding to the // errors exception name. func (u *UnmarshalErrorHandler) UnmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() respMeta := ResponseMetadata{ StatusCode: r.HTTPResponse.StatusCode, RequestID: r.RequestID, } v, err := u.unmarshaler.UnmarshalError(r.HTTPResponse, respMeta) if err != nil { r.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, "failed to unmarshal response error", err), respMeta.StatusCode, respMeta.RequestID, ) return } r.Error = v } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go ================================================ // Package xmlutil provides XML serialization of AWS requests and responses. package xmlutil import ( "encoding/base64" "encoding/xml" "fmt" "math" "reflect" "sort" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/private/protocol" ) const ( floatNaN = "NaN" floatInf = "Infinity" floatNegInf = "-Infinity" ) // BuildXML will serialize params into an xml.Encoder. Error will be returned // if the serialization of any of the params or nested values fails. func BuildXML(params interface{}, e *xml.Encoder) error { return buildXML(params, e, false) } func buildXML(params interface{}, e *xml.Encoder, sorted bool) error { b := xmlBuilder{encoder: e, namespaces: map[string]string{}} root := NewXMLElement(xml.Name{}) if err := b.buildValue(reflect.ValueOf(params), root, ""); err != nil { return err } for _, c := range root.Children { for _, v := range c { return StructToXML(e, v, sorted) } } return nil } // Returns the reflection element of a value, if it is a pointer. func elemOf(value reflect.Value) reflect.Value { for value.Kind() == reflect.Ptr { value = value.Elem() } return value } // A xmlBuilder serializes values from Go code to XML type xmlBuilder struct { encoder *xml.Encoder namespaces map[string]string } // buildValue generic XMLNode builder for any type. Will build value for their specific type // struct, list, map, scalar. // // Also takes a "type" tag value to set what type a value should be converted to XMLNode as. If // type is not provided reflect will be used to determine the value's type. func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag reflect.StructTag) error { value = elemOf(value) if !value.IsValid() { // no need to handle zero values return nil } else if tag.Get("location") != "" { // don't handle non-body location values return nil } xml := tag.Get("xml") if len(xml) != 0 { name := strings.SplitAfterN(xml, ",", 2)[0] if name == "-" { return nil } } t := tag.Get("type") if t == "" { switch value.Kind() { case reflect.Struct: t = "structure" case reflect.Slice: t = "list" case reflect.Map: t = "map" } } switch t { case "structure": if field, ok := value.Type().FieldByName("_"); ok { tag = tag + reflect.StructTag(" ") + field.Tag } return b.buildStruct(value, current, tag) case "list": return b.buildList(value, current, tag) case "map": return b.buildMap(value, current, tag) default: return b.buildScalar(value, current, tag) } } // 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() { return nil } // unwrap payloads if payload := tag.Get("payload"); payload != "" { field, _ := value.Type().FieldByName(payload) tag = field.Tag value = elemOf(value.FieldByName(payload)) if !value.IsValid() { return nil } } child := NewXMLElement(xml.Name{Local: tag.Get("locationName")}) // there is an xmlNamespace associated with this struct if prefix, uri := tag.Get("xmlPrefix"), tag.Get("xmlURI"); uri != "" { ns := xml.Attr{ Name: xml.Name{Local: "xmlns"}, Value: uri, } if prefix != "" { b.namespaces[prefix] = uri // register the namespace ns.Name.Local = "xmlns:" + prefix } child.Attr = append(child.Attr, ns) } var payloadFields, nonPayloadFields int t := value.Type() for i := 0; i < value.NumField(); i++ { member := elemOf(value.Field(i)) field := t.Field(i) if field.PkgPath != "" { continue // ignore unexported fields } if field.Tag.Get("ignore") != "" { continue } mTag := field.Tag if mTag.Get("location") != "" { // skip non-body members nonPayloadFields++ continue } payloadFields++ if protocol.CanSetIdempotencyToken(value.Field(i), field) { token := protocol.GetIdempotencyToken() member = reflect.ValueOf(token) } memberName := mTag.Get("locationName") if memberName == "" { memberName = field.Name mTag = reflect.StructTag(string(mTag) + ` locationName:"` + memberName + `"`) } if err := b.buildValue(member, child, mTag); err != nil { return err } } // Only case where the child shape is not added is if the shape only contains // non-payload fields, e.g headers/query. if !(payloadFields == 0 && nonPayloadFields > 0) { current.AddChild(child) } return nil } // buildList adds the value's list items to the current XMLNode as children nodes. All // nested values in the list are converted to XMLNodes also. func (b *xmlBuilder) buildList(value reflect.Value, current *XMLNode, tag reflect.StructTag) error { if value.IsNil() { // don't build omitted lists return nil } // check for unflattened list member flattened := tag.Get("flattened") != "" xname := xml.Name{Local: tag.Get("locationName")} if flattened { for i := 0; i < value.Len(); i++ { child := NewXMLElement(xname) current.AddChild(child) if err := b.buildValue(value.Index(i), child, ""); err != nil { return err } } } else { list := NewXMLElement(xname) current.AddChild(list) for i := 0; i < value.Len(); i++ { iname := tag.Get("locationNameList") if iname == "" { iname = "member" } child := NewXMLElement(xml.Name{Local: iname}) list.AddChild(child) if err := b.buildValue(value.Index(i), child, ""); err != nil { return err } } } return nil } // buildMap adds the value's key/value pairs to the current XMLNode as children nodes. All // nested values in the map are converted to XMLNodes also. // // Error will be returned if it is unable to build the map's values into XMLNodes func (b *xmlBuilder) buildMap(value reflect.Value, current *XMLNode, tag reflect.StructTag) error { if value.IsNil() { // don't build omitted maps return nil } maproot := NewXMLElement(xml.Name{Local: tag.Get("locationName")}) current.AddChild(maproot) current = maproot kname, vname := "key", "value" if n := tag.Get("locationNameKey"); n != "" { kname = n } if n := tag.Get("locationNameValue"); n != "" { vname = n } // sorting is not required for compliance, but it makes testing easier keys := make([]string, value.Len()) for i, k := range value.MapKeys() { keys[i] = k.String() } sort.Strings(keys) for _, k := range keys { v := value.MapIndex(reflect.ValueOf(k)) mapcur := current if tag.Get("flattened") == "" { // add "entry" tag to non-flat maps child := NewXMLElement(xml.Name{Local: "entry"}) mapcur.AddChild(child) mapcur = child } kchild := NewXMLElement(xml.Name{Local: kname}) kchild.Text = k vchild := NewXMLElement(xml.Name{Local: vname}) mapcur.AddChild(kchild) mapcur.AddChild(vchild) if err := b.buildValue(v, vchild, ""); err != nil { return err } } return nil } // buildScalar will convert the value into a string and append it as a attribute or child // of the current XMLNode. // // The value will be added as an attribute if tag contains a "xmlAttribute" attribute value. // // Error will be returned if the value type is unsupported. func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag reflect.StructTag) error { var str string switch converted := value.Interface().(type) { case string: str = converted case []byte: if !value.IsNil() { str = base64.StdEncoding.EncodeToString(converted) } case bool: str = strconv.FormatBool(converted) case int64: str = strconv.FormatInt(converted, 10) case int: str = strconv.Itoa(converted) case float64: switch { case math.IsNaN(converted): str = floatNaN case math.IsInf(converted, 1): str = floatInf case math.IsInf(converted, -1): str = floatNegInf default: str = strconv.FormatFloat(converted, 'f', -1, 64) } case float32: // The SDK doesn't render float32 values in types, only float64. This case would never be hit currently. asFloat64 := float64(converted) switch { case math.IsNaN(asFloat64): str = floatNaN case math.IsInf(asFloat64, 1): str = floatInf case math.IsInf(asFloat64, -1): str = floatNegInf default: str = strconv.FormatFloat(asFloat64, 'f', -1, 32) } case time.Time: format := tag.Get("timestampFormat") if len(format) == 0 { format = protocol.ISO8601TimeFormatName } str = protocol.FormatTime(format, converted) default: return fmt.Errorf("unsupported value for param %s: %v (%s)", tag.Get("locationName"), value.Interface(), value.Type().Name()) } xname := xml.Name{Local: tag.Get("locationName")} if tag.Get("xmlAttribute") != "" { // put into current node's attribute list attr := xml.Attr{Name: xname, Value: str} current.Attr = append(current.Attr, attr) } else if len(xname.Local) == 0 { current.Text = str } else { // regular text node current.AddChild(&XMLNode{Name: xname, Text: str}) } return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go ================================================ package xmlutil import ( "encoding/xml" "strings" ) type xmlAttrSlice []xml.Attr func (x xmlAttrSlice) Len() int { return len(x) } func (x xmlAttrSlice) Less(i, j int) bool { spaceI, spaceJ := x[i].Name.Space, x[j].Name.Space localI, localJ := x[i].Name.Local, x[j].Name.Local valueI, valueJ := x[i].Value, x[j].Value spaceCmp := strings.Compare(spaceI, spaceJ) localCmp := strings.Compare(localI, localJ) valueCmp := strings.Compare(valueI, valueJ) if spaceCmp == -1 || (spaceCmp == 0 && (localCmp == -1 || (localCmp == 0 && valueCmp == -1))) { return true } return false } func (x xmlAttrSlice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go ================================================ package xmlutil import ( "bytes" "encoding/base64" "encoding/xml" "fmt" "io" "math" "reflect" "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/private/protocol" ) // UnmarshalXMLError unmarshals the XML error from the stream into the value // type specified. The value must be a pointer. If the message fails to // unmarshal, the message content will be included in the returned error as a // awserr.UnmarshalError. func UnmarshalXMLError(v interface{}, stream io.Reader) error { var errBuf bytes.Buffer body := io.TeeReader(stream, &errBuf) err := xml.NewDecoder(body).Decode(v) if err != nil && err != io.EOF { return awserr.NewUnmarshalError(err, "failed to unmarshal error message", errBuf.Bytes()) } return nil } // UnmarshalXML deserializes an xml.Decoder into the container v. V // needs to match the shape of the XML expected to be decoded. // If the shape doesn't match unmarshaling will fail. func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error { n, err := XMLToStruct(d, nil) if err != nil { return err } if n.Children != nil { for _, root := range n.Children { for _, c := range root { if wrappedChild, ok := c.Children[wrapper]; ok { c = wrappedChild[0] // pull out wrapped element } err = parse(reflect.ValueOf(v), c, "") if err != nil { if err == io.EOF { return nil } return err } } } return nil } return nil } // parse deserializes any value from the XMLNode. The type tag is used to infer the type, or reflect // will be used to determine the type from r. func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { xml := tag.Get("xml") if len(xml) != 0 { name := strings.SplitAfterN(xml, ",", 2)[0] if name == "-" { return nil } } rtype := r.Type() if rtype.Kind() == reflect.Ptr { rtype = rtype.Elem() // check kind of actual element type } t := tag.Get("type") if t == "" { switch rtype.Kind() { case reflect.Struct: // also it can't be a time object if _, ok := r.Interface().(*time.Time); !ok { t = "structure" } case reflect.Slice: // also it can't be a byte slice if _, ok := r.Interface().([]byte); !ok { t = "list" } case reflect.Map: t = "map" } } switch t { case "structure": if field, ok := rtype.FieldByName("_"); ok { tag = field.Tag } return parseStruct(r, node, tag) case "list": return parseList(r, node, tag) case "map": return parseMap(r, node, tag) default: return parseScalar(r, node, tag) } } // parseStruct deserializes a structure and its fields from an XMLNode. Any nested // types in the structure will also be deserialized. func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { t := r.Type() if r.Kind() == reflect.Ptr { if r.IsNil() { // create the structure if it's nil s := reflect.New(r.Type().Elem()) r.Set(s) r = s } r = r.Elem() t = t.Elem() } // unwrap any payloads if payload := tag.Get("payload"); payload != "" { field, _ := t.FieldByName(payload) return parseStruct(r.FieldByName(payload), node, field.Tag) } for i := 0; i < t.NumField(); i++ { field := t.Field(i) if c := field.Name[0:1]; strings.ToLower(c) == c { continue // ignore unexported fields } // figure out what this field is called name := field.Name if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" { name = field.Tag.Get("locationNameList") } else if locName := field.Tag.Get("locationName"); locName != "" { name = locName } // try to find the field by name in elements elems := node.Children[name] if elems == nil { // try to find the field in attributes if val, ok := node.findElem(name); ok { elems = []*XMLNode{{Text: val}} } } member := r.FieldByName(field.Name) for _, elem := range elems { err := parse(member, elem, field.Tag) if err != nil { return err } } } return nil } // parseList deserializes a list of values from an XML node. Each list entry // will also be deserialized. func parseList(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { t := r.Type() if tag.Get("flattened") == "" { // look at all item entries mname := "member" if name := tag.Get("locationNameList"); name != "" { mname = name } if Children, ok := node.Children[mname]; ok { if r.IsNil() { r.Set(reflect.MakeSlice(t, len(Children), len(Children))) } for i, c := range Children { err := parse(r.Index(i), c, "") if err != nil { return err } } } } else { // flattened list means this is a single element if r.IsNil() { r.Set(reflect.MakeSlice(t, 0, 0)) } childR := reflect.Zero(t.Elem()) r.Set(reflect.Append(r, childR)) err := parse(r.Index(r.Len()-1), node, "") if err != nil { return err } } return nil } // parseMap deserializes a map from an XMLNode. The direct children of the XMLNode // will also be deserialized as map entries. func parseMap(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { if r.IsNil() { r.Set(reflect.MakeMap(r.Type())) } if tag.Get("flattened") == "" { // look at all child entries for _, entry := range node.Children["entry"] { parseMapEntry(r, entry, tag) } } else { // this element is itself an entry parseMapEntry(r, node, tag) } return nil } // parseMapEntry deserializes a map entry from a XML node. func parseMapEntry(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { kname, vname := "key", "value" if n := tag.Get("locationNameKey"); n != "" { kname = n } if n := tag.Get("locationNameValue"); n != "" { vname = n } keys, ok := node.Children[kname] values := node.Children[vname] if ok { for i, key := range keys { keyR := reflect.ValueOf(key.Text) value := values[i] valueR := reflect.New(r.Type().Elem()).Elem() parse(valueR, value, "") r.SetMapIndex(keyR, valueR) } } return nil } // parseScaller deserializes an XMLNode value into a concrete type based on the // interface type of r. // // Error is returned if the deserialization fails due to invalid type conversion, // or unsupported interface type. func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { switch r.Interface().(type) { case *string: r.Set(reflect.ValueOf(&node.Text)) return nil case []byte: b, err := base64.StdEncoding.DecodeString(node.Text) if err != nil { return err } r.Set(reflect.ValueOf(b)) case *bool: v, err := strconv.ParseBool(node.Text) if err != nil { return err } r.Set(reflect.ValueOf(&v)) case *int64: v, err := strconv.ParseInt(node.Text, 10, 64) if err != nil { return err } r.Set(reflect.ValueOf(&v)) case *float64: var v float64 switch { case strings.EqualFold(node.Text, floatNaN): v = math.NaN() case strings.EqualFold(node.Text, floatInf): v = math.Inf(1) case strings.EqualFold(node.Text, floatNegInf): v = math.Inf(-1) default: var err error v, err = strconv.ParseFloat(node.Text, 64) if err != nil { return err } } r.Set(reflect.ValueOf(&v)) case *time.Time: format := tag.Get("timestampFormat") if len(format) == 0 { format = protocol.ISO8601TimeFormatName } t, err := protocol.ParseTime(format, node.Text) if err != nil { return err } r.Set(reflect.ValueOf(&t)) default: return fmt.Errorf("unsupported value: %v (%s)", r.Interface(), r.Type()) } return nil } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go ================================================ package xmlutil import ( "encoding/xml" "fmt" "io" "sort" ) // A XMLNode contains the values to be encoded or decoded. type XMLNode struct { Name xml.Name `json:",omitempty"` Children map[string][]*XMLNode `json:",omitempty"` Text string `json:",omitempty"` Attr []xml.Attr `json:",omitempty"` namespaces map[string]string parent *XMLNode } // textEncoder is a string type alias that implemnts the TextMarshaler interface. // This alias type is used to ensure that the line feed (\n) (U+000A) is escaped. type textEncoder string func (t textEncoder) MarshalText() ([]byte, error) { return []byte(t), nil } // NewXMLElement returns a pointer to a new XMLNode initialized to default values. func NewXMLElement(name xml.Name) *XMLNode { return &XMLNode{ Name: name, Children: map[string][]*XMLNode{}, Attr: []xml.Attr{}, } } // AddChild adds child to the XMLNode. func (n *XMLNode) AddChild(child *XMLNode) { child.parent = n if _, ok := n.Children[child.Name.Local]; !ok { n.Children[child.Name.Local] = []*XMLNode{} } n.Children[child.Name.Local] = append(n.Children[child.Name.Local], child) } // XMLToStruct converts a xml.Decoder stream to XMLNode with nested values. func XMLToStruct(d *xml.Decoder, s *xml.StartElement) (*XMLNode, error) { out := &XMLNode{} for { tok, err := d.Token() if err != nil { if err == io.EOF { break } else { return out, err } } if tok == nil { break } switch typed := tok.(type) { case xml.CharData: out.Text = string(typed.Copy()) case xml.StartElement: el := typed.Copy() out.Attr = el.Attr if out.Children == nil { out.Children = map[string][]*XMLNode{} } name := typed.Name.Local slice := out.Children[name] if slice == nil { slice = []*XMLNode{} } node, e := XMLToStruct(d, &el) out.findNamespaces() if e != nil { return out, e } node.Name = typed.Name node.findNamespaces() tempOut := *out // Save into a temp variable, simply because out gets squashed during // loop iterations node.parent = &tempOut slice = append(slice, node) out.Children[name] = slice case xml.EndElement: if s != nil && s.Name.Local == typed.Name.Local { // matching end token return out, nil } out = &XMLNode{} } } return out, nil } func (n *XMLNode) findNamespaces() { ns := map[string]string{} for _, a := range n.Attr { if a.Name.Space == "xmlns" { ns[a.Value] = a.Name.Local } } n.namespaces = ns } func (n *XMLNode) findElem(name string) (string, bool) { for node := n; node != nil; node = node.parent { for _, a := range node.Attr { namespace := a.Name.Space if v, ok := node.namespaces[namespace]; ok { namespace = v } if name == fmt.Sprintf("%s:%s", namespace, a.Name.Local) { return a.Value, true } } } return "", false } // StructToXML writes an XMLNode to a xml.Encoder as tokens. func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error { // Sort Attributes attrs := node.Attr if sorted { sortedAttrs := make([]xml.Attr, len(attrs)) for _, k := range node.Attr { sortedAttrs = append(sortedAttrs, k) } sort.Sort(xmlAttrSlice(sortedAttrs)) attrs = sortedAttrs } startElement := xml.StartElement{Name: node.Name, Attr: attrs} if node.Text != "" { e.EncodeElement(textEncoder(node.Text), startElement) return e.Flush() } e.EncodeToken(startElement) if sorted { sortedNames := []string{} for k := range node.Children { sortedNames = append(sortedNames, k) } sort.Strings(sortedNames) for _, k := range sortedNames { for _, v := range node.Children[k] { StructToXML(e, v, sorted) } } } else { for _, c := range node.Children { for _, v := range c { StructToXML(e, v, sorted) } } } e.EncodeToken(startElement.End()) return e.Flush() } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package dynamodb import ( "fmt" "net/url" "strings" "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" ) const opBatchExecuteStatement = "BatchExecuteStatement" // BatchExecuteStatementRequest generates a "aws/request.Request" representing the // client's request for the BatchExecuteStatement operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See BatchExecuteStatement for more information on using the BatchExecuteStatement // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the BatchExecuteStatementRequest method. // req, resp := client.BatchExecuteStatementRequest(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/BatchExecuteStatement func (c *DynamoDB) BatchExecuteStatementRequest(input *BatchExecuteStatementInput) (req *request.Request, output *BatchExecuteStatementOutput) { op := &request.Operation{ Name: opBatchExecuteStatement, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &BatchExecuteStatementInput{} } output = &BatchExecuteStatementOutput{} req = c.newRequest(op, input, output) return } // BatchExecuteStatement API operation for Amazon DynamoDB. // // This operation allows you to perform batch reads or writes on data stored // in DynamoDB, using PartiQL. Each read statement in a BatchExecuteStatement // must specify an equality condition on all key attributes. This enforces that // each SELECT statement in a batch returns at most a single item. // // The entire batch must consist of either read statements or write statements, // you cannot mix both in one batch. // // A HTTP 200 response does not mean that all statements in the BatchExecuteStatement // succeeded. Error details for individual statements can be found under the // Error (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchStatementResponse.html#DDB-Type-BatchStatementResponse-Error) // field of the BatchStatementResponse for each statement. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 BatchExecuteStatement for usage and error information. // // Returned Error Types: // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchExecuteStatement func (c *DynamoDB) BatchExecuteStatement(input *BatchExecuteStatementInput) (*BatchExecuteStatementOutput, error) { req, out := c.BatchExecuteStatementRequest(input) return out, req.Send() } // BatchExecuteStatementWithContext is the same as BatchExecuteStatement with the addition of // the ability to pass a context and additional request options. // // See BatchExecuteStatement for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) BatchExecuteStatementWithContext(ctx aws.Context, input *BatchExecuteStatementInput, opts ...request.Option) (*BatchExecuteStatementOutput, error) { req, out := c.BatchExecuteStatementRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opBatchGetItem = "BatchGetItem" // BatchGetItemRequest generates a "aws/request.Request" representing the // client's request for the BatchGetItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See BatchGetItem for more information on using the BatchGetItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the BatchGetItemRequest method. // req, resp := client.BatchGetItemRequest(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/BatchGetItem func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.Request, output *BatchGetItemOutput) { op := &request.Operation{ Name: opBatchGetItem, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"RequestItems"}, OutputTokens: []string{"UnprocessedKeys"}, LimitToken: "", TruncationToken: "", }, } if input == nil { input = &BatchGetItemInput{} } output = &BatchGetItemOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // BatchGetItem API operation for Amazon DynamoDB. // // The BatchGetItem operation returns the attributes of one or more items from // one or more tables. You identify requested items by primary key. // // A single operation can retrieve up to 16 MB of data, which can contain as // many as 100 items. BatchGetItem returns a partial result if the response // size limit is exceeded, the table's provisioned throughput is exceeded, more // than 1MB per partition is requested, or an internal processing failure occurs. // If a partial result is returned, the operation returns a value for UnprocessedKeys. // You can use this value to retry the operation starting with the next item // to get. // // If you request more than 100 items, BatchGetItem returns a ValidationException // with the message "Too many items requested for the BatchGetItem call." // // For example, if you ask to retrieve 100 items, but each individual item is // 300 KB in size, the system returns 52 items (so as not to exceed the 16 MB // limit). It also returns an appropriate UnprocessedKeys value so you can get // the next page of results. If desired, your application can include its own // logic to assemble the pages of results into one dataset. // // If none of the items can be processed due to insufficient provisioned throughput // on all of the tables in the request, then BatchGetItem returns a ProvisionedThroughputExceededException. // If at least one of the items is successfully processed, then BatchGetItem // completes successfully, while returning the keys of the unread items in UnprocessedKeys. // // If DynamoDB returns any unprocessed items, you should retry the batch operation // on those items. However, we strongly recommend that you use an exponential // backoff algorithm. If you retry the batch operation immediately, the underlying // read or write requests can still fail due to throttling on the individual // tables. If you delay the batch operation using exponential backoff, the individual // requests in the batch are much more likely to succeed. // // For more information, see Batch Operations and Error Handling (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations) // in the Amazon DynamoDB Developer Guide. // // By default, BatchGetItem performs eventually consistent reads on every table // in the request. If you want strongly consistent reads instead, you can set // ConsistentRead to true for any or all tables. // // In order to minimize response latency, BatchGetItem may retrieve items in // parallel. // // When designing your application, keep in mind that DynamoDB does not return // items in any particular order. To help parse the response by item, include // the primary key values for the items in your request in the ProjectionExpression // parameter. // // If a requested item does not exist, it is not returned in the result. Requests // for nonexistent items consume the minimum read capacity units according to // the type of read. For more information, see Working with Tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations) // in the Amazon DynamoDB Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation BatchGetItem for usage and error information. // // Returned Error Types: // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchGetItem func (c *DynamoDB) BatchGetItem(input *BatchGetItemInput) (*BatchGetItemOutput, error) { req, out := c.BatchGetItemRequest(input) return out, req.Send() } // BatchGetItemWithContext is the same as BatchGetItem with the addition of // the ability to pass a context and additional request options. // // See BatchGetItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) BatchGetItemWithContext(ctx aws.Context, input *BatchGetItemInput, opts ...request.Option) (*BatchGetItemOutput, error) { req, out := c.BatchGetItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // BatchGetItemPages iterates over the pages of a BatchGetItem operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See BatchGetItem 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 BatchGetItem operation. // pageNum := 0 // err := client.BatchGetItemPages(params, // func(page *dynamodb.BatchGetItemOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *DynamoDB) BatchGetItemPages(input *BatchGetItemInput, fn func(*BatchGetItemOutput, bool) bool) error { return c.BatchGetItemPagesWithContext(aws.BackgroundContext(), input, fn) } // BatchGetItemPagesWithContext same as BatchGetItemPages 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 *DynamoDB) BatchGetItemPagesWithContext(ctx aws.Context, input *BatchGetItemInput, fn func(*BatchGetItemOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *BatchGetItemInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.BatchGetItemRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*BatchGetItemOutput), !p.HasNextPage()) { break } } return p.Err() } const opBatchWriteItem = "BatchWriteItem" // BatchWriteItemRequest generates a "aws/request.Request" representing the // client's request for the BatchWriteItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See BatchWriteItem for more information on using the BatchWriteItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the BatchWriteItemRequest method. // req, resp := client.BatchWriteItemRequest(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/BatchWriteItem func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *request.Request, output *BatchWriteItemOutput) { op := &request.Operation{ Name: opBatchWriteItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &BatchWriteItemInput{} } output = &BatchWriteItemOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // BatchWriteItem API operation for Amazon DynamoDB. // // The BatchWriteItem operation puts or deletes multiple items in one or more // tables. A single call to BatchWriteItem can transmit up to 16MB of data over // the network, consisting of up to 25 item put or delete operations. While // individual items can be up to 400 KB once stored, it's important to note // that an item's representation might be greater than 400KB while being sent // in DynamoDB's JSON format for the API call. For more details on this distinction, // see Naming Rules and Data Types (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html). // // BatchWriteItem cannot update items. If you perform a BatchWriteItem operation // on an existing item, that item's values will be overwritten by the operation // and it will appear like it was updated. To update items, we recommend you // use the UpdateItem action. // // The individual PutItem and DeleteItem operations specified in BatchWriteItem // are atomic; however BatchWriteItem as a whole is not. If any requested operations // fail because the table's provisioned throughput is exceeded or an internal // processing failure occurs, the failed operations are returned in the UnprocessedItems // response parameter. You can investigate and optionally resend the requests. // Typically, you would call BatchWriteItem in a loop. Each iteration would // check for unprocessed items and submit a new BatchWriteItem request with // those unprocessed items until all items have been processed. // // If none of the items can be processed due to insufficient provisioned throughput // on all of the tables in the request, then BatchWriteItem returns a ProvisionedThroughputExceededException. // // If DynamoDB returns any unprocessed items, you should retry the batch operation // on those items. However, we strongly recommend that you use an exponential // backoff algorithm. If you retry the batch operation immediately, the underlying // read or write requests can still fail due to throttling on the individual // tables. If you delay the batch operation using exponential backoff, the individual // requests in the batch are much more likely to succeed. // // For more information, see Batch Operations and Error Handling (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#Programming.Errors.BatchOperations) // in the Amazon DynamoDB Developer Guide. // // With BatchWriteItem, you can efficiently write or delete large amounts of // data, such as from Amazon EMR, or copy data from another database into DynamoDB. // In order to improve performance with these large-scale operations, BatchWriteItem // does not behave in the same way as individual PutItem and DeleteItem calls // would. For example, you cannot specify conditions on individual put and delete // requests, and BatchWriteItem does not return deleted items in the response. // // If you use a programming language that supports concurrency, you can use // threads to write items in parallel. Your application must include the necessary // logic to manage the threads. With languages that don't support threading, // you must update or delete the specified items one at a time. In both situations, // BatchWriteItem performs the specified put and delete operations in parallel, // giving you the power of the thread pool approach without having to introduce // complexity into your application. // // Parallel processing reduces latency, but each specified put and delete request // consumes the same number of write capacity units whether it is processed // in parallel or not. Delete operations on nonexistent items consume one write // capacity unit. // // If one or more of the following is true, DynamoDB rejects the entire batch // write operation: // // - One or more tables specified in the BatchWriteItem request does not // exist. // // - Primary key attributes specified on an item in the request do not match // those in the corresponding table's primary key schema. // // - You try to perform multiple operations on the same item in the same // BatchWriteItem request. For example, you cannot put and delete the same // item in the same BatchWriteItem request. // // - Your request contains at least two items with identical hash and range // keys (which essentially is two put operations). // // - There are more than 25 requests in the batch. // // - Any individual item in a batch exceeds 400 KB. // // - The total request size exceeds 16 MB. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 BatchWriteItem for usage and error information. // // Returned Error Types: // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - ItemCollectionSizeLimitExceededException // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchWriteItem func (c *DynamoDB) BatchWriteItem(input *BatchWriteItemInput) (*BatchWriteItemOutput, error) { req, out := c.BatchWriteItemRequest(input) return out, req.Send() } // BatchWriteItemWithContext is the same as BatchWriteItem with the addition of // the ability to pass a context and additional request options. // // See BatchWriteItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) BatchWriteItemWithContext(ctx aws.Context, input *BatchWriteItemInput, opts ...request.Option) (*BatchWriteItemOutput, error) { req, out := c.BatchWriteItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateBackup = "CreateBackup" // CreateBackupRequest generates a "aws/request.Request" representing the // client's request for the CreateBackup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateBackup for more information on using the CreateBackup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateBackupRequest method. // req, resp := client.CreateBackupRequest(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/CreateBackup func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.Request, output *CreateBackupOutput) { op := &request.Operation{ Name: opCreateBackup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateBackupInput{} } output = &CreateBackupOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // CreateBackup API operation for Amazon DynamoDB. // // Creates a backup for an existing table. // // Each time you create an on-demand backup, the entire table data is backed // up. There is no limit to the number of on-demand backups that can be taken. // // When you create an on-demand backup, a time marker of the request is cataloged, // and the backup is created asynchronously, by applying all changes until the // time of the request to the last full table snapshot. Backup requests are // processed instantaneously and become available for restore within minutes. // // You can call CreateBackup at a maximum rate of 50 times per second. // // All backups in DynamoDB work without consuming any provisioned throughput // on the table. // // If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed // to contain all data committed to the table up to 14:24:00, and data committed // after 14:26:00 will not be. The backup might contain data modifications made // between 14:24:00 and 14:26:00. On-demand backup does not support causal consistency. // // Along with data, the following are also included on the backups: // // - Global secondary indexes (GSIs) // // - Local secondary indexes (LSIs) // // - Streams // // - Provisioned read and write 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 DynamoDB's // API operation CreateBackup for usage and error information. // // Returned Error Types: // // - TableNotFoundException // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. // // - TableInUseException // A target table with the specified name is either being created or deleted. // // - ContinuousBackupsUnavailableException // Backups have not yet been enabled for this table. // // - BackupInUseException // There is another ongoing conflicting backup control plane operation on the // table. The backup is either being created, deleted or restored to a table. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateBackup func (c *DynamoDB) CreateBackup(input *CreateBackupInput) (*CreateBackupOutput, error) { req, out := c.CreateBackupRequest(input) return out, req.Send() } // CreateBackupWithContext is the same as CreateBackup with the addition of // the ability to pass a context and additional request options. // // See CreateBackup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) CreateBackupWithContext(ctx aws.Context, input *CreateBackupInput, opts ...request.Option) (*CreateBackupOutput, error) { req, out := c.CreateBackupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateGlobalTable = "CreateGlobalTable" // CreateGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the CreateGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateGlobalTable for more information on using the CreateGlobalTable // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateGlobalTableRequest method. // req, resp := client.CreateGlobalTableRequest(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/CreateGlobalTable func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req *request.Request, output *CreateGlobalTableOutput) { op := &request.Operation{ Name: opCreateGlobalTable, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateGlobalTableInput{} } output = &CreateGlobalTableOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // CreateGlobalTable API operation for Amazon DynamoDB. // // Creates a global table from an existing table. A global table creates a replication // relationship between two or more DynamoDB tables with the same table name // in the provided Regions. // // This operation only applies to Version 2017.11.29 (Legacy) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. We recommend using Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // when creating new global tables, as it provides greater flexibility, higher // efficiency and consumes less write capacity than 2017.11.29 (Legacy). To // determine which version you are using, see Determining the version (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html). // To update existing global tables from version 2017.11.29 (Legacy) to version // 2019.11.21 (Current), see Updating global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.html). // // If you want to add a new replica table to a global table, each of the following // conditions must be true: // // - The table must have the same primary key as all of the other replicas. // // - The table must have the same name as all of the other replicas. // // - The table must have DynamoDB Streams enabled, with the stream containing // both the new and the old images of the item. // // - None of the replica tables in the global table can contain any data. // // If global secondary indexes are specified, then the following conditions // must also be met: // // - The global secondary indexes must have the same name. // // - The global secondary indexes must have the same hash key and sort key // (if present). // // If local secondary indexes are specified, then the following conditions must // also be met: // // - The local secondary indexes must have the same name. // // - The local secondary indexes must have the same hash key and sort key // (if present). // // Write capacity settings should be set consistently across your replica tables // and secondary indexes. DynamoDB strongly recommends enabling auto scaling // to manage the write capacity settings for all of your global tables replicas // and indexes. // // If you prefer to manage write capacity settings manually, you should provision // equal replicated write capacity units to your replica tables. You should // also provision equal replicated write capacity units to matching secondary // indexes across your global 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 DynamoDB's // API operation CreateGlobalTable for usage and error information. // // Returned Error Types: // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // - GlobalTableAlreadyExistsException // The specified global table already exists. // // - TableNotFoundException // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateGlobalTable func (c *DynamoDB) CreateGlobalTable(input *CreateGlobalTableInput) (*CreateGlobalTableOutput, error) { req, out := c.CreateGlobalTableRequest(input) return out, req.Send() } // CreateGlobalTableWithContext is the same as CreateGlobalTable with the addition of // the ability to pass a context and additional request options. // // See CreateGlobalTable for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) CreateGlobalTableWithContext(ctx aws.Context, input *CreateGlobalTableInput, opts ...request.Option) (*CreateGlobalTableOutput, error) { req, out := c.CreateGlobalTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateTable = "CreateTable" // CreateTableRequest generates a "aws/request.Request" representing the // client's request for the CreateTable operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateTable for more information on using the CreateTable // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateTableRequest method. // req, resp := client.CreateTableRequest(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/CreateTable func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Request, output *CreateTableOutput) { op := &request.Operation{ Name: opCreateTable, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateTableInput{} } output = &CreateTableOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // CreateTable API operation for Amazon DynamoDB. // // The CreateTable operation adds a new table to your account. In an Amazon // Web Services account, table names must be unique within each Region. That // is, you can have two tables with same name if you create the tables in different // Regions. // // CreateTable is an asynchronous operation. Upon receiving a CreateTable request, // DynamoDB immediately returns a response with a TableStatus of CREATING. After // the table is created, DynamoDB sets the TableStatus to ACTIVE. You can perform // read and write operations only on an ACTIVE table. // // You can optionally define secondary indexes on the new table, as part of // the CreateTable operation. If you want to create multiple tables with secondary // indexes on them, you must create the tables sequentially. Only one table // with secondary indexes can be in the CREATING state at any given time. // // You can use the DescribeTable action to check the table 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 DynamoDB's // API operation CreateTable for usage and error information. // // Returned Error Types: // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateTable func (c *DynamoDB) CreateTable(input *CreateTableInput) (*CreateTableOutput, error) { req, out := c.CreateTableRequest(input) return out, req.Send() } // CreateTableWithContext is the same as CreateTable with the addition of // the ability to pass a context and additional request options. // // See CreateTable for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) CreateTableWithContext(ctx aws.Context, input *CreateTableInput, opts ...request.Option) (*CreateTableOutput, error) { req, out := c.CreateTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteBackup = "DeleteBackup" // DeleteBackupRequest generates a "aws/request.Request" representing the // client's request for the DeleteBackup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteBackup for more information on using the DeleteBackup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteBackupRequest method. // req, resp := client.DeleteBackupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteBackup func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) { op := &request.Operation{ Name: opDeleteBackup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteBackupInput{} } output = &DeleteBackupOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DeleteBackup API operation for Amazon DynamoDB. // // Deletes an existing backup of a table. // // You can call DeleteBackup at a maximum rate of 10 times per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation DeleteBackup for usage and error information. // // Returned Error Types: // // - BackupNotFoundException // Backup not found for the given BackupARN. // // - BackupInUseException // There is another ongoing conflicting backup control plane operation on the // table. The backup is either being created, deleted or restored to a table. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteBackup func (c *DynamoDB) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) { req, out := c.DeleteBackupRequest(input) return out, req.Send() } // DeleteBackupWithContext is the same as DeleteBackup with the addition of // the ability to pass a context and additional request options. // // See DeleteBackup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *DynamoDB) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) { req, out := c.DeleteBackupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteItem = "DeleteItem" // DeleteItemRequest generates a "aws/request.Request" representing the // client's request for the DeleteItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteItem for more information on using the DeleteItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteItemRequest method. // req, resp := client.DeleteItemRequest(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/DeleteItem func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Request, output *DeleteItemOutput) { op := &request.Operation{ Name: opDeleteItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteItemInput{} } output = &DeleteItemOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DeleteItem API operation for Amazon DynamoDB. // // Deletes a single item in a table by primary key. You can perform a conditional // delete operation that deletes the item if it exists, or if it has an expected // attribute value. // // In addition to deleting an item, you can also return the item's attribute // values in the same operation, using the ReturnValues parameter. // // Unless you specify conditions, the DeleteItem is an idempotent operation; // running it multiple times on the same item or attribute does not result in // an error response. // // Conditional deletes are useful for deleting items only if specific conditions // are met. If those conditions are met, DynamoDB performs the delete. Otherwise, // the item is not 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 // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation DeleteItem for usage and error information. // // Returned Error Types: // // - ConditionalCheckFailedException // A condition specified in the operation could not be evaluated. // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - ItemCollectionSizeLimitExceededException // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // // - TransactionConflictException // Operation was rejected because there is an ongoing transaction for the item. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteItem func (c *DynamoDB) DeleteItem(input *DeleteItemInput) (*DeleteItemOutput, error) { req, out := c.DeleteItemRequest(input) return out, req.Send() } // DeleteItemWithContext is the same as DeleteItem with the addition of // the ability to pass a context and additional request options. // // See DeleteItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DeleteItemWithContext(ctx aws.Context, input *DeleteItemInput, opts ...request.Option) (*DeleteItemOutput, error) { req, out := c.DeleteItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteTable = "DeleteTable" // DeleteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteTable operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteTable for more information on using the DeleteTable // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteTableRequest method. // req, resp := client.DeleteTableRequest(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/DeleteTable func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Request, output *DeleteTableOutput) { op := &request.Operation{ Name: opDeleteTable, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteTableInput{} } output = &DeleteTableOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DeleteTable API operation for Amazon DynamoDB. // // The DeleteTable operation deletes a table and all of its items. After a DeleteTable // request, the specified table is in the DELETING state until DynamoDB completes // the deletion. If the table is in the ACTIVE state, you can delete it. If // a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException. // If the specified table does not exist, DynamoDB returns a ResourceNotFoundException. // If table is already in the DELETING state, no error is returned. // // This operation only applies to Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // of global tables. // // DynamoDB might continue to accept data read and write operations, such as // GetItem and PutItem, on a table in the DELETING state until the table deletion // is complete. // // When you delete a table, any indexes on that table are also deleted. // // If you have DynamoDB Streams enabled on the table, then the corresponding // stream on that table goes into the DISABLED state, and the stream is automatically // deleted after 24 hours. // // Use the DescribeTable action to check the status of the 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 DynamoDB's // API operation DeleteTable for usage and error information. // // Returned Error Types: // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - 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. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteTable func (c *DynamoDB) DeleteTable(input *DeleteTableInput) (*DeleteTableOutput, error) { req, out := c.DeleteTableRequest(input) return out, req.Send() } // DeleteTableWithContext is the same as DeleteTable with the addition of // the ability to pass a context and additional request options. // // See DeleteTable for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DeleteTableWithContext(ctx aws.Context, input *DeleteTableInput, opts ...request.Option) (*DeleteTableOutput, error) { req, out := c.DeleteTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeBackup = "DescribeBackup" // DescribeBackupRequest generates a "aws/request.Request" representing the // client's request for the DescribeBackup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeBackup for more information on using the DescribeBackup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeBackupRequest method. // req, resp := client.DescribeBackupRequest(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/DescribeBackup func (c *DynamoDB) DescribeBackupRequest(input *DescribeBackupInput) (req *request.Request, output *DescribeBackupOutput) { op := &request.Operation{ Name: opDescribeBackup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeBackupInput{} } output = &DescribeBackupOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DescribeBackup API operation for Amazon DynamoDB. // // Describes an existing backup of a table. // // You can call DescribeBackup at a maximum rate of 10 times per second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation DescribeBackup for usage and error information. // // Returned Error Types: // // - BackupNotFoundException // Backup not found for the given BackupARN. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeBackup func (c *DynamoDB) DescribeBackup(input *DescribeBackupInput) (*DescribeBackupOutput, error) { req, out := c.DescribeBackupRequest(input) return out, req.Send() } // DescribeBackupWithContext is the same as DescribeBackup with the addition of // the ability to pass a context and additional request options. // // See DescribeBackup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeBackupWithContext(ctx aws.Context, input *DescribeBackupInput, opts ...request.Option) (*DescribeBackupOutput, error) { req, out := c.DescribeBackupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeContinuousBackups = "DescribeContinuousBackups" // DescribeContinuousBackupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeContinuousBackups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeContinuousBackups for more information on using the DescribeContinuousBackups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeContinuousBackupsRequest method. // req, resp := client.DescribeContinuousBackupsRequest(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/DescribeContinuousBackups func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBackupsInput) (req *request.Request, output *DescribeContinuousBackupsOutput) { op := &request.Operation{ Name: opDescribeContinuousBackups, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeContinuousBackupsInput{} } output = &DescribeContinuousBackupsOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DescribeContinuousBackups API operation for Amazon DynamoDB. // // Checks the status of continuous backups and point in time recovery on the // specified table. Continuous backups are ENABLED on all tables at table creation. // If point in time recovery is enabled, PointInTimeRecoveryStatus will be set // to ENABLED. // // After continuous backups and point in time recovery are enabled, you can // restore to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. // // LatestRestorableDateTime is typically 5 minutes before the current time. // You can restore your table to any point in time during the last 35 days. // // You can call DescribeContinuousBackups at a maximum rate of 10 times per // second. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation DescribeContinuousBackups for usage and error information. // // Returned Error Types: // // - TableNotFoundException // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContinuousBackups func (c *DynamoDB) DescribeContinuousBackups(input *DescribeContinuousBackupsInput) (*DescribeContinuousBackupsOutput, error) { req, out := c.DescribeContinuousBackupsRequest(input) return out, req.Send() } // DescribeContinuousBackupsWithContext is the same as DescribeContinuousBackups with the addition of // the ability to pass a context and additional request options. // // See DescribeContinuousBackups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeContinuousBackupsWithContext(ctx aws.Context, input *DescribeContinuousBackupsInput, opts ...request.Option) (*DescribeContinuousBackupsOutput, error) { req, out := c.DescribeContinuousBackupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeContributorInsights = "DescribeContributorInsights" // DescribeContributorInsightsRequest generates a "aws/request.Request" representing the // client's request for the DescribeContributorInsights operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeContributorInsights for more information on using the DescribeContributorInsights // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeContributorInsightsRequest method. // req, resp := client.DescribeContributorInsightsRequest(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/DescribeContributorInsights func (c *DynamoDB) DescribeContributorInsightsRequest(input *DescribeContributorInsightsInput) (req *request.Request, output *DescribeContributorInsightsOutput) { op := &request.Operation{ Name: opDescribeContributorInsights, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeContributorInsightsInput{} } output = &DescribeContributorInsightsOutput{} req = c.newRequest(op, input, output) return } // DescribeContributorInsights API operation for Amazon DynamoDB. // // Returns information about contributor insights for a given table or global // secondary index. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 DescribeContributorInsights for usage and error information. // // Returned Error Types: // // - 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. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContributorInsights func (c *DynamoDB) DescribeContributorInsights(input *DescribeContributorInsightsInput) (*DescribeContributorInsightsOutput, error) { req, out := c.DescribeContributorInsightsRequest(input) return out, req.Send() } // DescribeContributorInsightsWithContext is the same as DescribeContributorInsights with the addition of // the ability to pass a context and additional request options. // // See DescribeContributorInsights for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeContributorInsightsWithContext(ctx aws.Context, input *DescribeContributorInsightsInput, opts ...request.Option) (*DescribeContributorInsightsOutput, error) { req, out := c.DescribeContributorInsightsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeEndpoints = "DescribeEndpoints" // DescribeEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoints operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeEndpoints for more information on using the DescribeEndpoints // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeEndpointsRequest method. // req, resp := client.DescribeEndpointsRequest(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/DescribeEndpoints func (c *DynamoDB) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) { op := &request.Operation{ Name: opDescribeEndpoints, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeEndpointsInput{} } output = &DescribeEndpointsOutput{} req = c.newRequest(op, input, output) return } // DescribeEndpoints API operation for Amazon DynamoDB. // // Returns the regional endpoint information. For more information on policy // permissions, please see Internetwork traffic privacy (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/inter-network-traffic-privacy.html#inter-network-traffic-DescribeEndpoints). // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 DescribeEndpoints for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeEndpoints func (c *DynamoDB) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) { req, out := c.DescribeEndpointsRequest(input) return out, req.Send() } // DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of // the ability to pass a context and additional request options. // // See DescribeEndpoints for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) { req, out := c.DescribeEndpointsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } type discovererDescribeEndpoints struct { Client *DynamoDB Required bool EndpointCache *crr.EndpointCache Params map[string]*string Key string req *request.Request } 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 } address := *e.Address var scheme string if idx := strings.Index(address, "://"); idx != -1 { scheme = address[:idx] } if len(scheme) == 0 { address = fmt.Sprintf("%s://%s", d.req.HTTPRequest.URL.Scheme, address) } cachedInMinutes := aws.Int64Value(e.CachePeriodInMinutes) u, err := url.Parse(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 d.req = r 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 opDescribeExport = "DescribeExport" // DescribeExportRequest generates a "aws/request.Request" representing the // client's request for the DescribeExport operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeExport for more information on using the DescribeExport // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeExportRequest method. // req, resp := client.DescribeExportRequest(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/DescribeExport func (c *DynamoDB) DescribeExportRequest(input *DescribeExportInput) (req *request.Request, output *DescribeExportOutput) { op := &request.Operation{ Name: opDescribeExport, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeExportInput{} } output = &DescribeExportOutput{} req = c.newRequest(op, input, output) return } // DescribeExport API operation for Amazon DynamoDB. // // Describes an existing table export. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 DescribeExport for usage and error information. // // Returned Error Types: // // - ExportNotFoundException // The specified export was not found. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeExport func (c *DynamoDB) DescribeExport(input *DescribeExportInput) (*DescribeExportOutput, error) { req, out := c.DescribeExportRequest(input) return out, req.Send() } // DescribeExportWithContext is the same as DescribeExport with the addition of // the ability to pass a context and additional request options. // // See DescribeExport for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeExportWithContext(ctx aws.Context, input *DescribeExportInput, opts ...request.Option) (*DescribeExportOutput, error) { req, out := c.DescribeExportRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeGlobalTable = "DescribeGlobalTable" // DescribeGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the DescribeGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeGlobalTable for more information on using the DescribeGlobalTable // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeGlobalTableRequest method. // req, resp := client.DescribeGlobalTableRequest(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/DescribeGlobalTable func (c *DynamoDB) DescribeGlobalTableRequest(input *DescribeGlobalTableInput) (req *request.Request, output *DescribeGlobalTableOutput) { op := &request.Operation{ Name: opDescribeGlobalTable, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeGlobalTableInput{} } output = &DescribeGlobalTableOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DescribeGlobalTable API operation for Amazon DynamoDB. // // Returns information about the specified global table. // // This operation only applies to Version 2017.11.29 (Legacy) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. We recommend using Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // when creating new global tables, as it provides greater flexibility, higher // efficiency and consumes less write capacity than 2017.11.29 (Legacy). To // determine which version you are using, see Determining the version (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html). // To update existing global tables from version 2017.11.29 (Legacy) to version // 2019.11.21 (Current), see Updating global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.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 DynamoDB's // API operation DescribeGlobalTable for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - GlobalTableNotFoundException // The specified global table does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTable func (c *DynamoDB) DescribeGlobalTable(input *DescribeGlobalTableInput) (*DescribeGlobalTableOutput, error) { req, out := c.DescribeGlobalTableRequest(input) return out, req.Send() } // DescribeGlobalTableWithContext is the same as DescribeGlobalTable with the addition of // the ability to pass a context and additional request options. // // See DescribeGlobalTable for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeGlobalTableWithContext(ctx aws.Context, input *DescribeGlobalTableInput, opts ...request.Option) (*DescribeGlobalTableOutput, error) { req, out := c.DescribeGlobalTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeGlobalTableSettings = "DescribeGlobalTableSettings" // DescribeGlobalTableSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGlobalTableSettings operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeGlobalTableSettings for more information on using the DescribeGlobalTableSettings // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeGlobalTableSettingsRequest method. // req, resp := client.DescribeGlobalTableSettingsRequest(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/DescribeGlobalTableSettings func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTableSettingsInput) (req *request.Request, output *DescribeGlobalTableSettingsOutput) { op := &request.Operation{ Name: opDescribeGlobalTableSettings, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeGlobalTableSettingsInput{} } output = &DescribeGlobalTableSettingsOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DescribeGlobalTableSettings API operation for Amazon DynamoDB. // // Describes Region-specific settings for a global table. // // This operation only applies to Version 2017.11.29 (Legacy) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. We recommend using Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // when creating new global tables, as it provides greater flexibility, higher // efficiency and consumes less write capacity than 2017.11.29 (Legacy). To // determine which version you are using, see Determining the version (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html). // To update existing global tables from version 2017.11.29 (Legacy) to version // 2019.11.21 (Current), see Updating global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.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 DynamoDB's // API operation DescribeGlobalTableSettings for usage and error information. // // Returned Error Types: // // - GlobalTableNotFoundException // The specified global table does not exist. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings func (c *DynamoDB) DescribeGlobalTableSettings(input *DescribeGlobalTableSettingsInput) (*DescribeGlobalTableSettingsOutput, error) { req, out := c.DescribeGlobalTableSettingsRequest(input) return out, req.Send() } // DescribeGlobalTableSettingsWithContext is the same as DescribeGlobalTableSettings with the addition of // the ability to pass a context and additional request options. // // See DescribeGlobalTableSettings for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeGlobalTableSettingsWithContext(ctx aws.Context, input *DescribeGlobalTableSettingsInput, opts ...request.Option) (*DescribeGlobalTableSettingsOutput, error) { req, out := c.DescribeGlobalTableSettingsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeImport = "DescribeImport" // DescribeImportRequest generates a "aws/request.Request" representing the // client's request for the DescribeImport operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeImport for more information on using the DescribeImport // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeImportRequest method. // req, resp := client.DescribeImportRequest(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/DescribeImport func (c *DynamoDB) DescribeImportRequest(input *DescribeImportInput) (req *request.Request, output *DescribeImportOutput) { op := &request.Operation{ Name: opDescribeImport, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeImportInput{} } output = &DescribeImportOutput{} req = c.newRequest(op, input, output) return } // DescribeImport API operation for Amazon DynamoDB. // // Represents the properties of the import. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 DescribeImport for usage and error information. // // Returned Error Types: // - ImportNotFoundException // The specified import was not found. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeImport func (c *DynamoDB) DescribeImport(input *DescribeImportInput) (*DescribeImportOutput, error) { req, out := c.DescribeImportRequest(input) return out, req.Send() } // DescribeImportWithContext is the same as DescribeImport with the addition of // the ability to pass a context and additional request options. // // See DescribeImport for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeImportWithContext(ctx aws.Context, input *DescribeImportInput, opts ...request.Option) (*DescribeImportOutput, error) { req, out := c.DescribeImportRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeKinesisStreamingDestination = "DescribeKinesisStreamingDestination" // DescribeKinesisStreamingDestinationRequest generates a "aws/request.Request" representing the // client's request for the DescribeKinesisStreamingDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeKinesisStreamingDestination for more information on using the DescribeKinesisStreamingDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeKinesisStreamingDestinationRequest method. // req, resp := client.DescribeKinesisStreamingDestinationRequest(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/DescribeKinesisStreamingDestination func (c *DynamoDB) DescribeKinesisStreamingDestinationRequest(input *DescribeKinesisStreamingDestinationInput) (req *request.Request, output *DescribeKinesisStreamingDestinationOutput) { op := &request.Operation{ Name: opDescribeKinesisStreamingDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeKinesisStreamingDestinationInput{} } output = &DescribeKinesisStreamingDestinationOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DescribeKinesisStreamingDestination API operation for Amazon DynamoDB. // // Returns information about the status of Kinesis streaming. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 DescribeKinesisStreamingDestination for usage and error information. // // Returned Error Types: // // - 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. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeKinesisStreamingDestination func (c *DynamoDB) DescribeKinesisStreamingDestination(input *DescribeKinesisStreamingDestinationInput) (*DescribeKinesisStreamingDestinationOutput, error) { req, out := c.DescribeKinesisStreamingDestinationRequest(input) return out, req.Send() } // DescribeKinesisStreamingDestinationWithContext is the same as DescribeKinesisStreamingDestination with the addition of // the ability to pass a context and additional request options. // // See DescribeKinesisStreamingDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeKinesisStreamingDestinationWithContext(ctx aws.Context, input *DescribeKinesisStreamingDestinationInput, opts ...request.Option) (*DescribeKinesisStreamingDestinationOutput, error) { req, out := c.DescribeKinesisStreamingDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLimits operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeLimits for more information on using the DescribeLimits // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeLimitsRequest method. // req, resp := client.DescribeLimitsRequest(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/DescribeLimits func (c *DynamoDB) DescribeLimitsRequest(input *DescribeLimitsInput) (req *request.Request, output *DescribeLimitsOutput) { op := &request.Operation{ Name: opDescribeLimits, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeLimitsInput{} } output = &DescribeLimitsOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DescribeLimits API operation for Amazon DynamoDB. // // Returns the current provisioned-capacity quotas for your Amazon Web Services // account in a Region, both for the Region as a whole and for any one DynamoDB // table that you create there. // // When you establish an Amazon Web Services account, the account has initial // quotas on the maximum read capacity units and write capacity units that you // can provision across all of your DynamoDB tables in a given Region. Also, // there are per-table quotas that apply when you create a table there. For // more information, see Service, Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // page in the Amazon DynamoDB Developer Guide. // // Although you can increase these quotas by filing a case at Amazon Web Services // Support Center (https://console.aws.amazon.com/support/home#/), obtaining // the increase is not instantaneous. The DescribeLimits action lets you write // code to compare the capacity you are currently using to those quotas imposed // by your account so that you have enough time to apply for an increase before // you hit a quota. // // For example, you could use one of the Amazon Web Services SDKs to do the // following: // // Call DescribeLimits for a particular Region to obtain your current account // quotas on provisioned capacity there. // // Create a variable to hold the aggregate read capacity units provisioned for // all your tables in that Region, and one to hold the aggregate write capacity // units. Zero them both. // // Call ListTables to obtain a list of all your DynamoDB tables. // // For each table name listed by ListTables, do the following: // // - Call DescribeTable with the table name. // // - Use the data returned by DescribeTable to add the read capacity units // and write capacity units provisioned for the table itself to your variables. // // - If the table has one or more global secondary indexes (GSIs), loop over // these GSIs and add their provisioned capacity values to your variables // as well. // // Report the account quotas for that Region returned by DescribeLimits, along // with the total current provisioned capacity levels you have calculated. // // This will let you see whether you are getting close to your account-level // quotas. // // The per-table quotas apply only when you are creating a new table. They restrict // the sum of the provisioned capacity of the new table itself and all its global // secondary indexes. // // For existing tables and their GSIs, DynamoDB doesn't let you increase provisioned // capacity extremely rapidly, but the only quota that applies is that the aggregate // provisioned capacity over all your tables and GSIs cannot exceed either of // the per-account quotas. // // DescribeLimits should only be called periodically. You can expect throttling // errors if you call it more than once in a minute. // // The DescribeLimits Request element has no content. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 DescribeLimits for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeLimits func (c *DynamoDB) DescribeLimits(input *DescribeLimitsInput) (*DescribeLimitsOutput, error) { req, out := c.DescribeLimitsRequest(input) return out, req.Send() } // DescribeLimitsWithContext is the same as DescribeLimits with the addition of // the ability to pass a context and additional request options. // // See DescribeLimits for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeLimitsWithContext(ctx aws.Context, input *DescribeLimitsInput, opts ...request.Option) (*DescribeLimitsOutput, error) { req, out := c.DescribeLimitsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeTable = "DescribeTable" // DescribeTableRequest generates a "aws/request.Request" representing the // client's request for the DescribeTable operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeTable for more information on using the DescribeTable // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeTableRequest method. // req, resp := client.DescribeTableRequest(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/DescribeTable func (c *DynamoDB) DescribeTableRequest(input *DescribeTableInput) (req *request.Request, output *DescribeTableOutput) { op := &request.Operation{ Name: opDescribeTable, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeTableInput{} } output = &DescribeTableOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DescribeTable API operation for Amazon DynamoDB. // // Returns information about the table, including the current status of the // table, when it was created, the primary key schema, and any indexes on the // table. // // This operation only applies to Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // of global tables. // // If you issue a DescribeTable request immediately after a CreateTable request, // DynamoDB might return a ResourceNotFoundException. This is because DescribeTable // uses an eventually consistent query, and the metadata for your table might // not be available at that moment. Wait for a few seconds, and then try the // DescribeTable request again. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 DescribeTable for usage and error information. // // Returned Error Types: // // - 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. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTable func (c *DynamoDB) DescribeTable(input *DescribeTableInput) (*DescribeTableOutput, error) { req, out := c.DescribeTableRequest(input) return out, req.Send() } // DescribeTableWithContext is the same as DescribeTable with the addition of // the ability to pass a context and additional request options. // // See DescribeTable for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeTableWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.Option) (*DescribeTableOutput, error) { req, out := c.DescribeTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeTableReplicaAutoScaling = "DescribeTableReplicaAutoScaling" // DescribeTableReplicaAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the DescribeTableReplicaAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeTableReplicaAutoScaling for more information on using the DescribeTableReplicaAutoScaling // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeTableReplicaAutoScalingRequest method. // req, resp := client.DescribeTableReplicaAutoScalingRequest(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/DescribeTableReplicaAutoScaling func (c *DynamoDB) DescribeTableReplicaAutoScalingRequest(input *DescribeTableReplicaAutoScalingInput) (req *request.Request, output *DescribeTableReplicaAutoScalingOutput) { op := &request.Operation{ Name: opDescribeTableReplicaAutoScaling, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeTableReplicaAutoScalingInput{} } output = &DescribeTableReplicaAutoScalingOutput{} req = c.newRequest(op, input, output) return } // DescribeTableReplicaAutoScaling API operation for Amazon DynamoDB. // // Describes auto scaling settings across replicas of the global table at once. // // This operation only applies to Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // of global tables. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation DescribeTableReplicaAutoScaling for usage and error information. // // Returned Error Types: // // - 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. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTableReplicaAutoScaling func (c *DynamoDB) DescribeTableReplicaAutoScaling(input *DescribeTableReplicaAutoScalingInput) (*DescribeTableReplicaAutoScalingOutput, error) { req, out := c.DescribeTableReplicaAutoScalingRequest(input) return out, req.Send() } // DescribeTableReplicaAutoScalingWithContext is the same as DescribeTableReplicaAutoScaling with the addition of // the ability to pass a context and additional request options. // // See DescribeTableReplicaAutoScaling for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeTableReplicaAutoScalingWithContext(ctx aws.Context, input *DescribeTableReplicaAutoScalingInput, opts ...request.Option) (*DescribeTableReplicaAutoScalingOutput, error) { req, out := c.DescribeTableReplicaAutoScalingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeTimeToLive = "DescribeTimeToLive" // DescribeTimeToLiveRequest generates a "aws/request.Request" representing the // client's request for the DescribeTimeToLive operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeTimeToLive for more information on using the DescribeTimeToLive // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeTimeToLiveRequest method. // req, resp := client.DescribeTimeToLiveRequest(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/DescribeTimeToLive func (c *DynamoDB) DescribeTimeToLiveRequest(input *DescribeTimeToLiveInput) (req *request.Request, output *DescribeTimeToLiveOutput) { op := &request.Operation{ Name: opDescribeTimeToLive, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeTimeToLiveInput{} } output = &DescribeTimeToLiveOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DescribeTimeToLive API operation for Amazon DynamoDB. // // Gives a description of the Time to Live (TTL) status on the specified 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 DynamoDB's // API operation DescribeTimeToLive for usage and error information. // // Returned Error Types: // // - 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. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTimeToLive func (c *DynamoDB) DescribeTimeToLive(input *DescribeTimeToLiveInput) (*DescribeTimeToLiveOutput, error) { req, out := c.DescribeTimeToLiveRequest(input) return out, req.Send() } // DescribeTimeToLiveWithContext is the same as DescribeTimeToLive with the addition of // the ability to pass a context and additional request options. // // See DescribeTimeToLive for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DescribeTimeToLiveWithContext(ctx aws.Context, input *DescribeTimeToLiveInput, opts ...request.Option) (*DescribeTimeToLiveOutput, error) { req, out := c.DescribeTimeToLiveRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDisableKinesisStreamingDestination = "DisableKinesisStreamingDestination" // DisableKinesisStreamingDestinationRequest generates a "aws/request.Request" representing the // client's request for the DisableKinesisStreamingDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DisableKinesisStreamingDestination for more information on using the DisableKinesisStreamingDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DisableKinesisStreamingDestinationRequest method. // req, resp := client.DisableKinesisStreamingDestinationRequest(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/DisableKinesisStreamingDestination func (c *DynamoDB) DisableKinesisStreamingDestinationRequest(input *DisableKinesisStreamingDestinationInput) (req *request.Request, output *DisableKinesisStreamingDestinationOutput) { op := &request.Operation{ Name: opDisableKinesisStreamingDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DisableKinesisStreamingDestinationInput{} } output = &DisableKinesisStreamingDestinationOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // DisableKinesisStreamingDestination API operation for Amazon DynamoDB. // // Stops replication from the DynamoDB table to the Kinesis data stream. This // is done without deleting either of the resources. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation DisableKinesisStreamingDestination for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - 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. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DisableKinesisStreamingDestination func (c *DynamoDB) DisableKinesisStreamingDestination(input *DisableKinesisStreamingDestinationInput) (*DisableKinesisStreamingDestinationOutput, error) { req, out := c.DisableKinesisStreamingDestinationRequest(input) return out, req.Send() } // DisableKinesisStreamingDestinationWithContext is the same as DisableKinesisStreamingDestination with the addition of // the ability to pass a context and additional request options. // // See DisableKinesisStreamingDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) DisableKinesisStreamingDestinationWithContext(ctx aws.Context, input *DisableKinesisStreamingDestinationInput, opts ...request.Option) (*DisableKinesisStreamingDestinationOutput, error) { req, out := c.DisableKinesisStreamingDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opEnableKinesisStreamingDestination = "EnableKinesisStreamingDestination" // EnableKinesisStreamingDestinationRequest generates a "aws/request.Request" representing the // client's request for the EnableKinesisStreamingDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See EnableKinesisStreamingDestination for more information on using the EnableKinesisStreamingDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the EnableKinesisStreamingDestinationRequest method. // req, resp := client.EnableKinesisStreamingDestinationRequest(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/EnableKinesisStreamingDestination func (c *DynamoDB) EnableKinesisStreamingDestinationRequest(input *EnableKinesisStreamingDestinationInput) (req *request.Request, output *EnableKinesisStreamingDestinationOutput) { op := &request.Operation{ Name: opEnableKinesisStreamingDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &EnableKinesisStreamingDestinationInput{} } output = &EnableKinesisStreamingDestinationOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // EnableKinesisStreamingDestination API operation for Amazon DynamoDB. // // Starts table data replication to the specified Kinesis data stream at a timestamp // chosen during the enable workflow. If this operation doesn't return results // immediately, use DescribeKinesisStreamingDestination to check if streaming // to the Kinesis data stream is 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 DynamoDB's // API operation EnableKinesisStreamingDestination for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - 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. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/EnableKinesisStreamingDestination func (c *DynamoDB) EnableKinesisStreamingDestination(input *EnableKinesisStreamingDestinationInput) (*EnableKinesisStreamingDestinationOutput, error) { req, out := c.EnableKinesisStreamingDestinationRequest(input) return out, req.Send() } // EnableKinesisStreamingDestinationWithContext is the same as EnableKinesisStreamingDestination with the addition of // the ability to pass a context and additional request options. // // See EnableKinesisStreamingDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) EnableKinesisStreamingDestinationWithContext(ctx aws.Context, input *EnableKinesisStreamingDestinationInput, opts ...request.Option) (*EnableKinesisStreamingDestinationOutput, error) { req, out := c.EnableKinesisStreamingDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opExecuteStatement = "ExecuteStatement" // ExecuteStatementRequest generates a "aws/request.Request" representing the // client's request for the ExecuteStatement operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ExecuteStatement for more information on using the ExecuteStatement // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ExecuteStatementRequest method. // req, resp := client.ExecuteStatementRequest(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/ExecuteStatement func (c *DynamoDB) ExecuteStatementRequest(input *ExecuteStatementInput) (req *request.Request, output *ExecuteStatementOutput) { op := &request.Operation{ Name: opExecuteStatement, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ExecuteStatementInput{} } output = &ExecuteStatementOutput{} req = c.newRequest(op, input, output) return } // ExecuteStatement API operation for Amazon DynamoDB. // // This operation allows you to perform reads and singleton writes on data stored // in DynamoDB, using PartiQL. // // For PartiQL reads (SELECT statement), if the total number of processed items // exceeds the maximum dataset size limit of 1 MB, the read stops and results // are returned to the user as a LastEvaluatedKey value to continue the read // in a subsequent operation. If the filter criteria in WHERE clause does not // match any data, the read will return an empty result set. // // A single SELECT statement response can return up to the maximum number of // items (if using the Limit parameter) or a maximum of 1 MB of data (and then // apply any filtering to the results using WHERE clause). If LastEvaluatedKey // is present in the response, you need to paginate the result set. If NextToken // is present, you need to paginate the result set and include NextToken. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 ExecuteStatement for usage and error information. // // Returned Error Types: // // - ConditionalCheckFailedException // A condition specified in the operation could not be evaluated. // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - ItemCollectionSizeLimitExceededException // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // // - TransactionConflictException // Operation was rejected because there is an ongoing transaction for the item. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // - DuplicateItemException // There was an attempt to insert an item with the same primary key as an item // that already exists in the DynamoDB table. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ExecuteStatement func (c *DynamoDB) ExecuteStatement(input *ExecuteStatementInput) (*ExecuteStatementOutput, error) { req, out := c.ExecuteStatementRequest(input) return out, req.Send() } // ExecuteStatementWithContext is the same as ExecuteStatement with the addition of // the ability to pass a context and additional request options. // // See ExecuteStatement for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ExecuteStatementWithContext(ctx aws.Context, input *ExecuteStatementInput, opts ...request.Option) (*ExecuteStatementOutput, error) { req, out := c.ExecuteStatementRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opExecuteTransaction = "ExecuteTransaction" // ExecuteTransactionRequest generates a "aws/request.Request" representing the // client's request for the ExecuteTransaction operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ExecuteTransaction for more information on using the ExecuteTransaction // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ExecuteTransactionRequest method. // req, resp := client.ExecuteTransactionRequest(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/ExecuteTransaction func (c *DynamoDB) ExecuteTransactionRequest(input *ExecuteTransactionInput) (req *request.Request, output *ExecuteTransactionOutput) { op := &request.Operation{ Name: opExecuteTransaction, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ExecuteTransactionInput{} } output = &ExecuteTransactionOutput{} req = c.newRequest(op, input, output) return } // ExecuteTransaction API operation for Amazon DynamoDB. // // This operation allows you to perform transactional reads or writes on data // stored in DynamoDB, using PartiQL. // // The entire transaction must consist of either read statements or write statements, // you cannot mix both in one transaction. The EXISTS function is an exception // and can be used to check the condition of specific attributes of the item // in a similar manner to ConditionCheck in the TransactWriteItems (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html#transaction-apis-txwriteitems) // API. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation ExecuteTransaction for usage and error information. // // Returned Error Types: // // - 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. // // - TransactionCanceledException // The entire transaction request was canceled. // // DynamoDB cancels a TransactWriteItems request under the following circumstances: // // - A condition in one of the condition expressions is not met. // // - A table in the TransactWriteItems request is in a different account // or region. // // - More than one action in the TransactWriteItems operation targets the // same item. // // - There is insufficient provisioned capacity for the transaction to be // completed. // // - An item size becomes too large (larger than 400 KB), or 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. // // - There is an ongoing TransactWriteItems operation that conflicts with // a concurrent TransactWriteItems request. In this case the TransactWriteItems // operation fails with a TransactionCanceledException. // // DynamoDB cancels a TransactGetItems request under the following circumstances: // // - There is an ongoing TransactGetItems operation that conflicts with a // concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. // In this case the TransactGetItems operation fails with a TransactionCanceledException. // // - A table in the TransactGetItems request is in a different account or // region. // // - There is insufficient provisioned capacity for the transaction to be // completed. // // - There is a user error, such as an invalid data format. // // If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons // property. This property is not set for other languages. Transaction cancellation // reasons are ordered in the order of requested items, if an item has no error // it will have None code and Null message. // // Cancellation reason codes and possible error messages: // // - No Errors: Code: None Message: null // // - Conditional Check Failed: Code: ConditionalCheckFailed Message: The // conditional request failed. // // - Item Collection Size Limit Exceeded: Code: ItemCollectionSizeLimitExceeded // Message: Collection size exceeded. // // - Transaction Conflict: Code: TransactionConflict Message: Transaction // is ongoing for the item. // // - Provisioned Throughput Exceeded: Code: ProvisionedThroughputExceeded // Messages: The level of configured provisioned throughput for the table // was exceeded. Consider increasing your provisioning level with the UpdateTable // API. This Message is received when provisioned throughput is exceeded // is on a provisioned DynamoDB table. The level of configured provisioned // throughput for one or more global secondary indexes of the table was exceeded. // Consider increasing your provisioning level for the under-provisioned // global secondary indexes with the UpdateTable API. This message is returned // when provisioned throughput is exceeded is on a provisioned GSI. // // - Throttling Error: Code: ThrottlingError Messages: Throughput exceeds // the current capacity of your table or index. DynamoDB is automatically // scaling your table or index so please try again shortly. If exceptions // persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html. // This message is returned when writes get throttled on an On-Demand table // as DynamoDB is automatically scaling the table. Throughput exceeds the // current capacity for one or more global secondary indexes. DynamoDB is // automatically scaling your index so please try again shortly. This message // is returned when writes get throttled on an On-Demand GSI as DynamoDB // is automatically scaling the GSI. // // - Validation Error: Code: ValidationError Messages: One or more parameter // values were invalid. The update expression attempted to update the secondary // index key beyond allowed size limits. The update expression attempted // to update the secondary index key to unsupported type. An operand in the // update expression has an incorrect data type. Item size to update has // exceeded the maximum allowed size. Number overflow. Attempting to store // a number with magnitude larger than supported range. Type mismatch for // attribute to update. Nesting Levels have exceeded supported limits. The // document path provided in the update expression is invalid for update. // The provided expression refers to an attribute that does not exist in // the item. // // - TransactionInProgressException // The transaction with the given request token is already in progress. // // Recommended Settings // // This is a general recommendation for handling the TransactionInProgressException. // These settings help ensure that the client retries will trigger completion // of the ongoing TransactWriteItems request. // // - Set clientExecutionTimeout to a value that allows at least one retry // to be processed after 5 seconds have elapsed since the first attempt for // the TransactWriteItems operation. // // - Set socketTimeout to a value a little lower than the requestTimeout // setting. // // - requestTimeout should be set based on the time taken for the individual // retries of a single HTTP request for your use case, but setting it to // 1 second or higher should work well to reduce chances of retries and TransactionInProgressException // errors. // // - Use exponential backoff when retrying and tune backoff if needed. // // Assuming default retry policy (https://github.com/aws/aws-sdk-java/blob/fd409dee8ae23fb8953e0bb4dbde65536a7e0514/aws-java-sdk-core/src/main/java/com/amazonaws/retry/PredefinedRetryPolicies.java#L97), // example timeout settings based on the guidelines above are as follows: // // Example timeline: // // - 0-1000 first attempt // // - 1000-1500 first sleep/delay (default retry policy uses 500 ms as base // delay for 4xx errors) // // - 1500-2500 second attempt // // - 2500-3500 second sleep/delay (500 * 2, exponential backoff) // // - 3500-4500 third attempt // // - 4500-6500 third sleep/delay (500 * 2^2) // // - 6500-7500 fourth attempt (this can trigger inline recovery since 5 seconds // have elapsed since the first attempt reached TC) // // - IdempotentParameterMismatchException // DynamoDB rejected the request because you retried a request with a different // payload but with an idempotent token that was already used. // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ExecuteTransaction func (c *DynamoDB) ExecuteTransaction(input *ExecuteTransactionInput) (*ExecuteTransactionOutput, error) { req, out := c.ExecuteTransactionRequest(input) return out, req.Send() } // ExecuteTransactionWithContext is the same as ExecuteTransaction with the addition of // the ability to pass a context and additional request options. // // See ExecuteTransaction for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ExecuteTransactionWithContext(ctx aws.Context, input *ExecuteTransactionInput, opts ...request.Option) (*ExecuteTransactionOutput, error) { req, out := c.ExecuteTransactionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opExportTableToPointInTime = "ExportTableToPointInTime" // ExportTableToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the ExportTableToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ExportTableToPointInTime for more information on using the ExportTableToPointInTime // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ExportTableToPointInTimeRequest method. // req, resp := client.ExportTableToPointInTimeRequest(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/ExportTableToPointInTime func (c *DynamoDB) ExportTableToPointInTimeRequest(input *ExportTableToPointInTimeInput) (req *request.Request, output *ExportTableToPointInTimeOutput) { op := &request.Operation{ Name: opExportTableToPointInTime, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ExportTableToPointInTimeInput{} } output = &ExportTableToPointInTimeOutput{} req = c.newRequest(op, input, output) return } // ExportTableToPointInTime API operation for Amazon DynamoDB. // // Exports table data to an S3 bucket. The table must have point in time recovery // enabled, and you can export data from any time within the point in time recovery // window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation ExportTableToPointInTime for usage and error information. // // Returned Error Types: // // - TableNotFoundException // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. // // - PointInTimeRecoveryUnavailableException // Point in time recovery has not yet been enabled for this source table. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InvalidExportTimeException // The specified ExportTime is outside of the point in time recovery window. // // - ExportConflictException // There was a conflict when writing to the specified S3 bucket. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ExportTableToPointInTime func (c *DynamoDB) ExportTableToPointInTime(input *ExportTableToPointInTimeInput) (*ExportTableToPointInTimeOutput, error) { req, out := c.ExportTableToPointInTimeRequest(input) return out, req.Send() } // ExportTableToPointInTimeWithContext is the same as ExportTableToPointInTime with the addition of // the ability to pass a context and additional request options. // // See ExportTableToPointInTime for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ExportTableToPointInTimeWithContext(ctx aws.Context, input *ExportTableToPointInTimeInput, opts ...request.Option) (*ExportTableToPointInTimeOutput, error) { req, out := c.ExportTableToPointInTimeRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetItem = "GetItem" // GetItemRequest generates a "aws/request.Request" representing the // client's request for the GetItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetItem for more information on using the GetItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetItemRequest method. // req, resp := client.GetItemRequest(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/GetItem func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, output *GetItemOutput) { op := &request.Operation{ Name: opGetItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetItemInput{} } output = &GetItemOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // GetItem API operation for Amazon DynamoDB. // // The GetItem operation returns a set of attributes for the item with the given // primary key. If there is no matching item, GetItem does not return any data // and there will be no Item element in the response. // // GetItem provides an eventually consistent read by default. If your application // requires a strongly consistent read, set ConsistentRead to true. Although // a strongly consistent read might take more time than an eventually consistent // read, it always returns the last updated value. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation GetItem for usage and error information. // // Returned Error Types: // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/GetItem func (c *DynamoDB) GetItem(input *GetItemInput) (*GetItemOutput, error) { req, out := c.GetItemRequest(input) return out, req.Send() } // GetItemWithContext is the same as GetItem with the addition of // the ability to pass a context and additional request options. // // See GetItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) GetItemWithContext(ctx aws.Context, input *GetItemInput, opts ...request.Option) (*GetItemOutput, error) { req, out := c.GetItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opImportTable = "ImportTable" // ImportTableRequest generates a "aws/request.Request" representing the // client's request for the ImportTable operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ImportTable for more information on using the ImportTable // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ImportTableRequest method. // req, resp := client.ImportTableRequest(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/ImportTable func (c *DynamoDB) ImportTableRequest(input *ImportTableInput) (req *request.Request, output *ImportTableOutput) { op := &request.Operation{ Name: opImportTable, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ImportTableInput{} } output = &ImportTableOutput{} req = c.newRequest(op, input, output) return } // ImportTable API operation for Amazon DynamoDB. // // Imports table data from an 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 DynamoDB's // API operation ImportTable for usage and error information. // // Returned Error Types: // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - ImportConflictException // There was a conflict when importing from the specified S3 source. This can // occur when the current import conflicts with a previous import request that // had the same client token. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ImportTable func (c *DynamoDB) ImportTable(input *ImportTableInput) (*ImportTableOutput, error) { req, out := c.ImportTableRequest(input) return out, req.Send() } // ImportTableWithContext is the same as ImportTable with the addition of // the ability to pass a context and additional request options. // // See ImportTable for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ImportTableWithContext(ctx aws.Context, input *ImportTableInput, opts ...request.Option) (*ImportTableOutput, error) { req, out := c.ImportTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListBackups = "ListBackups" // ListBackupsRequest generates a "aws/request.Request" representing the // client's request for the ListBackups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListBackups for more information on using the ListBackups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListBackupsRequest method. // req, resp := client.ListBackupsRequest(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/ListBackups func (c *DynamoDB) ListBackupsRequest(input *ListBackupsInput) (req *request.Request, output *ListBackupsOutput) { op := &request.Operation{ Name: opListBackups, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListBackupsInput{} } output = &ListBackupsOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // ListBackups API operation for Amazon DynamoDB. // // List DynamoDB backups that are associated with an Amazon Web Services account // and weren't made with Amazon Web Services Backup. To list these backups for // a given table, specify TableName. ListBackups returns a paginated list of // results with at most 1 MB worth of items in a page. You can also specify // a maximum number of entries to be returned in a page. // // In the request, start time is inclusive, but end time is exclusive. Note // that these boundaries are for the time at which the original backup was requested. // // You can call ListBackups a maximum of five times per second. // // If you want to retrieve the complete list of backups made with Amazon Web // Services Backup, use the Amazon Web Services Backup list API. (https://docs.aws.amazon.com/aws-backup/latest/devguide/API_ListBackupJobs.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 DynamoDB's // API operation ListBackups for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListBackups func (c *DynamoDB) ListBackups(input *ListBackupsInput) (*ListBackupsOutput, error) { req, out := c.ListBackupsRequest(input) return out, req.Send() } // ListBackupsWithContext is the same as ListBackups with the addition of // the ability to pass a context and additional request options. // // See ListBackups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ListBackupsWithContext(ctx aws.Context, input *ListBackupsInput, opts ...request.Option) (*ListBackupsOutput, error) { req, out := c.ListBackupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListContributorInsights = "ListContributorInsights" // ListContributorInsightsRequest generates a "aws/request.Request" representing the // client's request for the ListContributorInsights operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListContributorInsights for more information on using the ListContributorInsights // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListContributorInsightsRequest method. // req, resp := client.ListContributorInsightsRequest(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/ListContributorInsights func (c *DynamoDB) ListContributorInsightsRequest(input *ListContributorInsightsInput) (req *request.Request, output *ListContributorInsightsOutput) { op := &request.Operation{ Name: opListContributorInsights, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListContributorInsightsInput{} } output = &ListContributorInsightsOutput{} req = c.newRequest(op, input, output) return } // ListContributorInsights API operation for Amazon DynamoDB. // // Returns a list of ContributorInsightsSummary for a table and all its global // secondary indexes. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 ListContributorInsights for usage and error information. // // Returned Error Types: // // - 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. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListContributorInsights func (c *DynamoDB) ListContributorInsights(input *ListContributorInsightsInput) (*ListContributorInsightsOutput, error) { req, out := c.ListContributorInsightsRequest(input) return out, req.Send() } // ListContributorInsightsWithContext is the same as ListContributorInsights with the addition of // the ability to pass a context and additional request options. // // See ListContributorInsights for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ListContributorInsightsWithContext(ctx aws.Context, input *ListContributorInsightsInput, opts ...request.Option) (*ListContributorInsightsOutput, error) { req, out := c.ListContributorInsightsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListContributorInsightsPages iterates over the pages of a ListContributorInsights operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListContributorInsights 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 ListContributorInsights operation. // pageNum := 0 // err := client.ListContributorInsightsPages(params, // func(page *dynamodb.ListContributorInsightsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *DynamoDB) ListContributorInsightsPages(input *ListContributorInsightsInput, fn func(*ListContributorInsightsOutput, bool) bool) error { return c.ListContributorInsightsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListContributorInsightsPagesWithContext same as ListContributorInsightsPages 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 *DynamoDB) ListContributorInsightsPagesWithContext(ctx aws.Context, input *ListContributorInsightsInput, fn func(*ListContributorInsightsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListContributorInsightsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListContributorInsightsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListContributorInsightsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListExports = "ListExports" // ListExportsRequest generates a "aws/request.Request" representing the // client's request for the ListExports operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListExports for more information on using the ListExports // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListExportsRequest method. // req, resp := client.ListExportsRequest(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/ListExports func (c *DynamoDB) ListExportsRequest(input *ListExportsInput) (req *request.Request, output *ListExportsOutput) { op := &request.Operation{ Name: opListExports, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListExportsInput{} } output = &ListExportsOutput{} req = c.newRequest(op, input, output) return } // ListExports API operation for Amazon DynamoDB. // // Lists completed exports within the past 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. // // See the AWS API reference guide for Amazon DynamoDB's // API operation ListExports for usage and error information. // // Returned Error Types: // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListExports func (c *DynamoDB) ListExports(input *ListExportsInput) (*ListExportsOutput, error) { req, out := c.ListExportsRequest(input) return out, req.Send() } // ListExportsWithContext is the same as ListExports with the addition of // the ability to pass a context and additional request options. // // See ListExports for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ListExportsWithContext(ctx aws.Context, input *ListExportsInput, opts ...request.Option) (*ListExportsOutput, error) { req, out := c.ListExportsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListExportsPages iterates over the pages of a ListExports operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListExports 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 ListExports operation. // pageNum := 0 // err := client.ListExportsPages(params, // func(page *dynamodb.ListExportsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *DynamoDB) ListExportsPages(input *ListExportsInput, fn func(*ListExportsOutput, bool) bool) error { return c.ListExportsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListExportsPagesWithContext same as ListExportsPages 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 *DynamoDB) ListExportsPagesWithContext(ctx aws.Context, input *ListExportsInput, fn func(*ListExportsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListExportsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListExportsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListExportsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListGlobalTables = "ListGlobalTables" // ListGlobalTablesRequest generates a "aws/request.Request" representing the // client's request for the ListGlobalTables operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListGlobalTables for more information on using the ListGlobalTables // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListGlobalTablesRequest method. // req, resp := client.ListGlobalTablesRequest(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/ListGlobalTables func (c *DynamoDB) ListGlobalTablesRequest(input *ListGlobalTablesInput) (req *request.Request, output *ListGlobalTablesOutput) { op := &request.Operation{ Name: opListGlobalTables, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListGlobalTablesInput{} } output = &ListGlobalTablesOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // ListGlobalTables API operation for Amazon DynamoDB. // // Lists all global tables that have a replica in the specified Region. // // This operation only applies to Version 2017.11.29 (Legacy) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. We recommend using Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // when creating new global tables, as it provides greater flexibility, higher // efficiency and consumes less write capacity than 2017.11.29 (Legacy). To // determine which version you are using, see Determining the version (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html). // To update existing global tables from version 2017.11.29 (Legacy) to version // 2019.11.21 (Current), see Updating global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.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 DynamoDB's // API operation ListGlobalTables for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables func (c *DynamoDB) ListGlobalTables(input *ListGlobalTablesInput) (*ListGlobalTablesOutput, error) { req, out := c.ListGlobalTablesRequest(input) return out, req.Send() } // ListGlobalTablesWithContext is the same as ListGlobalTables with the addition of // the ability to pass a context and additional request options. // // See ListGlobalTables for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ListGlobalTablesWithContext(ctx aws.Context, input *ListGlobalTablesInput, opts ...request.Option) (*ListGlobalTablesOutput, error) { req, out := c.ListGlobalTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListImports = "ListImports" // ListImportsRequest generates a "aws/request.Request" representing the // client's request for the ListImports operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListImports for more information on using the ListImports // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListImportsRequest method. // req, resp := client.ListImportsRequest(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/ListImports func (c *DynamoDB) ListImportsRequest(input *ListImportsInput) (req *request.Request, output *ListImportsOutput) { op := &request.Operation{ Name: opListImports, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "PageSize", TruncationToken: "", }, } if input == nil { input = &ListImportsInput{} } output = &ListImportsOutput{} req = c.newRequest(op, input, output) return } // ListImports API operation for Amazon DynamoDB. // // Lists completed imports within the past 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. // // See the AWS API reference guide for Amazon DynamoDB's // API operation ListImports for usage and error information. // // Returned Error Types: // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListImports func (c *DynamoDB) ListImports(input *ListImportsInput) (*ListImportsOutput, error) { req, out := c.ListImportsRequest(input) return out, req.Send() } // ListImportsWithContext is the same as ListImports with the addition of // the ability to pass a context and additional request options. // // See ListImports for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ListImportsWithContext(ctx aws.Context, input *ListImportsInput, opts ...request.Option) (*ListImportsOutput, error) { req, out := c.ListImportsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListImportsPages iterates over the pages of a ListImports operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListImports 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 ListImports operation. // pageNum := 0 // err := client.ListImportsPages(params, // func(page *dynamodb.ListImportsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *DynamoDB) ListImportsPages(input *ListImportsInput, fn func(*ListImportsOutput, bool) bool) error { return c.ListImportsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListImportsPagesWithContext same as ListImportsPages 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 *DynamoDB) ListImportsPagesWithContext(ctx aws.Context, input *ListImportsInput, fn func(*ListImportsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListImportsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListImportsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListImportsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListTables = "ListTables" // ListTablesRequest generates a "aws/request.Request" representing the // client's request for the ListTables operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListTables for more information on using the ListTables // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListTablesRequest method. // req, resp := client.ListTablesRequest(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/ListTables func (c *DynamoDB) ListTablesRequest(input *ListTablesInput) (req *request.Request, output *ListTablesOutput) { op := &request.Operation{ Name: opListTables, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"ExclusiveStartTableName"}, OutputTokens: []string{"LastEvaluatedTableName"}, LimitToken: "Limit", TruncationToken: "", }, } if input == nil { input = &ListTablesInput{} } output = &ListTablesOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // ListTables API operation for Amazon DynamoDB. // // Returns an array of table names associated with the current account and endpoint. // The output from ListTables is paginated, with each page returning a maximum // of 100 table names. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 ListTables for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTables func (c *DynamoDB) ListTables(input *ListTablesInput) (*ListTablesOutput, error) { req, out := c.ListTablesRequest(input) return out, req.Send() } // ListTablesWithContext is the same as ListTables with the addition of // the ability to pass a context and additional request options. // // See ListTables for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ListTablesWithContext(ctx aws.Context, input *ListTablesInput, opts ...request.Option) (*ListTablesOutput, error) { req, out := c.ListTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListTablesPages iterates over the pages of a ListTables operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListTables 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 ListTables operation. // pageNum := 0 // err := client.ListTablesPages(params, // func(page *dynamodb.ListTablesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *DynamoDB) ListTablesPages(input *ListTablesInput, fn func(*ListTablesOutput, bool) bool) error { return c.ListTablesPagesWithContext(aws.BackgroundContext(), input, fn) } // ListTablesPagesWithContext same as ListTablesPages 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 *DynamoDB) ListTablesPagesWithContext(ctx aws.Context, input *ListTablesInput, fn func(*ListTablesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListTablesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListTablesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListTablesOutput), !p.HasNextPage()) { break } } return p.Err() } const opListTagsOfResource = "ListTagsOfResource" // ListTagsOfResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsOfResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListTagsOfResource for more information on using the ListTagsOfResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListTagsOfResourceRequest method. // req, resp := client.ListTagsOfResourceRequest(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/ListTagsOfResource func (c *DynamoDB) ListTagsOfResourceRequest(input *ListTagsOfResourceInput) (req *request.Request, output *ListTagsOfResourceOutput) { op := &request.Operation{ Name: opListTagsOfResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListTagsOfResourceInput{} } output = &ListTagsOfResourceOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // ListTagsOfResource API operation for Amazon DynamoDB. // // List all tags on an Amazon DynamoDB resource. You can call ListTagsOfResource // up to 10 times per second, per account. // // For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) // in the Amazon DynamoDB Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation ListTagsOfResource for usage and error information. // // Returned Error Types: // // - 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. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTagsOfResource func (c *DynamoDB) ListTagsOfResource(input *ListTagsOfResourceInput) (*ListTagsOfResourceOutput, error) { req, out := c.ListTagsOfResourceRequest(input) return out, req.Send() } // ListTagsOfResourceWithContext is the same as ListTagsOfResource with the addition of // the ability to pass a context and additional request options. // // See ListTagsOfResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ListTagsOfResourceWithContext(ctx aws.Context, input *ListTagsOfResourceInput, opts ...request.Option) (*ListTagsOfResourceOutput, error) { req, out := c.ListTagsOfResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutItem = "PutItem" // PutItemRequest generates a "aws/request.Request" representing the // client's request for the PutItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See PutItem for more information on using the PutItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the PutItemRequest method. // req, resp := client.PutItemRequest(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/PutItem func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, output *PutItemOutput) { op := &request.Operation{ Name: opPutItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutItemInput{} } output = &PutItemOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // PutItem API operation for Amazon DynamoDB. // // Creates a new item, or replaces an old item with a new item. If an item that // has the same primary key as the new item already exists in the specified // table, the new item completely replaces the existing item. You can perform // a conditional put operation (add a new item if one with the specified primary // key doesn't exist), or replace an existing item if it has certain attribute // values. You can return the item's attribute values in the same operation, // using the ReturnValues parameter. // // When you add an item, the primary key attributes are the only required attributes. // // Empty String and Binary attribute values are allowed. Attribute values of // type String and Binary must have a length greater than zero if the attribute // is used as a key attribute for a table or index. Set type attributes cannot // be empty. // // Invalid Requests with empty values will be rejected with a ValidationException // exception. // // To prevent a new item from replacing an existing item, use a conditional // expression that contains the attribute_not_exists function with the name // of the attribute being used as the partition key for the table. Since every // record must contain that attribute, the attribute_not_exists function will // only succeed if no matching item exists. // // For more information about PutItem, see Working with Items (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html) // in the Amazon DynamoDB Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation PutItem for usage and error information. // // Returned Error Types: // // - ConditionalCheckFailedException // A condition specified in the operation could not be evaluated. // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - ItemCollectionSizeLimitExceededException // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // // - TransactionConflictException // Operation was rejected because there is an ongoing transaction for the item. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/PutItem func (c *DynamoDB) PutItem(input *PutItemInput) (*PutItemOutput, error) { req, out := c.PutItemRequest(input) return out, req.Send() } // PutItemWithContext is the same as PutItem with the addition of // the ability to pass a context and additional request options. // // See PutItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) PutItemWithContext(ctx aws.Context, input *PutItemInput, opts ...request.Option) (*PutItemOutput, error) { req, out := c.PutItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opQuery = "Query" // QueryRequest generates a "aws/request.Request" representing the // client's request for the Query operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See Query for more information on using the Query // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the QueryRequest method. // req, resp := client.QueryRequest(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/Query func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output *QueryOutput) { op := &request.Operation{ Name: opQuery, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"ExclusiveStartKey"}, OutputTokens: []string{"LastEvaluatedKey"}, LimitToken: "Limit", TruncationToken: "", }, } if input == nil { input = &QueryInput{} } output = &QueryOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // Query API operation for Amazon DynamoDB. // // You must provide the name of the partition key attribute and a single value // for that attribute. Query returns all items with that partition key value. // Optionally, you can provide a sort key attribute and use a comparison operator // to refine the search results. // // Use the KeyConditionExpression parameter to provide a specific value for // the partition key. The Query operation will return all of the items from // the table or index with that partition key value. You can optionally narrow // the scope of the Query operation by specifying a sort key value and a comparison // operator in KeyConditionExpression. To further refine the Query results, // you can optionally provide a FilterExpression. A FilterExpression determines // which items within the results should be returned to you. All of the other // results are discarded. // // A Query operation always returns a result set. If no matching items are found, // the result set will be empty. Queries that do not return results consume // the minimum number of read capacity units for that type of read operation. // // DynamoDB calculates the number of read capacity units consumed based on item // size, not on the amount of data that is returned to an application. The number // of capacity units consumed will be the same whether you request all of the // attributes (the default behavior) or just some of them (using a projection // expression). The number will also be the same whether or not you use a FilterExpression. // // Query results are always sorted by the sort key value. If the data type of // the sort key is Number, the results are returned in numeric order; otherwise, // the results are returned in order of UTF-8 bytes. By default, the sort order // is ascending. To reverse the order, set the ScanIndexForward parameter to // false. // // A single Query operation will read up to the maximum number of items set // (if using the Limit parameter) or a maximum of 1 MB of data and then apply // any filtering to the results using FilterExpression. If LastEvaluatedKey // is present in the response, you will need to paginate the result set. For // more information, see Paginating the Results (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.Pagination) // in the Amazon DynamoDB Developer Guide. // // FilterExpression is applied after a Query finishes, but before the results // are returned. A FilterExpression cannot contain partition key or sort key // attributes. You need to specify those attributes in the KeyConditionExpression. // // A Query operation can return an empty result set and a LastEvaluatedKey if // all the items read for the page of results are filtered out. // // You can query a table, a local secondary index, or a global secondary index. // For a query on a table or on a local secondary index, you can set the ConsistentRead // parameter to true and obtain a strongly consistent result. Global secondary // indexes support eventually consistent reads only, so do not specify ConsistentRead // when querying a global secondary index. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 Query for usage and error information. // // Returned Error Types: // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Query func (c *DynamoDB) Query(input *QueryInput) (*QueryOutput, error) { req, out := c.QueryRequest(input) return out, req.Send() } // QueryWithContext is the same as Query with the addition of // the ability to pass a context and additional request options. // // See Query for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) QueryWithContext(ctx aws.Context, input *QueryInput, opts ...request.Option) (*QueryOutput, error) { req, out := c.QueryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // QueryPages iterates over the pages of a Query operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See Query 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 Query operation. // pageNum := 0 // err := client.QueryPages(params, // func(page *dynamodb.QueryOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *DynamoDB) QueryPages(input *QueryInput, fn func(*QueryOutput, bool) bool) error { return c.QueryPagesWithContext(aws.BackgroundContext(), input, fn) } // QueryPagesWithContext same as QueryPages 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 *DynamoDB) QueryPagesWithContext(ctx aws.Context, input *QueryInput, fn func(*QueryOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *QueryInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.QueryRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*QueryOutput), !p.HasNextPage()) { break } } return p.Err() } const opRestoreTableFromBackup = "RestoreTableFromBackup" // RestoreTableFromBackupRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableFromBackup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See RestoreTableFromBackup for more information on using the RestoreTableFromBackup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the RestoreTableFromBackupRequest method. // req, resp := client.RestoreTableFromBackupRequest(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/RestoreTableFromBackup func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupInput) (req *request.Request, output *RestoreTableFromBackupOutput) { op := &request.Operation{ Name: opRestoreTableFromBackup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &RestoreTableFromBackupInput{} } output = &RestoreTableFromBackupOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // RestoreTableFromBackup API operation for Amazon DynamoDB. // // Creates a new table from an existing backup. Any number of users can execute // up to 50 concurrent restores (any type of restore) in a given account. // // You can call RestoreTableFromBackup at a maximum rate of 10 times per second. // // You must manually set up the following on the restored table: // // - Auto scaling policies // // - IAM policies // // - Amazon CloudWatch metrics and alarms // // - Tags // // - Stream settings // // - Time to Live (TTL) 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 DynamoDB's // API operation RestoreTableFromBackup for usage and error information. // // Returned Error Types: // // - TableAlreadyExistsException // A target table with the specified name already exists. // // - TableInUseException // A target table with the specified name is either being created or deleted. // // - BackupNotFoundException // Backup not found for the given BackupARN. // // - BackupInUseException // There is another ongoing conflicting backup control plane operation on the // table. The backup is either being created, deleted or restored to a table. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableFromBackup func (c *DynamoDB) RestoreTableFromBackup(input *RestoreTableFromBackupInput) (*RestoreTableFromBackupOutput, error) { req, out := c.RestoreTableFromBackupRequest(input) return out, req.Send() } // RestoreTableFromBackupWithContext is the same as RestoreTableFromBackup with the addition of // the ability to pass a context and additional request options. // // See RestoreTableFromBackup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) RestoreTableFromBackupWithContext(ctx aws.Context, input *RestoreTableFromBackupInput, opts ...request.Option) (*RestoreTableFromBackupOutput, error) { req, out := c.RestoreTableFromBackupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opRestoreTableToPointInTime = "RestoreTableToPointInTime" // RestoreTableToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See RestoreTableToPointInTime for more information on using the RestoreTableToPointInTime // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the RestoreTableToPointInTimeRequest method. // req, resp := client.RestoreTableToPointInTimeRequest(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/RestoreTableToPointInTime func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointInTimeInput) (req *request.Request, output *RestoreTableToPointInTimeOutput) { op := &request.Operation{ Name: opRestoreTableToPointInTime, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &RestoreTableToPointInTimeInput{} } output = &RestoreTableToPointInTimeOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // RestoreTableToPointInTime API operation for Amazon DynamoDB. // // Restores the specified table to the specified point in time within EarliestRestorableDateTime // and LatestRestorableDateTime. You can restore your table to any point in // time during the last 35 days. Any number of users can execute up to 4 concurrent // restores (any type of restore) in a given account. // // When you restore using point in time recovery, DynamoDB restores your table // data to the state based on the selected date and time (day:hour:minute:second) // to a new table. // // Along with data, the following are also included on the new restored table // using point in time recovery: // // - Global secondary indexes (GSIs) // // - Local secondary indexes (LSIs) // // - Provisioned read and write capacity // // - Encryption settings All these settings come from the current settings // of the source table at the time of restore. // // You must manually set up the following on the restored table: // // - Auto scaling policies // // - IAM policies // // - Amazon CloudWatch metrics and alarms // // - Tags // // - Stream settings // // - Time to Live (TTL) settings // // - Point in time recovery 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 DynamoDB's // API operation RestoreTableToPointInTime for usage and error information. // // Returned Error Types: // // - TableAlreadyExistsException // A target table with the specified name already exists. // // - TableNotFoundException // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. // // - TableInUseException // A target table with the specified name is either being created or deleted. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InvalidRestoreTimeException // An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime // and LatestRestorableDateTime. // // - PointInTimeRecoveryUnavailableException // Point in time recovery has not yet been enabled for this source table. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime func (c *DynamoDB) RestoreTableToPointInTime(input *RestoreTableToPointInTimeInput) (*RestoreTableToPointInTimeOutput, error) { req, out := c.RestoreTableToPointInTimeRequest(input) return out, req.Send() } // RestoreTableToPointInTimeWithContext is the same as RestoreTableToPointInTime with the addition of // the ability to pass a context and additional request options. // // See RestoreTableToPointInTime for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) RestoreTableToPointInTimeWithContext(ctx aws.Context, input *RestoreTableToPointInTimeInput, opts ...request.Option) (*RestoreTableToPointInTimeOutput, error) { req, out := c.RestoreTableToPointInTimeRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opScan = "Scan" // ScanRequest generates a "aws/request.Request" representing the // client's request for the Scan operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See Scan for more information on using the Scan // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ScanRequest method. // req, resp := client.ScanRequest(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/Scan func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output *ScanOutput) { op := &request.Operation{ Name: opScan, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"ExclusiveStartKey"}, OutputTokens: []string{"LastEvaluatedKey"}, LimitToken: "Limit", TruncationToken: "", }, } if input == nil { input = &ScanInput{} } output = &ScanOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // Scan API operation for Amazon DynamoDB. // // The Scan operation returns one or more items and item attributes by accessing // every item in a table or a secondary index. To have DynamoDB return fewer // items, you can provide a FilterExpression operation. // // If the total size of scanned items exceeds the maximum dataset size limit // of 1 MB, the scan completes and results are returned to the user. The LastEvaluatedKey // value is also returned and the requestor can use the LastEvaluatedKey to // continue the scan in a subsequent operation. Each scan response also includes // number of items that were scanned (ScannedCount) as part of the request. // If using a FilterExpression, a scan result can result in no items meeting // the criteria and the Count will result in zero. If you did not use a FilterExpression // in the scan request, then Count is the same as ScannedCount. // // Count and ScannedCount only return the count of items specific to a single // scan request and, unless the table is less than 1MB, do not represent the // total number of items in the table. // // A single Scan operation first reads up to the maximum number of items set // (if using the Limit parameter) or a maximum of 1 MB of data and then applies // any filtering to the results if a FilterExpression is provided. If LastEvaluatedKey // is present in the response, pagination is required to complete the full table // scan. For more information, see Paginating the Results (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.Pagination) // in the Amazon DynamoDB Developer Guide. // // Scan operations proceed sequentially; however, for faster performance on // a large table or secondary index, applications can request a parallel Scan // operation by providing the Segment and TotalSegments parameters. For more // information, see Parallel Scan (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan) // in the Amazon DynamoDB Developer Guide. // // By default, a Scan uses eventually consistent reads when accessing the items // in a table. Therefore, the results from an eventually consistent Scan may // not include the latest item changes at the time the scan iterates through // each item in the table. If you require a strongly consistent read of each // item as the scan iterates through the items in the table, you can set the // ConsistentRead parameter to true. Strong consistency only relates to the // consistency of the read at the item level. // // DynamoDB does not provide snapshot isolation for a scan operation when the // ConsistentRead parameter is set to true. Thus, a DynamoDB scan operation // does not guarantee that all reads in a scan see a consistent snapshot of // the table when the scan operation was requested. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 Scan for usage and error information. // // Returned Error Types: // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Scan func (c *DynamoDB) Scan(input *ScanInput) (*ScanOutput, error) { req, out := c.ScanRequest(input) return out, req.Send() } // ScanWithContext is the same as Scan with the addition of // the ability to pass a context and additional request options. // // See Scan for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) ScanWithContext(ctx aws.Context, input *ScanInput, opts ...request.Option) (*ScanOutput, error) { req, out := c.ScanRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ScanPages iterates over the pages of a Scan operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See Scan 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 Scan operation. // pageNum := 0 // err := client.ScanPages(params, // func(page *dynamodb.ScanOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *DynamoDB) ScanPages(input *ScanInput, fn func(*ScanOutput, bool) bool) error { return c.ScanPagesWithContext(aws.BackgroundContext(), input, fn) } // ScanPagesWithContext same as ScanPages 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 *DynamoDB) ScanPagesWithContext(ctx aws.Context, input *ScanInput, fn func(*ScanOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ScanInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ScanRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ScanOutput), !p.HasNextPage()) { break } } return p.Err() } 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/dynamodb-2012-08-10/TagResource func (c *DynamoDB) 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) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // TagResource API operation for Amazon DynamoDB. // // Associate a set of tags with an Amazon DynamoDB resource. You can then activate // these user-defined tags so that they appear on the Billing and Cost Management // console for cost allocation tracking. You can call TagResource up to five // times per second, per account. // // For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) // in the Amazon DynamoDB Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation TagResource for usage and error information. // // Returned Error Types: // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - 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. // // - InternalServerError // An error occurred on the server side. // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TagResource func (c *DynamoDB) 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 *DynamoDB) 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 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 custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 100 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 Amazon Web Services account // or Region. The aggregate size of the items in the transaction cannot exceed // 4 MB. // // 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. // // - The aggregate size of the items in the transaction exceeded 4 MB. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 Types: // // - 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. // // - TransactionCanceledException // The entire transaction request was canceled. // // DynamoDB cancels a TransactWriteItems request under the following circumstances: // // - A condition in one of the condition expressions is not met. // // - A table in the TransactWriteItems request is in a different account // or region. // // - More than one action in the TransactWriteItems operation targets the // same item. // // - There is insufficient provisioned capacity for the transaction to be // completed. // // - An item size becomes too large (larger than 400 KB), or 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. // // - There is an ongoing TransactWriteItems operation that conflicts with // a concurrent TransactWriteItems request. In this case the TransactWriteItems // operation fails with a TransactionCanceledException. // // DynamoDB cancels a TransactGetItems request under the following circumstances: // // - There is an ongoing TransactGetItems operation that conflicts with a // concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. // In this case the TransactGetItems operation fails with a TransactionCanceledException. // // - A table in the TransactGetItems request is in a different account or // region. // // - There is insufficient provisioned capacity for the transaction to be // completed. // // - There is a user error, such as an invalid data format. // // If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons // property. This property is not set for other languages. Transaction cancellation // reasons are ordered in the order of requested items, if an item has no error // it will have None code and Null message. // // Cancellation reason codes and possible error messages: // // - No Errors: Code: None Message: null // // - Conditional Check Failed: Code: ConditionalCheckFailed Message: The // conditional request failed. // // - Item Collection Size Limit Exceeded: Code: ItemCollectionSizeLimitExceeded // Message: Collection size exceeded. // // - Transaction Conflict: Code: TransactionConflict Message: Transaction // is ongoing for the item. // // - Provisioned Throughput Exceeded: Code: ProvisionedThroughputExceeded // Messages: The level of configured provisioned throughput for the table // was exceeded. Consider increasing your provisioning level with the UpdateTable // API. This Message is received when provisioned throughput is exceeded // is on a provisioned DynamoDB table. The level of configured provisioned // throughput for one or more global secondary indexes of the table was exceeded. // Consider increasing your provisioning level for the under-provisioned // global secondary indexes with the UpdateTable API. This message is returned // when provisioned throughput is exceeded is on a provisioned GSI. // // - Throttling Error: Code: ThrottlingError Messages: Throughput exceeds // the current capacity of your table or index. DynamoDB is automatically // scaling your table or index so please try again shortly. If exceptions // persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html. // This message is returned when writes get throttled on an On-Demand table // as DynamoDB is automatically scaling the table. Throughput exceeds the // current capacity for one or more global secondary indexes. DynamoDB is // automatically scaling your index so please try again shortly. This message // is returned when writes get throttled on an On-Demand GSI as DynamoDB // is automatically scaling the GSI. // // - Validation Error: Code: ValidationError Messages: One or more parameter // values were invalid. The update expression attempted to update the secondary // index key beyond allowed size limits. The update expression attempted // to update the secondary index key to unsupported type. An operand in the // update expression has an incorrect data type. Item size to update has // exceeded the maximum allowed size. Number overflow. Attempting to store // a number with magnitude larger than supported range. Type mismatch for // attribute to update. Nesting Levels have exceeded supported limits. The // document path provided in the update expression is invalid for update. // The provided expression refers to an attribute that does not exist in // the item. // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - 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 custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 100 // action requests. These actions can target items in different tables, but // not in different Amazon Web Services accounts or Regions, and no two actions // can target the same item. For example, you cannot both ConditionCheck and // Update the same item. The aggregate size of the items in the transaction // cannot exceed 4 MB. // // 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 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 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 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 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. // // - An ongoing 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. // // - The aggregate size of the items in the transaction exceeds 4 MB. // // - 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 Types: // // - 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. // // - TransactionCanceledException // The entire transaction request was canceled. // // DynamoDB cancels a TransactWriteItems request under the following circumstances: // // - A condition in one of the condition expressions is not met. // // - A table in the TransactWriteItems request is in a different account // or region. // // - More than one action in the TransactWriteItems operation targets the // same item. // // - There is insufficient provisioned capacity for the transaction to be // completed. // // - An item size becomes too large (larger than 400 KB), or 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. // // - There is an ongoing TransactWriteItems operation that conflicts with // a concurrent TransactWriteItems request. In this case the TransactWriteItems // operation fails with a TransactionCanceledException. // // DynamoDB cancels a TransactGetItems request under the following circumstances: // // - There is an ongoing TransactGetItems operation that conflicts with a // concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. // In this case the TransactGetItems operation fails with a TransactionCanceledException. // // - A table in the TransactGetItems request is in a different account or // region. // // - There is insufficient provisioned capacity for the transaction to be // completed. // // - There is a user error, such as an invalid data format. // // If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons // property. This property is not set for other languages. Transaction cancellation // reasons are ordered in the order of requested items, if an item has no error // it will have None code and Null message. // // Cancellation reason codes and possible error messages: // // - No Errors: Code: None Message: null // // - Conditional Check Failed: Code: ConditionalCheckFailed Message: The // conditional request failed. // // - Item Collection Size Limit Exceeded: Code: ItemCollectionSizeLimitExceeded // Message: Collection size exceeded. // // - Transaction Conflict: Code: TransactionConflict Message: Transaction // is ongoing for the item. // // - Provisioned Throughput Exceeded: Code: ProvisionedThroughputExceeded // Messages: The level of configured provisioned throughput for the table // was exceeded. Consider increasing your provisioning level with the UpdateTable // API. This Message is received when provisioned throughput is exceeded // is on a provisioned DynamoDB table. The level of configured provisioned // throughput for one or more global secondary indexes of the table was exceeded. // Consider increasing your provisioning level for the under-provisioned // global secondary indexes with the UpdateTable API. This message is returned // when provisioned throughput is exceeded is on a provisioned GSI. // // - Throttling Error: Code: ThrottlingError Messages: Throughput exceeds // the current capacity of your table or index. DynamoDB is automatically // scaling your table or index so please try again shortly. If exceptions // persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html. // This message is returned when writes get throttled on an On-Demand table // as DynamoDB is automatically scaling the table. Throughput exceeds the // current capacity for one or more global secondary indexes. DynamoDB is // automatically scaling your index so please try again shortly. This message // is returned when writes get throttled on an On-Demand GSI as DynamoDB // is automatically scaling the GSI. // // - Validation Error: Code: ValidationError Messages: One or more parameter // values were invalid. The update expression attempted to update the secondary // index key beyond allowed size limits. The update expression attempted // to update the secondary index key to unsupported type. An operand in the // update expression has an incorrect data type. Item size to update has // exceeded the maximum allowed size. Number overflow. Attempting to store // a number with magnitude larger than supported range. Type mismatch for // attribute to update. Nesting Levels have exceeded supported limits. The // document path provided in the update expression is invalid for update. // The provided expression refers to an attribute that does not exist in // the item. // // - TransactionInProgressException // The transaction with the given request token is already in progress. // // Recommended Settings // // This is a general recommendation for handling the TransactionInProgressException. // These settings help ensure that the client retries will trigger completion // of the ongoing TransactWriteItems request. // // - Set clientExecutionTimeout to a value that allows at least one retry // to be processed after 5 seconds have elapsed since the first attempt for // the TransactWriteItems operation. // // - Set socketTimeout to a value a little lower than the requestTimeout // setting. // // - requestTimeout should be set based on the time taken for the individual // retries of a single HTTP request for your use case, but setting it to // 1 second or higher should work well to reduce chances of retries and TransactionInProgressException // errors. // // - Use exponential backoff when retrying and tune backoff if needed. // // Assuming default retry policy (https://github.com/aws/aws-sdk-java/blob/fd409dee8ae23fb8953e0bb4dbde65536a7e0514/aws-java-sdk-core/src/main/java/com/amazonaws/retry/PredefinedRetryPolicies.java#L97), // example timeout settings based on the guidelines above are as follows: // // Example timeline: // // - 0-1000 first attempt // // - 1000-1500 first sleep/delay (default retry policy uses 500 ms as base // delay for 4xx errors) // // - 1500-2500 second attempt // // - 2500-3500 second sleep/delay (500 * 2, exponential backoff) // // - 3500-4500 third attempt // // - 4500-6500 third sleep/delay (500 * 2^2) // // - 6500-7500 fourth attempt (this can trigger inline recovery since 5 seconds // have elapsed since the first attempt reached TC) // // - IdempotentParameterMismatchException // DynamoDB rejected the request because you retried a request with a different // payload but with an idempotent token that was already used. // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems func (c *DynamoDB) TransactWriteItems(input *TransactWriteItemsInput) (*TransactWriteItemsOutput, error) { req, out := c.TransactWriteItemsRequest(input) return out, req.Send() } // TransactWriteItemsWithContext is the same as TransactWriteItems with the addition of // the ability to pass a context and additional request options. // // See TransactWriteItems for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *DynamoDB) TransactWriteItemsWithContext(ctx aws.Context, input *TransactWriteItemsInput, opts ...request.Option) (*TransactWriteItemsOutput, error) { req, out := c.TransactWriteItemsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UntagResource for more information on using the UntagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UntagResourceRequest method. // req, resp := client.UntagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ Name: opUntagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UntagResourceInput{} } output = &UntagResourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { if aws.BoolValue(req.Config.EnableEndpointDiscovery) { de := discovererDescribeEndpoints{ Required: false, EndpointCache: c.endpointCache, Params: map[string]*string{ "op": aws.String(req.Operation.Name), }, Client: c, } for k, v := range de.Params { if v == nil { delete(de.Params, k) } } req.Handlers.Build.PushFrontNamed(request.NamedHandler{ Name: "crr.endpointdiscovery", Fn: de.Handler, }) } } return } // UntagResource API operation for Amazon DynamoDB. // // Removes the association of tags from an Amazon DynamoDB resource. You can // call UntagResource up to five times per second, per account. // // For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) // in the Amazon DynamoDB Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation UntagResource for usage and error information. // // Returned Error Types: // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - 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. // // - InternalServerError // An error occurred on the server side. // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource func (c *DynamoDB) 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 *DynamoDB) 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 opUpdateContinuousBackups = "UpdateContinuousBackups" // UpdateContinuousBackupsRequest generates a "aws/request.Request" representing the // client's request for the UpdateContinuousBackups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateContinuousBackups for more information on using the UpdateContinuousBackups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateContinuousBackupsRequest method. // req, resp := client.UpdateContinuousBackupsRequest(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/UpdateContinuousBackups func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackupsInput) (req *request.Request, output *UpdateContinuousBackupsOutput) { op := &request.Operation{ Name: opUpdateContinuousBackups, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateContinuousBackupsInput{} } output = &UpdateContinuousBackupsOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // UpdateContinuousBackups API operation for Amazon DynamoDB. // // UpdateContinuousBackups enables or disables point in time recovery for the // specified table. A successful UpdateContinuousBackups call returns the current // ContinuousBackupsDescription. Continuous backups are ENABLED on all tables // at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus // will be set to ENABLED. // // Once continuous backups and point in time recovery are enabled, you can restore // to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. // // LatestRestorableDateTime is typically 5 minutes before the current time. // You can restore your table to any point in time during the last 35 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. // // See the AWS API reference guide for Amazon DynamoDB's // API operation UpdateContinuousBackups for usage and error information. // // Returned Error Types: // // - TableNotFoundException // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. // // - ContinuousBackupsUnavailableException // Backups have not yet been enabled for this table. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups func (c *DynamoDB) UpdateContinuousBackups(input *UpdateContinuousBackupsInput) (*UpdateContinuousBackupsOutput, error) { req, out := c.UpdateContinuousBackupsRequest(input) return out, req.Send() } // UpdateContinuousBackupsWithContext is the same as UpdateContinuousBackups with the addition of // the ability to pass a context and additional request options. // // See UpdateContinuousBackups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) UpdateContinuousBackupsWithContext(ctx aws.Context, input *UpdateContinuousBackupsInput, opts ...request.Option) (*UpdateContinuousBackupsOutput, error) { req, out := c.UpdateContinuousBackupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateContributorInsights = "UpdateContributorInsights" // UpdateContributorInsightsRequest generates a "aws/request.Request" representing the // client's request for the UpdateContributorInsights operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateContributorInsights for more information on using the UpdateContributorInsights // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateContributorInsightsRequest method. // req, resp := client.UpdateContributorInsightsRequest(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/UpdateContributorInsights func (c *DynamoDB) UpdateContributorInsightsRequest(input *UpdateContributorInsightsInput) (req *request.Request, output *UpdateContributorInsightsOutput) { op := &request.Operation{ Name: opUpdateContributorInsights, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateContributorInsightsInput{} } output = &UpdateContributorInsightsOutput{} req = c.newRequest(op, input, output) return } // UpdateContributorInsights API operation for Amazon DynamoDB. // // Updates the status for contributor insights for a specific table or index. // CloudWatch Contributor Insights for DynamoDB graphs display the partition // key and (if applicable) sort key of frequently accessed items and frequently // throttled items in plaintext. If you require the use of Amazon Web Services // Key Management Service (KMS) to encrypt this table’s partition key and // sort key data with an Amazon Web Services managed key or customer managed // key, you should not enable CloudWatch Contributor Insights for DynamoDB for // this 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 DynamoDB's // API operation UpdateContributorInsights for usage and error information. // // Returned Error Types: // // - 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. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContributorInsights func (c *DynamoDB) UpdateContributorInsights(input *UpdateContributorInsightsInput) (*UpdateContributorInsightsOutput, error) { req, out := c.UpdateContributorInsightsRequest(input) return out, req.Send() } // UpdateContributorInsightsWithContext is the same as UpdateContributorInsights with the addition of // the ability to pass a context and additional request options. // // See UpdateContributorInsights for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) UpdateContributorInsightsWithContext(ctx aws.Context, input *UpdateContributorInsightsInput, opts ...request.Option) (*UpdateContributorInsightsOutput, error) { req, out := c.UpdateContributorInsightsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateGlobalTable = "UpdateGlobalTable" // UpdateGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateGlobalTable for more information on using the UpdateGlobalTable // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateGlobalTableRequest method. // req, resp := client.UpdateGlobalTableRequest(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/UpdateGlobalTable func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req *request.Request, output *UpdateGlobalTableOutput) { op := &request.Operation{ Name: opUpdateGlobalTable, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateGlobalTableInput{} } output = &UpdateGlobalTableOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // UpdateGlobalTable API operation for Amazon DynamoDB. // // Adds or removes replicas in the specified global table. The global table // must already exist to be able to use this operation. Any replica to be added // must be empty, have the same name as the global table, have the same key // schema, have DynamoDB Streams enabled, and have the same provisioned and // maximum write capacity units. // // This operation only applies to Version 2017.11.29 (Legacy) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. We recommend using Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // when creating new global tables, as it provides greater flexibility, higher // efficiency and consumes less write capacity than 2017.11.29 (Legacy). To // determine which version you are using, see Determining the version (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html). // To update existing global tables from version 2017.11.29 (Legacy) to version // 2019.11.21 (Current), see Updating global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.html). // // This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. If you are using global tables Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // you can use DescribeTable (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html) // instead. // // Although you can use UpdateGlobalTable to add replicas and remove replicas // in a single request, for simplicity we recommend that you issue separate // requests for adding or removing replicas. // // If global secondary indexes are specified, then the following conditions // must also be met: // // - The global secondary indexes must have the same name. // // - The global secondary indexes must have the same hash key and sort key // (if present). // // - The global secondary indexes must have the same provisioned and maximum // write capacity units. // // Returns awserr.Error for service API and SDK errors. Use runtime type 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 UpdateGlobalTable for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - GlobalTableNotFoundException // The specified global table does not exist. // // - ReplicaAlreadyExistsException // The specified replica is already part of the global table. // // - ReplicaNotFoundException // The specified replica is no longer part of the global table. // // - TableNotFoundException // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable func (c *DynamoDB) UpdateGlobalTable(input *UpdateGlobalTableInput) (*UpdateGlobalTableOutput, error) { req, out := c.UpdateGlobalTableRequest(input) return out, req.Send() } // UpdateGlobalTableWithContext is the same as UpdateGlobalTable with the addition of // the ability to pass a context and additional request options. // // See UpdateGlobalTable for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) UpdateGlobalTableWithContext(ctx aws.Context, input *UpdateGlobalTableInput, opts ...request.Option) (*UpdateGlobalTableOutput, error) { req, out := c.UpdateGlobalTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateGlobalTableSettings = "UpdateGlobalTableSettings" // UpdateGlobalTableSettingsRequest generates a "aws/request.Request" representing the // client's request for the UpdateGlobalTableSettings operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateGlobalTableSettings for more information on using the UpdateGlobalTableSettings // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateGlobalTableSettingsRequest method. // req, resp := client.UpdateGlobalTableSettingsRequest(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/UpdateGlobalTableSettings func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSettingsInput) (req *request.Request, output *UpdateGlobalTableSettingsOutput) { op := &request.Operation{ Name: opUpdateGlobalTableSettings, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateGlobalTableSettingsInput{} } output = &UpdateGlobalTableSettingsOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // UpdateGlobalTableSettings API operation for Amazon DynamoDB. // // Updates settings for a global table. // // This operation only applies to Version 2017.11.29 (Legacy) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. We recommend using Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // when creating new global tables, as it provides greater flexibility, higher // efficiency and consumes less write capacity than 2017.11.29 (Legacy). To // determine which version you are using, see Determining the version (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html). // To update existing global tables from version 2017.11.29 (Legacy) to version // 2019.11.21 (Current), see Updating global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.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 DynamoDB's // API operation UpdateGlobalTableSettings for usage and error information. // // Returned Error Types: // // - GlobalTableNotFoundException // The specified global table does not exist. // // - ReplicaNotFoundException // The specified replica is no longer part of the global table. // // - IndexNotFoundException // The operation tried to access a nonexistent index. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings func (c *DynamoDB) UpdateGlobalTableSettings(input *UpdateGlobalTableSettingsInput) (*UpdateGlobalTableSettingsOutput, error) { req, out := c.UpdateGlobalTableSettingsRequest(input) return out, req.Send() } // UpdateGlobalTableSettingsWithContext is the same as UpdateGlobalTableSettings with the addition of // the ability to pass a context and additional request options. // // See UpdateGlobalTableSettings for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) UpdateGlobalTableSettingsWithContext(ctx aws.Context, input *UpdateGlobalTableSettingsInput, opts ...request.Option) (*UpdateGlobalTableSettingsOutput, error) { req, out := c.UpdateGlobalTableSettingsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateItem = "UpdateItem" // UpdateItemRequest generates a "aws/request.Request" representing the // client's request for the UpdateItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateItem for more information on using the UpdateItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateItemRequest method. // req, resp := client.UpdateItemRequest(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/UpdateItem func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Request, output *UpdateItemOutput) { op := &request.Operation{ Name: opUpdateItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateItemInput{} } output = &UpdateItemOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // UpdateItem API operation for Amazon DynamoDB. // // Edits an existing item's attributes, or adds a new item to the table if it // does not already exist. You can put, delete, or add attribute values. You // can also perform a conditional update on an existing item (insert a new attribute // name-value pair if it doesn't exist, or replace an existing name-value pair // if it has certain expected attribute values). // // You can also return the item's attribute values in the same UpdateItem operation // using the ReturnValues 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 Amazon DynamoDB's // API operation UpdateItem for usage and error information. // // Returned Error Types: // // - ConditionalCheckFailedException // A condition specified in the operation could not be evaluated. // // - ProvisionedThroughputExceededException // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. // // - 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. // // - ItemCollectionSizeLimitExceededException // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // // - TransactionConflictException // Operation was rejected because there is an ongoing transaction for the item. // // - RequestLimitExceeded // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateItem func (c *DynamoDB) UpdateItem(input *UpdateItemInput) (*UpdateItemOutput, error) { req, out := c.UpdateItemRequest(input) return out, req.Send() } // UpdateItemWithContext is the same as UpdateItem with the addition of // the ability to pass a context and additional request options. // // See UpdateItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) UpdateItemWithContext(ctx aws.Context, input *UpdateItemInput, opts ...request.Option) (*UpdateItemOutput, error) { req, out := c.UpdateItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateTable = "UpdateTable" // UpdateTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateTable operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateTable for more information on using the UpdateTable // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateTableRequest method. // req, resp := client.UpdateTableRequest(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/UpdateTable func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Request, output *UpdateTableOutput) { op := &request.Operation{ Name: opUpdateTable, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateTableInput{} } output = &UpdateTableOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // UpdateTable API operation for Amazon DynamoDB. // // Modifies the provisioned throughput settings, global secondary indexes, or // DynamoDB Streams settings for a given table. // // This operation only applies to Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // of global tables. // // You can only perform one of the following operations at once: // // - Modify the provisioned throughput settings of the table. // // - Remove a global secondary index from the table. // // - Create a new global secondary index on the table. After the index begins // backfilling, you can use UpdateTable to perform other operations. // // UpdateTable is an asynchronous operation; while it is executing, the table // status changes from ACTIVE to UPDATING. While it is UPDATING, you cannot // issue another UpdateTable request. When the table returns to the ACTIVE state, // the UpdateTable operation 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 // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation UpdateTable for usage and error information. // // Returned Error Types: // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - 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. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTable func (c *DynamoDB) UpdateTable(input *UpdateTableInput) (*UpdateTableOutput, error) { req, out := c.UpdateTableRequest(input) return out, req.Send() } // UpdateTableWithContext is the same as UpdateTable with the addition of // the ability to pass a context and additional request options. // // See UpdateTable for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) UpdateTableWithContext(ctx aws.Context, input *UpdateTableInput, opts ...request.Option) (*UpdateTableOutput, error) { req, out := c.UpdateTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateTableReplicaAutoScaling = "UpdateTableReplicaAutoScaling" // UpdateTableReplicaAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the UpdateTableReplicaAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateTableReplicaAutoScaling for more information on using the UpdateTableReplicaAutoScaling // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateTableReplicaAutoScalingRequest method. // req, resp := client.UpdateTableReplicaAutoScalingRequest(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/UpdateTableReplicaAutoScaling func (c *DynamoDB) UpdateTableReplicaAutoScalingRequest(input *UpdateTableReplicaAutoScalingInput) (req *request.Request, output *UpdateTableReplicaAutoScalingOutput) { op := &request.Operation{ Name: opUpdateTableReplicaAutoScaling, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateTableReplicaAutoScalingInput{} } output = &UpdateTableReplicaAutoScalingOutput{} req = c.newRequest(op, input, output) return } // UpdateTableReplicaAutoScaling API operation for Amazon DynamoDB. // // Updates auto scaling settings on your global tables at once. // // This operation only applies to Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // of global tables. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation UpdateTableReplicaAutoScaling for usage and error information. // // Returned Error Types: // // - 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. // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTableReplicaAutoScaling func (c *DynamoDB) UpdateTableReplicaAutoScaling(input *UpdateTableReplicaAutoScalingInput) (*UpdateTableReplicaAutoScalingOutput, error) { req, out := c.UpdateTableReplicaAutoScalingRequest(input) return out, req.Send() } // UpdateTableReplicaAutoScalingWithContext is the same as UpdateTableReplicaAutoScaling with the addition of // the ability to pass a context and additional request options. // // See UpdateTableReplicaAutoScaling for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) UpdateTableReplicaAutoScalingWithContext(ctx aws.Context, input *UpdateTableReplicaAutoScalingInput, opts ...request.Option) (*UpdateTableReplicaAutoScalingOutput, error) { req, out := c.UpdateTableReplicaAutoScalingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateTimeToLive = "UpdateTimeToLive" // UpdateTimeToLiveRequest generates a "aws/request.Request" representing the // client's request for the UpdateTimeToLive operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateTimeToLive for more information on using the UpdateTimeToLive // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateTimeToLiveRequest method. // req, resp := client.UpdateTimeToLiveRequest(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/UpdateTimeToLive func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *request.Request, output *UpdateTimeToLiveOutput) { op := &request.Operation{ Name: opUpdateTimeToLive, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateTimeToLiveInput{} } output = &UpdateTimeToLiveOutput{} req = c.newRequest(op, input, output) // if custom endpoint for the request is set to a non empty string, // we skip the endpoint discovery workflow. if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 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 } // UpdateTimeToLive API operation for Amazon DynamoDB. // // The UpdateTimeToLive method enables or disables Time to Live (TTL) for the // specified table. A successful UpdateTimeToLive call returns the current TimeToLiveSpecification. // It can take up to one hour for the change to fully process. Any additional // UpdateTimeToLive calls for the same table during this one hour duration result // in a ValidationException. // // TTL compares the current time in epoch time format to the time stored in // the TTL attribute of an item. If the epoch time value stored in the attribute // is less than the current time, the item is marked as expired and subsequently // deleted. // // The epoch time format is the number of seconds elapsed since 12:00:00 AM // January 1, 1970 UTC. // // DynamoDB deletes expired items on a best-effort basis to ensure availability // of throughput for other data operations. // // DynamoDB typically deletes expired items within two days of expiration. The // exact duration within which an item gets deleted after expiration is specific // to the nature of the workload. Items that have expired and not been deleted // will still show up in reads, queries, and scans. // // As items are deleted, they are removed from any local secondary index and // global secondary index immediately in the same eventually consistent way // as a standard delete operation. // // For more information, see Time To Live (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html) // in the Amazon DynamoDB Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon DynamoDB's // API operation UpdateTimeToLive for usage and error information. // // Returned Error Types: // // - ResourceInUseException // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. // // - 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. // // - LimitExceededException // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTimeToLive func (c *DynamoDB) UpdateTimeToLive(input *UpdateTimeToLiveInput) (*UpdateTimeToLiveOutput, error) { req, out := c.UpdateTimeToLiveRequest(input) return out, req.Send() } // UpdateTimeToLiveWithContext is the same as UpdateTimeToLive with the addition of // the ability to pass a context and additional request options. // // See UpdateTimeToLive for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the 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) UpdateTimeToLiveWithContext(ctx aws.Context, input *UpdateTimeToLiveInput, opts ...request.Option) (*UpdateTimeToLiveOutput, error) { req, out := c.UpdateTimeToLiveRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // Contains details of a table archival operation. type ArchivalSummary struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the backup the table was archived to, when // applicable in the archival reason. If you wish to restore this backup to // the same table name, you will need to delete the original table. ArchivalBackupArn *string `min:"37" type:"string"` // The date and time when table archival was initiated by DynamoDB, in UNIX // epoch time format. ArchivalDateTime *time.Time `type:"timestamp"` // The reason DynamoDB archived the table. Currently, the only possible value // is: // // * INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to // the table's KMS key being inaccessible for more than seven days. An On-Demand // backup was created at the archival time. ArchivalReason *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ArchivalSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ArchivalSummary) GoString() string { return s.String() } // SetArchivalBackupArn sets the ArchivalBackupArn field's value. func (s *ArchivalSummary) SetArchivalBackupArn(v string) *ArchivalSummary { s.ArchivalBackupArn = &v return s } // SetArchivalDateTime sets the ArchivalDateTime field's value. func (s *ArchivalSummary) SetArchivalDateTime(v time.Time) *ArchivalSummary { s.ArchivalDateTime = &v return s } // SetArchivalReason sets the ArchivalReason field's value. func (s *ArchivalSummary) SetArchivalReason(v string) *ArchivalSummary { s.ArchivalReason = &v return s } // Represents an attribute for describing the key schema for the table and indexes. type AttributeDefinition struct { _ struct{} `type:"structure"` // A name for the attribute. // // AttributeName is a required field AttributeName *string `min:"1" type:"string" required:"true"` // The data type for the attribute, where: // // * S - the attribute is of type String // // * N - the attribute is of type Number // // * B - the attribute is of type Binary // // AttributeType is a required field AttributeType *string `type:"string" required:"true" enum:"ScalarAttributeType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttributeDefinition) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttributeDefinition) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AttributeDefinition) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AttributeDefinition"} if s.AttributeName == nil { invalidParams.Add(request.NewErrParamRequired("AttributeName")) } if s.AttributeName != nil && len(*s.AttributeName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) } if s.AttributeType == nil { invalidParams.Add(request.NewErrParamRequired("AttributeType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributeName sets the AttributeName field's value. func (s *AttributeDefinition) SetAttributeName(v string) *AttributeDefinition { s.AttributeName = &v return s } // SetAttributeType sets the AttributeType field's value. func (s *AttributeDefinition) SetAttributeType(v string) *AttributeDefinition { s.AttributeType = &v return s } // Represents the data for an attribute. // // Each attribute value is described as a name-value pair. The name is the data // type, and the value is the data itself. // // For more information, see Data Types (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes) // in the Amazon DynamoDB Developer Guide. type AttributeValue struct { _ struct{} `type:"structure"` // An attribute of type Binary. For example: // // "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk" // B is automatically base64 encoded/decoded by the SDK. B []byte `type:"blob"` // An attribute of type Boolean. For example: // // "BOOL": true BOOL *bool `type:"boolean"` // An attribute of type Binary Set. For example: // // "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="] BS [][]byte `type:"list"` // An attribute of type List. For example: // // "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}] L []*AttributeValue `type:"list"` // An attribute of type Map. For example: // // "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}} M map[string]*AttributeValue `type:"map"` // An attribute of type Number. For example: // // "N": "123.45" // // Numbers are sent across the network to DynamoDB as strings, to maximize compatibility // across languages and libraries. However, DynamoDB treats them as number type // attributes for mathematical operations. N *string `type:"string"` // An attribute of type Number Set. For example: // // "NS": ["42.2", "-19", "7.5", "3.14"] // // Numbers are sent across the network to DynamoDB as strings, to maximize compatibility // across languages and libraries. However, DynamoDB treats them as number type // attributes for mathematical operations. NS []*string `type:"list"` // An attribute of type Null. For example: // // "NULL": true NULL *bool `type:"boolean"` // An attribute of type String. For example: // // "S": "Hello" S *string `type:"string"` // An attribute of type String Set. For example: // // "SS": ["Giraffe", "Hippo" ,"Zebra"] SS []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttributeValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttributeValue) GoString() string { return s.String() } // SetB sets the B field's value. func (s *AttributeValue) SetB(v []byte) *AttributeValue { s.B = v return s } // SetBOOL sets the BOOL field's value. func (s *AttributeValue) SetBOOL(v bool) *AttributeValue { s.BOOL = &v return s } // SetBS sets the BS field's value. func (s *AttributeValue) SetBS(v [][]byte) *AttributeValue { s.BS = v return s } // SetL sets the L field's value. func (s *AttributeValue) SetL(v []*AttributeValue) *AttributeValue { s.L = v return s } // SetM sets the M field's value. func (s *AttributeValue) SetM(v map[string]*AttributeValue) *AttributeValue { s.M = v return s } // SetN sets the N field's value. func (s *AttributeValue) SetN(v string) *AttributeValue { s.N = &v return s } // SetNS sets the NS field's value. func (s *AttributeValue) SetNS(v []*string) *AttributeValue { s.NS = v return s } // SetNULL sets the NULL field's value. func (s *AttributeValue) SetNULL(v bool) *AttributeValue { s.NULL = &v return s } // SetS sets the S field's value. func (s *AttributeValue) SetS(v string) *AttributeValue { s.S = &v return s } // SetSS sets the SS field's value. func (s *AttributeValue) SetSS(v []*string) *AttributeValue { s.SS = v return s } // For the UpdateItem operation, represents the attributes to be modified, the // action to perform on each, and the new value for each. // // You cannot use UpdateItem to update any primary key attributes. Instead, // you will need to delete the item, and then use PutItem to create a new item // with new attributes. // // Attribute values cannot be null; string and binary type attributes must have // lengths greater than zero; and set type attributes must not be empty. Requests // with empty values will be rejected with a ValidationException exception. type AttributeValueUpdate struct { _ struct{} `type:"structure"` // Specifies how to perform the update. Valid values are PUT (default), DELETE, // and ADD. The behavior depends on whether the specified primary key already // exists in the table. // // If an item with the specified Key is found in the table: // // * PUT - Adds the specified attribute to the item. If the attribute already // exists, it is replaced by the new value. // // * DELETE - If no value is specified, the attribute and its value are removed // from the item. The data type of the specified value must match the existing // value's data type. If a set of values is specified, then those values // are subtracted from the old set. For example, if the attribute value was // the set [a,b,c] and the DELETE action specified [a,c], then the final // attribute value would be [b]. Specifying an empty set is an error. // // * ADD - If the attribute does not already exist, then the attribute and // its values are added to the item. If the attribute does exist, then the // behavior of ADD depends on the data type of the attribute: If the existing // attribute is a number, and if Value is also a number, then the Value is // mathematically added to the existing attribute. If Value is a negative // number, then it is subtracted from the existing attribute. If you use // ADD to increment or decrement a number value for an item that doesn't // exist before the update, DynamoDB uses 0 as the initial value. In addition, // if you use ADD to update an existing item, and intend to increment or // decrement an attribute value which does not yet exist, DynamoDB uses 0 // as the initial value. For example, suppose that the item you want to update // does not yet have an attribute named itemcount, but you decide to ADD // the number 3 to this attribute anyway, even though it currently does not // exist. DynamoDB will create the itemcount attribute, set its initial value // to 0, and finally add 3 to it. The result will be a new itemcount attribute // in the item, with a value of 3. If the existing data type is a set, and // if the Value is also a set, then the Value is added to the existing set. // (This is a set operation, not mathematical addition.) For example, if // the attribute value was the set [1,2], and the ADD action specified [3], // then the final attribute value would be [1,2,3]. An error occurs if an // Add action is specified for a set attribute and the attribute type specified // does not match the existing set type. Both sets must have the same primitive // data type. For example, if the existing data type is a set of strings, // the Value must also be a set of strings. The same holds true for number // sets and binary sets. This action is only valid for an existing attribute // whose data type is number or is a set. Do not use ADD for any other data // types. // // If no item with the specified Key is found: // // * PUT - DynamoDB creates a new item with the specified primary key, and // then adds the attribute. // // * DELETE - Nothing happens; there is no attribute to delete. // // * ADD - DynamoDB creates a new item with the supplied primary key and // number (or set) for the attribute value. The only data types allowed are // number, number set, string set or binary set. Action *string `type:"string" enum:"AttributeAction"` // Represents the data for an attribute. // // Each attribute value is described as a name-value pair. The name is the data // type, and the value is the data itself. // // For more information, see Data Types (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes) // in the Amazon DynamoDB Developer Guide. Value *AttributeValue `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttributeValueUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttributeValueUpdate) GoString() string { return s.String() } // SetAction sets the Action field's value. func (s *AttributeValueUpdate) SetAction(v string) *AttributeValueUpdate { s.Action = &v return s } // SetValue sets the Value field's value. func (s *AttributeValueUpdate) SetValue(v *AttributeValue) *AttributeValueUpdate { s.Value = v return s } // Represents the properties of the scaling policy. type AutoScalingPolicyDescription struct { _ struct{} `type:"structure"` // The name of the scaling policy. PolicyName *string `min:"1" type:"string"` // Represents a target tracking scaling policy configuration. TargetTrackingScalingPolicyConfiguration *AutoScalingTargetTrackingScalingPolicyConfigurationDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingPolicyDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingPolicyDescription) GoString() string { return s.String() } // SetPolicyName sets the PolicyName field's value. func (s *AutoScalingPolicyDescription) SetPolicyName(v string) *AutoScalingPolicyDescription { s.PolicyName = &v return s } // SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value. func (s *AutoScalingPolicyDescription) SetTargetTrackingScalingPolicyConfiguration(v *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) *AutoScalingPolicyDescription { s.TargetTrackingScalingPolicyConfiguration = v return s } // Represents the auto scaling policy to be modified. type AutoScalingPolicyUpdate struct { _ struct{} `type:"structure"` // The name of the scaling policy. PolicyName *string `min:"1" type:"string"` // Represents a target tracking scaling policy configuration. // // TargetTrackingScalingPolicyConfiguration is a required field TargetTrackingScalingPolicyConfiguration *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate `type:"structure" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingPolicyUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingPolicyUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AutoScalingPolicyUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AutoScalingPolicyUpdate"} if s.PolicyName != nil && len(*s.PolicyName) < 1 { invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) } if s.TargetTrackingScalingPolicyConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("TargetTrackingScalingPolicyConfiguration")) } if s.TargetTrackingScalingPolicyConfiguration != nil { if err := s.TargetTrackingScalingPolicyConfiguration.Validate(); err != nil { invalidParams.AddNested("TargetTrackingScalingPolicyConfiguration", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetPolicyName sets the PolicyName field's value. func (s *AutoScalingPolicyUpdate) SetPolicyName(v string) *AutoScalingPolicyUpdate { s.PolicyName = &v return s } // SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value. func (s *AutoScalingPolicyUpdate) SetTargetTrackingScalingPolicyConfiguration(v *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) *AutoScalingPolicyUpdate { s.TargetTrackingScalingPolicyConfiguration = v return s } // Represents the auto scaling settings for a global table or global secondary // index. type AutoScalingSettingsDescription struct { _ struct{} `type:"structure"` // Disabled auto scaling for this global table or global secondary index. AutoScalingDisabled *bool `type:"boolean"` // Role ARN used for configuring the auto scaling policy. AutoScalingRoleArn *string `type:"string"` // The maximum capacity units that a global table or global secondary index // should be scaled up to. MaximumUnits *int64 `min:"1" type:"long"` // The minimum capacity units that a global table or global secondary index // should be scaled down to. MinimumUnits *int64 `min:"1" type:"long"` // Information about the scaling policies. ScalingPolicies []*AutoScalingPolicyDescription `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingSettingsDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingSettingsDescription) GoString() string { return s.String() } // SetAutoScalingDisabled sets the AutoScalingDisabled field's value. func (s *AutoScalingSettingsDescription) SetAutoScalingDisabled(v bool) *AutoScalingSettingsDescription { s.AutoScalingDisabled = &v return s } // SetAutoScalingRoleArn sets the AutoScalingRoleArn field's value. func (s *AutoScalingSettingsDescription) SetAutoScalingRoleArn(v string) *AutoScalingSettingsDescription { s.AutoScalingRoleArn = &v return s } // SetMaximumUnits sets the MaximumUnits field's value. func (s *AutoScalingSettingsDescription) SetMaximumUnits(v int64) *AutoScalingSettingsDescription { s.MaximumUnits = &v return s } // SetMinimumUnits sets the MinimumUnits field's value. func (s *AutoScalingSettingsDescription) SetMinimumUnits(v int64) *AutoScalingSettingsDescription { s.MinimumUnits = &v return s } // SetScalingPolicies sets the ScalingPolicies field's value. func (s *AutoScalingSettingsDescription) SetScalingPolicies(v []*AutoScalingPolicyDescription) *AutoScalingSettingsDescription { s.ScalingPolicies = v return s } // Represents the auto scaling settings to be modified for a global table or // global secondary index. type AutoScalingSettingsUpdate struct { _ struct{} `type:"structure"` // Disabled auto scaling for this global table or global secondary index. AutoScalingDisabled *bool `type:"boolean"` // Role ARN used for configuring auto scaling policy. AutoScalingRoleArn *string `min:"1" type:"string"` // The maximum capacity units that a global table or global secondary index // should be scaled up to. MaximumUnits *int64 `min:"1" type:"long"` // The minimum capacity units that a global table or global secondary index // should be scaled down to. MinimumUnits *int64 `min:"1" type:"long"` // The scaling policy to apply for scaling target global table or global secondary // index capacity units. ScalingPolicyUpdate *AutoScalingPolicyUpdate `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingSettingsUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingSettingsUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AutoScalingSettingsUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AutoScalingSettingsUpdate"} if s.AutoScalingRoleArn != nil && len(*s.AutoScalingRoleArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("AutoScalingRoleArn", 1)) } if s.MaximumUnits != nil && *s.MaximumUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("MaximumUnits", 1)) } if s.MinimumUnits != nil && *s.MinimumUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("MinimumUnits", 1)) } if s.ScalingPolicyUpdate != nil { if err := s.ScalingPolicyUpdate.Validate(); err != nil { invalidParams.AddNested("ScalingPolicyUpdate", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAutoScalingDisabled sets the AutoScalingDisabled field's value. func (s *AutoScalingSettingsUpdate) SetAutoScalingDisabled(v bool) *AutoScalingSettingsUpdate { s.AutoScalingDisabled = &v return s } // SetAutoScalingRoleArn sets the AutoScalingRoleArn field's value. func (s *AutoScalingSettingsUpdate) SetAutoScalingRoleArn(v string) *AutoScalingSettingsUpdate { s.AutoScalingRoleArn = &v return s } // SetMaximumUnits sets the MaximumUnits field's value. func (s *AutoScalingSettingsUpdate) SetMaximumUnits(v int64) *AutoScalingSettingsUpdate { s.MaximumUnits = &v return s } // SetMinimumUnits sets the MinimumUnits field's value. func (s *AutoScalingSettingsUpdate) SetMinimumUnits(v int64) *AutoScalingSettingsUpdate { s.MinimumUnits = &v return s } // SetScalingPolicyUpdate sets the ScalingPolicyUpdate field's value. func (s *AutoScalingSettingsUpdate) SetScalingPolicyUpdate(v *AutoScalingPolicyUpdate) *AutoScalingSettingsUpdate { s.ScalingPolicyUpdate = v return s } // Represents the properties of a target tracking scaling policy. type AutoScalingTargetTrackingScalingPolicyConfigurationDescription struct { _ struct{} `type:"structure"` // Indicates whether scale in by the target tracking policy is disabled. If // the value is true, scale in is disabled and the target tracking policy won't // remove capacity from the scalable resource. Otherwise, scale in is enabled // and the target tracking policy can remove capacity from the scalable resource. // The default value is false. DisableScaleIn *bool `type:"boolean"` // The amount of time, in seconds, after a scale in activity completes before // another scale in activity can start. The cooldown period is used to block // subsequent scale in requests until it has expired. You should scale in conservatively // to protect your application's availability. However, if another alarm triggers // a scale out policy during the cooldown period after a scale-in, application // auto scaling scales out your scalable target immediately. ScaleInCooldown *int64 `type:"integer"` // The amount of time, in seconds, after a scale out activity completes before // another scale out activity can start. While the cooldown period is in effect, // the capacity that has been added by the previous scale out event that initiated // the cooldown is calculated as part of the desired capacity for the next scale // out. You should continuously (but not excessively) scale out. ScaleOutCooldown *int64 `type:"integer"` // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 // (Base 10) or 2e-360 to 2e360 (Base 2). // // TargetValue is a required field TargetValue *float64 `type:"double" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingTargetTrackingScalingPolicyConfigurationDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingTargetTrackingScalingPolicyConfigurationDescription) GoString() string { return s.String() } // SetDisableScaleIn sets the DisableScaleIn field's value. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetDisableScaleIn(v bool) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription { s.DisableScaleIn = &v return s } // SetScaleInCooldown sets the ScaleInCooldown field's value. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetScaleInCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription { s.ScaleInCooldown = &v return s } // SetScaleOutCooldown sets the ScaleOutCooldown field's value. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetScaleOutCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription { s.ScaleOutCooldown = &v return s } // SetTargetValue sets the TargetValue field's value. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetTargetValue(v float64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription { s.TargetValue = &v return s } // Represents the settings of a target tracking scaling policy that will be // modified. type AutoScalingTargetTrackingScalingPolicyConfigurationUpdate struct { _ struct{} `type:"structure"` // Indicates whether scale in by the target tracking policy is disabled. If // the value is true, scale in is disabled and the target tracking policy won't // remove capacity from the scalable resource. Otherwise, scale in is enabled // and the target tracking policy can remove capacity from the scalable resource. // The default value is false. DisableScaleIn *bool `type:"boolean"` // The amount of time, in seconds, after a scale in activity completes before // another scale in activity can start. The cooldown period is used to block // subsequent scale in requests until it has expired. You should scale in conservatively // to protect your application's availability. However, if another alarm triggers // a scale out policy during the cooldown period after a scale-in, application // auto scaling scales out your scalable target immediately. ScaleInCooldown *int64 `type:"integer"` // The amount of time, in seconds, after a scale out activity completes before // another scale out activity can start. While the cooldown period is in effect, // the capacity that has been added by the previous scale out event that initiated // the cooldown is calculated as part of the desired capacity for the next scale // out. You should continuously (but not excessively) scale out. ScaleOutCooldown *int64 `type:"integer"` // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 // (Base 10) or 2e-360 to 2e360 (Base 2). // // TargetValue is a required field TargetValue *float64 `type:"double" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AutoScalingTargetTrackingScalingPolicyConfigurationUpdate"} if s.TargetValue == nil { invalidParams.Add(request.NewErrParamRequired("TargetValue")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDisableScaleIn sets the DisableScaleIn field's value. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetDisableScaleIn(v bool) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { s.DisableScaleIn = &v return s } // SetScaleInCooldown sets the ScaleInCooldown field's value. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetScaleInCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { s.ScaleInCooldown = &v return s } // SetScaleOutCooldown sets the ScaleOutCooldown field's value. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetScaleOutCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { s.ScaleOutCooldown = &v return s } // SetTargetValue sets the TargetValue field's value. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetTargetValue(v float64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate { s.TargetValue = &v return s } // Contains the description of the backup created for the table. type BackupDescription struct { _ struct{} `type:"structure"` // Contains the details of the backup created for the table. BackupDetails *BackupDetails `type:"structure"` // Contains the details of the table when the backup was created. SourceTableDetails *SourceTableDetails `type:"structure"` // Contains the details of the features enabled on the table when the backup // was created. For example, LSIs, GSIs, streams, TTL. SourceTableFeatureDetails *SourceTableFeatureDetails `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupDescription) GoString() string { return s.String() } // SetBackupDetails sets the BackupDetails field's value. func (s *BackupDescription) SetBackupDetails(v *BackupDetails) *BackupDescription { s.BackupDetails = v return s } // SetSourceTableDetails sets the SourceTableDetails field's value. func (s *BackupDescription) SetSourceTableDetails(v *SourceTableDetails) *BackupDescription { s.SourceTableDetails = v return s } // SetSourceTableFeatureDetails sets the SourceTableFeatureDetails field's value. func (s *BackupDescription) SetSourceTableFeatureDetails(v *SourceTableFeatureDetails) *BackupDescription { s.SourceTableFeatureDetails = v return s } // Contains the details of the backup created for the table. type BackupDetails struct { _ struct{} `type:"structure"` // ARN associated with the backup. // // BackupArn is a required field BackupArn *string `min:"37" type:"string" required:"true"` // Time at which the backup was created. This is the request time of the backup. // // BackupCreationDateTime is a required field BackupCreationDateTime *time.Time `type:"timestamp" required:"true"` // Time at which the automatic on-demand backup created by DynamoDB will expire. // This SYSTEM on-demand backup expires automatically 35 days after its creation. BackupExpiryDateTime *time.Time `type:"timestamp"` // Name of the requested backup. // // BackupName is a required field BackupName *string `min:"3" type:"string" required:"true"` // Size of the backup in bytes. DynamoDB updates this value approximately every // six hours. Recent changes might not be reflected in this value. BackupSizeBytes *int64 `type:"long"` // Backup can be in one of the following states: CREATING, ACTIVE, DELETED. // // BackupStatus is a required field BackupStatus *string `type:"string" required:"true" enum:"BackupStatus"` // BackupType: // // * USER - You create and manage these using the on-demand backup feature. // // * 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. // // * AWS_BACKUP - On-demand backup created by you from Backup service. // // BackupType is a required field BackupType *string `type:"string" required:"true" enum:"BackupType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupDetails) GoString() string { return s.String() } // SetBackupArn sets the BackupArn field's value. func (s *BackupDetails) SetBackupArn(v string) *BackupDetails { s.BackupArn = &v return s } // SetBackupCreationDateTime sets the BackupCreationDateTime field's value. func (s *BackupDetails) SetBackupCreationDateTime(v time.Time) *BackupDetails { s.BackupCreationDateTime = &v return s } // SetBackupExpiryDateTime sets the BackupExpiryDateTime field's value. func (s *BackupDetails) SetBackupExpiryDateTime(v time.Time) *BackupDetails { s.BackupExpiryDateTime = &v return s } // SetBackupName sets the BackupName field's value. func (s *BackupDetails) SetBackupName(v string) *BackupDetails { s.BackupName = &v return s } // SetBackupSizeBytes sets the BackupSizeBytes field's value. func (s *BackupDetails) SetBackupSizeBytes(v int64) *BackupDetails { s.BackupSizeBytes = &v return s } // SetBackupStatus sets the BackupStatus field's value. func (s *BackupDetails) SetBackupStatus(v string) *BackupDetails { s.BackupStatus = &v return s } // SetBackupType sets the BackupType field's value. func (s *BackupDetails) SetBackupType(v string) *BackupDetails { s.BackupType = &v return s } // There is another ongoing conflicting backup control plane operation on the // table. The backup is either being created, deleted or restored to a table. type BackupInUseException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupInUseException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupInUseException) GoString() string { return s.String() } func newErrorBackupInUseException(v protocol.ResponseMetadata) error { return &BackupInUseException{ RespMetadata: v, } } // Code returns the exception type name. func (s *BackupInUseException) Code() string { return "BackupInUseException" } // Message returns the exception's message. func (s *BackupInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *BackupInUseException) OrigErr() error { return nil } func (s *BackupInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *BackupInUseException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *BackupInUseException) RequestID() string { return s.RespMetadata.RequestID } // Backup not found for the given BackupARN. type BackupNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupNotFoundException) GoString() string { return s.String() } func newErrorBackupNotFoundException(v protocol.ResponseMetadata) error { return &BackupNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *BackupNotFoundException) Code() string { return "BackupNotFoundException" } // Message returns the exception's message. func (s *BackupNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *BackupNotFoundException) OrigErr() error { return nil } func (s *BackupNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *BackupNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *BackupNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Contains details for the backup. type BackupSummary struct { _ struct{} `type:"structure"` // ARN associated with the backup. BackupArn *string `min:"37" type:"string"` // Time at which the backup was created. BackupCreationDateTime *time.Time `type:"timestamp"` // Time at which the automatic on-demand backup created by DynamoDB will expire. // This SYSTEM on-demand backup expires automatically 35 days after its creation. BackupExpiryDateTime *time.Time `type:"timestamp"` // Name of the specified backup. BackupName *string `min:"3" type:"string"` // Size of the backup in bytes. BackupSizeBytes *int64 `type:"long"` // Backup can be in one of the following states: CREATING, ACTIVE, DELETED. BackupStatus *string `type:"string" enum:"BackupStatus"` // BackupType: // // * USER - You create and manage these using the on-demand backup feature. // // * 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. // // * AWS_BACKUP - On-demand backup created by you from Backup service. BackupType *string `type:"string" enum:"BackupType"` // ARN associated with the table. TableArn *string `type:"string"` // Unique identifier for the table. TableId *string `type:"string"` // Name of the table. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BackupSummary) GoString() string { return s.String() } // SetBackupArn sets the BackupArn field's value. func (s *BackupSummary) SetBackupArn(v string) *BackupSummary { s.BackupArn = &v return s } // SetBackupCreationDateTime sets the BackupCreationDateTime field's value. func (s *BackupSummary) SetBackupCreationDateTime(v time.Time) *BackupSummary { s.BackupCreationDateTime = &v return s } // SetBackupExpiryDateTime sets the BackupExpiryDateTime field's value. func (s *BackupSummary) SetBackupExpiryDateTime(v time.Time) *BackupSummary { s.BackupExpiryDateTime = &v return s } // SetBackupName sets the BackupName field's value. func (s *BackupSummary) SetBackupName(v string) *BackupSummary { s.BackupName = &v return s } // SetBackupSizeBytes sets the BackupSizeBytes field's value. func (s *BackupSummary) SetBackupSizeBytes(v int64) *BackupSummary { s.BackupSizeBytes = &v return s } // SetBackupStatus sets the BackupStatus field's value. func (s *BackupSummary) SetBackupStatus(v string) *BackupSummary { s.BackupStatus = &v return s } // SetBackupType sets the BackupType field's value. func (s *BackupSummary) SetBackupType(v string) *BackupSummary { s.BackupType = &v return s } // SetTableArn sets the TableArn field's value. func (s *BackupSummary) SetTableArn(v string) *BackupSummary { s.TableArn = &v return s } // SetTableId sets the TableId field's value. func (s *BackupSummary) SetTableId(v string) *BackupSummary { s.TableId = &v return s } // SetTableName sets the TableName field's value. func (s *BackupSummary) SetTableName(v string) *BackupSummary { s.TableName = &v return s } type BatchExecuteStatementInput struct { _ struct{} `type:"structure"` // Determines the level of detail about either provisioned or on-demand 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"` // The list of PartiQL statements representing the batch to run. // // Statements is a required field Statements []*BatchStatementRequest `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchExecuteStatementInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchExecuteStatementInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *BatchExecuteStatementInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "BatchExecuteStatementInput"} if s.Statements == nil { invalidParams.Add(request.NewErrParamRequired("Statements")) } if s.Statements != nil && len(s.Statements) < 1 { invalidParams.Add(request.NewErrParamMinLen("Statements", 1)) } if s.Statements != nil { for i, v := range s.Statements { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Statements", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *BatchExecuteStatementInput) SetReturnConsumedCapacity(v string) *BatchExecuteStatementInput { s.ReturnConsumedCapacity = &v return s } // SetStatements sets the Statements field's value. func (s *BatchExecuteStatementInput) SetStatements(v []*BatchStatementRequest) *BatchExecuteStatementInput { s.Statements = v return s } type BatchExecuteStatementOutput struct { _ struct{} `type:"structure"` // The capacity units consumed by the entire operation. The values of the list // are ordered according to the ordering of the statements. ConsumedCapacity []*ConsumedCapacity `type:"list"` // The response to each PartiQL statement in the batch. The values of the list // are ordered according to the ordering of the request statements. Responses []*BatchStatementResponse `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchExecuteStatementOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchExecuteStatementOutput) GoString() string { return s.String() } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *BatchExecuteStatementOutput) SetConsumedCapacity(v []*ConsumedCapacity) *BatchExecuteStatementOutput { s.ConsumedCapacity = v return s } // SetResponses sets the Responses field's value. func (s *BatchExecuteStatementOutput) SetResponses(v []*BatchStatementResponse) *BatchExecuteStatementOutput { s.Responses = v return s } // Represents the input of a BatchGetItem operation. type BatchGetItemInput struct { _ struct{} `type:"structure"` // A map of one or more table names and, for each table, a map that describes // one or more items to retrieve from that table. Each table name can be used // only once per BatchGetItem request. // // Each element in the map of items to retrieve consists of the following: // // * ConsistentRead - If true, a strongly consistent read is used; if false // (the default), an eventually consistent read is used. // // * ExpressionAttributeNames - One or more substitution tokens for attribute // names in the ProjectionExpression parameter. The following are some use // cases for using ExpressionAttributeNames: To access an attribute whose // name conflicts with a DynamoDB reserved word. To create a placeholder // for repeating occurrences of an attribute name in an expression. To prevent // special characters in an attribute name from being misinterpreted in an // expression. Use the # character in an expression to dereference an attribute // name. For example, consider the following attribute name: Percentile The // name of this attribute conflicts with a reserved word, so it cannot be // used directly in an expression. (For the complete list of reserved words, // see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide). To work around this, you could // specify the following for ExpressionAttributeNames: {"#P":"Percentile"} // You could then use this substitution in an expression, as in this example: // #P = :val Tokens that begin with the : character are expression attribute // values, which are placeholders for the actual value at runtime. For more // information about expression attribute names, see Accessing Item Attributes // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. // // * Keys - An array of primary key attribute values that define specific // items in the table. For each primary key, you must provide all of the // key attributes. For example, with a simple primary key, you only need // to provide the partition key value. For a composite key, you must provide // both the partition key value and the sort key value. // // * ProjectionExpression - A string that identifies one or more attributes // to retrieve from the table. These attributes can include scalars, sets, // or elements of a JSON document. The attributes in the expression must // be separated by commas. If no attribute names are specified, then all // attributes are returned. If any of the requested attributes are not found, // they do not appear in the result. For more information, see Accessing // Item Attributes (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. // // * AttributesToGet - This is a legacy parameter. Use ProjectionExpression // instead. For more information, see AttributesToGet (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html) // in the Amazon DynamoDB Developer Guide. // // RequestItems is a required field RequestItems map[string]*KeysAndAttributes `min:"1" type:"map" required:"true"` // Determines the level of detail about either provisioned or on-demand 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"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchGetItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchGetItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *BatchGetItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "BatchGetItemInput"} if s.RequestItems == nil { invalidParams.Add(request.NewErrParamRequired("RequestItems")) } if s.RequestItems != nil && len(s.RequestItems) < 1 { invalidParams.Add(request.NewErrParamMinLen("RequestItems", 1)) } if s.RequestItems != nil { for i, v := range s.RequestItems { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RequestItems", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRequestItems sets the RequestItems field's value. func (s *BatchGetItemInput) SetRequestItems(v map[string]*KeysAndAttributes) *BatchGetItemInput { s.RequestItems = v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *BatchGetItemInput) SetReturnConsumedCapacity(v string) *BatchGetItemInput { s.ReturnConsumedCapacity = &v return s } // Represents the output of a BatchGetItem operation. type BatchGetItemOutput struct { _ struct{} `type:"structure"` // The read capacity units consumed by the entire BatchGetItem operation. // // Each element consists of: // // * TableName - The table that consumed the provisioned throughput. // // * CapacityUnits - The total number of capacity units consumed. ConsumedCapacity []*ConsumedCapacity `type:"list"` // A map of table name to a list of items. Each object in Responses consists // of a table name, along with a map of attribute data consisting of the data // type and attribute value. Responses map[string][]map[string]*AttributeValue `type:"map"` // A map of tables and their respective keys that were not processed with the // current response. The UnprocessedKeys value is in the same form as RequestItems, // so the value can be provided directly to a subsequent BatchGetItem operation. // For more information, see RequestItems in the Request Parameters section. // // Each element consists of: // // * Keys - An array of primary key attribute values that define specific // items in the table. // // * ProjectionExpression - One or more attributes to be retrieved from the // table or index. By default, all attributes are returned. If a requested // attribute is not found, it does not appear in the result. // // * ConsistentRead - The consistency of a read operation. If set to true, // then a strongly consistent read is used; otherwise, an eventually consistent // read is used. // // If there are no unprocessed keys remaining, the response contains an empty // UnprocessedKeys map. UnprocessedKeys map[string]*KeysAndAttributes `min:"1" type:"map"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchGetItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchGetItemOutput) GoString() string { return s.String() } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *BatchGetItemOutput) SetConsumedCapacity(v []*ConsumedCapacity) *BatchGetItemOutput { s.ConsumedCapacity = v return s } // SetResponses sets the Responses field's value. func (s *BatchGetItemOutput) SetResponses(v map[string][]map[string]*AttributeValue) *BatchGetItemOutput { s.Responses = v return s } // SetUnprocessedKeys sets the UnprocessedKeys field's value. func (s *BatchGetItemOutput) SetUnprocessedKeys(v map[string]*KeysAndAttributes) *BatchGetItemOutput { s.UnprocessedKeys = v return s } // An error associated with a statement in a PartiQL batch that was run. type BatchStatementError struct { _ struct{} `type:"structure"` // The error code associated with the failed PartiQL batch statement. Code *string `type:"string" enum:"BatchStatementErrorCodeEnum"` // The item which caused the condition check to fail. This will be set if ReturnValuesOnConditionCheckFailure // is specified as ALL_OLD. Item map[string]*AttributeValue `type:"map"` // The error message associated with the PartiQL batch response. Message *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchStatementError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchStatementError) GoString() string { return s.String() } // SetCode sets the Code field's value. func (s *BatchStatementError) SetCode(v string) *BatchStatementError { s.Code = &v return s } // SetItem sets the Item field's value. func (s *BatchStatementError) SetItem(v map[string]*AttributeValue) *BatchStatementError { s.Item = v return s } // SetMessage sets the Message field's value. func (s *BatchStatementError) SetMessage(v string) *BatchStatementError { s.Message = &v return s } // A PartiQL batch statement request. type BatchStatementRequest struct { _ struct{} `type:"structure"` // The read consistency of the PartiQL batch request. ConsistentRead *bool `type:"boolean"` // The parameters associated with a PartiQL statement in the batch request. Parameters []*AttributeValue `min:"1" type:"list"` // An optional parameter that returns the item attributes for a PartiQL batch // request operation that failed a condition check. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` // A valid PartiQL statement. // // Statement is a required field Statement *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchStatementRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchStatementRequest) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *BatchStatementRequest) Validate() error { invalidParams := request.ErrInvalidParams{Context: "BatchStatementRequest"} if s.Parameters != nil && len(s.Parameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) } if s.Statement == nil { invalidParams.Add(request.NewErrParamRequired("Statement")) } if s.Statement != nil && len(*s.Statement) < 1 { invalidParams.Add(request.NewErrParamMinLen("Statement", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConsistentRead sets the ConsistentRead field's value. func (s *BatchStatementRequest) SetConsistentRead(v bool) *BatchStatementRequest { s.ConsistentRead = &v return s } // SetParameters sets the Parameters field's value. func (s *BatchStatementRequest) SetParameters(v []*AttributeValue) *BatchStatementRequest { s.Parameters = v return s } // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. func (s *BatchStatementRequest) SetReturnValuesOnConditionCheckFailure(v string) *BatchStatementRequest { s.ReturnValuesOnConditionCheckFailure = &v return s } // SetStatement sets the Statement field's value. func (s *BatchStatementRequest) SetStatement(v string) *BatchStatementRequest { s.Statement = &v return s } // A PartiQL batch statement response.. type BatchStatementResponse struct { _ struct{} `type:"structure"` // The error associated with a failed PartiQL batch statement. Error *BatchStatementError `type:"structure"` // A DynamoDB item associated with a BatchStatementResponse Item map[string]*AttributeValue `type:"map"` // The table name associated with a failed PartiQL batch statement. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchStatementResponse) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchStatementResponse) GoString() string { return s.String() } // SetError sets the Error field's value. func (s *BatchStatementResponse) SetError(v *BatchStatementError) *BatchStatementResponse { s.Error = v return s } // SetItem sets the Item field's value. func (s *BatchStatementResponse) SetItem(v map[string]*AttributeValue) *BatchStatementResponse { s.Item = v return s } // SetTableName sets the TableName field's value. func (s *BatchStatementResponse) SetTableName(v string) *BatchStatementResponse { s.TableName = &v return s } // Represents the input of a BatchWriteItem operation. type BatchWriteItemInput struct { _ struct{} `type:"structure"` // A map of one or more table names and, for each table, a list of operations // to be performed (DeleteRequest or PutRequest). Each element in the map consists // of the following: // // * DeleteRequest - Perform a DeleteItem operation on the specified item. // The item to be deleted is identified by a Key subelement: Key - A map // of primary key attribute values that uniquely identify the item. Each // entry in this map consists of an attribute name and an attribute value. // For each primary key, you must provide all of the key attributes. For // example, with a simple primary key, you only need to provide a value for // the partition key. For a composite primary key, you must provide values // for both the partition key and the sort key. // // * PutRequest - Perform a PutItem operation on the specified item. The // item to be put is identified by an Item subelement: Item - A map of attributes // and their values. Each entry in this map consists of an attribute name // and an attribute value. Attribute values must not be null; string and // binary type attributes must have lengths greater than zero; and set type // attributes must not be empty. Requests that contain empty values are rejected // with a ValidationException exception. If you specify any attributes that // are part of an index key, then the data types for those attributes must // match those of the schema in the table's attribute definition. // // RequestItems is a required field RequestItems map[string][]*WriteRequest `min:"1" type:"map" required:"true"` // Determines the level of detail about either provisioned or on-demand 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 are returned in the response. If set to NONE // (the default), no statistics are returned. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchWriteItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchWriteItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *BatchWriteItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "BatchWriteItemInput"} if s.RequestItems == nil { invalidParams.Add(request.NewErrParamRequired("RequestItems")) } if s.RequestItems != nil && len(s.RequestItems) < 1 { invalidParams.Add(request.NewErrParamMinLen("RequestItems", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRequestItems sets the RequestItems field's value. func (s *BatchWriteItemInput) SetRequestItems(v map[string][]*WriteRequest) *BatchWriteItemInput { s.RequestItems = v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *BatchWriteItemInput) SetReturnConsumedCapacity(v string) *BatchWriteItemInput { s.ReturnConsumedCapacity = &v return s } // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value. func (s *BatchWriteItemInput) SetReturnItemCollectionMetrics(v string) *BatchWriteItemInput { s.ReturnItemCollectionMetrics = &v return s } // Represents the output of a BatchWriteItem operation. type BatchWriteItemOutput struct { _ struct{} `type:"structure"` // The capacity units consumed by the entire BatchWriteItem operation. // // Each element consists of: // // * TableName - The table that consumed the provisioned throughput. // // * CapacityUnits - The total number of capacity units consumed. ConsumedCapacity []*ConsumedCapacity `type:"list"` // A list of tables that were processed by BatchWriteItem and, for each table, // information about any item collections that were affected by individual DeleteItem // or PutItem operations. // // Each entry consists of the following subelements: // // * ItemCollectionKey - The partition key value of the item collection. // This is the same as the partition key value of the item. // // * SizeEstimateRangeGB - An estimate of item collection size, expressed // in GB. This is a two-element array containing a lower bound and an upper // bound for the estimate. The estimate includes the size of all the items // in the table, plus the size of all attributes projected into all of the // local secondary indexes on the table. Use this estimate to measure whether // a local secondary index is approaching its size limit. The estimate is // subject to change over time; therefore, do not rely on the precision or // accuracy of the estimate. ItemCollectionMetrics map[string][]*ItemCollectionMetrics `type:"map"` // A map of tables and requests against those tables that were not processed. // The UnprocessedItems value is in the same form as RequestItems, so you can // provide this value directly to a subsequent BatchWriteItem operation. For // more information, see RequestItems in the Request Parameters section. // // Each UnprocessedItems entry consists of a table name and, for that table, // a list of operations to perform (DeleteRequest or PutRequest). // // * DeleteRequest - Perform a DeleteItem operation on the specified item. // The item to be deleted is identified by a Key subelement: Key - A map // of primary key attribute values that uniquely identify the item. Each // entry in this map consists of an attribute name and an attribute value. // // * PutRequest - Perform a PutItem operation on the specified item. The // item to be put is identified by an Item subelement: Item - A map of attributes // and their values. Each entry in this map consists of an attribute name // and an attribute value. Attribute values must not be null; string and // binary type attributes must have lengths greater than zero; and set type // attributes must not be empty. Requests that contain empty values will // be rejected with a ValidationException exception. If you specify any attributes // that are part of an index key, then the data types for those attributes // must match those of the schema in the table's attribute definition. // // If there are no unprocessed items remaining, the response contains an empty // UnprocessedItems map. UnprocessedItems map[string][]*WriteRequest `min:"1" type:"map"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchWriteItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BatchWriteItemOutput) GoString() string { return s.String() } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *BatchWriteItemOutput) SetConsumedCapacity(v []*ConsumedCapacity) *BatchWriteItemOutput { s.ConsumedCapacity = v return s } // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value. func (s *BatchWriteItemOutput) SetItemCollectionMetrics(v map[string][]*ItemCollectionMetrics) *BatchWriteItemOutput { s.ItemCollectionMetrics = v return s } // SetUnprocessedItems sets the UnprocessedItems field's value. func (s *BatchWriteItemOutput) SetUnprocessedItems(v map[string][]*WriteRequest) *BatchWriteItemOutput { s.UnprocessedItems = v return s } // Contains the details for the read/write capacity mode. This page talks about // PROVISIONED and PAY_PER_REQUEST billing modes. For more information about // these modes, see Read/write capacity mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html). // // You may need to switch to on-demand mode at least once in order to return // a BillingModeSummary response. 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BillingModeSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancellationReason) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 { _ struct{} `type:"structure"` // 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Capacity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Capacity) GoString() string { return s.String() } // SetCapacityUnits sets the CapacityUnits field's value. func (s *Capacity) SetCapacityUnits(v float64) *Capacity { s.CapacityUnits = &v 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 // to use when querying a table or an index. For KeyConditions, only the // following comparison operators are supported: EQ | LE | LT | GE | GT | // BEGINS_WITH | BETWEEN Condition is also used in a QueryFilter, which evaluates // the query results and returns only the desired values. // // - For a Scan operation, Condition is used in a ScanFilter, which evaluates // the scan results and returns only the desired values. type Condition struct { _ struct{} `type:"structure"` // One or more values to evaluate against the supplied attribute. The number // of values in the list depends on the ComparisonOperator being used. // // For type Number, value comparisons are numeric. // // String value comparisons for greater than, equals, or less than are based // on ASCII character code values. For example, a is greater than A, and a is // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). // // For Binary, DynamoDB treats each byte of the binary data as unsigned when // it compares binary values. AttributeValueList []*AttributeValue `type:"list"` // A comparator for evaluating attributes. For example, equals, greater than, // less than, etc. // // The following comparison operators are available: // // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | // BEGINS_WITH | IN | BETWEEN // // The following are descriptions of each comparison operator. // // * EQ : Equal. EQ is supported for all data types, including lists and // maps. AttributeValueList can contain only one AttributeValue element of // type String, Number, Binary, String Set, Number Set, or Binary Set. If // an item contains an AttributeValue element of a different type than the // one provided in the request, the value does not match. For example, {"S":"6"} // does not equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", // "1"]}. // // * NE : Not equal. NE is supported for all data types, including lists // and maps. AttributeValueList can contain only one AttributeValue of type // String, Number, Binary, String Set, Number Set, or Binary Set. If an item // contains an AttributeValue of a different type than the one provided in // the request, the value does not match. For example, {"S":"6"} does not // equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}. // // * LE : Less than or equal. AttributeValueList can contain only one AttributeValue // element of type String, Number, or Binary (not a set type). If an item // contains an AttributeValue element of a different type than the one provided // in the request, the value does not match. For example, {"S":"6"} does // not equal {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2", // "1"]}. // // * LT : Less than. AttributeValueList can contain only one AttributeValue // of type String, Number, or Binary (not a set type). If an item contains // an AttributeValue element of a different type than the one provided in // the request, the value does not match. For example, {"S":"6"} does not // equal {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2", // "1"]}. // // * GE : Greater than or equal. AttributeValueList can contain only one // AttributeValue element of type String, Number, or Binary (not a set type). // If an item contains an AttributeValue element of a different type than // the one provided in the request, the value does not match. For example, // {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"} does not compare to // {"NS":["6", "2", "1"]}. // // * GT : Greater than. AttributeValueList can contain only one AttributeValue // element of type String, Number, or Binary (not a set type). If an item // contains an AttributeValue element of a different type than the one provided // in the request, the value does not match. For example, {"S":"6"} does // not equal {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2", // "1"]}. // // * NOT_NULL : The attribute exists. NOT_NULL is supported for all data // types, including lists and maps. This operator tests for the existence // of an attribute, not its data type. If the data type of attribute "a" // is null, and you evaluate it using NOT_NULL, the result is a Boolean true. // This result is because the attribute "a" exists; its data type is not // relevant to the NOT_NULL comparison operator. // // * NULL : The attribute does not exist. NULL is supported for all data // types, including lists and maps. This operator tests for the nonexistence // of an attribute, not its data type. If the data type of attribute "a" // is null, and you evaluate it using NULL, the result is a Boolean false. // This is because the attribute "a" exists; its data type is not relevant // to the NULL comparison operator. // // * CONTAINS : Checks for a subsequence, or value in a set. AttributeValueList // can contain only one AttributeValue element of type String, Number, or // Binary (not a set type). If the target attribute of the comparison is // of type String, then the operator checks for a substring match. If the // target attribute of the comparison is of type Binary, then the operator // looks for a subsequence of the target that matches the input. If the target // attribute of the comparison is a set ("SS", "NS", or "BS"), then the operator // evaluates to true if it finds an exact match with any member of the set. // CONTAINS is supported for lists: When evaluating "a CONTAINS b", "a" can // be a list; however, "b" cannot be a set, a map, or a list. // // * NOT_CONTAINS : Checks for absence of a subsequence, or absence of a // value in a set. AttributeValueList can contain only one AttributeValue // element of type String, Number, or Binary (not a set type). If the target // attribute of the comparison is a String, then the operator checks for // the absence of a substring match. If the target attribute of the comparison // is Binary, then the operator checks for the absence of a subsequence of // the target that matches the input. If the target attribute of the comparison // is a set ("SS", "NS", or "BS"), then the operator evaluates to true if // it does not find an exact match with any member of the set. NOT_CONTAINS // is supported for lists: When evaluating "a NOT CONTAINS b", "a" can be // a list; however, "b" cannot be a set, a map, or a list. // // * BEGINS_WITH : Checks for a prefix. AttributeValueList can contain only // one AttributeValue of type String or Binary (not a Number or a set type). // The target attribute of the comparison must be of type String or Binary // (not a Number or a set type). // // * IN : Checks for matching elements in a list. AttributeValueList can // contain one or more AttributeValue elements of type String, Number, or // Binary. These attributes are compared against an existing attribute of // an item. If any elements of the input are equal to the item attribute, // the expression evaluates to true. // // * BETWEEN : Greater than or equal to the first value, and less than or // equal to the second value. AttributeValueList must contain two AttributeValue // elements of the same type, either String, Number, or Binary (not a set // type). A target attribute matches if the target value is greater than, // or equal to, the first element and less than, or equal to, the second // element. If an item contains an AttributeValue element of a different // type than the one provided in the request, the value does not match. For // example, {"S":"6"} does not compare to {"N":"6"}. Also, {"N":"6"} does // not compare to {"NS":["6", "2", "1"]} // // For usage examples of AttributeValueList and ComparisonOperator, see Legacy // Conditional Parameters (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html) // in the Amazon DynamoDB Developer Guide. // // ComparisonOperator is a required field ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Condition) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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.ComparisonOperator == nil { invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributeValueList sets the AttributeValueList field's value. func (s *Condition) SetAttributeValueList(v []*AttributeValue) *Condition { s.AttributeValueList = v return s } // SetComparisonOperator sets the ComparisonOperator field's value. func (s *Condition) SetComparisonOperator(v string) *Condition { s.ComparisonOperator = &v 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. // For more information, see Condition expressions (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ConditionExpressions.html) // in the Amazon DynamoDB Developer Guide. // // ConditionExpression is a required field ConditionExpression *string `type:"string" required:"true"` // One or more substitution tokens for attribute names in an expression. For // more information, see Expression attribute names (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionAttributeNames.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeNames map[string]*string `type:"map"` // One or more values that can be substituted in an expression. For more information, // see Condition expressions (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ConditionExpressions.html) // in the Amazon DynamoDB Developer Guide. 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ConditionCheck) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 } // A condition specified in the operation could not be evaluated. type ConditionalCheckFailedException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Item which caused the ConditionalCheckFailedException. Item map[string]*AttributeValue `type:"map"` // The conditional request failed. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ConditionalCheckFailedException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ConditionalCheckFailedException) GoString() string { return s.String() } func newErrorConditionalCheckFailedException(v protocol.ResponseMetadata) error { return &ConditionalCheckFailedException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ConditionalCheckFailedException) Code() string { return "ConditionalCheckFailedException" } // Message returns the exception's message. func (s *ConditionalCheckFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ConditionalCheckFailedException) OrigErr() error { return nil } func (s *ConditionalCheckFailedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *ConditionalCheckFailedException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ConditionalCheckFailedException) RequestID() string { return s.RespMetadata.RequestID } // 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 // if the request asked for it. For more information, see Provisioned Throughput // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html) // in the Amazon DynamoDB Developer Guide. type ConsumedCapacity struct { _ struct{} `type:"structure"` // The total number of capacity units consumed by the operation. CapacityUnits *float64 `type:"double"` // The amount of throughput consumed on each global index affected by the operation. GlobalSecondaryIndexes map[string]*Capacity `type:"map"` // 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ConsumedCapacity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ConsumedCapacity) GoString() string { return s.String() } // SetCapacityUnits sets the CapacityUnits field's value. func (s *ConsumedCapacity) SetCapacityUnits(v float64) *ConsumedCapacity { s.CapacityUnits = &v return s } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *ConsumedCapacity) SetGlobalSecondaryIndexes(v map[string]*Capacity) *ConsumedCapacity { s.GlobalSecondaryIndexes = v return s } // SetLocalSecondaryIndexes sets the LocalSecondaryIndexes field's value. func (s *ConsumedCapacity) SetLocalSecondaryIndexes(v map[string]*Capacity) *ConsumedCapacity { s.LocalSecondaryIndexes = v 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 return s } // SetTableName sets the TableName field's value. func (s *ConsumedCapacity) SetTableName(v string) *ConsumedCapacity { s.TableName = &v 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 { _ struct{} `type:"structure"` // ContinuousBackupsStatus can be one of the following states: ENABLED, DISABLED // // ContinuousBackupsStatus is a required field ContinuousBackupsStatus *string `type:"string" required:"true" enum:"ContinuousBackupsStatus"` // The description of the point in time recovery settings applied to the table. PointInTimeRecoveryDescription *PointInTimeRecoveryDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ContinuousBackupsDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ContinuousBackupsDescription) GoString() string { return s.String() } // SetContinuousBackupsStatus sets the ContinuousBackupsStatus field's value. func (s *ContinuousBackupsDescription) SetContinuousBackupsStatus(v string) *ContinuousBackupsDescription { s.ContinuousBackupsStatus = &v return s } // SetPointInTimeRecoveryDescription sets the PointInTimeRecoveryDescription field's value. func (s *ContinuousBackupsDescription) SetPointInTimeRecoveryDescription(v *PointInTimeRecoveryDescription) *ContinuousBackupsDescription { s.PointInTimeRecoveryDescription = v return s } // Backups have not yet been enabled for this table. type ContinuousBackupsUnavailableException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ContinuousBackupsUnavailableException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ContinuousBackupsUnavailableException) GoString() string { return s.String() } func newErrorContinuousBackupsUnavailableException(v protocol.ResponseMetadata) error { return &ContinuousBackupsUnavailableException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ContinuousBackupsUnavailableException) Code() string { return "ContinuousBackupsUnavailableException" } // Message returns the exception's message. func (s *ContinuousBackupsUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ContinuousBackupsUnavailableException) OrigErr() error { return nil } func (s *ContinuousBackupsUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ContinuousBackupsUnavailableException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ContinuousBackupsUnavailableException) RequestID() string { return s.RespMetadata.RequestID } // Represents a Contributor Insights summary entry. type ContributorInsightsSummary struct { _ struct{} `type:"structure"` // Describes the current status for contributor insights for the given table // and index, if applicable. ContributorInsightsStatus *string `type:"string" enum:"ContributorInsightsStatus"` // Name of the index associated with the summary, if any. IndexName *string `min:"3" type:"string"` // Name of the table associated with the summary. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ContributorInsightsSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ContributorInsightsSummary) GoString() string { return s.String() } // SetContributorInsightsStatus sets the ContributorInsightsStatus field's value. func (s *ContributorInsightsSummary) SetContributorInsightsStatus(v string) *ContributorInsightsSummary { s.ContributorInsightsStatus = &v return s } // SetIndexName sets the IndexName field's value. func (s *ContributorInsightsSummary) SetIndexName(v string) *ContributorInsightsSummary { s.IndexName = &v return s } // SetTableName sets the TableName field's value. func (s *ContributorInsightsSummary) SetTableName(v string) *ContributorInsightsSummary { s.TableName = &v return s } type CreateBackupInput struct { _ struct{} `type:"structure"` // Specified name for the backup. // // BackupName is a required field BackupName *string `min:"3" type:"string" required:"true"` // The name of the table. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateBackupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateBackupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateBackupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateBackupInput"} if s.BackupName == nil { invalidParams.Add(request.NewErrParamRequired("BackupName")) } if s.BackupName != nil && len(*s.BackupName) < 3 { invalidParams.Add(request.NewErrParamMinLen("BackupName", 3)) } 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 } // SetBackupName sets the BackupName field's value. func (s *CreateBackupInput) SetBackupName(v string) *CreateBackupInput { s.BackupName = &v return s } // SetTableName sets the TableName field's value. func (s *CreateBackupInput) SetTableName(v string) *CreateBackupInput { s.TableName = &v return s } type CreateBackupOutput struct { _ struct{} `type:"structure"` // Contains the details of the backup created for the table. BackupDetails *BackupDetails `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateBackupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateBackupOutput) GoString() string { return s.String() } // SetBackupDetails sets the BackupDetails field's value. func (s *CreateBackupOutput) SetBackupDetails(v *BackupDetails) *CreateBackupOutput { s.BackupDetails = v return s } // Represents a new global secondary index to be added to an existing table. type CreateGlobalSecondaryIndexAction struct { _ struct{} `type:"structure"` // The name of the global secondary index to be created. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` // The key schema for the global secondary index. // // KeySchema is a required field KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` // Represents attributes that are copied (projected) from the table into an // index. These are in addition to the primary key attributes and index key // attributes, which are automatically projected. // // Projection is a required field Projection *Projection `type:"structure" required:"true"` // Represents the provisioned throughput settings for the specified global secondary // index. // // For current minimum and maximum provisioned throughput values, see Service, // Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. ProvisionedThroughput *ProvisionedThroughput `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateGlobalSecondaryIndexAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateGlobalSecondaryIndexAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateGlobalSecondaryIndexAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateGlobalSecondaryIndexAction"} if s.IndexName == nil { invalidParams.Add(request.NewErrParamRequired("IndexName")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.KeySchema == nil { invalidParams.Add(request.NewErrParamRequired("KeySchema")) } if s.KeySchema != nil && len(s.KeySchema) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) } if s.Projection == nil { invalidParams.Add(request.NewErrParamRequired("Projection")) } if s.KeySchema != nil { for i, v := range s.KeySchema { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) } } } if s.Projection != nil { if err := s.Projection.Validate(); err != nil { invalidParams.AddNested("Projection", err.(request.ErrInvalidParams)) } } if s.ProvisionedThroughput != nil { if err := s.ProvisionedThroughput.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *CreateGlobalSecondaryIndexAction) SetIndexName(v string) *CreateGlobalSecondaryIndexAction { s.IndexName = &v return s } // SetKeySchema sets the KeySchema field's value. func (s *CreateGlobalSecondaryIndexAction) SetKeySchema(v []*KeySchemaElement) *CreateGlobalSecondaryIndexAction { s.KeySchema = v return s } // SetProjection sets the Projection field's value. func (s *CreateGlobalSecondaryIndexAction) SetProjection(v *Projection) *CreateGlobalSecondaryIndexAction { s.Projection = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *CreateGlobalSecondaryIndexAction) SetProvisionedThroughput(v *ProvisionedThroughput) *CreateGlobalSecondaryIndexAction { s.ProvisionedThroughput = v return s } type CreateGlobalTableInput struct { _ struct{} `type:"structure"` // The global table name. // // GlobalTableName is a required field GlobalTableName *string `min:"3" type:"string" required:"true"` // The Regions where the global table needs to be created. // // ReplicationGroup is a required field ReplicationGroup []*Replica `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateGlobalTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateGlobalTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateGlobalTableInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateGlobalTableInput"} if s.GlobalTableName == nil { invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) } if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) } if s.ReplicationGroup == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationGroup")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetGlobalTableName sets the GlobalTableName field's value. func (s *CreateGlobalTableInput) SetGlobalTableName(v string) *CreateGlobalTableInput { s.GlobalTableName = &v return s } // SetReplicationGroup sets the ReplicationGroup field's value. func (s *CreateGlobalTableInput) SetReplicationGroup(v []*Replica) *CreateGlobalTableInput { s.ReplicationGroup = v return s } type CreateGlobalTableOutput struct { _ struct{} `type:"structure"` // Contains the details of the global table. GlobalTableDescription *GlobalTableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateGlobalTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateGlobalTableOutput) GoString() string { return s.String() } // SetGlobalTableDescription sets the GlobalTableDescription field's value. func (s *CreateGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescription) *CreateGlobalTableOutput { s.GlobalTableDescription = v return s } // Represents a replica to be added. type CreateReplicaAction struct { _ struct{} `type:"structure"` // The Region of the replica to be added. // // RegionName is a required field RegionName *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateReplicaAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateReplicaAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateReplicaAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateReplicaAction"} if s.RegionName == nil { invalidParams.Add(request.NewErrParamRequired("RegionName")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRegionName sets the RegionName field's value. func (s *CreateReplicaAction) SetRegionName(v string) *CreateReplicaAction { s.RegionName = &v return s } // Represents a replica to be created. type CreateReplicationGroupMemberAction struct { _ struct{} `type:"structure"` // Replica-specific global secondary index settings. GlobalSecondaryIndexes []*ReplicaGlobalSecondaryIndex `min:"1" type:"list"` // The KMS key that should be used for KMS encryption in the new replica. To // specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or // alias ARN. Note that you should only provide this parameter if the key is // different from the default DynamoDB KMS key alias/aws/dynamodb. KMSMasterKeyId *string `type:"string"` // Replica-specific provisioned throughput. If not specified, uses the source // table's provisioned throughput settings. ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"` // The Region where the new replica will be created. // // RegionName is a required field RegionName *string `type:"string" required:"true"` // Replica-specific table class. If not specified, uses the source table's table // class. TableClassOverride *string `type:"string" enum:"TableClass"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateReplicationGroupMemberAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateReplicationGroupMemberAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateReplicationGroupMemberAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateReplicationGroupMemberAction"} if s.GlobalSecondaryIndexes != nil && len(s.GlobalSecondaryIndexes) < 1 { invalidParams.Add(request.NewErrParamMinLen("GlobalSecondaryIndexes", 1)) } if s.RegionName == nil { invalidParams.Add(request.NewErrParamRequired("RegionName")) } if s.GlobalSecondaryIndexes != nil { for i, v := range s.GlobalSecondaryIndexes { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexes", i), err.(request.ErrInvalidParams)) } } } if s.ProvisionedThroughputOverride != nil { if err := s.ProvisionedThroughputOverride.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *CreateReplicationGroupMemberAction) SetGlobalSecondaryIndexes(v []*ReplicaGlobalSecondaryIndex) *CreateReplicationGroupMemberAction { s.GlobalSecondaryIndexes = v return s } // SetKMSMasterKeyId sets the KMSMasterKeyId field's value. func (s *CreateReplicationGroupMemberAction) SetKMSMasterKeyId(v string) *CreateReplicationGroupMemberAction { s.KMSMasterKeyId = &v return s } // SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value. func (s *CreateReplicationGroupMemberAction) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *CreateReplicationGroupMemberAction { s.ProvisionedThroughputOverride = v return s } // SetRegionName sets the RegionName field's value. func (s *CreateReplicationGroupMemberAction) SetRegionName(v string) *CreateReplicationGroupMemberAction { s.RegionName = &v return s } // SetTableClassOverride sets the TableClassOverride field's value. func (s *CreateReplicationGroupMemberAction) SetTableClassOverride(v string) *CreateReplicationGroupMemberAction { s.TableClassOverride = &v return s } // Represents the input of a CreateTable operation. type CreateTableInput struct { _ struct{} `type:"structure"` // An array of attributes that describe the key schema for the table and indexes. // // 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 - We recommend using PROVISIONED for predictable workloads. // PROVISIONED sets the billing mode to Provisioned Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual). // // * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable // workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand). BillingMode *string `type:"string" enum:"BillingMode"` // Indicates whether deletion protection is to be enabled (true) or disabled // (false) on the table. DeletionProtectionEnabled *bool `type:"boolean"` // One or more global secondary indexes (the maximum is 20) to be created on // the table. Each global secondary index in the array includes the following: // // * IndexName - The name of the global secondary index. Must be unique only // for this table. // // * KeySchema - Specifies the key schema for the global secondary index. // // * Projection - Specifies attributes that are copied (projected) from the // table into the index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. Each attribute // specification is composed of: ProjectionType - One of the following: KEYS_ONLY // - Only the index and primary keys are projected into the index. INCLUDE // - Only the specified table attributes are projected into the index. The // list of projected attributes is in NonKeyAttributes. ALL - All of the // table attributes are projected into the index. NonKeyAttributes - A list // of one or more non-key attribute names that are projected into the secondary // index. The total count of attributes provided in NonKeyAttributes, summed // across all of the secondary indexes, must not exceed 100. If you project // the same attribute into two different indexes, this counts as two distinct // attributes when determining the total. // // * ProvisionedThroughput - The provisioned throughput settings for the // global secondary index, consisting of read and write capacity units. GlobalSecondaryIndexes []*GlobalSecondaryIndex `type:"list"` // Specifies the attributes that make up the primary key for a table or an index. // The attributes in KeySchema must also be defined in the AttributeDefinitions // array. For more information, see Data Model (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html) // in the Amazon DynamoDB Developer Guide. // // Each KeySchemaElement in the array is composed of: // // * AttributeName - The name of this key attribute. // // * KeyType - The role that the key attribute will assume: HASH - partition // key RANGE - sort key // // The partition key of an item is also known as its hash attribute. The term // "hash attribute" derives from the DynamoDB usage of an internal hash function // to evenly distribute data items across partitions, based on their partition // key values. // // The sort key of an item is also known as its range attribute. The term "range // attribute" derives from the way DynamoDB stores items with the same partition // key physically close together, in sorted order by the sort key value. // // For a simple primary key (partition key), you must provide exactly one element // with a KeyType of HASH. // // For a composite primary key (partition key and sort key), you must provide // exactly two elements, in this order: The first element must have a KeyType // of HASH, and the second element must have a KeyType of RANGE. // // For more information, see Working with Tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key) // in the Amazon DynamoDB Developer Guide. // // KeySchema is a required field KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` // One or more local secondary indexes (the maximum is 5) to be created on the // table. Each index is scoped to a given partition key value. There is a 10 // GB size limit per partition key value; otherwise, the size of a local secondary // index is unconstrained. // // Each local secondary index in the array includes the following: // // * IndexName - The name of the local secondary index. Must be unique only // for this table. // // * KeySchema - Specifies the key schema for the local secondary index. // The key schema must begin with the same partition key as the table. // // * Projection - Specifies attributes that are copied (projected) from the // table into the index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. Each attribute // specification is composed of: ProjectionType - One of the following: KEYS_ONLY // - Only the index and primary keys are projected into the index. INCLUDE // - Only the specified table attributes are projected into the index. The // list of projected attributes is in NonKeyAttributes. ALL - All of the // table attributes are projected into the index. NonKeyAttributes - A list // of one or more non-key attribute names that are projected into the secondary // index. The total count of attributes provided in NonKeyAttributes, summed // across all of the secondary indexes, must not exceed 100. If you project // the same attribute into two different indexes, this counts as two distinct // attributes when determining the total. LocalSecondaryIndexes []*LocalSecondaryIndex `type:"list"` // 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 Service, // Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. ProvisionedThroughput *ProvisionedThroughput `type:"structure"` // Represents the settings used to enable server-side encryption. SSESpecification *SSESpecification `type:"structure"` // The settings for DynamoDB Streams on the table. These settings consist of: // // * StreamEnabled - Indicates whether DynamoDB Streams is to be enabled // (true) or disabled (false). // // * StreamViewType - When an item in the table is modified, StreamViewType // determines what information is written to the table's stream. Valid values // for StreamViewType are: KEYS_ONLY - Only the key attributes of the modified // item are written to the stream. NEW_IMAGE - The entire item, as it appears // after it was modified, is written to the stream. OLD_IMAGE - The entire // item, as it appeared before it was modified, is written to the stream. // NEW_AND_OLD_IMAGES - Both the new and the old item images of the item // are written to the stream. StreamSpecification *StreamSpecification `type:"structure"` // The table class of the new table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS. TableClass *string `type:"string" enum:"TableClass"` // The name of the table to create. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` // A list of key-value pairs to label the table. For more information, see Tagging // for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html). Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateTableInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateTableInput"} if s.AttributeDefinitions == nil { invalidParams.Add(request.NewErrParamRequired("AttributeDefinitions")) } if s.KeySchema == nil { invalidParams.Add(request.NewErrParamRequired("KeySchema")) } if s.KeySchema != nil && len(s.KeySchema) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) } 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.AttributeDefinitions != nil { for i, v := range s.AttributeDefinitions { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeDefinitions", i), err.(request.ErrInvalidParams)) } } } if s.GlobalSecondaryIndexes != nil { for i, v := range s.GlobalSecondaryIndexes { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexes", i), err.(request.ErrInvalidParams)) } } } if s.KeySchema != nil { for i, v := range s.KeySchema { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) } } } if s.LocalSecondaryIndexes != nil { for i, v := range s.LocalSecondaryIndexes { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LocalSecondaryIndexes", i), err.(request.ErrInvalidParams)) } } } if s.ProvisionedThroughput != nil { if err := s.ProvisionedThroughput.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) } } if s.StreamSpecification != nil { if err := s.StreamSpecification.Validate(); err != nil { invalidParams.AddNested("StreamSpecification", 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 } // SetAttributeDefinitions sets the AttributeDefinitions field's value. func (s *CreateTableInput) SetAttributeDefinitions(v []*AttributeDefinition) *CreateTableInput { s.AttributeDefinitions = v return s } // SetBillingMode sets the BillingMode field's value. func (s *CreateTableInput) SetBillingMode(v string) *CreateTableInput { s.BillingMode = &v return s } // SetDeletionProtectionEnabled sets the DeletionProtectionEnabled field's value. func (s *CreateTableInput) SetDeletionProtectionEnabled(v bool) *CreateTableInput { s.DeletionProtectionEnabled = &v return s } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *CreateTableInput) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndex) *CreateTableInput { s.GlobalSecondaryIndexes = v return s } // SetKeySchema sets the KeySchema field's value. func (s *CreateTableInput) SetKeySchema(v []*KeySchemaElement) *CreateTableInput { s.KeySchema = v return s } // SetLocalSecondaryIndexes sets the LocalSecondaryIndexes field's value. func (s *CreateTableInput) SetLocalSecondaryIndexes(v []*LocalSecondaryIndex) *CreateTableInput { s.LocalSecondaryIndexes = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *CreateTableInput) SetProvisionedThroughput(v *ProvisionedThroughput) *CreateTableInput { s.ProvisionedThroughput = v return s } // SetSSESpecification sets the SSESpecification field's value. func (s *CreateTableInput) SetSSESpecification(v *SSESpecification) *CreateTableInput { s.SSESpecification = v return s } // SetStreamSpecification sets the StreamSpecification field's value. func (s *CreateTableInput) SetStreamSpecification(v *StreamSpecification) *CreateTableInput { s.StreamSpecification = v return s } // SetTableClass sets the TableClass field's value. func (s *CreateTableInput) SetTableClass(v string) *CreateTableInput { s.TableClass = &v return s } // SetTableName sets the TableName field's value. func (s *CreateTableInput) SetTableName(v string) *CreateTableInput { s.TableName = &v return s } // SetTags sets the Tags field's value. func (s *CreateTableInput) SetTags(v []*Tag) *CreateTableInput { s.Tags = v return s } // Represents the output of a CreateTable operation. type CreateTableOutput struct { _ struct{} `type:"structure"` // Represents the properties of the table. TableDescription *TableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTableOutput) GoString() string { return s.String() } // SetTableDescription sets the TableDescription field's value. func (s *CreateTableOutput) SetTableDescription(v *TableDescription) *CreateTableOutput { s.TableDescription = v return s } // Processing options for the CSV file being imported. type CsvOptions struct { _ struct{} `type:"structure"` // The delimiter used for separating items in the CSV file being imported. Delimiter *string `min:"1" type:"string"` // List of the headers used to specify a common header for all source CSV files // being imported. If this field is specified then the first line of each CSV // file is treated as data instead of the header. If this field is not specified // the the first line of each CSV file is treated as the header. HeaderList []*string `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CsvOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CsvOptions) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CsvOptions) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CsvOptions"} if s.Delimiter != nil && len(*s.Delimiter) < 1 { invalidParams.Add(request.NewErrParamMinLen("Delimiter", 1)) } if s.HeaderList != nil && len(s.HeaderList) < 1 { invalidParams.Add(request.NewErrParamMinLen("HeaderList", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDelimiter sets the Delimiter field's value. func (s *CsvOptions) SetDelimiter(v string) *CsvOptions { s.Delimiter = &v return s } // SetHeaderList sets the HeaderList field's value. func (s *CsvOptions) SetHeaderList(v []*string) *CsvOptions { s.HeaderList = v 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Delete) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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"` // The ARN associated with the backup. // // BackupArn is a required field BackupArn *string `min:"37" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteBackupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteBackupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteBackupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"} if s.BackupArn == nil { invalidParams.Add(request.NewErrParamRequired("BackupArn")) } if s.BackupArn != nil && len(*s.BackupArn) < 37 { invalidParams.Add(request.NewErrParamMinLen("BackupArn", 37)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBackupArn sets the BackupArn field's value. func (s *DeleteBackupInput) SetBackupArn(v string) *DeleteBackupInput { s.BackupArn = &v return s } type DeleteBackupOutput struct { _ struct{} `type:"structure"` // Contains the description of the backup created for the table. BackupDescription *BackupDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteBackupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteBackupOutput) GoString() string { return s.String() } // SetBackupDescription sets the BackupDescription field's value. func (s *DeleteBackupOutput) SetBackupDescription(v *BackupDescription) *DeleteBackupOutput { s.BackupDescription = v return s } // Represents a global secondary index to be deleted from an existing table. type DeleteGlobalSecondaryIndexAction struct { _ struct{} `type:"structure"` // The name of the global secondary index to be deleted. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteGlobalSecondaryIndexAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteGlobalSecondaryIndexAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteGlobalSecondaryIndexAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteGlobalSecondaryIndexAction"} if s.IndexName == nil { invalidParams.Add(request.NewErrParamRequired("IndexName")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *DeleteGlobalSecondaryIndexAction) SetIndexName(v string) *DeleteGlobalSecondaryIndexAction { s.IndexName = &v return s } // Represents the input of a DeleteItem operation. type DeleteItemInput struct { _ struct{} `type:"structure"` // A condition that must be satisfied in order for a conditional DeleteItem // to succeed. // // An expression can contain any of the following: // // * Functions: attribute_exists | attribute_not_exists | attribute_type // | contains | begins_with | size These function names are case-sensitive. // // * Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN // // * Logical operators: AND | OR | NOT // // For more information about condition expressions, see Condition Expressions // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html) // in the Amazon DynamoDB Developer Guide. ConditionExpression *string `type:"string"` // This is a legacy parameter. Use ConditionExpression instead. For more information, // see ConditionalOperator (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html) // in the Amazon DynamoDB Developer Guide. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"` // This is a legacy parameter. Use ConditionExpression instead. For more information, // see Expected (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html) // in the Amazon DynamoDB Developer Guide. Expected map[string]*ExpectedAttributeValue `type:"map"` // One or more substitution tokens for attribute names in an expression. The // following are some use cases for using ExpressionAttributeNames: // // * To access an attribute whose name conflicts with a DynamoDB reserved // word. // // * To create a placeholder for repeating occurrences of an attribute name // in an expression. // // * To prevent special characters in an attribute name from being misinterpreted // in an expression. // // Use the # character in an expression to dereference an attribute name. For // example, consider the following attribute name: // // * Percentile // // The name of this attribute conflicts with a reserved word, so it cannot be // used directly in an expression. (For the complete list of reserved words, // see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide). To work around this, you could specify // the following for ExpressionAttributeNames: // // * {"#P":"Percentile"} // // You could then use this substitution in an expression, as in this example: // // * #P = :val // // Tokens that begin with the : character are expression attribute values, which // are placeholders for the actual value at runtime. // // For more information on expression attribute names, see Specifying Item Attributes // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeNames map[string]*string `type:"map"` // One or more values that can be substituted in an expression. // // Use the : (colon) character in an expression to dereference an attribute // value. For example, suppose that you wanted to check whether the value of // the ProductStatus attribute was one of the following: // // Available | Backordered | Discontinued // // You would first need to specify ExpressionAttributeValues as follows: // // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} // } // // You could then use these values in an expression, such as this: // // ProductStatus IN (:avail, :back, :disc) // // For more information on expression attribute values, see Condition Expressions // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeValues map[string]*AttributeValue `type:"map"` // A map of attribute names to AttributeValue objects, representing the primary // key of the item to delete. // // For the primary key, you must provide all of the key attributes. For example, // with a simple primary key, you only need to provide a value for the partition // key. For a composite primary key, you must provide values for both the partition // key and the sort key. // // Key is a required field Key map[string]*AttributeValue `type:"map" required:"true"` // Determines the level of detail about either provisioned or on-demand 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 are returned in the response. If set to NONE // (the default), no statistics are returned. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared // before they were deleted. For DeleteItem, the valid values are: // // * NONE - If ReturnValues is not specified, or if its value is NONE, then // nothing is returned. (This setting is the default for ReturnValues.) // // * ALL_OLD - The content of the old item is returned. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. // // The ReturnValues parameter is used by several DynamoDB operations; however, // DeleteItem does not recognize any values other than NONE or ALL_OLD. ReturnValues *string `type:"string" enum:"ReturnValue"` // An optional parameter that returns the item attributes for a DeleteItem operation // that failed a condition check. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` // The name of the table from which to delete the item. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteItemInput"} 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 *DeleteItemInput) SetConditionExpression(v string) *DeleteItemInput { s.ConditionExpression = &v return s } // SetConditionalOperator sets the ConditionalOperator field's value. func (s *DeleteItemInput) SetConditionalOperator(v string) *DeleteItemInput { s.ConditionalOperator = &v return s } // SetExpected sets the Expected field's value. func (s *DeleteItemInput) SetExpected(v map[string]*ExpectedAttributeValue) *DeleteItemInput { s.Expected = v return s } // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. func (s *DeleteItemInput) SetExpressionAttributeNames(v map[string]*string) *DeleteItemInput { s.ExpressionAttributeNames = v return s } // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. func (s *DeleteItemInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *DeleteItemInput { s.ExpressionAttributeValues = v return s } // SetKey sets the Key field's value. func (s *DeleteItemInput) SetKey(v map[string]*AttributeValue) *DeleteItemInput { s.Key = v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *DeleteItemInput) SetReturnConsumedCapacity(v string) *DeleteItemInput { s.ReturnConsumedCapacity = &v return s } // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value. func (s *DeleteItemInput) SetReturnItemCollectionMetrics(v string) *DeleteItemInput { s.ReturnItemCollectionMetrics = &v return s } // SetReturnValues sets the ReturnValues field's value. func (s *DeleteItemInput) SetReturnValues(v string) *DeleteItemInput { s.ReturnValues = &v return s } // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. func (s *DeleteItemInput) SetReturnValuesOnConditionCheckFailure(v string) *DeleteItemInput { s.ReturnValuesOnConditionCheckFailure = &v return s } // SetTableName sets the TableName field's value. func (s *DeleteItemInput) SetTableName(v string) *DeleteItemInput { s.TableName = &v return s } // Represents the output of a DeleteItem operation. type DeleteItemOutput struct { _ struct{} `type:"structure"` // A map of attribute names to AttributeValue objects, representing the item // as it appeared before the DeleteItem operation. This map appears in the response // only if ReturnValues was specified as ALL_OLD in the request. Attributes map[string]*AttributeValue `type:"map"` // The capacity units consumed by the DeleteItem 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 if the ReturnConsumedCapacity parameter was specified. For // more information, see Provisioned Throughput (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html) // in the Amazon DynamoDB Developer Guide. ConsumedCapacity *ConsumedCapacity `type:"structure"` // Information about item collections, if any, that were affected by the DeleteItem // operation. ItemCollectionMetrics is only returned if the ReturnItemCollectionMetrics // parameter was specified. If the table does not have any local secondary indexes, // this information is not returned in the response. // // Each ItemCollectionMetrics element consists of: // // * ItemCollectionKey - The partition key value of the item collection. // This is the same as the partition key value of the item itself. // // * SizeEstimateRangeGB - An estimate of item collection size, in gigabytes. // This value is a two-element array containing a lower bound and an upper // bound for the estimate. The estimate includes the size of all the items // in the table, plus the size of all attributes projected into all of the // local secondary indexes on that table. Use this estimate to measure whether // a local secondary index is approaching its size limit. The estimate is // subject to change over time; therefore, do not rely on the precision or // accuracy of the estimate. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteItemOutput) GoString() string { return s.String() } // SetAttributes sets the Attributes field's value. func (s *DeleteItemOutput) SetAttributes(v map[string]*AttributeValue) *DeleteItemOutput { s.Attributes = v return s } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *DeleteItemOutput) SetConsumedCapacity(v *ConsumedCapacity) *DeleteItemOutput { s.ConsumedCapacity = v return s } // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value. func (s *DeleteItemOutput) SetItemCollectionMetrics(v *ItemCollectionMetrics) *DeleteItemOutput { s.ItemCollectionMetrics = v return s } // Represents a replica to be removed. type DeleteReplicaAction struct { _ struct{} `type:"structure"` // The Region of the replica to be removed. // // RegionName is a required field RegionName *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteReplicaAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteReplicaAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteReplicaAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteReplicaAction"} if s.RegionName == nil { invalidParams.Add(request.NewErrParamRequired("RegionName")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRegionName sets the RegionName field's value. func (s *DeleteReplicaAction) SetRegionName(v string) *DeleteReplicaAction { s.RegionName = &v return s } // Represents a replica to be deleted. type DeleteReplicationGroupMemberAction struct { _ struct{} `type:"structure"` // The Region where the replica exists. // // RegionName is a required field RegionName *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteReplicationGroupMemberAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteReplicationGroupMemberAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteReplicationGroupMemberAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationGroupMemberAction"} if s.RegionName == nil { invalidParams.Add(request.NewErrParamRequired("RegionName")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRegionName sets the RegionName field's value. func (s *DeleteReplicationGroupMemberAction) SetRegionName(v string) *DeleteReplicationGroupMemberAction { s.RegionName = &v return s } // Represents a request to perform a DeleteItem operation on an item. type DeleteRequest struct { _ struct{} `type:"structure"` // A map of attribute name to attribute values, representing the primary key // of the item to delete. All of the table's primary key attributes must be // specified, and their data types must match those of the table's key schema. // // Key is a required field Key map[string]*AttributeValue `type:"map" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteRequest) GoString() string { return s.String() } // SetKey sets the Key field's value. func (s *DeleteRequest) SetKey(v map[string]*AttributeValue) *DeleteRequest { s.Key = v return s } // Represents the input of a DeleteTable operation. type DeleteTableInput struct { _ struct{} `type:"structure"` // The name of the table to delete. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteTableInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteTableInput"} 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 } // SetTableName sets the TableName field's value. func (s *DeleteTableInput) SetTableName(v string) *DeleteTableInput { s.TableName = &v return s } // Represents the output of a DeleteTable operation. type DeleteTableOutput struct { _ struct{} `type:"structure"` // Represents the properties of a table. TableDescription *TableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteTableOutput) GoString() string { return s.String() } // SetTableDescription sets the TableDescription field's value. func (s *DeleteTableOutput) SetTableDescription(v *TableDescription) *DeleteTableOutput { s.TableDescription = v return s } type DescribeBackupInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) associated with the backup. // // BackupArn is a required field BackupArn *string `min:"37" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeBackupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeBackupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeBackupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeBackupInput"} if s.BackupArn == nil { invalidParams.Add(request.NewErrParamRequired("BackupArn")) } if s.BackupArn != nil && len(*s.BackupArn) < 37 { invalidParams.Add(request.NewErrParamMinLen("BackupArn", 37)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBackupArn sets the BackupArn field's value. func (s *DescribeBackupInput) SetBackupArn(v string) *DescribeBackupInput { s.BackupArn = &v return s } type DescribeBackupOutput struct { _ struct{} `type:"structure"` // Contains the description of the backup created for the table. BackupDescription *BackupDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeBackupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeBackupOutput) GoString() string { return s.String() } // SetBackupDescription sets the BackupDescription field's value. func (s *DescribeBackupOutput) SetBackupDescription(v *BackupDescription) *DescribeBackupOutput { s.BackupDescription = v return s } type DescribeContinuousBackupsInput struct { _ struct{} `type:"structure"` // Name of the table for which the customer wants to check the continuous backups // and point in time recovery settings. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeContinuousBackupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeContinuousBackupsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeContinuousBackupsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeContinuousBackupsInput"} 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 } // SetTableName sets the TableName field's value. func (s *DescribeContinuousBackupsInput) SetTableName(v string) *DescribeContinuousBackupsInput { s.TableName = &v return s } type DescribeContinuousBackupsOutput struct { _ struct{} `type:"structure"` // Represents the continuous backups and point in time recovery settings on // the table. ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeContinuousBackupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeContinuousBackupsOutput) GoString() string { return s.String() } // SetContinuousBackupsDescription sets the ContinuousBackupsDescription field's value. func (s *DescribeContinuousBackupsOutput) SetContinuousBackupsDescription(v *ContinuousBackupsDescription) *DescribeContinuousBackupsOutput { s.ContinuousBackupsDescription = v return s } type DescribeContributorInsightsInput struct { _ struct{} `type:"structure"` // The name of the global secondary index to describe, if applicable. IndexName *string `min:"3" type:"string"` // The name of the table to describe. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeContributorInsightsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeContributorInsightsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeContributorInsightsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeContributorInsightsInput"} if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } 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 } // SetIndexName sets the IndexName field's value. func (s *DescribeContributorInsightsInput) SetIndexName(v string) *DescribeContributorInsightsInput { s.IndexName = &v return s } // SetTableName sets the TableName field's value. func (s *DescribeContributorInsightsInput) SetTableName(v string) *DescribeContributorInsightsInput { s.TableName = &v return s } type DescribeContributorInsightsOutput struct { _ struct{} `type:"structure"` // List of names of the associated contributor insights rules. ContributorInsightsRuleList []*string `type:"list"` // Current status of contributor insights. ContributorInsightsStatus *string `type:"string" enum:"ContributorInsightsStatus"` // Returns information about the last failure that was encountered. // // The most common exceptions for a FAILED status are: // // * LimitExceededException - Per-account Amazon CloudWatch Contributor Insights // rule limit reached. Please disable Contributor Insights for other tables/indexes // OR disable Contributor Insights rules before retrying. // // * AccessDeniedException - Amazon CloudWatch Contributor Insights rules // cannot be modified due to insufficient permissions. // // * AccessDeniedException - Failed to create service-linked role for Contributor // Insights due to insufficient permissions. // // * InternalServerError - Failed to create Amazon CloudWatch Contributor // Insights rules. Please retry request. FailureException *FailureException `type:"structure"` // The name of the global secondary index being described. IndexName *string `min:"3" type:"string"` // Timestamp of the last time the status was changed. LastUpdateDateTime *time.Time `type:"timestamp"` // The name of the table being described. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeContributorInsightsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeContributorInsightsOutput) GoString() string { return s.String() } // SetContributorInsightsRuleList sets the ContributorInsightsRuleList field's value. func (s *DescribeContributorInsightsOutput) SetContributorInsightsRuleList(v []*string) *DescribeContributorInsightsOutput { s.ContributorInsightsRuleList = v return s } // SetContributorInsightsStatus sets the ContributorInsightsStatus field's value. func (s *DescribeContributorInsightsOutput) SetContributorInsightsStatus(v string) *DescribeContributorInsightsOutput { s.ContributorInsightsStatus = &v return s } // SetFailureException sets the FailureException field's value. func (s *DescribeContributorInsightsOutput) SetFailureException(v *FailureException) *DescribeContributorInsightsOutput { s.FailureException = v return s } // SetIndexName sets the IndexName field's value. func (s *DescribeContributorInsightsOutput) SetIndexName(v string) *DescribeContributorInsightsOutput { s.IndexName = &v return s } // SetLastUpdateDateTime sets the LastUpdateDateTime field's value. func (s *DescribeContributorInsightsOutput) SetLastUpdateDateTime(v time.Time) *DescribeContributorInsightsOutput { s.LastUpdateDateTime = &v return s } // SetTableName sets the TableName field's value. func (s *DescribeContributorInsightsOutput) SetTableName(v string) *DescribeContributorInsightsOutput { s.TableName = &v return s } type DescribeEndpointsInput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEndpointsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEndpointsInput) GoString() string { return s.String() } type DescribeEndpointsOutput struct { _ struct{} `type:"structure"` // List of endpoints. // // Endpoints is a required field Endpoints []*Endpoint `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEndpointsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEndpointsOutput) GoString() string { return s.String() } // SetEndpoints sets the Endpoints field's value. func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput { s.Endpoints = v return s } type DescribeExportInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) associated with the export. // // ExportArn is a required field ExportArn *string `min:"37" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeExportInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeExportInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeExportInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeExportInput"} if s.ExportArn == nil { invalidParams.Add(request.NewErrParamRequired("ExportArn")) } if s.ExportArn != nil && len(*s.ExportArn) < 37 { invalidParams.Add(request.NewErrParamMinLen("ExportArn", 37)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetExportArn sets the ExportArn field's value. func (s *DescribeExportInput) SetExportArn(v string) *DescribeExportInput { s.ExportArn = &v return s } type DescribeExportOutput struct { _ struct{} `type:"structure"` // Represents the properties of the export. ExportDescription *ExportDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeExportOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeExportOutput) GoString() string { return s.String() } // SetExportDescription sets the ExportDescription field's value. func (s *DescribeExportOutput) SetExportDescription(v *ExportDescription) *DescribeExportOutput { s.ExportDescription = v return s } type DescribeGlobalTableInput struct { _ struct{} `type:"structure"` // The name of the global table. // // GlobalTableName is a required field GlobalTableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeGlobalTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeGlobalTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeGlobalTableInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalTableInput"} if s.GlobalTableName == nil { invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) } if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetGlobalTableName sets the GlobalTableName field's value. func (s *DescribeGlobalTableInput) SetGlobalTableName(v string) *DescribeGlobalTableInput { s.GlobalTableName = &v return s } type DescribeGlobalTableOutput struct { _ struct{} `type:"structure"` // Contains the details of the global table. GlobalTableDescription *GlobalTableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeGlobalTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeGlobalTableOutput) GoString() string { return s.String() } // SetGlobalTableDescription sets the GlobalTableDescription field's value. func (s *DescribeGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescription) *DescribeGlobalTableOutput { s.GlobalTableDescription = v return s } type DescribeGlobalTableSettingsInput struct { _ struct{} `type:"structure"` // The name of the global table to describe. // // GlobalTableName is a required field GlobalTableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeGlobalTableSettingsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeGlobalTableSettingsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeGlobalTableSettingsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalTableSettingsInput"} if s.GlobalTableName == nil { invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) } if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetGlobalTableName sets the GlobalTableName field's value. func (s *DescribeGlobalTableSettingsInput) SetGlobalTableName(v string) *DescribeGlobalTableSettingsInput { s.GlobalTableName = &v return s } type DescribeGlobalTableSettingsOutput struct { _ struct{} `type:"structure"` // The name of the global table. GlobalTableName *string `min:"3" type:"string"` // The Region-specific settings for the global table. ReplicaSettings []*ReplicaSettingsDescription `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeGlobalTableSettingsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeGlobalTableSettingsOutput) GoString() string { return s.String() } // SetGlobalTableName sets the GlobalTableName field's value. func (s *DescribeGlobalTableSettingsOutput) SetGlobalTableName(v string) *DescribeGlobalTableSettingsOutput { s.GlobalTableName = &v return s } // SetReplicaSettings sets the ReplicaSettings field's value. func (s *DescribeGlobalTableSettingsOutput) SetReplicaSettings(v []*ReplicaSettingsDescription) *DescribeGlobalTableSettingsOutput { s.ReplicaSettings = v return s } type DescribeImportInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) associated with the table you're importing // to. // // ImportArn is a required field ImportArn *string `min:"37" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeImportInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeImportInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeImportInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeImportInput"} if s.ImportArn == nil { invalidParams.Add(request.NewErrParamRequired("ImportArn")) } if s.ImportArn != nil && len(*s.ImportArn) < 37 { invalidParams.Add(request.NewErrParamMinLen("ImportArn", 37)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetImportArn sets the ImportArn field's value. func (s *DescribeImportInput) SetImportArn(v string) *DescribeImportInput { s.ImportArn = &v return s } type DescribeImportOutput struct { _ struct{} `type:"structure"` // Represents the properties of the table created for the import, and parameters // of the import. The import parameters include import status, how many items // were processed, and how many errors were encountered. // // ImportTableDescription is a required field ImportTableDescription *ImportTableDescription `type:"structure" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeImportOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeImportOutput) GoString() string { return s.String() } // SetImportTableDescription sets the ImportTableDescription field's value. func (s *DescribeImportOutput) SetImportTableDescription(v *ImportTableDescription) *DescribeImportOutput { s.ImportTableDescription = v return s } type DescribeKinesisStreamingDestinationInput struct { _ struct{} `type:"structure"` // The name of the table being described. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeKinesisStreamingDestinationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeKinesisStreamingDestinationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeKinesisStreamingDestinationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeKinesisStreamingDestinationInput"} 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 } // SetTableName sets the TableName field's value. func (s *DescribeKinesisStreamingDestinationInput) SetTableName(v string) *DescribeKinesisStreamingDestinationInput { s.TableName = &v return s } type DescribeKinesisStreamingDestinationOutput struct { _ struct{} `type:"structure"` // The list of replica structures for the table being described. KinesisDataStreamDestinations []*KinesisDataStreamDestination `type:"list"` // The name of the table being described. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeKinesisStreamingDestinationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeKinesisStreamingDestinationOutput) GoString() string { return s.String() } // SetKinesisDataStreamDestinations sets the KinesisDataStreamDestinations field's value. func (s *DescribeKinesisStreamingDestinationOutput) SetKinesisDataStreamDestinations(v []*KinesisDataStreamDestination) *DescribeKinesisStreamingDestinationOutput { s.KinesisDataStreamDestinations = v return s } // SetTableName sets the TableName field's value. func (s *DescribeKinesisStreamingDestinationOutput) SetTableName(v string) *DescribeKinesisStreamingDestinationOutput { s.TableName = &v return s } // Represents the input of a DescribeLimits operation. Has no content. type DescribeLimitsInput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeLimitsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeLimitsInput) GoString() string { return s.String() } // Represents the output of a DescribeLimits operation. type DescribeLimitsOutput struct { _ struct{} `type:"structure"` // The maximum total read capacity units that your account allows you to provision // across all of your tables in this Region. AccountMaxReadCapacityUnits *int64 `min:"1" type:"long"` // The maximum total write capacity units that your account allows you to provision // across all of your tables in this Region. AccountMaxWriteCapacityUnits *int64 `min:"1" type:"long"` // The maximum read capacity units that your account allows you to provision // for a new table that you are creating in this Region, including the read // capacity units provisioned for its global secondary indexes (GSIs). TableMaxReadCapacityUnits *int64 `min:"1" type:"long"` // The maximum write capacity units that your account allows you to provision // for a new table that you are creating in this Region, including the write // capacity units provisioned for its global secondary indexes (GSIs). TableMaxWriteCapacityUnits *int64 `min:"1" type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeLimitsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeLimitsOutput) GoString() string { return s.String() } // SetAccountMaxReadCapacityUnits sets the AccountMaxReadCapacityUnits field's value. func (s *DescribeLimitsOutput) SetAccountMaxReadCapacityUnits(v int64) *DescribeLimitsOutput { s.AccountMaxReadCapacityUnits = &v return s } // SetAccountMaxWriteCapacityUnits sets the AccountMaxWriteCapacityUnits field's value. func (s *DescribeLimitsOutput) SetAccountMaxWriteCapacityUnits(v int64) *DescribeLimitsOutput { s.AccountMaxWriteCapacityUnits = &v return s } // SetTableMaxReadCapacityUnits sets the TableMaxReadCapacityUnits field's value. func (s *DescribeLimitsOutput) SetTableMaxReadCapacityUnits(v int64) *DescribeLimitsOutput { s.TableMaxReadCapacityUnits = &v return s } // SetTableMaxWriteCapacityUnits sets the TableMaxWriteCapacityUnits field's value. func (s *DescribeLimitsOutput) SetTableMaxWriteCapacityUnits(v int64) *DescribeLimitsOutput { s.TableMaxWriteCapacityUnits = &v return s } // Represents the input of a DescribeTable operation. type DescribeTableInput struct { _ struct{} `type:"structure"` // The name of the table to describe. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeTableInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeTableInput"} 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 } // SetTableName sets the TableName field's value. func (s *DescribeTableInput) SetTableName(v string) *DescribeTableInput { s.TableName = &v return s } // Represents the output of a DescribeTable operation. type DescribeTableOutput struct { _ struct{} `type:"structure"` // The properties of the table. Table *TableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTableOutput) GoString() string { return s.String() } // SetTable sets the Table field's value. func (s *DescribeTableOutput) SetTable(v *TableDescription) *DescribeTableOutput { s.Table = v return s } type DescribeTableReplicaAutoScalingInput struct { _ struct{} `type:"structure"` // The name of the table. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTableReplicaAutoScalingInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTableReplicaAutoScalingInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeTableReplicaAutoScalingInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeTableReplicaAutoScalingInput"} 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 } // SetTableName sets the TableName field's value. func (s *DescribeTableReplicaAutoScalingInput) SetTableName(v string) *DescribeTableReplicaAutoScalingInput { s.TableName = &v return s } type DescribeTableReplicaAutoScalingOutput struct { _ struct{} `type:"structure"` // Represents the auto scaling properties of the table. TableAutoScalingDescription *TableAutoScalingDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTableReplicaAutoScalingOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTableReplicaAutoScalingOutput) GoString() string { return s.String() } // SetTableAutoScalingDescription sets the TableAutoScalingDescription field's value. func (s *DescribeTableReplicaAutoScalingOutput) SetTableAutoScalingDescription(v *TableAutoScalingDescription) *DescribeTableReplicaAutoScalingOutput { s.TableAutoScalingDescription = v return s } type DescribeTimeToLiveInput struct { _ struct{} `type:"structure"` // The name of the table to be described. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTimeToLiveInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTimeToLiveInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeTimeToLiveInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeTimeToLiveInput"} 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 } // SetTableName sets the TableName field's value. func (s *DescribeTimeToLiveInput) SetTableName(v string) *DescribeTimeToLiveInput { s.TableName = &v return s } type DescribeTimeToLiveOutput struct { _ struct{} `type:"structure"` // The description of the Time to Live (TTL) status on the specified table. TimeToLiveDescription *TimeToLiveDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTimeToLiveOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeTimeToLiveOutput) GoString() string { return s.String() } // SetTimeToLiveDescription sets the TimeToLiveDescription field's value. func (s *DescribeTimeToLiveOutput) SetTimeToLiveDescription(v *TimeToLiveDescription) *DescribeTimeToLiveOutput { s.TimeToLiveDescription = v return s } type DisableKinesisStreamingDestinationInput struct { _ struct{} `type:"structure"` // The ARN for a Kinesis data stream. // // StreamArn is a required field StreamArn *string `min:"37" type:"string" required:"true"` // The name of the DynamoDB table. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DisableKinesisStreamingDestinationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DisableKinesisStreamingDestinationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DisableKinesisStreamingDestinationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DisableKinesisStreamingDestinationInput"} if s.StreamArn == nil { invalidParams.Add(request.NewErrParamRequired("StreamArn")) } if s.StreamArn != nil && len(*s.StreamArn) < 37 { invalidParams.Add(request.NewErrParamMinLen("StreamArn", 37)) } 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 } // SetStreamArn sets the StreamArn field's value. func (s *DisableKinesisStreamingDestinationInput) SetStreamArn(v string) *DisableKinesisStreamingDestinationInput { s.StreamArn = &v return s } // SetTableName sets the TableName field's value. func (s *DisableKinesisStreamingDestinationInput) SetTableName(v string) *DisableKinesisStreamingDestinationInput { s.TableName = &v return s } type DisableKinesisStreamingDestinationOutput struct { _ struct{} `type:"structure"` // The current status of the replication. DestinationStatus *string `type:"string" enum:"DestinationStatus"` // The ARN for the specific Kinesis data stream. StreamArn *string `min:"37" type:"string"` // The name of the table being modified. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DisableKinesisStreamingDestinationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DisableKinesisStreamingDestinationOutput) GoString() string { return s.String() } // SetDestinationStatus sets the DestinationStatus field's value. func (s *DisableKinesisStreamingDestinationOutput) SetDestinationStatus(v string) *DisableKinesisStreamingDestinationOutput { s.DestinationStatus = &v return s } // SetStreamArn sets the StreamArn field's value. func (s *DisableKinesisStreamingDestinationOutput) SetStreamArn(v string) *DisableKinesisStreamingDestinationOutput { s.StreamArn = &v return s } // SetTableName sets the TableName field's value. func (s *DisableKinesisStreamingDestinationOutput) SetTableName(v string) *DisableKinesisStreamingDestinationOutput { s.TableName = &v return s } // There was an attempt to insert an item with the same primary key as an item // that already exists in the DynamoDB table. type DuplicateItemException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DuplicateItemException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DuplicateItemException) GoString() string { return s.String() } func newErrorDuplicateItemException(v protocol.ResponseMetadata) error { return &DuplicateItemException{ RespMetadata: v, } } // Code returns the exception type name. func (s *DuplicateItemException) Code() string { return "DuplicateItemException" } // Message returns the exception's message. func (s *DuplicateItemException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DuplicateItemException) OrigErr() error { return nil } func (s *DuplicateItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DuplicateItemException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DuplicateItemException) RequestID() string { return s.RespMetadata.RequestID } type EnableKinesisStreamingDestinationInput struct { _ struct{} `type:"structure"` // The ARN for a Kinesis data stream. // // StreamArn is a required field StreamArn *string `min:"37" type:"string" required:"true"` // The name of the DynamoDB table. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s EnableKinesisStreamingDestinationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s EnableKinesisStreamingDestinationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *EnableKinesisStreamingDestinationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "EnableKinesisStreamingDestinationInput"} if s.StreamArn == nil { invalidParams.Add(request.NewErrParamRequired("StreamArn")) } if s.StreamArn != nil && len(*s.StreamArn) < 37 { invalidParams.Add(request.NewErrParamMinLen("StreamArn", 37)) } 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 } // SetStreamArn sets the StreamArn field's value. func (s *EnableKinesisStreamingDestinationInput) SetStreamArn(v string) *EnableKinesisStreamingDestinationInput { s.StreamArn = &v return s } // SetTableName sets the TableName field's value. func (s *EnableKinesisStreamingDestinationInput) SetTableName(v string) *EnableKinesisStreamingDestinationInput { s.TableName = &v return s } type EnableKinesisStreamingDestinationOutput struct { _ struct{} `type:"structure"` // The current status of the replication. DestinationStatus *string `type:"string" enum:"DestinationStatus"` // The ARN for the specific Kinesis data stream. StreamArn *string `min:"37" type:"string"` // The name of the table being modified. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s EnableKinesisStreamingDestinationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s EnableKinesisStreamingDestinationOutput) GoString() string { return s.String() } // SetDestinationStatus sets the DestinationStatus field's value. func (s *EnableKinesisStreamingDestinationOutput) SetDestinationStatus(v string) *EnableKinesisStreamingDestinationOutput { s.DestinationStatus = &v return s } // SetStreamArn sets the StreamArn field's value. func (s *EnableKinesisStreamingDestinationOutput) SetStreamArn(v string) *EnableKinesisStreamingDestinationOutput { s.StreamArn = &v return s } // SetTableName sets the TableName field's value. func (s *EnableKinesisStreamingDestinationOutput) SetTableName(v string) *EnableKinesisStreamingDestinationOutput { s.TableName = &v return s } // An endpoint information details. type Endpoint struct { _ struct{} `type:"structure"` // IP address of the endpoint. // // Address is a required field Address *string `type:"string" required:"true"` // Endpoint cache time to live (TTL) value. // // CachePeriodInMinutes is a required field CachePeriodInMinutes *int64 `type:"long" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Endpoint) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Endpoint) GoString() string { return s.String() } // SetAddress sets the Address field's value. func (s *Endpoint) SetAddress(v string) *Endpoint { s.Address = &v return s } // SetCachePeriodInMinutes sets the CachePeriodInMinutes field's value. func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint { s.CachePeriodInMinutes = &v return s } type ExecuteStatementInput struct { _ struct{} `type:"structure"` // The consistency of a read operation. If set to true, then a strongly consistent // read is used; otherwise, an eventually consistent read is used. ConsistentRead *bool `type:"boolean"` // The maximum number of items to evaluate (not necessarily the number of matching // items). If DynamoDB processes the number of items up to the limit while processing // the results, it stops the operation and returns the matching values up to // that point, along with a key in LastEvaluatedKey to apply in a subsequent // operation so you can pick up where you left off. Also, if the processed dataset // size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation // and returns the matching values up to the limit, and a key in LastEvaluatedKey // to apply in a subsequent operation to continue the operation. Limit *int64 `min:"1" type:"integer"` // Set this value to get remaining results, if NextToken was returned in the // statement response. NextToken *string `min:"1" type:"string"` // The parameters for the PartiQL statement, if any. Parameters []*AttributeValue `min:"1" type:"list"` // Determines the level of detail about either provisioned or on-demand 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"` // An optional parameter that returns the item attributes for an ExecuteStatement // operation that failed a condition check. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` // The PartiQL statement representing the operation to run. // // Statement is a required field Statement *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExecuteStatementInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExecuteStatementInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ExecuteStatementInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ExecuteStatementInput"} if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if s.Parameters != nil && len(s.Parameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) } if s.Statement == nil { invalidParams.Add(request.NewErrParamRequired("Statement")) } if s.Statement != nil && len(*s.Statement) < 1 { invalidParams.Add(request.NewErrParamMinLen("Statement", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConsistentRead sets the ConsistentRead field's value. func (s *ExecuteStatementInput) SetConsistentRead(v bool) *ExecuteStatementInput { s.ConsistentRead = &v return s } // SetLimit sets the Limit field's value. func (s *ExecuteStatementInput) SetLimit(v int64) *ExecuteStatementInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. func (s *ExecuteStatementInput) SetNextToken(v string) *ExecuteStatementInput { s.NextToken = &v return s } // SetParameters sets the Parameters field's value. func (s *ExecuteStatementInput) SetParameters(v []*AttributeValue) *ExecuteStatementInput { s.Parameters = v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *ExecuteStatementInput) SetReturnConsumedCapacity(v string) *ExecuteStatementInput { s.ReturnConsumedCapacity = &v return s } // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. func (s *ExecuteStatementInput) SetReturnValuesOnConditionCheckFailure(v string) *ExecuteStatementInput { s.ReturnValuesOnConditionCheckFailure = &v return s } // SetStatement sets the Statement field's value. func (s *ExecuteStatementInput) SetStatement(v string) *ExecuteStatementInput { s.Statement = &v return s } type ExecuteStatementOutput struct { _ struct{} `type:"structure"` // 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 // if the request asked for it. For more information, see Provisioned Throughput // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html) // in the Amazon DynamoDB Developer Guide. ConsumedCapacity *ConsumedCapacity `type:"structure"` // If a read operation was used, this property will contain the result of the // read operation; a map of attribute names and their values. For the write // operations this value will be empty. Items []map[string]*AttributeValue `type:"list"` // The primary key of the item where the operation stopped, inclusive of the // previous result set. Use this value to start a new operation, excluding this // value in the new request. If LastEvaluatedKey is empty, then the "last page" // of results has been processed and there is no more data to be retrieved. // If LastEvaluatedKey is not empty, it does not necessarily mean that there // is more data in the result set. The only way to know when you have reached // the end of the result set is when LastEvaluatedKey is empty. LastEvaluatedKey map[string]*AttributeValue `type:"map"` // If the response of a read request exceeds the response payload limit DynamoDB // will set this value in the response. If set, you can use that this value // in the subsequent request to get the remaining results. NextToken *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExecuteStatementOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExecuteStatementOutput) GoString() string { return s.String() } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *ExecuteStatementOutput) SetConsumedCapacity(v *ConsumedCapacity) *ExecuteStatementOutput { s.ConsumedCapacity = v return s } // SetItems sets the Items field's value. func (s *ExecuteStatementOutput) SetItems(v []map[string]*AttributeValue) *ExecuteStatementOutput { s.Items = v return s } // SetLastEvaluatedKey sets the LastEvaluatedKey field's value. func (s *ExecuteStatementOutput) SetLastEvaluatedKey(v map[string]*AttributeValue) *ExecuteStatementOutput { s.LastEvaluatedKey = v return s } // SetNextToken sets the NextToken field's value. func (s *ExecuteStatementOutput) SetNextToken(v string) *ExecuteStatementOutput { s.NextToken = &v return s } type ExecuteTransactionInput struct { _ struct{} `type:"structure"` // Set this value to get remaining results, if NextToken was returned in the // statement response. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` // Determines the level of detail about either provisioned or on-demand throughput // consumption that is returned in the response. For more information, see TransactGetItems // (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html) // and TransactWriteItems (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html). ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"` // The list of PartiQL statements representing the transaction to run. // // TransactStatements is a required field TransactStatements []*ParameterizedStatement `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExecuteTransactionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExecuteTransactionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ExecuteTransactionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ExecuteTransactionInput"} if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) } if s.TransactStatements == nil { invalidParams.Add(request.NewErrParamRequired("TransactStatements")) } if s.TransactStatements != nil && len(s.TransactStatements) < 1 { invalidParams.Add(request.NewErrParamMinLen("TransactStatements", 1)) } if s.TransactStatements != nil { for i, v := range s.TransactStatements { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TransactStatements", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetClientRequestToken sets the ClientRequestToken field's value. func (s *ExecuteTransactionInput) SetClientRequestToken(v string) *ExecuteTransactionInput { s.ClientRequestToken = &v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *ExecuteTransactionInput) SetReturnConsumedCapacity(v string) *ExecuteTransactionInput { s.ReturnConsumedCapacity = &v return s } // SetTransactStatements sets the TransactStatements field's value. func (s *ExecuteTransactionInput) SetTransactStatements(v []*ParameterizedStatement) *ExecuteTransactionInput { s.TransactStatements = v return s } type ExecuteTransactionOutput struct { _ struct{} `type:"structure"` // The capacity units consumed by the entire operation. The values of the list // are ordered according to the ordering of the statements. ConsumedCapacity []*ConsumedCapacity `type:"list"` // The response to a PartiQL transaction. Responses []*ItemResponse `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExecuteTransactionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExecuteTransactionOutput) GoString() string { return s.String() } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *ExecuteTransactionOutput) SetConsumedCapacity(v []*ConsumedCapacity) *ExecuteTransactionOutput { s.ConsumedCapacity = v return s } // SetResponses sets the Responses field's value. func (s *ExecuteTransactionOutput) SetResponses(v []*ItemResponse) *ExecuteTransactionOutput { s.Responses = v return s } // Represents a condition to be compared with an attribute value. This condition // can be used with DeleteItem, PutItem, or UpdateItem operations; if the comparison // evaluates to true, the operation succeeds; if not, the operation fails. You // can use ExpectedAttributeValue in one of two different ways: // // - Use AttributeValueList to specify one or more values to compare against // an attribute. Use ComparisonOperator to specify how you want to perform // the comparison. If the comparison evaluates to true, then the conditional // operation succeeds. // // - Use Value to specify a value that DynamoDB will compare against an attribute. // If the values match, then ExpectedAttributeValue evaluates to true and // the conditional operation succeeds. Optionally, you can also set Exists // to false, indicating that you do not expect to find the attribute value // in the table. In this case, the conditional operation succeeds only if // the comparison evaluates to false. // // Value and Exists are incompatible with AttributeValueList and ComparisonOperator. // Note that if you use both sets of parameters at once, DynamoDB will return // a ValidationException exception. type ExpectedAttributeValue struct { _ struct{} `type:"structure"` // One or more values to evaluate against the supplied attribute. The number // of values in the list depends on the ComparisonOperator being used. // // For type Number, value comparisons are numeric. // // String value comparisons for greater than, equals, or less than are based // on ASCII character code values. For example, a is greater than A, and a is // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). // // For Binary, DynamoDB treats each byte of the binary data as unsigned when // it compares binary values. // // For information on specifying data types in JSON, see JSON Data Format (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html) // in the Amazon DynamoDB Developer Guide. AttributeValueList []*AttributeValue `type:"list"` // A comparator for evaluating attributes in the AttributeValueList. For example, // equals, greater than, less than, etc. // // The following comparison operators are available: // // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | // BEGINS_WITH | IN | BETWEEN // // The following are descriptions of each comparison operator. // // * EQ : Equal. EQ is supported for all data types, including lists and // maps. AttributeValueList can contain only one AttributeValue element of // type String, Number, Binary, String Set, Number Set, or Binary Set. If // an item contains an AttributeValue element of a different type than the // one provided in the request, the value does not match. For example, {"S":"6"} // does not equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", // "1"]}. // // * NE : Not equal. NE is supported for all data types, including lists // and maps. AttributeValueList can contain only one AttributeValue of type // String, Number, Binary, String Set, Number Set, or Binary Set. If an item // contains an AttributeValue of a different type than the one provided in // the request, the value does not match. For example, {"S":"6"} does not // equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}. // // * LE : Less than or equal. AttributeValueList can contain only one AttributeValue // element of type String, Number, or Binary (not a set type). If an item // contains an AttributeValue element of a different type than the one provided // in the request, the value does not match. For example, {"S":"6"} does // not equal {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2", // "1"]}. // // * LT : Less than. AttributeValueList can contain only one AttributeValue // of type String, Number, or Binary (not a set type). If an item contains // an AttributeValue element of a different type than the one provided in // the request, the value does not match. For example, {"S":"6"} does not // equal {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2", // "1"]}. // // * GE : Greater than or equal. AttributeValueList can contain only one // AttributeValue element of type String, Number, or Binary (not a set type). // If an item contains an AttributeValue element of a different type than // the one provided in the request, the value does not match. For example, // {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"} does not compare to // {"NS":["6", "2", "1"]}. // // * GT : Greater than. AttributeValueList can contain only one AttributeValue // element of type String, Number, or Binary (not a set type). If an item // contains an AttributeValue element of a different type than the one provided // in the request, the value does not match. For example, {"S":"6"} does // not equal {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2", // "1"]}. // // * NOT_NULL : The attribute exists. NOT_NULL is supported for all data // types, including lists and maps. This operator tests for the existence // of an attribute, not its data type. If the data type of attribute "a" // is null, and you evaluate it using NOT_NULL, the result is a Boolean true. // This result is because the attribute "a" exists; its data type is not // relevant to the NOT_NULL comparison operator. // // * NULL : The attribute does not exist. NULL is supported for all data // types, including lists and maps. This operator tests for the nonexistence // of an attribute, not its data type. If the data type of attribute "a" // is null, and you evaluate it using NULL, the result is a Boolean false. // This is because the attribute "a" exists; its data type is not relevant // to the NULL comparison operator. // // * CONTAINS : Checks for a subsequence, or value in a set. AttributeValueList // can contain only one AttributeValue element of type String, Number, or // Binary (not a set type). If the target attribute of the comparison is // of type String, then the operator checks for a substring match. If the // target attribute of the comparison is of type Binary, then the operator // looks for a subsequence of the target that matches the input. If the target // attribute of the comparison is a set ("SS", "NS", or "BS"), then the operator // evaluates to true if it finds an exact match with any member of the set. // CONTAINS is supported for lists: When evaluating "a CONTAINS b", "a" can // be a list; however, "b" cannot be a set, a map, or a list. // // * NOT_CONTAINS : Checks for absence of a subsequence, or absence of a // value in a set. AttributeValueList can contain only one AttributeValue // element of type String, Number, or Binary (not a set type). If the target // attribute of the comparison is a String, then the operator checks for // the absence of a substring match. If the target attribute of the comparison // is Binary, then the operator checks for the absence of a subsequence of // the target that matches the input. If the target attribute of the comparison // is a set ("SS", "NS", or "BS"), then the operator evaluates to true if // it does not find an exact match with any member of the set. NOT_CONTAINS // is supported for lists: When evaluating "a NOT CONTAINS b", "a" can be // a list; however, "b" cannot be a set, a map, or a list. // // * BEGINS_WITH : Checks for a prefix. AttributeValueList can contain only // one AttributeValue of type String or Binary (not a Number or a set type). // The target attribute of the comparison must be of type String or Binary // (not a Number or a set type). // // * IN : Checks for matching elements in a list. AttributeValueList can // contain one or more AttributeValue elements of type String, Number, or // Binary. These attributes are compared against an existing attribute of // an item. If any elements of the input are equal to the item attribute, // the expression evaluates to true. // // * BETWEEN : Greater than or equal to the first value, and less than or // equal to the second value. AttributeValueList must contain two AttributeValue // elements of the same type, either String, Number, or Binary (not a set // type). A target attribute matches if the target value is greater than, // or equal to, the first element and less than, or equal to, the second // element. If an item contains an AttributeValue element of a different // type than the one provided in the request, the value does not match. For // example, {"S":"6"} does not compare to {"N":"6"}. Also, {"N":"6"} does // not compare to {"NS":["6", "2", "1"]} ComparisonOperator *string `type:"string" enum:"ComparisonOperator"` // Causes DynamoDB to evaluate the value before attempting a conditional operation: // // * 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 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 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, // because it is implied. // // DynamoDB returns a ValidationException if: // // * Exists is true but there is no Value to check. (You expect a value to // exist, but don't specify what that value is.) // // * Exists is false but you also provide a Value. (You cannot expect an // attribute to have a value, while also expecting it not to exist.) Exists *bool `type:"boolean"` // Represents the data for the expected attribute. // // Each attribute value is described as a name-value pair. The name is the data // type, and the value is the data itself. // // For more information, see Data Types (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes) // in the Amazon DynamoDB Developer Guide. Value *AttributeValue `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExpectedAttributeValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExpectedAttributeValue) GoString() string { return s.String() } // SetAttributeValueList sets the AttributeValueList field's value. func (s *ExpectedAttributeValue) SetAttributeValueList(v []*AttributeValue) *ExpectedAttributeValue { s.AttributeValueList = v return s } // SetComparisonOperator sets the ComparisonOperator field's value. func (s *ExpectedAttributeValue) SetComparisonOperator(v string) *ExpectedAttributeValue { s.ComparisonOperator = &v return s } // SetExists sets the Exists field's value. func (s *ExpectedAttributeValue) SetExists(v bool) *ExpectedAttributeValue { s.Exists = &v return s } // SetValue sets the Value field's value. func (s *ExpectedAttributeValue) SetValue(v *AttributeValue) *ExpectedAttributeValue { s.Value = v return s } // There was a conflict when writing to the specified S3 bucket. type ExportConflictException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportConflictException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportConflictException) GoString() string { return s.String() } func newErrorExportConflictException(v protocol.ResponseMetadata) error { return &ExportConflictException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ExportConflictException) Code() string { return "ExportConflictException" } // Message returns the exception's message. func (s *ExportConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ExportConflictException) OrigErr() error { return nil } func (s *ExportConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ExportConflictException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ExportConflictException) RequestID() string { return s.RespMetadata.RequestID } // Represents the properties of the exported table. type ExportDescription struct { _ struct{} `type:"structure"` // The billable size of the table export. BilledSizeBytes *int64 `type:"long"` // The client token that was provided for the export task. A client token makes // calls to ExportTableToPointInTimeInput idempotent, meaning that multiple // identical calls have the same effect as one single call. ClientToken *string `type:"string"` // The time at which the export task completed. EndTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the table export. ExportArn *string `min:"37" type:"string"` // The format of the exported data. Valid values for ExportFormat are DYNAMODB_JSON // or ION. ExportFormat *string `type:"string" enum:"ExportFormat"` // The name of the manifest file for the export task. ExportManifest *string `type:"string"` // Export can be in one of the following states: IN_PROGRESS, COMPLETED, or // FAILED. ExportStatus *string `type:"string" enum:"ExportStatus"` // Point in time from which table data was exported. ExportTime *time.Time `type:"timestamp"` // The type of export that was performed. Valid values are FULL_EXPORT or INCREMENTAL_EXPORT. ExportType *string `type:"string" enum:"ExportType"` // Status code for the result of the failed export. FailureCode *string `type:"string"` // Export failure reason description. FailureMessage *string `type:"string"` // Optional object containing the parameters specific to an incremental export. IncrementalExportSpecification *IncrementalExportSpecification `type:"structure"` // The number of items exported. ItemCount *int64 `type:"long"` // The name of the Amazon S3 bucket containing the export. S3Bucket *string `type:"string"` // The ID of the Amazon Web Services account that owns the bucket containing // the export. S3BucketOwner *string `type:"string"` // The Amazon S3 bucket prefix used as the file name and path of the exported // snapshot. S3Prefix *string `type:"string"` // Type of encryption used on the bucket where export data is stored. Valid // values for S3SseAlgorithm are: // // * AES256 - server-side encryption with Amazon S3 managed keys // // * KMS - server-side encryption with KMS managed keys S3SseAlgorithm *string `type:"string" enum:"S3SseAlgorithm"` // The ID of the KMS managed key used to encrypt the S3 bucket where export // data is stored (if applicable). S3SseKmsKeyId *string `min:"1" type:"string"` // The time at which the export task began. StartTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the table that was exported. TableArn *string `type:"string"` // Unique ID of the table that was exported. TableId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportDescription) GoString() string { return s.String() } // SetBilledSizeBytes sets the BilledSizeBytes field's value. func (s *ExportDescription) SetBilledSizeBytes(v int64) *ExportDescription { s.BilledSizeBytes = &v return s } // SetClientToken sets the ClientToken field's value. func (s *ExportDescription) SetClientToken(v string) *ExportDescription { s.ClientToken = &v return s } // SetEndTime sets the EndTime field's value. func (s *ExportDescription) SetEndTime(v time.Time) *ExportDescription { s.EndTime = &v return s } // SetExportArn sets the ExportArn field's value. func (s *ExportDescription) SetExportArn(v string) *ExportDescription { s.ExportArn = &v return s } // SetExportFormat sets the ExportFormat field's value. func (s *ExportDescription) SetExportFormat(v string) *ExportDescription { s.ExportFormat = &v return s } // SetExportManifest sets the ExportManifest field's value. func (s *ExportDescription) SetExportManifest(v string) *ExportDescription { s.ExportManifest = &v return s } // SetExportStatus sets the ExportStatus field's value. func (s *ExportDescription) SetExportStatus(v string) *ExportDescription { s.ExportStatus = &v return s } // SetExportTime sets the ExportTime field's value. func (s *ExportDescription) SetExportTime(v time.Time) *ExportDescription { s.ExportTime = &v return s } // SetExportType sets the ExportType field's value. func (s *ExportDescription) SetExportType(v string) *ExportDescription { s.ExportType = &v return s } // SetFailureCode sets the FailureCode field's value. func (s *ExportDescription) SetFailureCode(v string) *ExportDescription { s.FailureCode = &v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *ExportDescription) SetFailureMessage(v string) *ExportDescription { s.FailureMessage = &v return s } // SetIncrementalExportSpecification sets the IncrementalExportSpecification field's value. func (s *ExportDescription) SetIncrementalExportSpecification(v *IncrementalExportSpecification) *ExportDescription { s.IncrementalExportSpecification = v return s } // SetItemCount sets the ItemCount field's value. func (s *ExportDescription) SetItemCount(v int64) *ExportDescription { s.ItemCount = &v return s } // SetS3Bucket sets the S3Bucket field's value. func (s *ExportDescription) SetS3Bucket(v string) *ExportDescription { s.S3Bucket = &v return s } // SetS3BucketOwner sets the S3BucketOwner field's value. func (s *ExportDescription) SetS3BucketOwner(v string) *ExportDescription { s.S3BucketOwner = &v return s } // SetS3Prefix sets the S3Prefix field's value. func (s *ExportDescription) SetS3Prefix(v string) *ExportDescription { s.S3Prefix = &v return s } // SetS3SseAlgorithm sets the S3SseAlgorithm field's value. func (s *ExportDescription) SetS3SseAlgorithm(v string) *ExportDescription { s.S3SseAlgorithm = &v return s } // SetS3SseKmsKeyId sets the S3SseKmsKeyId field's value. func (s *ExportDescription) SetS3SseKmsKeyId(v string) *ExportDescription { s.S3SseKmsKeyId = &v return s } // SetStartTime sets the StartTime field's value. func (s *ExportDescription) SetStartTime(v time.Time) *ExportDescription { s.StartTime = &v return s } // SetTableArn sets the TableArn field's value. func (s *ExportDescription) SetTableArn(v string) *ExportDescription { s.TableArn = &v return s } // SetTableId sets the TableId field's value. func (s *ExportDescription) SetTableId(v string) *ExportDescription { s.TableId = &v return s } // The specified export was not found. type ExportNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportNotFoundException) GoString() string { return s.String() } func newErrorExportNotFoundException(v protocol.ResponseMetadata) error { return &ExportNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ExportNotFoundException) Code() string { return "ExportNotFoundException" } // Message returns the exception's message. func (s *ExportNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ExportNotFoundException) OrigErr() error { return nil } func (s *ExportNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ExportNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ExportNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Summary information about an export task. type ExportSummary struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the export. ExportArn *string `min:"37" type:"string"` // Export can be in one of the following states: IN_PROGRESS, COMPLETED, or // FAILED. ExportStatus *string `type:"string" enum:"ExportStatus"` // The type of export that was performed. Valid values are FULL_EXPORT or INCREMENTAL_EXPORT. ExportType *string `type:"string" enum:"ExportType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportSummary) GoString() string { return s.String() } // SetExportArn sets the ExportArn field's value. func (s *ExportSummary) SetExportArn(v string) *ExportSummary { s.ExportArn = &v return s } // SetExportStatus sets the ExportStatus field's value. func (s *ExportSummary) SetExportStatus(v string) *ExportSummary { s.ExportStatus = &v return s } // SetExportType sets the ExportType field's value. func (s *ExportSummary) SetExportType(v string) *ExportSummary { s.ExportType = &v return s } type ExportTableToPointInTimeInput struct { _ struct{} `type:"structure"` // Providing a ClientToken makes the call to ExportTableToPointInTimeInput idempotent, // meaning that multiple identical calls have the same effect as one single // call. // // A client token is valid for 8 hours after the first request that uses it // is completed. After 8 hours, 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 8 hours, or the result might not be idempotent. // // If you submit a request with the same client token but a change in other // parameters within the 8-hour idempotency window, DynamoDB returns an ImportConflictException. ClientToken *string `type:"string" idempotencyToken:"true"` // The format for the exported data. Valid values for ExportFormat are DYNAMODB_JSON // or ION. ExportFormat *string `type:"string" enum:"ExportFormat"` // Time in the past from which to export table data, counted in seconds from // the start of the Unix epoch. The table export will be a snapshot of the table's // state at this point in time. ExportTime *time.Time `type:"timestamp"` // Choice of whether to execute as a full export or incremental export. Valid // values are FULL_EXPORT or INCREMENTAL_EXPORT. The default value is FULL_EXPORT. // If INCREMENTAL_EXPORT is provided, the IncrementalExportSpecification must // also be used. ExportType *string `type:"string" enum:"ExportType"` // Optional object containing the parameters specific to an incremental export. IncrementalExportSpecification *IncrementalExportSpecification `type:"structure"` // The name of the Amazon S3 bucket to export the snapshot to. // // S3Bucket is a required field S3Bucket *string `type:"string" required:"true"` // The ID of the Amazon Web Services account that owns the bucket the export // will be stored in. S3BucketOwner *string `type:"string"` // The Amazon S3 bucket prefix to use as the file name and path of the exported // snapshot. S3Prefix *string `type:"string"` // Type of encryption used on the bucket where export data will be stored. Valid // values for S3SseAlgorithm are: // // * AES256 - server-side encryption with Amazon S3 managed keys // // * KMS - server-side encryption with KMS managed keys S3SseAlgorithm *string `type:"string" enum:"S3SseAlgorithm"` // The ID of the KMS managed key used to encrypt the S3 bucket where export // data will be stored (if applicable). S3SseKmsKeyId *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) associated with the table to export. // // TableArn is a required field TableArn *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportTableToPointInTimeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportTableToPointInTimeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ExportTableToPointInTimeInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ExportTableToPointInTimeInput"} if s.S3Bucket == nil { invalidParams.Add(request.NewErrParamRequired("S3Bucket")) } if s.S3SseKmsKeyId != nil && len(*s.S3SseKmsKeyId) < 1 { invalidParams.Add(request.NewErrParamMinLen("S3SseKmsKeyId", 1)) } if s.TableArn == nil { invalidParams.Add(request.NewErrParamRequired("TableArn")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetClientToken sets the ClientToken field's value. func (s *ExportTableToPointInTimeInput) SetClientToken(v string) *ExportTableToPointInTimeInput { s.ClientToken = &v return s } // SetExportFormat sets the ExportFormat field's value. func (s *ExportTableToPointInTimeInput) SetExportFormat(v string) *ExportTableToPointInTimeInput { s.ExportFormat = &v return s } // SetExportTime sets the ExportTime field's value. func (s *ExportTableToPointInTimeInput) SetExportTime(v time.Time) *ExportTableToPointInTimeInput { s.ExportTime = &v return s } // SetExportType sets the ExportType field's value. func (s *ExportTableToPointInTimeInput) SetExportType(v string) *ExportTableToPointInTimeInput { s.ExportType = &v return s } // SetIncrementalExportSpecification sets the IncrementalExportSpecification field's value. func (s *ExportTableToPointInTimeInput) SetIncrementalExportSpecification(v *IncrementalExportSpecification) *ExportTableToPointInTimeInput { s.IncrementalExportSpecification = v return s } // SetS3Bucket sets the S3Bucket field's value. func (s *ExportTableToPointInTimeInput) SetS3Bucket(v string) *ExportTableToPointInTimeInput { s.S3Bucket = &v return s } // SetS3BucketOwner sets the S3BucketOwner field's value. func (s *ExportTableToPointInTimeInput) SetS3BucketOwner(v string) *ExportTableToPointInTimeInput { s.S3BucketOwner = &v return s } // SetS3Prefix sets the S3Prefix field's value. func (s *ExportTableToPointInTimeInput) SetS3Prefix(v string) *ExportTableToPointInTimeInput { s.S3Prefix = &v return s } // SetS3SseAlgorithm sets the S3SseAlgorithm field's value. func (s *ExportTableToPointInTimeInput) SetS3SseAlgorithm(v string) *ExportTableToPointInTimeInput { s.S3SseAlgorithm = &v return s } // SetS3SseKmsKeyId sets the S3SseKmsKeyId field's value. func (s *ExportTableToPointInTimeInput) SetS3SseKmsKeyId(v string) *ExportTableToPointInTimeInput { s.S3SseKmsKeyId = &v return s } // SetTableArn sets the TableArn field's value. func (s *ExportTableToPointInTimeInput) SetTableArn(v string) *ExportTableToPointInTimeInput { s.TableArn = &v return s } type ExportTableToPointInTimeOutput struct { _ struct{} `type:"structure"` // Contains a description of the table export. ExportDescription *ExportDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportTableToPointInTimeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExportTableToPointInTimeOutput) GoString() string { return s.String() } // SetExportDescription sets the ExportDescription field's value. func (s *ExportTableToPointInTimeOutput) SetExportDescription(v *ExportDescription) *ExportTableToPointInTimeOutput { s.ExportDescription = v return s } // Represents a failure a contributor insights operation. type FailureException struct { _ struct{} `type:"structure"` // Description of the failure. ExceptionDescription *string `type:"string"` // Exception name. ExceptionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FailureException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FailureException) GoString() string { return s.String() } // SetExceptionDescription sets the ExceptionDescription field's value. func (s *FailureException) SetExceptionDescription(v string) *FailureException { s.ExceptionDescription = &v return s } // SetExceptionName sets the ExceptionName field's value. func (s *FailureException) SetExceptionName(v string) *FailureException { s.ExceptionName = &v 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Get) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Get) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Get) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Get"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.TableName == nil { invalidParams.Add(request.NewErrParamRequired("TableName")) } if s.TableName != nil && len(*s.TableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. func (s *Get) SetExpressionAttributeNames(v map[string]*string) *Get { s.ExpressionAttributeNames = v return s } // SetKey sets the Key field's value. func (s *Get) SetKey(v map[string]*AttributeValue) *Get { s.Key = v return s } // SetProjectionExpression sets the ProjectionExpression field's value. func (s *Get) SetProjectionExpression(v string) *Get { s.ProjectionExpression = &v return s } // SetTableName sets the TableName field's value. func (s *Get) SetTableName(v string) *Get { s.TableName = &v return s } // Represents the input of a GetItem operation. type GetItemInput struct { _ struct{} `type:"structure"` // This is a legacy parameter. Use ProjectionExpression instead. For more information, // see AttributesToGet (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html) // in the Amazon DynamoDB Developer Guide. AttributesToGet []*string `min:"1" type:"list"` // Determines the read consistency model: If set to true, then the operation // uses strongly consistent reads; otherwise, the operation uses eventually // consistent reads. ConsistentRead *bool `type:"boolean"` // One or more substitution tokens for attribute names in an expression. The // following are some use cases for using ExpressionAttributeNames: // // * To access an attribute whose name conflicts with a DynamoDB reserved // word. // // * To create a placeholder for repeating occurrences of an attribute name // in an expression. // // * To prevent special characters in an attribute name from being misinterpreted // in an expression. // // Use the # character in an expression to dereference an attribute name. For // example, consider the following attribute name: // // * Percentile // // The name of this attribute conflicts with a reserved word, so it cannot be // used directly in an expression. (For the complete list of reserved words, // see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide). To work around this, you could specify // the following for ExpressionAttributeNames: // // * {"#P":"Percentile"} // // You could then use this substitution in an expression, as in this example: // // * #P = :val // // Tokens that begin with the : character are expression attribute values, which // are placeholders for the actual value at runtime. // // For more information on expression attribute names, see Specifying Item Attributes // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeNames map[string]*string `type:"map"` // A map of attribute names to AttributeValue objects, representing the primary // key of the item to retrieve. // // For the primary key, you must provide all of the attributes. For example, // with a simple primary key, you only need to provide a value for the partition // key. For a composite primary key, you must provide values for both the partition // key and the sort key. // // Key is a required field Key map[string]*AttributeValue `type:"map" required:"true"` // A string that identifies one or more attributes to retrieve from the table. // These attributes can include scalars, sets, or elements of a JSON document. // The attributes in the expression must be separated by commas. // // If no attribute names are specified, then all attributes are returned. If // any of the requested attributes are not found, they do not appear in the // result. // // For more information, see Specifying Item Attributes (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ProjectionExpression *string `type:"string"` // Determines the level of detail about either provisioned or on-demand 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"` // The name of the table containing the requested item. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetItemInput"} if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 { invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1)) } 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 } // SetAttributesToGet sets the AttributesToGet field's value. func (s *GetItemInput) SetAttributesToGet(v []*string) *GetItemInput { s.AttributesToGet = v return s } // SetConsistentRead sets the ConsistentRead field's value. func (s *GetItemInput) SetConsistentRead(v bool) *GetItemInput { s.ConsistentRead = &v return s } // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. func (s *GetItemInput) SetExpressionAttributeNames(v map[string]*string) *GetItemInput { s.ExpressionAttributeNames = v return s } // SetKey sets the Key field's value. func (s *GetItemInput) SetKey(v map[string]*AttributeValue) *GetItemInput { s.Key = v return s } // SetProjectionExpression sets the ProjectionExpression field's value. func (s *GetItemInput) SetProjectionExpression(v string) *GetItemInput { s.ProjectionExpression = &v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *GetItemInput) SetReturnConsumedCapacity(v string) *GetItemInput { s.ReturnConsumedCapacity = &v return s } // SetTableName sets the TableName field's value. func (s *GetItemInput) SetTableName(v string) *GetItemInput { s.TableName = &v return s } // Represents the output of a GetItem operation. type GetItemOutput struct { _ struct{} `type:"structure"` // The capacity units consumed by the GetItem 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 if the ReturnConsumedCapacity parameter was specified. For more // information, see Provisioned Throughput (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html#ItemSizeCalculations.Reads) // in the Amazon DynamoDB Developer Guide. ConsumedCapacity *ConsumedCapacity `type:"structure"` // A map of attribute names to AttributeValue objects, as specified by ProjectionExpression. Item map[string]*AttributeValue `type:"map"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetItemOutput) GoString() string { return s.String() } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *GetItemOutput) SetConsumedCapacity(v *ConsumedCapacity) *GetItemOutput { s.ConsumedCapacity = v return s } // SetItem sets the Item field's value. func (s *GetItemOutput) SetItem(v map[string]*AttributeValue) *GetItemOutput { s.Item = v return s } // Represents the properties of a global secondary index. type GlobalSecondaryIndex struct { _ struct{} `type:"structure"` // The name of the global secondary index. The name must be unique among all // other indexes on this table. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` // The complete key schema for a global secondary index, which consists of one // or more pairs of attribute names and key types: // // * HASH - partition key // // * RANGE - sort key // // The partition key of an item is also known as its hash attribute. The term // "hash attribute" derives from DynamoDB's usage of an internal hash function // to evenly distribute data items across partitions, based on their partition // key values. // // The sort key of an item is also known as its range attribute. The term "range // attribute" derives from the way DynamoDB stores items with the same partition // key physically close together, in sorted order by the sort key value. // // KeySchema is a required field KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` // Represents attributes that are copied (projected) from the table into the // global secondary index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. // // Projection is a required field Projection *Projection `type:"structure" required:"true"` // Represents the provisioned throughput settings for the specified global secondary // index. // // For current minimum and maximum provisioned throughput values, see Service, // Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. ProvisionedThroughput *ProvisionedThroughput `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndex) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndex) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GlobalSecondaryIndex) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GlobalSecondaryIndex"} if s.IndexName == nil { invalidParams.Add(request.NewErrParamRequired("IndexName")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.KeySchema == nil { invalidParams.Add(request.NewErrParamRequired("KeySchema")) } if s.KeySchema != nil && len(s.KeySchema) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) } if s.Projection == nil { invalidParams.Add(request.NewErrParamRequired("Projection")) } if s.KeySchema != nil { for i, v := range s.KeySchema { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) } } } if s.Projection != nil { if err := s.Projection.Validate(); err != nil { invalidParams.AddNested("Projection", err.(request.ErrInvalidParams)) } } if s.ProvisionedThroughput != nil { if err := s.ProvisionedThroughput.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *GlobalSecondaryIndex) SetIndexName(v string) *GlobalSecondaryIndex { s.IndexName = &v return s } // SetKeySchema sets the KeySchema field's value. func (s *GlobalSecondaryIndex) SetKeySchema(v []*KeySchemaElement) *GlobalSecondaryIndex { s.KeySchema = v return s } // SetProjection sets the Projection field's value. func (s *GlobalSecondaryIndex) SetProjection(v *Projection) *GlobalSecondaryIndex { s.Projection = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *GlobalSecondaryIndex) SetProvisionedThroughput(v *ProvisionedThroughput) *GlobalSecondaryIndex { s.ProvisionedThroughput = v return s } // Represents the auto scaling settings of a global secondary index for a global // table that will be modified. type GlobalSecondaryIndexAutoScalingUpdate struct { _ struct{} `type:"structure"` // The name of the global secondary index. IndexName *string `min:"3" type:"string"` // Represents the auto scaling settings to be modified for a global table or // global secondary index. ProvisionedWriteCapacityAutoScalingUpdate *AutoScalingSettingsUpdate `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndexAutoScalingUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndexAutoScalingUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GlobalSecondaryIndexAutoScalingUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GlobalSecondaryIndexAutoScalingUpdate"} if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.ProvisionedWriteCapacityAutoScalingUpdate != nil { if err := s.ProvisionedWriteCapacityAutoScalingUpdate.Validate(); err != nil { invalidParams.AddNested("ProvisionedWriteCapacityAutoScalingUpdate", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *GlobalSecondaryIndexAutoScalingUpdate) SetIndexName(v string) *GlobalSecondaryIndexAutoScalingUpdate { s.IndexName = &v return s } // SetProvisionedWriteCapacityAutoScalingUpdate sets the ProvisionedWriteCapacityAutoScalingUpdate field's value. func (s *GlobalSecondaryIndexAutoScalingUpdate) SetProvisionedWriteCapacityAutoScalingUpdate(v *AutoScalingSettingsUpdate) *GlobalSecondaryIndexAutoScalingUpdate { s.ProvisionedWriteCapacityAutoScalingUpdate = v return s } // Represents the properties of a global secondary index. type GlobalSecondaryIndexDescription struct { _ struct{} `type:"structure"` // Indicates whether the index is currently backfilling. Backfilling is the // process of reading items from the table and determining whether they can // be added to the index. (Not all items will qualify: For example, a partition // key cannot have any duplicate values.) If an item can be added to the index, // DynamoDB will do so. After all items have been processed, the backfilling // operation is complete and Backfilling is false. // // You can delete an index that is being created during the Backfilling phase // when IndexStatus is set to CREATING and Backfilling is true. You can't delete // the index that is being created when IndexStatus is set to CREATING and Backfilling // is false. // // For indexes that were created during a CreateTable operation, the Backfilling // attribute does not appear in the DescribeTable output. Backfilling *bool `type:"boolean"` // The Amazon Resource Name (ARN) that uniquely identifies the index. IndexArn *string `type:"string"` // The name of the global secondary index. IndexName *string `min:"3" type:"string"` // The total size of the specified index, in bytes. DynamoDB updates this value // approximately every six hours. Recent changes might not be reflected in this // value. IndexSizeBytes *int64 `type:"long"` // The current state of the global secondary index: // // * CREATING - The index is being created. // // * UPDATING - The index is being updated. // // * DELETING - The index is being deleted. // // * ACTIVE - The index is ready for use. IndexStatus *string `type:"string" enum:"IndexStatus"` // The number of items in the specified index. DynamoDB updates this value approximately // every six hours. Recent changes might not be reflected in this value. ItemCount *int64 `type:"long"` // The complete key schema for a global secondary index, which consists of one // or more pairs of attribute names and key types: // // * HASH - partition key // // * RANGE - sort key // // The partition key of an item is also known as its hash attribute. The term // "hash attribute" derives from DynamoDB's usage of an internal hash function // to evenly distribute data items across partitions, based on their partition // key values. // // The sort key of an item is also known as its range attribute. The term "range // attribute" derives from the way DynamoDB stores items with the same partition // key physically close together, in sorted order by the sort key value. KeySchema []*KeySchemaElement `min:"1" type:"list"` // Represents attributes that are copied (projected) from the table into the // global secondary index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. Projection *Projection `type:"structure"` // Represents the provisioned throughput settings for the specified global secondary // index. // // For current minimum and maximum provisioned throughput values, see Service, // Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. ProvisionedThroughput *ProvisionedThroughputDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndexDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndexDescription) GoString() string { return s.String() } // SetBackfilling sets the Backfilling field's value. func (s *GlobalSecondaryIndexDescription) SetBackfilling(v bool) *GlobalSecondaryIndexDescription { s.Backfilling = &v return s } // SetIndexArn sets the IndexArn field's value. func (s *GlobalSecondaryIndexDescription) SetIndexArn(v string) *GlobalSecondaryIndexDescription { s.IndexArn = &v return s } // SetIndexName sets the IndexName field's value. func (s *GlobalSecondaryIndexDescription) SetIndexName(v string) *GlobalSecondaryIndexDescription { s.IndexName = &v return s } // SetIndexSizeBytes sets the IndexSizeBytes field's value. func (s *GlobalSecondaryIndexDescription) SetIndexSizeBytes(v int64) *GlobalSecondaryIndexDescription { s.IndexSizeBytes = &v return s } // SetIndexStatus sets the IndexStatus field's value. func (s *GlobalSecondaryIndexDescription) SetIndexStatus(v string) *GlobalSecondaryIndexDescription { s.IndexStatus = &v return s } // SetItemCount sets the ItemCount field's value. func (s *GlobalSecondaryIndexDescription) SetItemCount(v int64) *GlobalSecondaryIndexDescription { s.ItemCount = &v return s } // SetKeySchema sets the KeySchema field's value. func (s *GlobalSecondaryIndexDescription) SetKeySchema(v []*KeySchemaElement) *GlobalSecondaryIndexDescription { s.KeySchema = v return s } // SetProjection sets the Projection field's value. func (s *GlobalSecondaryIndexDescription) SetProjection(v *Projection) *GlobalSecondaryIndexDescription { s.Projection = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *GlobalSecondaryIndexDescription) SetProvisionedThroughput(v *ProvisionedThroughputDescription) *GlobalSecondaryIndexDescription { s.ProvisionedThroughput = v return s } // Represents the properties of a global secondary index for the table when // the backup was created. type GlobalSecondaryIndexInfo struct { _ struct{} `type:"structure"` // The name of the global secondary index. IndexName *string `min:"3" type:"string"` // The complete key schema for a global secondary index, which consists of one // or more pairs of attribute names and key types: // // * HASH - partition key // // * RANGE - sort key // // The partition key of an item is also known as its hash attribute. The term // "hash attribute" derives from DynamoDB's usage of an internal hash function // to evenly distribute data items across partitions, based on their partition // key values. // // The sort key of an item is also known as its range attribute. The term "range // attribute" derives from the way DynamoDB stores items with the same partition // key physically close together, in sorted order by the sort key value. KeySchema []*KeySchemaElement `min:"1" type:"list"` // Represents attributes that are copied (projected) from the table into the // global secondary index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. Projection *Projection `type:"structure"` // Represents the provisioned throughput settings for the specified global secondary // index. ProvisionedThroughput *ProvisionedThroughput `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndexInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndexInfo) GoString() string { return s.String() } // SetIndexName sets the IndexName field's value. func (s *GlobalSecondaryIndexInfo) SetIndexName(v string) *GlobalSecondaryIndexInfo { s.IndexName = &v return s } // SetKeySchema sets the KeySchema field's value. func (s *GlobalSecondaryIndexInfo) SetKeySchema(v []*KeySchemaElement) *GlobalSecondaryIndexInfo { s.KeySchema = v return s } // SetProjection sets the Projection field's value. func (s *GlobalSecondaryIndexInfo) SetProjection(v *Projection) *GlobalSecondaryIndexInfo { s.Projection = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *GlobalSecondaryIndexInfo) SetProvisionedThroughput(v *ProvisionedThroughput) *GlobalSecondaryIndexInfo { s.ProvisionedThroughput = v return s } // Represents one of the following: // // - A new global secondary index to be added to an existing table. // // - New provisioned throughput parameters for an existing global secondary // index. // // - An existing global secondary index to be removed from an existing table. type GlobalSecondaryIndexUpdate struct { _ struct{} `type:"structure"` // The parameters required for creating a global secondary index on an existing // table: // // * IndexName // // * KeySchema // // * AttributeDefinitions // // * Projection // // * ProvisionedThroughput Create *CreateGlobalSecondaryIndexAction `type:"structure"` // The name of an existing global secondary index to be removed. Delete *DeleteGlobalSecondaryIndexAction `type:"structure"` // The name of an existing global secondary index, along with new provisioned // throughput settings to be applied to that index. Update *UpdateGlobalSecondaryIndexAction `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndexUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalSecondaryIndexUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GlobalSecondaryIndexUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GlobalSecondaryIndexUpdate"} if s.Create != nil { if err := s.Create.Validate(); err != nil { invalidParams.AddNested("Create", err.(request.ErrInvalidParams)) } } if s.Delete != nil { if err := s.Delete.Validate(); err != nil { invalidParams.AddNested("Delete", 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 } // SetCreate sets the Create field's value. func (s *GlobalSecondaryIndexUpdate) SetCreate(v *CreateGlobalSecondaryIndexAction) *GlobalSecondaryIndexUpdate { s.Create = v return s } // SetDelete sets the Delete field's value. func (s *GlobalSecondaryIndexUpdate) SetDelete(v *DeleteGlobalSecondaryIndexAction) *GlobalSecondaryIndexUpdate { s.Delete = v return s } // SetUpdate sets the Update field's value. func (s *GlobalSecondaryIndexUpdate) SetUpdate(v *UpdateGlobalSecondaryIndexAction) *GlobalSecondaryIndexUpdate { s.Update = v return s } // Represents the properties of a global table. type GlobalTable struct { _ struct{} `type:"structure"` // The global table name. GlobalTableName *string `min:"3" type:"string"` // The Regions where the global table has replicas. ReplicationGroup []*Replica `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTable) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTable) GoString() string { return s.String() } // SetGlobalTableName sets the GlobalTableName field's value. func (s *GlobalTable) SetGlobalTableName(v string) *GlobalTable { s.GlobalTableName = &v return s } // SetReplicationGroup sets the ReplicationGroup field's value. func (s *GlobalTable) SetReplicationGroup(v []*Replica) *GlobalTable { s.ReplicationGroup = v return s } // The specified global table already exists. type GlobalTableAlreadyExistsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTableAlreadyExistsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTableAlreadyExistsException) GoString() string { return s.String() } func newErrorGlobalTableAlreadyExistsException(v protocol.ResponseMetadata) error { return &GlobalTableAlreadyExistsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *GlobalTableAlreadyExistsException) Code() string { return "GlobalTableAlreadyExistsException" } // Message returns the exception's message. func (s *GlobalTableAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *GlobalTableAlreadyExistsException) OrigErr() error { return nil } func (s *GlobalTableAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *GlobalTableAlreadyExistsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *GlobalTableAlreadyExistsException) RequestID() string { return s.RespMetadata.RequestID } // Contains details about the global table. type GlobalTableDescription struct { _ struct{} `type:"structure"` // The creation time of the global table. CreationDateTime *time.Time `type:"timestamp"` // The unique identifier of the global table. GlobalTableArn *string `type:"string"` // The global table name. GlobalTableName *string `min:"3" type:"string"` // The current state of the global table: // // * CREATING - The global table is being created. // // * UPDATING - The global table is being updated. // // * DELETING - The global table is being deleted. // // * ACTIVE - The global table is ready for use. GlobalTableStatus *string `type:"string" enum:"GlobalTableStatus"` // The Regions where the global table has replicas. ReplicationGroup []*ReplicaDescription `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTableDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTableDescription) GoString() string { return s.String() } // SetCreationDateTime sets the CreationDateTime field's value. func (s *GlobalTableDescription) SetCreationDateTime(v time.Time) *GlobalTableDescription { s.CreationDateTime = &v return s } // SetGlobalTableArn sets the GlobalTableArn field's value. func (s *GlobalTableDescription) SetGlobalTableArn(v string) *GlobalTableDescription { s.GlobalTableArn = &v return s } // SetGlobalTableName sets the GlobalTableName field's value. func (s *GlobalTableDescription) SetGlobalTableName(v string) *GlobalTableDescription { s.GlobalTableName = &v return s } // SetGlobalTableStatus sets the GlobalTableStatus field's value. func (s *GlobalTableDescription) SetGlobalTableStatus(v string) *GlobalTableDescription { s.GlobalTableStatus = &v return s } // SetReplicationGroup sets the ReplicationGroup field's value. func (s *GlobalTableDescription) SetReplicationGroup(v []*ReplicaDescription) *GlobalTableDescription { s.ReplicationGroup = v return s } // Represents the settings of a global secondary index for a global table that // will be modified. type GlobalTableGlobalSecondaryIndexSettingsUpdate struct { _ struct{} `type:"structure"` // The name of the global secondary index. The name must be unique among all // other indexes on this table. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` // Auto scaling settings for managing a global secondary index's write capacity // units. ProvisionedWriteCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"` // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTableGlobalSecondaryIndexSettingsUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTableGlobalSecondaryIndexSettingsUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GlobalTableGlobalSecondaryIndexSettingsUpdate"} if s.IndexName == nil { invalidParams.Add(request.NewErrParamRequired("IndexName")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.ProvisionedWriteCapacityUnits != nil && *s.ProvisionedWriteCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("ProvisionedWriteCapacityUnits", 1)) } if s.ProvisionedWriteCapacityAutoScalingSettingsUpdate != nil { if err := s.ProvisionedWriteCapacityAutoScalingSettingsUpdate.Validate(); err != nil { invalidParams.AddNested("ProvisionedWriteCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *GlobalTableGlobalSecondaryIndexSettingsUpdate { s.IndexName = &v return s } // SetProvisionedWriteCapacityAutoScalingSettingsUpdate sets the ProvisionedWriteCapacityAutoScalingSettingsUpdate field's value. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *GlobalTableGlobalSecondaryIndexSettingsUpdate { s.ProvisionedWriteCapacityAutoScalingSettingsUpdate = v return s } // SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapacityUnits(v int64) *GlobalTableGlobalSecondaryIndexSettingsUpdate { s.ProvisionedWriteCapacityUnits = &v return s } // The specified global table does not exist. type GlobalTableNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTableNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GlobalTableNotFoundException) GoString() string { return s.String() } func newErrorGlobalTableNotFoundException(v protocol.ResponseMetadata) error { return &GlobalTableNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *GlobalTableNotFoundException) Code() string { return "GlobalTableNotFoundException" } // Message returns the exception's message. func (s *GlobalTableNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *GlobalTableNotFoundException) OrigErr() error { return nil } func (s *GlobalTableNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *GlobalTableNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *GlobalTableNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // DynamoDB rejected the request because you retried a request with a different // payload but with an idempotent token that was already used. type IdempotentParameterMismatchException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IdempotentParameterMismatchException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IdempotentParameterMismatchException) GoString() string { return s.String() } func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error { return &IdempotentParameterMismatchException{ RespMetadata: v, } } // Code returns the exception type name. func (s *IdempotentParameterMismatchException) Code() string { return "IdempotentParameterMismatchException" } // Message returns the exception's message. func (s *IdempotentParameterMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *IdempotentParameterMismatchException) OrigErr() error { return nil } func (s *IdempotentParameterMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *IdempotentParameterMismatchException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *IdempotentParameterMismatchException) RequestID() string { return s.RespMetadata.RequestID } // There was a conflict when importing from the specified S3 source. This can // occur when the current import conflicts with a previous import request that // had the same client token. type ImportConflictException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportConflictException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportConflictException) GoString() string { return s.String() } func newErrorImportConflictException(v protocol.ResponseMetadata) error { return &ImportConflictException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ImportConflictException) Code() string { return "ImportConflictException" } // Message returns the exception's message. func (s *ImportConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ImportConflictException) OrigErr() error { return nil } func (s *ImportConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ImportConflictException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ImportConflictException) RequestID() string { return s.RespMetadata.RequestID } // The specified import was not found. type ImportNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportNotFoundException) GoString() string { return s.String() } func newErrorImportNotFoundException(v protocol.ResponseMetadata) error { return &ImportNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ImportNotFoundException) Code() string { return "ImportNotFoundException" } // Message returns the exception's message. func (s *ImportNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ImportNotFoundException) OrigErr() error { return nil } func (s *ImportNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ImportNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ImportNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Summary information about the source file for the import. type ImportSummary struct { _ struct{} `type:"structure"` // The Amazon Resource Number (ARN) of the Cloudwatch Log Group associated with // this import task. CloudWatchLogGroupArn *string `min:"1" type:"string"` // The time at which this import task ended. (Does this include the successful // complete creation of the table it was imported to?) EndTime *time.Time `type:"timestamp"` // The Amazon Resource Number (ARN) corresponding to the import request. ImportArn *string `min:"37" type:"string"` // The status of the import operation. ImportStatus *string `type:"string" enum:"ImportStatus"` // The format of the source data. Valid values are CSV, DYNAMODB_JSON or ION. InputFormat *string `type:"string" enum:"InputFormat"` // The path and S3 bucket of the source file that is being imported. This includes // the S3Bucket (required), S3KeyPrefix (optional) and S3BucketOwner (optional // if the bucket is owned by the requester). S3BucketSource *S3BucketSource `type:"structure"` // The time at which this import task began. StartTime *time.Time `type:"timestamp"` // The Amazon Resource Number (ARN) of the table being imported into. TableArn *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportSummary) GoString() string { return s.String() } // SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. func (s *ImportSummary) SetCloudWatchLogGroupArn(v string) *ImportSummary { s.CloudWatchLogGroupArn = &v return s } // SetEndTime sets the EndTime field's value. func (s *ImportSummary) SetEndTime(v time.Time) *ImportSummary { s.EndTime = &v return s } // SetImportArn sets the ImportArn field's value. func (s *ImportSummary) SetImportArn(v string) *ImportSummary { s.ImportArn = &v return s } // SetImportStatus sets the ImportStatus field's value. func (s *ImportSummary) SetImportStatus(v string) *ImportSummary { s.ImportStatus = &v return s } // SetInputFormat sets the InputFormat field's value. func (s *ImportSummary) SetInputFormat(v string) *ImportSummary { s.InputFormat = &v return s } // SetS3BucketSource sets the S3BucketSource field's value. func (s *ImportSummary) SetS3BucketSource(v *S3BucketSource) *ImportSummary { s.S3BucketSource = v return s } // SetStartTime sets the StartTime field's value. func (s *ImportSummary) SetStartTime(v time.Time) *ImportSummary { s.StartTime = &v return s } // SetTableArn sets the TableArn field's value. func (s *ImportSummary) SetTableArn(v string) *ImportSummary { s.TableArn = &v return s } // Represents the properties of the table being imported into. type ImportTableDescription struct { _ struct{} `type:"structure"` // The client token that was provided for the import task. Reusing the client // token on retry makes a call to ImportTable idempotent. ClientToken *string `type:"string"` // The Amazon Resource Number (ARN) of the Cloudwatch Log Group associated with // the target table. CloudWatchLogGroupArn *string `min:"1" type:"string"` // The time at which the creation of the table associated with this import task // completed. EndTime *time.Time `type:"timestamp"` // The number of errors occurred on importing the source file into the target // table. ErrorCount *int64 `type:"long"` // The error code corresponding to the failure that the import job ran into // during execution. FailureCode *string `type:"string"` // The error message corresponding to the failure that the import job ran into // during execution. FailureMessage *string `type:"string"` // The Amazon Resource Number (ARN) corresponding to the import request. ImportArn *string `min:"37" type:"string"` // The status of the import. ImportStatus *string `type:"string" enum:"ImportStatus"` // The number of items successfully imported into the new table. ImportedItemCount *int64 `type:"long"` // The compression options for the data that has been imported into the target // table. The values are NONE, GZIP, or ZSTD. InputCompressionType *string `type:"string" enum:"InputCompressionType"` // The format of the source data going into the target table. InputFormat *string `type:"string" enum:"InputFormat"` // The format options for the data that was imported into the target table. // There is one value, CsvOption. InputFormatOptions *InputFormatOptions `type:"structure"` // The total number of items processed from the source file. ProcessedItemCount *int64 `type:"long"` // The total size of data processed from the source file, in Bytes. ProcessedSizeBytes *int64 `type:"long"` // Values for the S3 bucket the source file is imported from. Includes bucket // name (required), key prefix (optional) and bucket account owner ID (optional). S3BucketSource *S3BucketSource `type:"structure"` // The time when this import task started. StartTime *time.Time `type:"timestamp"` // The Amazon Resource Number (ARN) of the table being imported into. TableArn *string `type:"string"` // The parameters for the new table that is being imported into. TableCreationParameters *TableCreationParameters `type:"structure"` // The table id corresponding to the table created by import table process. TableId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportTableDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportTableDescription) GoString() string { return s.String() } // SetClientToken sets the ClientToken field's value. func (s *ImportTableDescription) SetClientToken(v string) *ImportTableDescription { s.ClientToken = &v return s } // SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. func (s *ImportTableDescription) SetCloudWatchLogGroupArn(v string) *ImportTableDescription { s.CloudWatchLogGroupArn = &v return s } // SetEndTime sets the EndTime field's value. func (s *ImportTableDescription) SetEndTime(v time.Time) *ImportTableDescription { s.EndTime = &v return s } // SetErrorCount sets the ErrorCount field's value. func (s *ImportTableDescription) SetErrorCount(v int64) *ImportTableDescription { s.ErrorCount = &v return s } // SetFailureCode sets the FailureCode field's value. func (s *ImportTableDescription) SetFailureCode(v string) *ImportTableDescription { s.FailureCode = &v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *ImportTableDescription) SetFailureMessage(v string) *ImportTableDescription { s.FailureMessage = &v return s } // SetImportArn sets the ImportArn field's value. func (s *ImportTableDescription) SetImportArn(v string) *ImportTableDescription { s.ImportArn = &v return s } // SetImportStatus sets the ImportStatus field's value. func (s *ImportTableDescription) SetImportStatus(v string) *ImportTableDescription { s.ImportStatus = &v return s } // SetImportedItemCount sets the ImportedItemCount field's value. func (s *ImportTableDescription) SetImportedItemCount(v int64) *ImportTableDescription { s.ImportedItemCount = &v return s } // SetInputCompressionType sets the InputCompressionType field's value. func (s *ImportTableDescription) SetInputCompressionType(v string) *ImportTableDescription { s.InputCompressionType = &v return s } // SetInputFormat sets the InputFormat field's value. func (s *ImportTableDescription) SetInputFormat(v string) *ImportTableDescription { s.InputFormat = &v return s } // SetInputFormatOptions sets the InputFormatOptions field's value. func (s *ImportTableDescription) SetInputFormatOptions(v *InputFormatOptions) *ImportTableDescription { s.InputFormatOptions = v return s } // SetProcessedItemCount sets the ProcessedItemCount field's value. func (s *ImportTableDescription) SetProcessedItemCount(v int64) *ImportTableDescription { s.ProcessedItemCount = &v return s } // SetProcessedSizeBytes sets the ProcessedSizeBytes field's value. func (s *ImportTableDescription) SetProcessedSizeBytes(v int64) *ImportTableDescription { s.ProcessedSizeBytes = &v return s } // SetS3BucketSource sets the S3BucketSource field's value. func (s *ImportTableDescription) SetS3BucketSource(v *S3BucketSource) *ImportTableDescription { s.S3BucketSource = v return s } // SetStartTime sets the StartTime field's value. func (s *ImportTableDescription) SetStartTime(v time.Time) *ImportTableDescription { s.StartTime = &v return s } // SetTableArn sets the TableArn field's value. func (s *ImportTableDescription) SetTableArn(v string) *ImportTableDescription { s.TableArn = &v return s } // SetTableCreationParameters sets the TableCreationParameters field's value. func (s *ImportTableDescription) SetTableCreationParameters(v *TableCreationParameters) *ImportTableDescription { s.TableCreationParameters = v return s } // SetTableId sets the TableId field's value. func (s *ImportTableDescription) SetTableId(v string) *ImportTableDescription { s.TableId = &v return s } type ImportTableInput struct { _ struct{} `type:"structure"` // Providing a ClientToken makes the call to ImportTableInput idempotent, meaning // that multiple identical calls have the same effect as one single call. // // A client token is valid for 8 hours after the first request that uses it // is completed. After 8 hours, 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 8 hours, or the result might not be idempotent. // // If you submit a request with the same client token but a change in other // parameters within the 8-hour idempotency window, DynamoDB returns an IdempotentParameterMismatch // exception. ClientToken *string `type:"string" idempotencyToken:"true"` // Type of compression to be used on the input coming from the imported table. InputCompressionType *string `type:"string" enum:"InputCompressionType"` // The format of the source data. Valid values for ImportFormat are CSV, DYNAMODB_JSON // or ION. // // InputFormat is a required field InputFormat *string `type:"string" required:"true" enum:"InputFormat"` // Additional properties that specify how the input is formatted, InputFormatOptions *InputFormatOptions `type:"structure"` // The S3 bucket that provides the source for the import. // // S3BucketSource is a required field S3BucketSource *S3BucketSource `type:"structure" required:"true"` // Parameters for the table to import the data into. // // TableCreationParameters is a required field TableCreationParameters *TableCreationParameters `type:"structure" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ImportTableInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ImportTableInput"} if s.InputFormat == nil { invalidParams.Add(request.NewErrParamRequired("InputFormat")) } if s.S3BucketSource == nil { invalidParams.Add(request.NewErrParamRequired("S3BucketSource")) } if s.TableCreationParameters == nil { invalidParams.Add(request.NewErrParamRequired("TableCreationParameters")) } if s.InputFormatOptions != nil { if err := s.InputFormatOptions.Validate(); err != nil { invalidParams.AddNested("InputFormatOptions", err.(request.ErrInvalidParams)) } } if s.S3BucketSource != nil { if err := s.S3BucketSource.Validate(); err != nil { invalidParams.AddNested("S3BucketSource", err.(request.ErrInvalidParams)) } } if s.TableCreationParameters != nil { if err := s.TableCreationParameters.Validate(); err != nil { invalidParams.AddNested("TableCreationParameters", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetClientToken sets the ClientToken field's value. func (s *ImportTableInput) SetClientToken(v string) *ImportTableInput { s.ClientToken = &v return s } // SetInputCompressionType sets the InputCompressionType field's value. func (s *ImportTableInput) SetInputCompressionType(v string) *ImportTableInput { s.InputCompressionType = &v return s } // SetInputFormat sets the InputFormat field's value. func (s *ImportTableInput) SetInputFormat(v string) *ImportTableInput { s.InputFormat = &v return s } // SetInputFormatOptions sets the InputFormatOptions field's value. func (s *ImportTableInput) SetInputFormatOptions(v *InputFormatOptions) *ImportTableInput { s.InputFormatOptions = v return s } // SetS3BucketSource sets the S3BucketSource field's value. func (s *ImportTableInput) SetS3BucketSource(v *S3BucketSource) *ImportTableInput { s.S3BucketSource = v return s } // SetTableCreationParameters sets the TableCreationParameters field's value. func (s *ImportTableInput) SetTableCreationParameters(v *TableCreationParameters) *ImportTableInput { s.TableCreationParameters = v return s } type ImportTableOutput struct { _ struct{} `type:"structure"` // Represents the properties of the table created for the import, and parameters // of the import. The import parameters include import status, how many items // were processed, and how many errors were encountered. // // ImportTableDescription is a required field ImportTableDescription *ImportTableDescription `type:"structure" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ImportTableOutput) GoString() string { return s.String() } // SetImportTableDescription sets the ImportTableDescription field's value. func (s *ImportTableOutput) SetImportTableDescription(v *ImportTableDescription) *ImportTableOutput { s.ImportTableDescription = v return s } // Optional object containing the parameters specific to an incremental export. type IncrementalExportSpecification struct { _ struct{} `type:"structure"` // Time in the past which provides the inclusive start range for the export // table's data, counted in seconds from the start of the Unix epoch. The incremental // export will reflect the table's state including and after this point in time. ExportFromTime *time.Time `type:"timestamp"` // Time in the past which provides the exclusive end range for the export table's // data, counted in seconds from the start of the Unix epoch. The incremental // export will reflect the table's state just prior to this point in time. If // this is not provided, the latest time with data available will be used. ExportToTime *time.Time `type:"timestamp"` // The view type that was chosen for the export. Valid values are NEW_AND_OLD_IMAGES // and NEW_IMAGES. The default value is NEW_AND_OLD_IMAGES. ExportViewType *string `type:"string" enum:"ExportViewType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IncrementalExportSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IncrementalExportSpecification) GoString() string { return s.String() } // SetExportFromTime sets the ExportFromTime field's value. func (s *IncrementalExportSpecification) SetExportFromTime(v time.Time) *IncrementalExportSpecification { s.ExportFromTime = &v return s } // SetExportToTime sets the ExportToTime field's value. func (s *IncrementalExportSpecification) SetExportToTime(v time.Time) *IncrementalExportSpecification { s.ExportToTime = &v return s } // SetExportViewType sets the ExportViewType field's value. func (s *IncrementalExportSpecification) SetExportViewType(v string) *IncrementalExportSpecification { s.ExportViewType = &v return s } // The operation tried to access a nonexistent index. type IndexNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IndexNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IndexNotFoundException) GoString() string { return s.String() } func newErrorIndexNotFoundException(v protocol.ResponseMetadata) error { return &IndexNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *IndexNotFoundException) Code() string { return "IndexNotFoundException" } // Message returns the exception's message. func (s *IndexNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *IndexNotFoundException) OrigErr() error { return nil } func (s *IndexNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *IndexNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *IndexNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // The format options for the data that was imported into the target table. // There is one value, CsvOption. type InputFormatOptions struct { _ struct{} `type:"structure"` // The options for imported source files in CSV format. The values are Delimiter // and HeaderList. Csv *CsvOptions `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InputFormatOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InputFormatOptions) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InputFormatOptions) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InputFormatOptions"} if s.Csv != nil { if err := s.Csv.Validate(); err != nil { invalidParams.AddNested("Csv", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCsv sets the Csv field's value. func (s *InputFormatOptions) SetCsv(v *CsvOptions) *InputFormatOptions { s.Csv = v return s } // An error occurred on the server side. type InternalServerError struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The server encountered an internal error trying to fulfill the request. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InternalServerError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InternalServerError) GoString() string { return s.String() } func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ RespMetadata: v, } } // Code returns the exception type name. func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InternalServerError) OrigErr() error { return nil } func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InternalServerError) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InternalServerError) RequestID() string { return s.RespMetadata.RequestID } // The specified ExportTime is outside of the point in time recovery window. type InvalidExportTimeException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidExportTimeException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidExportTimeException) GoString() string { return s.String() } func newErrorInvalidExportTimeException(v protocol.ResponseMetadata) error { return &InvalidExportTimeException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidExportTimeException) Code() string { return "InvalidExportTimeException" } // Message returns the exception's message. func (s *InvalidExportTimeException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidExportTimeException) OrigErr() error { return nil } func (s *InvalidExportTimeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidExportTimeException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidExportTimeException) RequestID() string { return s.RespMetadata.RequestID } // An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime // and LatestRestorableDateTime. type InvalidRestoreTimeException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRestoreTimeException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRestoreTimeException) GoString() string { return s.String() } func newErrorInvalidRestoreTimeException(v protocol.ResponseMetadata) error { return &InvalidRestoreTimeException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidRestoreTimeException) Code() string { return "InvalidRestoreTimeException" } // Message returns the exception's message. func (s *InvalidRestoreTimeException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidRestoreTimeException) OrigErr() error { return nil } func (s *InvalidRestoreTimeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidRestoreTimeException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidRestoreTimeException) RequestID() string { return s.RespMetadata.RequestID } // Information about item collections, if any, that were affected by the operation. // ItemCollectionMetrics is only returned if the request asked for it. If the // table does not have any local secondary indexes, this information is not // returned in the response. type ItemCollectionMetrics struct { _ struct{} `type:"structure"` // The partition key value of the item collection. This value is the same as // the partition key value of the item. ItemCollectionKey map[string]*AttributeValue `type:"map"` // An estimate of item collection size, in gigabytes. This value is a two-element // array containing a lower bound and an upper bound for the estimate. The estimate // includes the size of all the items in the table, plus the size of all attributes // projected into all of the local secondary indexes on that table. Use this // estimate to measure whether a local secondary index is approaching its size // limit. // // The estimate is subject to change over time; therefore, do not rely on the // precision or accuracy of the estimate. SizeEstimateRangeGB []*float64 `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemCollectionMetrics) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemCollectionMetrics) GoString() string { return s.String() } // SetItemCollectionKey sets the ItemCollectionKey field's value. func (s *ItemCollectionMetrics) SetItemCollectionKey(v map[string]*AttributeValue) *ItemCollectionMetrics { s.ItemCollectionKey = v return s } // SetSizeEstimateRangeGB sets the SizeEstimateRangeGB field's value. func (s *ItemCollectionMetrics) SetSizeEstimateRangeGB(v []*float64) *ItemCollectionMetrics { s.SizeEstimateRangeGB = v return s } // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. type ItemCollectionSizeLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The total size of an item collection has exceeded the maximum limit of 10 // gigabytes. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemCollectionSizeLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemCollectionSizeLimitExceededException) GoString() string { return s.String() } func newErrorItemCollectionSizeLimitExceededException(v protocol.ResponseMetadata) error { return &ItemCollectionSizeLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ItemCollectionSizeLimitExceededException) Code() string { return "ItemCollectionSizeLimitExceededException" } // Message returns the exception's message. func (s *ItemCollectionSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ItemCollectionSizeLimitExceededException) OrigErr() error { return nil } func (s *ItemCollectionSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ItemCollectionSizeLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ItemCollectionSizeLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemResponse) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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. // // A KeySchemaElement represents exactly one attribute of the primary key. For // example, a simple primary key would be represented by one KeySchemaElement // (for the partition key). A composite primary key would require one KeySchemaElement // for the partition key, and another KeySchemaElement for the sort key. // // A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). // The data type must be one of String, Number, or Binary. The attribute cannot // be nested within a List or a Map. type KeySchemaElement struct { _ struct{} `type:"structure"` // The name of a key attribute. // // AttributeName is a required field AttributeName *string `min:"1" type:"string" required:"true"` // The role that this key attribute will assume: // // * HASH - partition key // // * RANGE - sort key // // The partition key of an item is also known as its hash attribute. The term // "hash attribute" derives from DynamoDB's usage of an internal hash function // to evenly distribute data items across partitions, based on their partition // key values. // // The sort key of an item is also known as its range attribute. The term "range // attribute" derives from the way DynamoDB stores items with the same partition // key physically close together, in sorted order by the sort key value. // // KeyType is a required field KeyType *string `type:"string" required:"true" enum:"KeyType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s KeySchemaElement) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s KeySchemaElement) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *KeySchemaElement) Validate() error { invalidParams := request.ErrInvalidParams{Context: "KeySchemaElement"} if s.AttributeName == nil { invalidParams.Add(request.NewErrParamRequired("AttributeName")) } if s.AttributeName != nil && len(*s.AttributeName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) } if s.KeyType == nil { invalidParams.Add(request.NewErrParamRequired("KeyType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributeName sets the AttributeName field's value. func (s *KeySchemaElement) SetAttributeName(v string) *KeySchemaElement { s.AttributeName = &v return s } // SetKeyType sets the KeyType field's value. func (s *KeySchemaElement) SetKeyType(v string) *KeySchemaElement { s.KeyType = &v return s } // Represents a set of primary keys and, for each key, the attributes to retrieve // from the table. // // For each primary key, you must provide all of the key attributes. For example, // with a simple primary key, you only need to provide the partition key. For // a composite primary key, you must provide both the partition key and the // sort key. type KeysAndAttributes struct { _ struct{} `type:"structure"` // This is a legacy parameter. Use ProjectionExpression instead. For more information, // see Legacy Conditional Parameters (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html) // in the Amazon DynamoDB Developer Guide. AttributesToGet []*string `min:"1" type:"list"` // The consistency of a read operation. If set to true, then a strongly consistent // read is used; otherwise, an eventually consistent read is used. ConsistentRead *bool `type:"boolean"` // One or more substitution tokens for attribute names in an expression. The // following are some use cases for using ExpressionAttributeNames: // // * To access an attribute whose name conflicts with a DynamoDB reserved // word. // // * To create a placeholder for repeating occurrences of an attribute name // in an expression. // // * To prevent special characters in an attribute name from being misinterpreted // in an expression. // // Use the # character in an expression to dereference an attribute name. For // example, consider the following attribute name: // // * Percentile // // The name of this attribute conflicts with a reserved word, so it cannot be // used directly in an expression. (For the complete list of reserved words, // see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide). To work around this, you could specify // the following for ExpressionAttributeNames: // // * {"#P":"Percentile"} // // You could then use this substitution in an expression, as in this example: // // * #P = :val // // Tokens that begin with the : character are expression attribute values, which // are placeholders for the actual value at runtime. // // For more information on expression attribute names, see Accessing Item Attributes // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeNames map[string]*string `type:"map"` // The primary key attribute values that define the items and the attributes // associated with the items. // // Keys is a required field Keys []map[string]*AttributeValue `min:"1" type:"list" required:"true"` // A string that identifies one or more attributes to retrieve from the table. // These attributes can include scalars, sets, or elements of a JSON document. // The attributes in the ProjectionExpression must be separated by commas. // // If no attribute names are specified, then all attributes will be returned. // If any of the requested attributes are not found, they will not appear in // the result. // // For more information, see Accessing Item Attributes (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ProjectionExpression *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s KeysAndAttributes) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s KeysAndAttributes) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *KeysAndAttributes) Validate() error { invalidParams := request.ErrInvalidParams{Context: "KeysAndAttributes"} if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 { invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1)) } if s.Keys == nil { invalidParams.Add(request.NewErrParamRequired("Keys")) } if s.Keys != nil && len(s.Keys) < 1 { invalidParams.Add(request.NewErrParamMinLen("Keys", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributesToGet sets the AttributesToGet field's value. func (s *KeysAndAttributes) SetAttributesToGet(v []*string) *KeysAndAttributes { s.AttributesToGet = v return s } // SetConsistentRead sets the ConsistentRead field's value. func (s *KeysAndAttributes) SetConsistentRead(v bool) *KeysAndAttributes { s.ConsistentRead = &v return s } // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. func (s *KeysAndAttributes) SetExpressionAttributeNames(v map[string]*string) *KeysAndAttributes { s.ExpressionAttributeNames = v return s } // SetKeys sets the Keys field's value. func (s *KeysAndAttributes) SetKeys(v []map[string]*AttributeValue) *KeysAndAttributes { s.Keys = v return s } // SetProjectionExpression sets the ProjectionExpression field's value. func (s *KeysAndAttributes) SetProjectionExpression(v string) *KeysAndAttributes { s.ProjectionExpression = &v return s } // Describes a Kinesis data stream destination. type KinesisDataStreamDestination struct { _ struct{} `type:"structure"` // The current status of replication. DestinationStatus *string `type:"string" enum:"DestinationStatus"` // The human-readable string that corresponds to the replica status. DestinationStatusDescription *string `type:"string"` // The ARN for a specific Kinesis data stream. StreamArn *string `min:"37" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s KinesisDataStreamDestination) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s KinesisDataStreamDestination) GoString() string { return s.String() } // SetDestinationStatus sets the DestinationStatus field's value. func (s *KinesisDataStreamDestination) SetDestinationStatus(v string) *KinesisDataStreamDestination { s.DestinationStatus = &v return s } // SetDestinationStatusDescription sets the DestinationStatusDescription field's value. func (s *KinesisDataStreamDestination) SetDestinationStatusDescription(v string) *KinesisDataStreamDestination { s.DestinationStatusDescription = &v return s } // SetStreamArn sets the StreamArn field's value. func (s *KinesisDataStreamDestination) SetStreamArn(v string) *KinesisDataStreamDestination { s.StreamArn = &v return s } // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. type LimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Too many operations for a given subscriber. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LimitExceededException) GoString() string { return s.String() } func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *LimitExceededException) OrigErr() error { return nil } func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *LimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *LimitExceededException) RequestID() string { return s.RespMetadata.RequestID } type ListBackupsInput struct { _ struct{} `type:"structure"` // The backups from the table specified by BackupType are listed. // // Where BackupType can be: // // * USER - On-demand backup created by you. (The default setting if no other // backup types are specified.) // // * SYSTEM - On-demand backup automatically created by DynamoDB. // // * ALL - All types of on-demand backups (USER and SYSTEM). BackupType *string `type:"string" enum:"BackupTypeFilter"` // LastEvaluatedBackupArn is the Amazon Resource Name (ARN) of the backup last // evaluated when the current page of results was returned, inclusive of the // current page of results. This value may be specified as the ExclusiveStartBackupArn // of a new ListBackups operation in order to fetch the next page of results. ExclusiveStartBackupArn *string `min:"37" type:"string"` // Maximum number of backups to return at once. Limit *int64 `min:"1" type:"integer"` // The backups from the table specified by TableName are listed. TableName *string `min:"3" type:"string"` // Only backups created after this time are listed. TimeRangeLowerBound is inclusive. TimeRangeLowerBound *time.Time `type:"timestamp"` // Only backups created before this time are listed. TimeRangeUpperBound is // exclusive. TimeRangeUpperBound *time.Time `type:"timestamp"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListBackupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListBackupsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListBackupsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListBackupsInput"} if s.ExclusiveStartBackupArn != nil && len(*s.ExclusiveStartBackupArn) < 37 { invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartBackupArn", 37)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } if s.TableName != nil && len(*s.TableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBackupType sets the BackupType field's value. func (s *ListBackupsInput) SetBackupType(v string) *ListBackupsInput { s.BackupType = &v return s } // SetExclusiveStartBackupArn sets the ExclusiveStartBackupArn field's value. func (s *ListBackupsInput) SetExclusiveStartBackupArn(v string) *ListBackupsInput { s.ExclusiveStartBackupArn = &v return s } // SetLimit sets the Limit field's value. func (s *ListBackupsInput) SetLimit(v int64) *ListBackupsInput { s.Limit = &v return s } // SetTableName sets the TableName field's value. func (s *ListBackupsInput) SetTableName(v string) *ListBackupsInput { s.TableName = &v return s } // SetTimeRangeLowerBound sets the TimeRangeLowerBound field's value. func (s *ListBackupsInput) SetTimeRangeLowerBound(v time.Time) *ListBackupsInput { s.TimeRangeLowerBound = &v return s } // SetTimeRangeUpperBound sets the TimeRangeUpperBound field's value. func (s *ListBackupsInput) SetTimeRangeUpperBound(v time.Time) *ListBackupsInput { s.TimeRangeUpperBound = &v return s } type ListBackupsOutput struct { _ struct{} `type:"structure"` // List of BackupSummary objects. BackupSummaries []*BackupSummary `type:"list"` // The ARN of the backup last evaluated when the current page of results was // returned, inclusive of the current page of results. This value may be specified // as the ExclusiveStartBackupArn of a new ListBackups operation in order to // fetch the next page of results. // // If LastEvaluatedBackupArn is empty, then the last page of results has been // processed and there are no more results to be retrieved. // // If LastEvaluatedBackupArn is not empty, this may or may not indicate that // there is more data to be returned. All results are guaranteed to have been // returned if and only if no value for LastEvaluatedBackupArn is returned. LastEvaluatedBackupArn *string `min:"37" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListBackupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListBackupsOutput) GoString() string { return s.String() } // SetBackupSummaries sets the BackupSummaries field's value. func (s *ListBackupsOutput) SetBackupSummaries(v []*BackupSummary) *ListBackupsOutput { s.BackupSummaries = v return s } // SetLastEvaluatedBackupArn sets the LastEvaluatedBackupArn field's value. func (s *ListBackupsOutput) SetLastEvaluatedBackupArn(v string) *ListBackupsOutput { s.LastEvaluatedBackupArn = &v return s } type ListContributorInsightsInput struct { _ struct{} `type:"structure"` // Maximum number of results to return per page. MaxResults *int64 `type:"integer"` // A token to for the desired page, if there is one. NextToken *string `type:"string"` // The name of the table. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListContributorInsightsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListContributorInsightsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListContributorInsightsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListContributorInsightsInput"} if s.TableName != nil && len(*s.TableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *ListContributorInsightsInput) SetMaxResults(v int64) *ListContributorInsightsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListContributorInsightsInput) SetNextToken(v string) *ListContributorInsightsInput { s.NextToken = &v return s } // SetTableName sets the TableName field's value. func (s *ListContributorInsightsInput) SetTableName(v string) *ListContributorInsightsInput { s.TableName = &v return s } type ListContributorInsightsOutput struct { _ struct{} `type:"structure"` // A list of ContributorInsightsSummary. ContributorInsightsSummaries []*ContributorInsightsSummary `type:"list"` // A token to go to the next page if there is one. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListContributorInsightsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListContributorInsightsOutput) GoString() string { return s.String() } // SetContributorInsightsSummaries sets the ContributorInsightsSummaries field's value. func (s *ListContributorInsightsOutput) SetContributorInsightsSummaries(v []*ContributorInsightsSummary) *ListContributorInsightsOutput { s.ContributorInsightsSummaries = v return s } // SetNextToken sets the NextToken field's value. func (s *ListContributorInsightsOutput) SetNextToken(v string) *ListContributorInsightsOutput { s.NextToken = &v return s } type ListExportsInput struct { _ struct{} `type:"structure"` // Maximum number of results to return per page. MaxResults *int64 `min:"1" type:"integer"` // An optional string that, if supplied, must be copied from the output of a // previous call to ListExports. When provided in this manner, the API fetches // the next page of results. NextToken *string `type:"string"` // The Amazon Resource Name (ARN) associated with the exported table. TableArn *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListExportsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListExportsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListExportsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListExportsInput"} 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 *ListExportsInput) SetMaxResults(v int64) *ListExportsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListExportsInput) SetNextToken(v string) *ListExportsInput { s.NextToken = &v return s } // SetTableArn sets the TableArn field's value. func (s *ListExportsInput) SetTableArn(v string) *ListExportsInput { s.TableArn = &v return s } type ListExportsOutput struct { _ struct{} `type:"structure"` // A list of ExportSummary objects. ExportSummaries []*ExportSummary `type:"list"` // If this value is returned, there are additional results to be displayed. // To retrieve them, call ListExports again, with NextToken set to this value. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListExportsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListExportsOutput) GoString() string { return s.String() } // SetExportSummaries sets the ExportSummaries field's value. func (s *ListExportsOutput) SetExportSummaries(v []*ExportSummary) *ListExportsOutput { s.ExportSummaries = v return s } // SetNextToken sets the NextToken field's value. func (s *ListExportsOutput) SetNextToken(v string) *ListExportsOutput { s.NextToken = &v return s } type ListGlobalTablesInput struct { _ struct{} `type:"structure"` // The first global table name that this operation will evaluate. ExclusiveStartGlobalTableName *string `min:"3" type:"string"` // The maximum number of table names to return, if the parameter is not specified // DynamoDB defaults to 100. // // If the number of global tables DynamoDB finds reaches this limit, it stops // the operation and returns the table names collected up to that point, with // a table name in the LastEvaluatedGlobalTableName to apply in a subsequent // operation to the ExclusiveStartGlobalTableName parameter. Limit *int64 `min:"1" type:"integer"` // Lists the global tables in a specific Region. RegionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListGlobalTablesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListGlobalTablesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListGlobalTablesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListGlobalTablesInput"} if s.ExclusiveStartGlobalTableName != nil && len(*s.ExclusiveStartGlobalTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartGlobalTableName", 3)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetExclusiveStartGlobalTableName sets the ExclusiveStartGlobalTableName field's value. func (s *ListGlobalTablesInput) SetExclusiveStartGlobalTableName(v string) *ListGlobalTablesInput { s.ExclusiveStartGlobalTableName = &v return s } // SetLimit sets the Limit field's value. func (s *ListGlobalTablesInput) SetLimit(v int64) *ListGlobalTablesInput { s.Limit = &v return s } // SetRegionName sets the RegionName field's value. func (s *ListGlobalTablesInput) SetRegionName(v string) *ListGlobalTablesInput { s.RegionName = &v return s } type ListGlobalTablesOutput struct { _ struct{} `type:"structure"` // List of global table names. GlobalTables []*GlobalTable `type:"list"` // Last evaluated global table name. LastEvaluatedGlobalTableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListGlobalTablesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListGlobalTablesOutput) GoString() string { return s.String() } // SetGlobalTables sets the GlobalTables field's value. func (s *ListGlobalTablesOutput) SetGlobalTables(v []*GlobalTable) *ListGlobalTablesOutput { s.GlobalTables = v return s } // SetLastEvaluatedGlobalTableName sets the LastEvaluatedGlobalTableName field's value. func (s *ListGlobalTablesOutput) SetLastEvaluatedGlobalTableName(v string) *ListGlobalTablesOutput { s.LastEvaluatedGlobalTableName = &v return s } type ListImportsInput struct { _ struct{} `type:"structure"` // An optional string that, if supplied, must be copied from the output of a // previous call to ListImports. When provided in this manner, the API fetches // the next page of results. NextToken *string `min:"112" type:"string"` // The number of ImportSummary objects returned in a single page. PageSize *int64 `min:"1" type:"integer"` // The Amazon Resource Name (ARN) associated with the table that was imported // to. TableArn *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListImportsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListImportsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListImportsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListImportsInput"} if s.NextToken != nil && len(*s.NextToken) < 112 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 112)) } if s.PageSize != nil && *s.PageSize < 1 { invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetNextToken sets the NextToken field's value. func (s *ListImportsInput) SetNextToken(v string) *ListImportsInput { s.NextToken = &v return s } // SetPageSize sets the PageSize field's value. func (s *ListImportsInput) SetPageSize(v int64) *ListImportsInput { s.PageSize = &v return s } // SetTableArn sets the TableArn field's value. func (s *ListImportsInput) SetTableArn(v string) *ListImportsInput { s.TableArn = &v return s } type ListImportsOutput struct { _ struct{} `type:"structure"` // A list of ImportSummary objects. ImportSummaryList []*ImportSummary `type:"list"` // If this value is returned, there are additional results to be displayed. // To retrieve them, call ListImports again, with NextToken set to this value. NextToken *string `min:"112" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListImportsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListImportsOutput) GoString() string { return s.String() } // SetImportSummaryList sets the ImportSummaryList field's value. func (s *ListImportsOutput) SetImportSummaryList(v []*ImportSummary) *ListImportsOutput { s.ImportSummaryList = v return s } // SetNextToken sets the NextToken field's value. func (s *ListImportsOutput) SetNextToken(v string) *ListImportsOutput { s.NextToken = &v return s } // Represents the input of a ListTables operation. type ListTablesInput struct { _ struct{} `type:"structure"` // The first table name that this operation will evaluate. Use the value that // was returned for LastEvaluatedTableName in a previous operation, so that // you can obtain the next page of results. ExclusiveStartTableName *string `min:"3" type:"string"` // A maximum number of table names to return. If this parameter is not specified, // the limit is 100. Limit *int64 `min:"1" type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTablesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTablesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListTablesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListTablesInput"} if s.ExclusiveStartTableName != nil && len(*s.ExclusiveStartTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTableName", 3)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetExclusiveStartTableName sets the ExclusiveStartTableName field's value. func (s *ListTablesInput) SetExclusiveStartTableName(v string) *ListTablesInput { s.ExclusiveStartTableName = &v return s } // SetLimit sets the Limit field's value. func (s *ListTablesInput) SetLimit(v int64) *ListTablesInput { s.Limit = &v return s } // Represents the output of a ListTables operation. type ListTablesOutput struct { _ struct{} `type:"structure"` // The name of the last table in the current page of results. Use this value // as the ExclusiveStartTableName in a new request to obtain the next page of // results, until all the table names are returned. // // If you do not receive a LastEvaluatedTableName value in the response, this // means that there are no more table names to be retrieved. LastEvaluatedTableName *string `min:"3" type:"string"` // The names of the tables associated with the current account at the current // endpoint. The maximum size of this array is 100. // // If LastEvaluatedTableName also appears in the output, you can use this value // as the ExclusiveStartTableName parameter in a subsequent ListTables request // and obtain the next page of results. TableNames []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTablesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTablesOutput) GoString() string { return s.String() } // SetLastEvaluatedTableName sets the LastEvaluatedTableName field's value. func (s *ListTablesOutput) SetLastEvaluatedTableName(v string) *ListTablesOutput { s.LastEvaluatedTableName = &v return s } // SetTableNames sets the TableNames field's value. func (s *ListTablesOutput) SetTableNames(v []*string) *ListTablesOutput { s.TableNames = v return s } type ListTagsOfResourceInput struct { _ struct{} `type:"structure"` // An optional string that, if supplied, must be copied from the output of a // previous call to ListTagOfResource. When provided in this manner, this API // fetches the next page of results. NextToken *string `type:"string"` // The Amazon DynamoDB resource with tags to be listed. This value is an Amazon // Resource Name (ARN). // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTagsOfResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTagsOfResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListTagsOfResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListTagsOfResourceInput"} 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 } // SetNextToken sets the NextToken field's value. func (s *ListTagsOfResourceInput) SetNextToken(v string) *ListTagsOfResourceInput { s.NextToken = &v return s } // SetResourceArn sets the ResourceArn field's value. func (s *ListTagsOfResourceInput) SetResourceArn(v string) *ListTagsOfResourceInput { s.ResourceArn = &v return s } type ListTagsOfResourceOutput struct { _ struct{} `type:"structure"` // If this value is returned, there are additional results to be displayed. // To retrieve them, call ListTagsOfResource again, with NextToken set to this // value. NextToken *string `type:"string"` // The tags currently associated with the Amazon DynamoDB resource. Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTagsOfResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTagsOfResourceOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListTagsOfResourceOutput) SetNextToken(v string) *ListTagsOfResourceOutput { s.NextToken = &v return s } // SetTags sets the Tags field's value. func (s *ListTagsOfResourceOutput) SetTags(v []*Tag) *ListTagsOfResourceOutput { s.Tags = v return s } // Represents the properties of a local secondary index. type LocalSecondaryIndex struct { _ struct{} `type:"structure"` // The name of the local secondary index. The name must be unique among all // other indexes on this table. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` // The complete key schema for the local secondary index, consisting of one // or more pairs of attribute names and key types: // // * HASH - partition key // // * RANGE - sort key // // The partition key of an item is also known as its hash attribute. The term // "hash attribute" derives from DynamoDB's usage of an internal hash function // to evenly distribute data items across partitions, based on their partition // key values. // // The sort key of an item is also known as its range attribute. The term "range // attribute" derives from the way DynamoDB stores items with the same partition // key physically close together, in sorted order by the sort key value. // // KeySchema is a required field KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` // Represents attributes that are copied (projected) from the table into the // local secondary index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. // // Projection is a required field Projection *Projection `type:"structure" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LocalSecondaryIndex) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LocalSecondaryIndex) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *LocalSecondaryIndex) Validate() error { invalidParams := request.ErrInvalidParams{Context: "LocalSecondaryIndex"} if s.IndexName == nil { invalidParams.Add(request.NewErrParamRequired("IndexName")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.KeySchema == nil { invalidParams.Add(request.NewErrParamRequired("KeySchema")) } if s.KeySchema != nil && len(s.KeySchema) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) } if s.Projection == nil { invalidParams.Add(request.NewErrParamRequired("Projection")) } if s.KeySchema != nil { for i, v := range s.KeySchema { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) } } } if s.Projection != nil { if err := s.Projection.Validate(); err != nil { invalidParams.AddNested("Projection", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *LocalSecondaryIndex) SetIndexName(v string) *LocalSecondaryIndex { s.IndexName = &v return s } // SetKeySchema sets the KeySchema field's value. func (s *LocalSecondaryIndex) SetKeySchema(v []*KeySchemaElement) *LocalSecondaryIndex { s.KeySchema = v return s } // SetProjection sets the Projection field's value. func (s *LocalSecondaryIndex) SetProjection(v *Projection) *LocalSecondaryIndex { s.Projection = v return s } // Represents the properties of a local secondary index. type LocalSecondaryIndexDescription struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) that uniquely identifies the index. IndexArn *string `type:"string"` // Represents the name of the local secondary index. IndexName *string `min:"3" type:"string"` // The total size of the specified index, in bytes. DynamoDB updates this value // approximately every six hours. Recent changes might not be reflected in this // value. IndexSizeBytes *int64 `type:"long"` // The number of items in the specified index. DynamoDB updates this value approximately // every six hours. Recent changes might not be reflected in this value. ItemCount *int64 `type:"long"` // The complete key schema for the local secondary index, consisting of one // or more pairs of attribute names and key types: // // * HASH - partition key // // * RANGE - sort key // // The partition key of an item is also known as its hash attribute. The term // "hash attribute" derives from DynamoDB's usage of an internal hash function // to evenly distribute data items across partitions, based on their partition // key values. // // The sort key of an item is also known as its range attribute. The term "range // attribute" derives from the way DynamoDB stores items with the same partition // key physically close together, in sorted order by the sort key value. KeySchema []*KeySchemaElement `min:"1" type:"list"` // Represents attributes that are copied (projected) from the table into the // global secondary index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. Projection *Projection `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LocalSecondaryIndexDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LocalSecondaryIndexDescription) GoString() string { return s.String() } // SetIndexArn sets the IndexArn field's value. func (s *LocalSecondaryIndexDescription) SetIndexArn(v string) *LocalSecondaryIndexDescription { s.IndexArn = &v return s } // SetIndexName sets the IndexName field's value. func (s *LocalSecondaryIndexDescription) SetIndexName(v string) *LocalSecondaryIndexDescription { s.IndexName = &v return s } // SetIndexSizeBytes sets the IndexSizeBytes field's value. func (s *LocalSecondaryIndexDescription) SetIndexSizeBytes(v int64) *LocalSecondaryIndexDescription { s.IndexSizeBytes = &v return s } // SetItemCount sets the ItemCount field's value. func (s *LocalSecondaryIndexDescription) SetItemCount(v int64) *LocalSecondaryIndexDescription { s.ItemCount = &v return s } // SetKeySchema sets the KeySchema field's value. func (s *LocalSecondaryIndexDescription) SetKeySchema(v []*KeySchemaElement) *LocalSecondaryIndexDescription { s.KeySchema = v return s } // SetProjection sets the Projection field's value. func (s *LocalSecondaryIndexDescription) SetProjection(v *Projection) *LocalSecondaryIndexDescription { s.Projection = v return s } // Represents the properties of a local secondary index for the table when the // backup was created. type LocalSecondaryIndexInfo struct { _ struct{} `type:"structure"` // Represents the name of the local secondary index. IndexName *string `min:"3" type:"string"` // The complete key schema for a local secondary index, which consists of one // or more pairs of attribute names and key types: // // * HASH - partition key // // * RANGE - sort key // // The partition key of an item is also known as its hash attribute. The term // "hash attribute" derives from DynamoDB's usage of an internal hash function // to evenly distribute data items across partitions, based on their partition // key values. // // The sort key of an item is also known as its range attribute. The term "range // attribute" derives from the way DynamoDB stores items with the same partition // key physically close together, in sorted order by the sort key value. KeySchema []*KeySchemaElement `min:"1" type:"list"` // Represents attributes that are copied (projected) from the table into the // global secondary index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. Projection *Projection `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LocalSecondaryIndexInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LocalSecondaryIndexInfo) GoString() string { return s.String() } // SetIndexName sets the IndexName field's value. func (s *LocalSecondaryIndexInfo) SetIndexName(v string) *LocalSecondaryIndexInfo { s.IndexName = &v return s } // SetKeySchema sets the KeySchema field's value. func (s *LocalSecondaryIndexInfo) SetKeySchema(v []*KeySchemaElement) *LocalSecondaryIndexInfo { s.KeySchema = v return s } // SetProjection sets the Projection field's value. func (s *LocalSecondaryIndexInfo) SetProjection(v *Projection) *LocalSecondaryIndexInfo { s.Projection = v return s } // Represents a PartiQL statment that uses parameters. type ParameterizedStatement struct { _ struct{} `type:"structure"` // The parameter values. Parameters []*AttributeValue `min:"1" type:"list"` // An optional parameter that returns the item attributes for a PartiQL ParameterizedStatement // operation that failed a condition check. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` // A PartiQL statment that uses parameters. // // Statement is a required field Statement *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterizedStatement) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterizedStatement) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ParameterizedStatement) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ParameterizedStatement"} if s.Parameters != nil && len(s.Parameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) } if s.Statement == nil { invalidParams.Add(request.NewErrParamRequired("Statement")) } if s.Statement != nil && len(*s.Statement) < 1 { invalidParams.Add(request.NewErrParamMinLen("Statement", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetParameters sets the Parameters field's value. func (s *ParameterizedStatement) SetParameters(v []*AttributeValue) *ParameterizedStatement { s.Parameters = v return s } // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. func (s *ParameterizedStatement) SetReturnValuesOnConditionCheckFailure(v string) *ParameterizedStatement { s.ReturnValuesOnConditionCheckFailure = &v return s } // SetStatement sets the Statement field's value. func (s *ParameterizedStatement) SetStatement(v string) *ParameterizedStatement { s.Statement = &v return s } // The description of the point in time settings applied to the table. type PointInTimeRecoveryDescription struct { _ struct{} `type:"structure"` // Specifies the earliest point in time you can restore your table to. You can // restore your table to any point in time during the last 35 days. EarliestRestorableDateTime *time.Time `type:"timestamp"` // LatestRestorableDateTime is typically 5 minutes before the current time. LatestRestorableDateTime *time.Time `type:"timestamp"` // The current state of point in time recovery: // // * ENABLED - Point in time recovery is enabled. // // * DISABLED - Point in time recovery is disabled. PointInTimeRecoveryStatus *string `type:"string" enum:"PointInTimeRecoveryStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PointInTimeRecoveryDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PointInTimeRecoveryDescription) GoString() string { return s.String() } // SetEarliestRestorableDateTime sets the EarliestRestorableDateTime field's value. func (s *PointInTimeRecoveryDescription) SetEarliestRestorableDateTime(v time.Time) *PointInTimeRecoveryDescription { s.EarliestRestorableDateTime = &v return s } // SetLatestRestorableDateTime sets the LatestRestorableDateTime field's value. func (s *PointInTimeRecoveryDescription) SetLatestRestorableDateTime(v time.Time) *PointInTimeRecoveryDescription { s.LatestRestorableDateTime = &v return s } // SetPointInTimeRecoveryStatus sets the PointInTimeRecoveryStatus field's value. func (s *PointInTimeRecoveryDescription) SetPointInTimeRecoveryStatus(v string) *PointInTimeRecoveryDescription { s.PointInTimeRecoveryStatus = &v return s } // Represents the settings used to enable point in time recovery. type PointInTimeRecoverySpecification struct { _ struct{} `type:"structure"` // Indicates whether point in time recovery is enabled (true) or disabled (false) // on the table. // // PointInTimeRecoveryEnabled is a required field PointInTimeRecoveryEnabled *bool `type:"boolean" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PointInTimeRecoverySpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PointInTimeRecoverySpecification) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PointInTimeRecoverySpecification) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PointInTimeRecoverySpecification"} if s.PointInTimeRecoveryEnabled == nil { invalidParams.Add(request.NewErrParamRequired("PointInTimeRecoveryEnabled")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetPointInTimeRecoveryEnabled sets the PointInTimeRecoveryEnabled field's value. func (s *PointInTimeRecoverySpecification) SetPointInTimeRecoveryEnabled(v bool) *PointInTimeRecoverySpecification { s.PointInTimeRecoveryEnabled = &v return s } // Point in time recovery has not yet been enabled for this source table. type PointInTimeRecoveryUnavailableException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PointInTimeRecoveryUnavailableException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PointInTimeRecoveryUnavailableException) GoString() string { return s.String() } func newErrorPointInTimeRecoveryUnavailableException(v protocol.ResponseMetadata) error { return &PointInTimeRecoveryUnavailableException{ RespMetadata: v, } } // Code returns the exception type name. func (s *PointInTimeRecoveryUnavailableException) Code() string { return "PointInTimeRecoveryUnavailableException" } // Message returns the exception's message. func (s *PointInTimeRecoveryUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *PointInTimeRecoveryUnavailableException) OrigErr() error { return nil } func (s *PointInTimeRecoveryUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *PointInTimeRecoveryUnavailableException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *PointInTimeRecoveryUnavailableException) RequestID() string { return s.RespMetadata.RequestID } // Represents attributes that are copied (projected) from the table into an // index. These are in addition to the primary key attributes and index key // attributes, which are automatically projected. type Projection struct { _ struct{} `type:"structure"` // Represents the non-key attribute names which will be projected into the index. // // For local secondary indexes, the total count of NonKeyAttributes summed across // all of the local secondary indexes, must not exceed 100. If you project the // same attribute into two different indexes, this counts as two distinct attributes // when determining the total. NonKeyAttributes []*string `min:"1" type:"list"` // The set of attributes that are projected into the index: // // * KEYS_ONLY - Only the index and primary keys are projected into the index. // // * INCLUDE - In addition to the attributes described in KEYS_ONLY, the // secondary index will include other non-key attributes that you specify. // // * ALL - All of the table attributes are projected into the index. ProjectionType *string `type:"string" enum:"ProjectionType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Projection) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Projection) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Projection) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Projection"} if s.NonKeyAttributes != nil && len(s.NonKeyAttributes) < 1 { invalidParams.Add(request.NewErrParamMinLen("NonKeyAttributes", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetNonKeyAttributes sets the NonKeyAttributes field's value. func (s *Projection) SetNonKeyAttributes(v []*string) *Projection { s.NonKeyAttributes = v return s } // SetProjectionType sets the ProjectionType field's value. func (s *Projection) SetProjectionType(v string) *Projection { s.ProjectionType = &v return s } // Represents the provisioned throughput settings for a specified table or index. // The settings can be modified using the UpdateTable operation. // // For current minimum and maximum provisioned throughput values, see Service, // Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. type ProvisionedThroughput struct { _ struct{} `type:"structure"` // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. For more information, see Specifying // Read and Write Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html) // 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"` // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. For more information, see Specifying Read and Write // Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html) // 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"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvisionedThroughput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvisionedThroughput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ProvisionedThroughput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ProvisionedThroughput"} if s.ReadCapacityUnits == nil { invalidParams.Add(request.NewErrParamRequired("ReadCapacityUnits")) } if s.ReadCapacityUnits != nil && *s.ReadCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("ReadCapacityUnits", 1)) } if s.WriteCapacityUnits == nil { invalidParams.Add(request.NewErrParamRequired("WriteCapacityUnits")) } if s.WriteCapacityUnits != nil && *s.WriteCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("WriteCapacityUnits", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetReadCapacityUnits sets the ReadCapacityUnits field's value. func (s *ProvisionedThroughput) SetReadCapacityUnits(v int64) *ProvisionedThroughput { s.ReadCapacityUnits = &v return s } // SetWriteCapacityUnits sets the WriteCapacityUnits field's value. func (s *ProvisionedThroughput) SetWriteCapacityUnits(v int64) *ProvisionedThroughput { s.WriteCapacityUnits = &v return s } // Represents the provisioned throughput settings for the table, consisting // of read and write capacity units, along with data about increases and decreases. type ProvisionedThroughputDescription struct { _ struct{} `type:"structure"` // The date and time of the last provisioned throughput decrease for this table. LastDecreaseDateTime *time.Time `type:"timestamp"` // The date and time of the last provisioned throughput increase for this table. LastIncreaseDateTime *time.Time `type:"timestamp"` // The number of provisioned throughput decreases for this table during this // UTC calendar day. For current maximums on provisioned throughput decreases, // see Service, Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. NumberOfDecreasesToday *int64 `min:"1" type:"long"` // The maximum number of strongly consistent reads consumed per second before // 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 `type:"long"` // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. WriteCapacityUnits *int64 `type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvisionedThroughputDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvisionedThroughputDescription) GoString() string { return s.String() } // SetLastDecreaseDateTime sets the LastDecreaseDateTime field's value. func (s *ProvisionedThroughputDescription) SetLastDecreaseDateTime(v time.Time) *ProvisionedThroughputDescription { s.LastDecreaseDateTime = &v return s } // SetLastIncreaseDateTime sets the LastIncreaseDateTime field's value. func (s *ProvisionedThroughputDescription) SetLastIncreaseDateTime(v time.Time) *ProvisionedThroughputDescription { s.LastIncreaseDateTime = &v return s } // SetNumberOfDecreasesToday sets the NumberOfDecreasesToday field's value. func (s *ProvisionedThroughputDescription) SetNumberOfDecreasesToday(v int64) *ProvisionedThroughputDescription { s.NumberOfDecreasesToday = &v return s } // SetReadCapacityUnits sets the ReadCapacityUnits field's value. func (s *ProvisionedThroughputDescription) SetReadCapacityUnits(v int64) *ProvisionedThroughputDescription { s.ReadCapacityUnits = &v return s } // SetWriteCapacityUnits sets the WriteCapacityUnits field's value. func (s *ProvisionedThroughputDescription) SetWriteCapacityUnits(v int64) *ProvisionedThroughputDescription { s.WriteCapacityUnits = &v return s } // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. type ProvisionedThroughputExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You exceeded your maximum allowed provisioned throughput. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvisionedThroughputExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvisionedThroughputExceededException) GoString() string { return s.String() } func newErrorProvisionedThroughputExceededException(v protocol.ResponseMetadata) error { return &ProvisionedThroughputExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ProvisionedThroughputExceededException) Code() string { return "ProvisionedThroughputExceededException" } // Message returns the exception's message. func (s *ProvisionedThroughputExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ProvisionedThroughputExceededException) OrigErr() error { return nil } func (s *ProvisionedThroughputExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ProvisionedThroughputExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ProvisionedThroughputExceededException) RequestID() string { return s.RespMetadata.RequestID } // Replica-specific provisioned throughput settings. If not specified, uses // the source table's provisioned throughput settings. type ProvisionedThroughputOverride struct { _ struct{} `type:"structure"` // Replica-specific read capacity units. If not specified, uses the source table's // read capacity settings. ReadCapacityUnits *int64 `min:"1" type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvisionedThroughputOverride) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvisionedThroughputOverride) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ProvisionedThroughputOverride) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ProvisionedThroughputOverride"} if s.ReadCapacityUnits != nil && *s.ReadCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("ReadCapacityUnits", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetReadCapacityUnits sets the ReadCapacityUnits field's value. func (s *ProvisionedThroughputOverride) SetReadCapacityUnits(v int64) *ProvisionedThroughputOverride { s.ReadCapacityUnits = &v 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Put) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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"` // A condition that must be satisfied in order for a conditional PutItem operation // to succeed. // // An expression can contain any of the following: // // * Functions: attribute_exists | attribute_not_exists | attribute_type // | contains | begins_with | size These function names are case-sensitive. // // * Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN // // * Logical operators: AND | OR | NOT // // For more information on condition expressions, see Condition Expressions // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html) // in the Amazon DynamoDB Developer Guide. ConditionExpression *string `type:"string"` // This is a legacy parameter. Use ConditionExpression instead. For more information, // see ConditionalOperator (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html) // in the Amazon DynamoDB Developer Guide. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"` // This is a legacy parameter. Use ConditionExpression instead. For more information, // see Expected (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html) // in the Amazon DynamoDB Developer Guide. Expected map[string]*ExpectedAttributeValue `type:"map"` // One or more substitution tokens for attribute names in an expression. The // following are some use cases for using ExpressionAttributeNames: // // * To access an attribute whose name conflicts with a DynamoDB reserved // word. // // * To create a placeholder for repeating occurrences of an attribute name // in an expression. // // * To prevent special characters in an attribute name from being misinterpreted // in an expression. // // Use the # character in an expression to dereference an attribute name. For // example, consider the following attribute name: // // * Percentile // // The name of this attribute conflicts with a reserved word, so it cannot be // used directly in an expression. (For the complete list of reserved words, // see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide). To work around this, you could specify // the following for ExpressionAttributeNames: // // * {"#P":"Percentile"} // // You could then use this substitution in an expression, as in this example: // // * #P = :val // // Tokens that begin with the : character are expression attribute values, which // are placeholders for the actual value at runtime. // // For more information on expression attribute names, see Specifying Item Attributes // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeNames map[string]*string `type:"map"` // One or more values that can be substituted in an expression. // // Use the : (colon) character in an expression to dereference an attribute // value. For example, suppose that you wanted to check whether the value of // the ProductStatus attribute was one of the following: // // Available | Backordered | Discontinued // // You would first need to specify ExpressionAttributeValues as follows: // // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} // } // // You could then use these values in an expression, such as this: // // ProductStatus IN (:avail, :back, :disc) // // For more information on expression attribute values, see Condition Expressions // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeValues map[string]*AttributeValue `type:"map"` // A map of attribute name/value pairs, one for each attribute. Only the primary // key attributes are required; you can optionally provide other attribute name-value // pairs for the item. // // You must provide all of the attributes for the primary key. For example, // with a simple primary key, you only need to provide a value for the partition // key. For a composite primary key, you must provide both values for both the // partition key and the sort key. // // If you specify any attributes that are part of an index key, then the data // types for those attributes must match those of the schema in the table's // attribute definition. // // Empty String and Binary attribute values are allowed. Attribute values of // type String and Binary must have a length greater than zero if the attribute // is used as a key attribute for a table or index. // // For more information about primary keys, see Primary Key (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey) // in the Amazon DynamoDB Developer Guide. // // Each element in the Item map is an AttributeValue object. // // Item is a required field Item map[string]*AttributeValue `type:"map" required:"true"` // Determines the level of detail about either provisioned or on-demand 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 are returned in the response. If set to NONE // (the default), no statistics are returned. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appeared // before they were updated with the PutItem request. For PutItem, the valid // values are: // // * NONE - If ReturnValues is not specified, or if its value is NONE, then // nothing is returned. (This setting is the default for ReturnValues.) // // * ALL_OLD - If PutItem overwrote an attribute name-value pair, then the // content of the old item is returned. // // The values returned are strongly consistent. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. // // The ReturnValues parameter is used by several DynamoDB operations; however, // PutItem does not recognize any values other than NONE or ALL_OLD. ReturnValues *string `type:"string" enum:"ReturnValue"` // An optional parameter that returns the item attributes for a PutItem operation // that failed a condition check. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` // The name of the table to contain the item. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutItemInput"} 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 *PutItemInput) SetConditionExpression(v string) *PutItemInput { s.ConditionExpression = &v return s } // SetConditionalOperator sets the ConditionalOperator field's value. func (s *PutItemInput) SetConditionalOperator(v string) *PutItemInput { s.ConditionalOperator = &v return s } // SetExpected sets the Expected field's value. func (s *PutItemInput) SetExpected(v map[string]*ExpectedAttributeValue) *PutItemInput { s.Expected = v return s } // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. func (s *PutItemInput) SetExpressionAttributeNames(v map[string]*string) *PutItemInput { s.ExpressionAttributeNames = v return s } // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. func (s *PutItemInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *PutItemInput { s.ExpressionAttributeValues = v return s } // SetItem sets the Item field's value. func (s *PutItemInput) SetItem(v map[string]*AttributeValue) *PutItemInput { s.Item = v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *PutItemInput) SetReturnConsumedCapacity(v string) *PutItemInput { s.ReturnConsumedCapacity = &v return s } // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value. func (s *PutItemInput) SetReturnItemCollectionMetrics(v string) *PutItemInput { s.ReturnItemCollectionMetrics = &v return s } // SetReturnValues sets the ReturnValues field's value. func (s *PutItemInput) SetReturnValues(v string) *PutItemInput { s.ReturnValues = &v return s } // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. func (s *PutItemInput) SetReturnValuesOnConditionCheckFailure(v string) *PutItemInput { s.ReturnValuesOnConditionCheckFailure = &v return s } // SetTableName sets the TableName field's value. func (s *PutItemInput) SetTableName(v string) *PutItemInput { s.TableName = &v return s } // Represents the output of a PutItem operation. type PutItemOutput struct { _ struct{} `type:"structure"` // The attribute values as they appeared before the PutItem operation, but only // if ReturnValues is specified as ALL_OLD in the request. Each element consists // of an attribute name and an attribute value. Attributes map[string]*AttributeValue `type:"map"` // The capacity units consumed by the PutItem 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 if the ReturnConsumedCapacity parameter was specified. For more // information, see Provisioned Throughput (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html) // in the Amazon DynamoDB Developer Guide. ConsumedCapacity *ConsumedCapacity `type:"structure"` // Information about item collections, if any, that were affected by the PutItem // operation. ItemCollectionMetrics is only returned if the ReturnItemCollectionMetrics // parameter was specified. If the table does not have any local secondary indexes, // this information is not returned in the response. // // Each ItemCollectionMetrics element consists of: // // * ItemCollectionKey - The partition key value of the item collection. // This is the same as the partition key value of the item itself. // // * SizeEstimateRangeGB - An estimate of item collection size, in gigabytes. // This value is a two-element array containing a lower bound and an upper // bound for the estimate. The estimate includes the size of all the items // in the table, plus the size of all attributes projected into all of the // local secondary indexes on that table. Use this estimate to measure whether // a local secondary index is approaching its size limit. The estimate is // subject to change over time; therefore, do not rely on the precision or // accuracy of the estimate. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutItemOutput) GoString() string { return s.String() } // SetAttributes sets the Attributes field's value. func (s *PutItemOutput) SetAttributes(v map[string]*AttributeValue) *PutItemOutput { s.Attributes = v return s } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *PutItemOutput) SetConsumedCapacity(v *ConsumedCapacity) *PutItemOutput { s.ConsumedCapacity = v return s } // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value. func (s *PutItemOutput) SetItemCollectionMetrics(v *ItemCollectionMetrics) *PutItemOutput { s.ItemCollectionMetrics = v return s } // Represents a request to perform a PutItem operation on an item. type PutRequest struct { _ struct{} `type:"structure"` // A map of attribute name to attribute values, representing the primary key // of an item to be processed 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"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutRequest) GoString() string { return s.String() } // SetItem sets the Item field's value. func (s *PutRequest) SetItem(v map[string]*AttributeValue) *PutRequest { s.Item = v return s } // Represents the input of a Query operation. type QueryInput struct { _ struct{} `type:"structure"` // This is a legacy parameter. Use ProjectionExpression instead. For more information, // see AttributesToGet (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html) // in the Amazon DynamoDB Developer Guide. AttributesToGet []*string `min:"1" type:"list"` // This is a legacy parameter. Use FilterExpression instead. For more information, // see ConditionalOperator (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html) // in the Amazon DynamoDB Developer Guide. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"` // Determines the read consistency model: If set to true, then the operation // uses strongly consistent reads; otherwise, the operation uses eventually // consistent reads. // // Strongly consistent reads are not supported on global secondary indexes. // If you query a global secondary index with ConsistentRead set to true, you // will receive a ValidationException. ConsistentRead *bool `type:"boolean"` // The primary key of the first item that this operation will evaluate. Use // the value that was returned for LastEvaluatedKey in the previous operation. // // The data type for ExclusiveStartKey must be String, Number, or Binary. No // set data types are allowed. ExclusiveStartKey map[string]*AttributeValue `type:"map"` // One or more substitution tokens for attribute names in an expression. The // following are some use cases for using ExpressionAttributeNames: // // * To access an attribute whose name conflicts with a DynamoDB reserved // word. // // * To create a placeholder for repeating occurrences of an attribute name // in an expression. // // * To prevent special characters in an attribute name from being misinterpreted // in an expression. // // Use the # character in an expression to dereference an attribute name. For // example, consider the following attribute name: // // * Percentile // // The name of this attribute conflicts with a reserved word, so it cannot be // used directly in an expression. (For the complete list of reserved words, // see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide). To work around this, you could specify // the following for ExpressionAttributeNames: // // * {"#P":"Percentile"} // // You could then use this substitution in an expression, as in this example: // // * #P = :val // // Tokens that begin with the : character are expression attribute values, which // are placeholders for the actual value at runtime. // // For more information on expression attribute names, see Specifying Item Attributes // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeNames map[string]*string `type:"map"` // One or more values that can be substituted in an expression. // // Use the : (colon) character in an expression to dereference an attribute // value. For example, suppose that you wanted to check whether the value of // the ProductStatus attribute was one of the following: // // Available | Backordered | Discontinued // // You would first need to specify ExpressionAttributeValues as follows: // // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} // } // // You could then use these values in an expression, such as this: // // ProductStatus IN (:avail, :back, :disc) // // For more information on expression attribute values, see Specifying Conditions // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeValues map[string]*AttributeValue `type:"map"` // A string that contains conditions that DynamoDB applies after the Query operation, // but before the data is returned to you. Items that do not satisfy the FilterExpression // criteria are not returned. // // A FilterExpression does not allow key attributes. You cannot define a filter // expression based on a partition key or a sort key. // // A FilterExpression is applied after the items have already been read; the // process of filtering does not consume any additional read capacity units. // // For more information, see Filter Expressions (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Query.FilterExpression) // in the Amazon DynamoDB Developer Guide. FilterExpression *string `type:"string"` // The name of an index to query. This index can be any local secondary index // or global secondary index on the table. Note that if you use the IndexName // parameter, you must also provide TableName. IndexName *string `min:"3" type:"string"` // The condition that specifies the key values for items to be retrieved by // the Query action. // // The condition must perform an equality test on a single partition key value. // // The condition can optionally perform one of several comparison tests on a // single sort key value. This allows Query to retrieve one item with a given // partition key value and sort key value, or several items that have the same // partition key value but different sort key values. // // The partition key equality test is required, and must be specified in the // following format: // // partitionKeyName = :partitionkeyval // // If you also want to provide a condition for the sort key, it must be combined // using AND with the condition for the sort key. Following is an example, using // the = comparison operator for the sort key: // // partitionKeyName = :partitionkeyval AND sortKeyName = :sortkeyval // // Valid comparisons for the sort key condition are as follows: // // * sortKeyName = :sortkeyval - true if the sort key value is equal to :sortkeyval. // // * sortKeyName < :sortkeyval - true if the sort key value is less than // :sortkeyval. // // * sortKeyName <= :sortkeyval - true if the sort key value is less than // or equal to :sortkeyval. // // * sortKeyName > :sortkeyval - true if the sort key value is greater than // :sortkeyval. // // * sortKeyName >= :sortkeyval - true if the sort key value is greater than // or equal to :sortkeyval. // // * sortKeyName BETWEEN :sortkeyval1 AND :sortkeyval2 - true if the sort // key value is greater than or equal to :sortkeyval1, and less than or equal // to :sortkeyval2. // // * begins_with ( sortKeyName, :sortkeyval ) - true if the sort key value // begins with a particular operand. (You cannot use this function with a // sort key that is of type Number.) Note that the function name begins_with // is case-sensitive. // // Use the ExpressionAttributeValues parameter to replace tokens such as :partitionval // and :sortval with actual values at runtime. // // You can optionally use the ExpressionAttributeNames parameter to replace // the names of the partition key and sort key with placeholder tokens. This // option might be necessary if an attribute name conflicts with a DynamoDB // reserved word. For example, the following KeyConditionExpression parameter // causes an error because Size is a reserved word: // // * Size = :myval // // To work around this, define a placeholder (such a #S) to represent the attribute // name Size. KeyConditionExpression then is as follows: // // * #S = :myval // // For a list of reserved words, see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide. // // For more information on ExpressionAttributeNames and ExpressionAttributeValues, // see Using Placeholders for Attribute Names and Values (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html) // in the Amazon DynamoDB Developer Guide. KeyConditionExpression *string `type:"string"` // This is a legacy parameter. Use KeyConditionExpression instead. For more // information, see KeyConditions (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.KeyConditions.html) // in the Amazon DynamoDB Developer Guide. KeyConditions map[string]*Condition `type:"map"` // The maximum number of items to evaluate (not necessarily the number of matching // items). If DynamoDB processes the number of items up to the limit while processing // the results, it stops the operation and returns the matching values up to // that point, and a key in LastEvaluatedKey to apply in a subsequent operation, // so that you can pick up where you left off. Also, if the processed dataset // size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation // and returns the matching values up to the limit, and a key in LastEvaluatedKey // to apply in a subsequent operation to continue the operation. For more information, // see Query and Scan (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html) // in the Amazon DynamoDB Developer Guide. Limit *int64 `min:"1" type:"integer"` // A string that identifies one or more attributes to retrieve from the table. // These attributes can include scalars, sets, or elements of a JSON document. // The attributes in the expression must be separated by commas. // // If no attribute names are specified, then all attributes will be returned. // If any of the requested attributes are not found, they will not appear in // the result. // // For more information, see Accessing Item Attributes (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ProjectionExpression *string `type:"string"` // This is a legacy parameter. Use FilterExpression instead. For more information, // see QueryFilter (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.QueryFilter.html) // in the Amazon DynamoDB Developer Guide. QueryFilter map[string]*Condition `type:"map"` // Determines the level of detail about either provisioned or on-demand 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"` // Specifies the order for index traversal: If true (default), the traversal // is performed in ascending order; if false, the traversal is performed in // descending order. // // Items with the same partition key value are stored in sorted order by sort // key. If the sort key data type is Number, the results are stored in numeric // order. For type String, the results are stored in order of UTF-8 bytes. For // type Binary, DynamoDB treats each byte of the binary data as unsigned. // // If ScanIndexForward is true, DynamoDB returns the results in the order in // which they are stored (by sort key value). This is the default behavior. // If ScanIndexForward is false, DynamoDB reads the results in reverse order // by sort key value, and then returns the results to the client. ScanIndexForward *bool `type:"boolean"` // The attributes to be returned in the result. You can retrieve all item attributes, // specific item attributes, the count of matching items, or in the case of // an index, some or all of the attributes projected into the index. // // * ALL_ATTRIBUTES - Returns all of the item attributes from the specified // table or index. If you query a local secondary index, then for each matching // item in the index, DynamoDB fetches the entire item from the parent table. // If the index is configured to project all item attributes, then all of // the data can be obtained from the local secondary index, and no fetching // is required. // // * ALL_PROJECTED_ATTRIBUTES - Allowed only when querying an index. Retrieves // all attributes that have been projected into the index. If the index is // configured to project all attributes, this return value is equivalent // to specifying ALL_ATTRIBUTES. // // * COUNT - Returns the number of matching items, rather than the matching // items themselves. Note that this uses the same quantity of read capacity // units as getting the items, and is subject to the same item size calculations. // // * SPECIFIC_ATTRIBUTES - Returns only the attributes listed in ProjectionExpression. // This return value is equivalent to specifying ProjectionExpression without // specifying any value for Select. If you query or scan a local secondary // index and request only attributes that are projected into that index, // the operation will read only the index and not the table. If any of the // requested attributes are not projected into the local secondary index, // DynamoDB fetches each of these attributes from the parent table. This // extra fetching incurs additional throughput cost and latency. If you query // or scan a global secondary index, you can only request attributes that // are projected into the index. Global secondary index queries cannot fetch // attributes from the parent table. // // If neither Select nor ProjectionExpression are specified, DynamoDB defaults // to ALL_ATTRIBUTES when accessing a table, and ALL_PROJECTED_ATTRIBUTES when // accessing an index. You cannot use both Select and ProjectionExpression together // in a single request, unless the value for Select is SPECIFIC_ATTRIBUTES. // (This usage is equivalent to specifying ProjectionExpression without any // value for Select.) // // If you use the ProjectionExpression parameter, then the value for Select // can only be SPECIFIC_ATTRIBUTES. Any other value for Select will return an // error. Select *string `type:"string" enum:"Select"` // The name of the table containing the requested items. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s QueryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s QueryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *QueryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "QueryInput"} if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 { invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1)) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } 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.KeyConditions != nil { for i, v := range s.KeyConditions { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeyConditions", i), err.(request.ErrInvalidParams)) } } } if s.QueryFilter != nil { for i, v := range s.QueryFilter { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueryFilter", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributesToGet sets the AttributesToGet field's value. func (s *QueryInput) SetAttributesToGet(v []*string) *QueryInput { s.AttributesToGet = v return s } // SetConditionalOperator sets the ConditionalOperator field's value. func (s *QueryInput) SetConditionalOperator(v string) *QueryInput { s.ConditionalOperator = &v return s } // SetConsistentRead sets the ConsistentRead field's value. func (s *QueryInput) SetConsistentRead(v bool) *QueryInput { s.ConsistentRead = &v return s } // SetExclusiveStartKey sets the ExclusiveStartKey field's value. func (s *QueryInput) SetExclusiveStartKey(v map[string]*AttributeValue) *QueryInput { s.ExclusiveStartKey = v return s } // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. func (s *QueryInput) SetExpressionAttributeNames(v map[string]*string) *QueryInput { s.ExpressionAttributeNames = v return s } // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. func (s *QueryInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *QueryInput { s.ExpressionAttributeValues = v return s } // SetFilterExpression sets the FilterExpression field's value. func (s *QueryInput) SetFilterExpression(v string) *QueryInput { s.FilterExpression = &v return s } // SetIndexName sets the IndexName field's value. func (s *QueryInput) SetIndexName(v string) *QueryInput { s.IndexName = &v return s } // SetKeyConditionExpression sets the KeyConditionExpression field's value. func (s *QueryInput) SetKeyConditionExpression(v string) *QueryInput { s.KeyConditionExpression = &v return s } // SetKeyConditions sets the KeyConditions field's value. func (s *QueryInput) SetKeyConditions(v map[string]*Condition) *QueryInput { s.KeyConditions = v return s } // SetLimit sets the Limit field's value. func (s *QueryInput) SetLimit(v int64) *QueryInput { s.Limit = &v return s } // SetProjectionExpression sets the ProjectionExpression field's value. func (s *QueryInput) SetProjectionExpression(v string) *QueryInput { s.ProjectionExpression = &v return s } // SetQueryFilter sets the QueryFilter field's value. func (s *QueryInput) SetQueryFilter(v map[string]*Condition) *QueryInput { s.QueryFilter = v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *QueryInput) SetReturnConsumedCapacity(v string) *QueryInput { s.ReturnConsumedCapacity = &v return s } // SetScanIndexForward sets the ScanIndexForward field's value. func (s *QueryInput) SetScanIndexForward(v bool) *QueryInput { s.ScanIndexForward = &v return s } // SetSelect sets the Select field's value. func (s *QueryInput) SetSelect(v string) *QueryInput { s.Select = &v return s } // SetTableName sets the TableName field's value. func (s *QueryInput) SetTableName(v string) *QueryInput { s.TableName = &v return s } // Represents the output of a Query operation. type QueryOutput struct { _ struct{} `type:"structure"` // The capacity units consumed by the Query 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 if the ReturnConsumedCapacity parameter was specified. For more // information, see Provisioned Throughput (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html) // in the Amazon DynamoDB Developer Guide. ConsumedCapacity *ConsumedCapacity `type:"structure"` // The number of items in the response. // // If you used a QueryFilter in the request, then Count is the number of items // returned after the filter was applied, and ScannedCount is the number of // matching items before the filter was applied. // // If you did not use a filter in the request, then Count and ScannedCount are // the same. Count *int64 `type:"integer"` // An array of item attributes that match the query criteria. Each element in // this array consists of an attribute name and the value for that attribute. Items []map[string]*AttributeValue `type:"list"` // The primary key of the item where the operation stopped, inclusive of the // previous result set. Use this value to start a new operation, excluding this // value in the new request. // // If LastEvaluatedKey is empty, then the "last page" of results has been processed // and there is no more data to be retrieved. // // If LastEvaluatedKey is not empty, it does not necessarily mean that there // is more data in the result set. The only way to know when you have reached // the end of the result set is when LastEvaluatedKey is empty. LastEvaluatedKey map[string]*AttributeValue `type:"map"` // The number of items evaluated, before any QueryFilter is applied. A high // ScannedCount value with few, or no, Count results indicates an inefficient // Query operation. For more information, see Count and ScannedCount (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count) // in the Amazon DynamoDB Developer Guide. // // If you did not use a filter in the request, then ScannedCount is the same // as Count. ScannedCount *int64 `type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s QueryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s QueryOutput) GoString() string { return s.String() } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *QueryOutput) SetConsumedCapacity(v *ConsumedCapacity) *QueryOutput { s.ConsumedCapacity = v return s } // SetCount sets the Count field's value. func (s *QueryOutput) SetCount(v int64) *QueryOutput { s.Count = &v return s } // SetItems sets the Items field's value. func (s *QueryOutput) SetItems(v []map[string]*AttributeValue) *QueryOutput { s.Items = v return s } // SetLastEvaluatedKey sets the LastEvaluatedKey field's value. func (s *QueryOutput) SetLastEvaluatedKey(v map[string]*AttributeValue) *QueryOutput { s.LastEvaluatedKey = v return s } // SetScannedCount sets the ScannedCount field's value. func (s *QueryOutput) SetScannedCount(v int64) *QueryOutput { s.ScannedCount = &v return s } // Represents the properties of a replica. type Replica struct { _ struct{} `type:"structure"` // The Region where the replica needs to be created. RegionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Replica) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Replica) GoString() string { return s.String() } // SetRegionName sets the RegionName field's value. func (s *Replica) SetRegionName(v string) *Replica { s.RegionName = &v return s } // The specified replica is already part of the global table. type ReplicaAlreadyExistsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaAlreadyExistsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaAlreadyExistsException) GoString() string { return s.String() } func newErrorReplicaAlreadyExistsException(v protocol.ResponseMetadata) error { return &ReplicaAlreadyExistsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ReplicaAlreadyExistsException) Code() string { return "ReplicaAlreadyExistsException" } // Message returns the exception's message. func (s *ReplicaAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ReplicaAlreadyExistsException) OrigErr() error { return nil } func (s *ReplicaAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ReplicaAlreadyExistsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ReplicaAlreadyExistsException) RequestID() string { return s.RespMetadata.RequestID } // Represents the auto scaling settings of the replica. type ReplicaAutoScalingDescription struct { _ struct{} `type:"structure"` // Replica-specific global secondary index auto scaling settings. GlobalSecondaryIndexes []*ReplicaGlobalSecondaryIndexAutoScalingDescription `type:"list"` // The Region where the replica exists. RegionName *string `type:"string"` // Represents the auto scaling settings for a global table or global secondary // index. ReplicaProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` // Represents the auto scaling settings for a global table or global secondary // index. ReplicaProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` // The current state of the replica: // // * CREATING - The replica is being created. // // * UPDATING - The replica is being updated. // // * DELETING - The replica is being deleted. // // * ACTIVE - The replica is ready for use. ReplicaStatus *string `type:"string" enum:"ReplicaStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaAutoScalingDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaAutoScalingDescription) GoString() string { return s.String() } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *ReplicaAutoScalingDescription) SetGlobalSecondaryIndexes(v []*ReplicaGlobalSecondaryIndexAutoScalingDescription) *ReplicaAutoScalingDescription { s.GlobalSecondaryIndexes = v return s } // SetRegionName sets the RegionName field's value. func (s *ReplicaAutoScalingDescription) SetRegionName(v string) *ReplicaAutoScalingDescription { s.RegionName = &v return s } // SetReplicaProvisionedReadCapacityAutoScalingSettings sets the ReplicaProvisionedReadCapacityAutoScalingSettings field's value. func (s *ReplicaAutoScalingDescription) SetReplicaProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaAutoScalingDescription { s.ReplicaProvisionedReadCapacityAutoScalingSettings = v return s } // SetReplicaProvisionedWriteCapacityAutoScalingSettings sets the ReplicaProvisionedWriteCapacityAutoScalingSettings field's value. func (s *ReplicaAutoScalingDescription) SetReplicaProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaAutoScalingDescription { s.ReplicaProvisionedWriteCapacityAutoScalingSettings = v return s } // SetReplicaStatus sets the ReplicaStatus field's value. func (s *ReplicaAutoScalingDescription) SetReplicaStatus(v string) *ReplicaAutoScalingDescription { s.ReplicaStatus = &v return s } // Represents the auto scaling settings of a replica that will be modified. type ReplicaAutoScalingUpdate struct { _ struct{} `type:"structure"` // The Region where the replica exists. // // RegionName is a required field RegionName *string `type:"string" required:"true"` // Represents the auto scaling settings of global secondary indexes that will // be modified. ReplicaGlobalSecondaryIndexUpdates []*ReplicaGlobalSecondaryIndexAutoScalingUpdate `type:"list"` // Represents the auto scaling settings to be modified for a global table or // global secondary index. ReplicaProvisionedReadCapacityAutoScalingUpdate *AutoScalingSettingsUpdate `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaAutoScalingUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaAutoScalingUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ReplicaAutoScalingUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicaAutoScalingUpdate"} if s.RegionName == nil { invalidParams.Add(request.NewErrParamRequired("RegionName")) } if s.ReplicaGlobalSecondaryIndexUpdates != nil { for i, v := range s.ReplicaGlobalSecondaryIndexUpdates { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaGlobalSecondaryIndexUpdates", i), err.(request.ErrInvalidParams)) } } } if s.ReplicaProvisionedReadCapacityAutoScalingUpdate != nil { if err := s.ReplicaProvisionedReadCapacityAutoScalingUpdate.Validate(); err != nil { invalidParams.AddNested("ReplicaProvisionedReadCapacityAutoScalingUpdate", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRegionName sets the RegionName field's value. func (s *ReplicaAutoScalingUpdate) SetRegionName(v string) *ReplicaAutoScalingUpdate { s.RegionName = &v return s } // SetReplicaGlobalSecondaryIndexUpdates sets the ReplicaGlobalSecondaryIndexUpdates field's value. func (s *ReplicaAutoScalingUpdate) SetReplicaGlobalSecondaryIndexUpdates(v []*ReplicaGlobalSecondaryIndexAutoScalingUpdate) *ReplicaAutoScalingUpdate { s.ReplicaGlobalSecondaryIndexUpdates = v return s } // SetReplicaProvisionedReadCapacityAutoScalingUpdate sets the ReplicaProvisionedReadCapacityAutoScalingUpdate field's value. func (s *ReplicaAutoScalingUpdate) SetReplicaProvisionedReadCapacityAutoScalingUpdate(v *AutoScalingSettingsUpdate) *ReplicaAutoScalingUpdate { s.ReplicaProvisionedReadCapacityAutoScalingUpdate = v return s } // Contains the details of the replica. type ReplicaDescription struct { _ struct{} `type:"structure"` // Replica-specific global secondary index settings. GlobalSecondaryIndexes []*ReplicaGlobalSecondaryIndexDescription `type:"list"` // The KMS key of the replica that will be used for KMS encryption. KMSMasterKeyId *string `type:"string"` // Replica-specific provisioned throughput. If not described, uses the source // table's provisioned throughput settings. ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"` // The name of the Region. RegionName *string `type:"string"` // The time at which the replica was first detected as inaccessible. To determine // cause of inaccessibility check the ReplicaStatus property. ReplicaInaccessibleDateTime *time.Time `type:"timestamp"` // The current state of the replica: // // * CREATING - The replica is being created. // // * UPDATING - The replica is being updated. // // * DELETING - The replica is being deleted. // // * ACTIVE - The replica is ready for use. // // * REGION_DISABLED - The replica is inaccessible because the Amazon Web // Services Region has been disabled. If the Amazon Web Services Region remains // inaccessible for more than 20 hours, DynamoDB will remove this replica // from the replication group. The replica will not be deleted and replication // will stop from and to this region. // // * INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the // table is inaccessible. If the KMS key remains inaccessible for more than // 20 hours, DynamoDB will remove this replica from the replication group. // The replica will not be deleted and replication will stop from and to // this region. ReplicaStatus *string `type:"string" enum:"ReplicaStatus"` // Detailed information about the replica status. ReplicaStatusDescription *string `type:"string"` // Specifies the progress of a Create, Update, or Delete action on the replica // as a percentage. ReplicaStatusPercentProgress *string `type:"string"` // Contains details of the table class. ReplicaTableClassSummary *TableClassSummary `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaDescription) GoString() string { return s.String() } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *ReplicaDescription) SetGlobalSecondaryIndexes(v []*ReplicaGlobalSecondaryIndexDescription) *ReplicaDescription { s.GlobalSecondaryIndexes = v return s } // SetKMSMasterKeyId sets the KMSMasterKeyId field's value. func (s *ReplicaDescription) SetKMSMasterKeyId(v string) *ReplicaDescription { s.KMSMasterKeyId = &v return s } // SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value. func (s *ReplicaDescription) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *ReplicaDescription { s.ProvisionedThroughputOverride = v return s } // SetRegionName sets the RegionName field's value. func (s *ReplicaDescription) SetRegionName(v string) *ReplicaDescription { s.RegionName = &v return s } // SetReplicaInaccessibleDateTime sets the ReplicaInaccessibleDateTime field's value. func (s *ReplicaDescription) SetReplicaInaccessibleDateTime(v time.Time) *ReplicaDescription { s.ReplicaInaccessibleDateTime = &v return s } // SetReplicaStatus sets the ReplicaStatus field's value. func (s *ReplicaDescription) SetReplicaStatus(v string) *ReplicaDescription { s.ReplicaStatus = &v return s } // SetReplicaStatusDescription sets the ReplicaStatusDescription field's value. func (s *ReplicaDescription) SetReplicaStatusDescription(v string) *ReplicaDescription { s.ReplicaStatusDescription = &v return s } // SetReplicaStatusPercentProgress sets the ReplicaStatusPercentProgress field's value. func (s *ReplicaDescription) SetReplicaStatusPercentProgress(v string) *ReplicaDescription { s.ReplicaStatusPercentProgress = &v return s } // SetReplicaTableClassSummary sets the ReplicaTableClassSummary field's value. func (s *ReplicaDescription) SetReplicaTableClassSummary(v *TableClassSummary) *ReplicaDescription { s.ReplicaTableClassSummary = v return s } // Represents the properties of a replica global secondary index. type ReplicaGlobalSecondaryIndex struct { _ struct{} `type:"structure"` // The name of the global secondary index. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` // Replica table GSI-specific provisioned throughput. If not specified, uses // the source table GSI's read capacity settings. ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndex) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndex) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ReplicaGlobalSecondaryIndex) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicaGlobalSecondaryIndex"} if s.IndexName == nil { invalidParams.Add(request.NewErrParamRequired("IndexName")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.ProvisionedThroughputOverride != nil { if err := s.ProvisionedThroughputOverride.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *ReplicaGlobalSecondaryIndex) SetIndexName(v string) *ReplicaGlobalSecondaryIndex { s.IndexName = &v return s } // SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value. func (s *ReplicaGlobalSecondaryIndex) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *ReplicaGlobalSecondaryIndex { s.ProvisionedThroughputOverride = v return s } // Represents the auto scaling configuration for a replica global secondary // index. type ReplicaGlobalSecondaryIndexAutoScalingDescription struct { _ struct{} `type:"structure"` // The name of the global secondary index. IndexName *string `min:"3" type:"string"` // The current state of the replica global secondary index: // // * CREATING - The index is being created. // // * UPDATING - The table/index configuration is being updated. The table/index // remains available for data operations when UPDATING // // * DELETING - The index is being deleted. // // * ACTIVE - The index is ready for use. IndexStatus *string `type:"string" enum:"IndexStatus"` // Represents the auto scaling settings for a global table or global secondary // index. ProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` // Represents the auto scaling settings for a global table or global secondary // index. ProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexAutoScalingDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexAutoScalingDescription) GoString() string { return s.String() } // SetIndexName sets the IndexName field's value. func (s *ReplicaGlobalSecondaryIndexAutoScalingDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexAutoScalingDescription { s.IndexName = &v return s } // SetIndexStatus sets the IndexStatus field's value. func (s *ReplicaGlobalSecondaryIndexAutoScalingDescription) SetIndexStatus(v string) *ReplicaGlobalSecondaryIndexAutoScalingDescription { s.IndexStatus = &v return s } // SetProvisionedReadCapacityAutoScalingSettings sets the ProvisionedReadCapacityAutoScalingSettings field's value. func (s *ReplicaGlobalSecondaryIndexAutoScalingDescription) SetProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexAutoScalingDescription { s.ProvisionedReadCapacityAutoScalingSettings = v return s } // SetProvisionedWriteCapacityAutoScalingSettings sets the ProvisionedWriteCapacityAutoScalingSettings field's value. func (s *ReplicaGlobalSecondaryIndexAutoScalingDescription) SetProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexAutoScalingDescription { s.ProvisionedWriteCapacityAutoScalingSettings = v return s } // Represents the auto scaling settings of a global secondary index for a replica // that will be modified. type ReplicaGlobalSecondaryIndexAutoScalingUpdate struct { _ struct{} `type:"structure"` // The name of the global secondary index. IndexName *string `min:"3" type:"string"` // Represents the auto scaling settings to be modified for a global table or // global secondary index. ProvisionedReadCapacityAutoScalingUpdate *AutoScalingSettingsUpdate `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexAutoScalingUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexAutoScalingUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ReplicaGlobalSecondaryIndexAutoScalingUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicaGlobalSecondaryIndexAutoScalingUpdate"} if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.ProvisionedReadCapacityAutoScalingUpdate != nil { if err := s.ProvisionedReadCapacityAutoScalingUpdate.Validate(); err != nil { invalidParams.AddNested("ProvisionedReadCapacityAutoScalingUpdate", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *ReplicaGlobalSecondaryIndexAutoScalingUpdate) SetIndexName(v string) *ReplicaGlobalSecondaryIndexAutoScalingUpdate { s.IndexName = &v return s } // SetProvisionedReadCapacityAutoScalingUpdate sets the ProvisionedReadCapacityAutoScalingUpdate field's value. func (s *ReplicaGlobalSecondaryIndexAutoScalingUpdate) SetProvisionedReadCapacityAutoScalingUpdate(v *AutoScalingSettingsUpdate) *ReplicaGlobalSecondaryIndexAutoScalingUpdate { s.ProvisionedReadCapacityAutoScalingUpdate = v return s } // Represents the properties of a replica global secondary index. type ReplicaGlobalSecondaryIndexDescription struct { _ struct{} `type:"structure"` // The name of the global secondary index. IndexName *string `min:"3" type:"string"` // If not described, uses the source table GSI's read capacity settings. ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexDescription) GoString() string { return s.String() } // SetIndexName sets the IndexName field's value. func (s *ReplicaGlobalSecondaryIndexDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexDescription { s.IndexName = &v return s } // SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value. func (s *ReplicaGlobalSecondaryIndexDescription) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *ReplicaGlobalSecondaryIndexDescription { s.ProvisionedThroughputOverride = v return s } // Represents the properties of a global secondary index. type ReplicaGlobalSecondaryIndexSettingsDescription struct { _ struct{} `type:"structure"` // The name of the global secondary index. The name must be unique among all // other indexes on this table. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` // The current status of the global secondary index: // // * CREATING - The global secondary index is being created. // // * UPDATING - The global secondary index is being updated. // // * DELETING - The global secondary index is being deleted. // // * ACTIVE - The global secondary index is ready for use. IndexStatus *string `type:"string" enum:"IndexStatus"` // Auto scaling settings for a global secondary index replica's read capacity // units. ProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` // Auto scaling settings for a global secondary index replica's write capacity // units. ProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexSettingsDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexSettingsDescription) GoString() string { return s.String() } // SetIndexName sets the IndexName field's value. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsDescription { s.IndexName = &v return s } // SetIndexStatus sets the IndexStatus field's value. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexStatus(v string) *ReplicaGlobalSecondaryIndexSettingsDescription { s.IndexStatus = &v return s } // SetProvisionedReadCapacityAutoScalingSettings sets the ProvisionedReadCapacityAutoScalingSettings field's value. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription { s.ProvisionedReadCapacityAutoScalingSettings = v return s } // SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription { s.ProvisionedReadCapacityUnits = &v return s } // SetProvisionedWriteCapacityAutoScalingSettings sets the ProvisionedWriteCapacityAutoScalingSettings field's value. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription { s.ProvisionedWriteCapacityAutoScalingSettings = v return s } // SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription { s.ProvisionedWriteCapacityUnits = &v return s } // Represents the settings of a global secondary index for a global table that // will be modified. type ReplicaGlobalSecondaryIndexSettingsUpdate struct { _ struct{} `type:"structure"` // The name of the global secondary index. The name must be unique among all // other indexes on this table. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` // Auto scaling settings for managing a global secondary index replica's read // capacity units. ProvisionedReadCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"` // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexSettingsUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaGlobalSecondaryIndexSettingsUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicaGlobalSecondaryIndexSettingsUpdate"} if s.IndexName == nil { invalidParams.Add(request.NewErrParamRequired("IndexName")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.ProvisionedReadCapacityUnits != nil && *s.ProvisionedReadCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("ProvisionedReadCapacityUnits", 1)) } if s.ProvisionedReadCapacityAutoScalingSettingsUpdate != nil { if err := s.ProvisionedReadCapacityAutoScalingSettingsUpdate.Validate(); err != nil { invalidParams.AddNested("ProvisionedReadCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsUpdate { s.IndexName = &v return s } // SetProvisionedReadCapacityAutoScalingSettingsUpdate sets the ProvisionedReadCapacityAutoScalingSettingsUpdate field's value. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *ReplicaGlobalSecondaryIndexSettingsUpdate { s.ProvisionedReadCapacityAutoScalingSettingsUpdate = v return s } // SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsUpdate { s.ProvisionedReadCapacityUnits = &v return s } // The specified replica is no longer part of the global table. type ReplicaNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaNotFoundException) GoString() string { return s.String() } func newErrorReplicaNotFoundException(v protocol.ResponseMetadata) error { return &ReplicaNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ReplicaNotFoundException) Code() string { return "ReplicaNotFoundException" } // Message returns the exception's message. func (s *ReplicaNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ReplicaNotFoundException) OrigErr() error { return nil } func (s *ReplicaNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ReplicaNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ReplicaNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Represents the properties of a replica. type ReplicaSettingsDescription struct { _ struct{} `type:"structure"` // The Region name of the replica. // // 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"` // Auto scaling settings for a global table replica's read capacity units. ReplicaProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. For more information, see Specifying // Read and Write Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) // in the Amazon DynamoDB Developer Guide. ReplicaProvisionedReadCapacityUnits *int64 `type:"long"` // Auto scaling settings for a global table replica's write capacity units. ReplicaProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. For more information, see Specifying Read and Write // Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) // in the Amazon DynamoDB Developer Guide. ReplicaProvisionedWriteCapacityUnits *int64 `type:"long"` // The current state of the Region: // // * CREATING - The Region is being created. // // * UPDATING - The Region is being updated. // // * DELETING - The Region is being deleted. // // * ACTIVE - The Region is ready for use. ReplicaStatus *string `type:"string" enum:"ReplicaStatus"` // Contains details of the table class. ReplicaTableClassSummary *TableClassSummary `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaSettingsDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaSettingsDescription) GoString() string { return s.String() } // SetRegionName sets the RegionName field's value. func (s *ReplicaSettingsDescription) SetRegionName(v string) *ReplicaSettingsDescription { s.RegionName = &v 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 return s } // SetReplicaProvisionedReadCapacityAutoScalingSettings sets the ReplicaProvisionedReadCapacityAutoScalingSettings field's value. func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaSettingsDescription { s.ReplicaProvisionedReadCapacityAutoScalingSettings = v return s } // SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value. func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsDescription { s.ReplicaProvisionedReadCapacityUnits = &v return s } // SetReplicaProvisionedWriteCapacityAutoScalingSettings sets the ReplicaProvisionedWriteCapacityAutoScalingSettings field's value. func (s *ReplicaSettingsDescription) SetReplicaProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaSettingsDescription { s.ReplicaProvisionedWriteCapacityAutoScalingSettings = v return s } // SetReplicaProvisionedWriteCapacityUnits sets the ReplicaProvisionedWriteCapacityUnits field's value. func (s *ReplicaSettingsDescription) SetReplicaProvisionedWriteCapacityUnits(v int64) *ReplicaSettingsDescription { s.ReplicaProvisionedWriteCapacityUnits = &v return s } // SetReplicaStatus sets the ReplicaStatus field's value. func (s *ReplicaSettingsDescription) SetReplicaStatus(v string) *ReplicaSettingsDescription { s.ReplicaStatus = &v return s } // SetReplicaTableClassSummary sets the ReplicaTableClassSummary field's value. func (s *ReplicaSettingsDescription) SetReplicaTableClassSummary(v *TableClassSummary) *ReplicaSettingsDescription { s.ReplicaTableClassSummary = v return s } // Represents the settings for a global table in a Region that will be modified. type ReplicaSettingsUpdate struct { _ struct{} `type:"structure"` // The Region of the replica to be added. // // RegionName is a required field RegionName *string `type:"string" required:"true"` // Represents the settings of a global secondary index for a global table that // will be modified. ReplicaGlobalSecondaryIndexSettingsUpdate []*ReplicaGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"` // Auto scaling settings for managing a global table replica's read capacity // units. ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"` // The maximum number of strongly consistent reads consumed per second before // DynamoDB returns a ThrottlingException. For more information, see Specifying // Read and Write Requirements (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) // in the Amazon DynamoDB Developer Guide. ReplicaProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` // Replica-specific table class. If not specified, uses the source table's table // class. ReplicaTableClass *string `type:"string" enum:"TableClass"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaSettingsUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaSettingsUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ReplicaSettingsUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicaSettingsUpdate"} if s.RegionName == nil { invalidParams.Add(request.NewErrParamRequired("RegionName")) } if s.ReplicaGlobalSecondaryIndexSettingsUpdate != nil && len(s.ReplicaGlobalSecondaryIndexSettingsUpdate) < 1 { invalidParams.Add(request.NewErrParamMinLen("ReplicaGlobalSecondaryIndexSettingsUpdate", 1)) } if s.ReplicaProvisionedReadCapacityUnits != nil && *s.ReplicaProvisionedReadCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("ReplicaProvisionedReadCapacityUnits", 1)) } if s.ReplicaGlobalSecondaryIndexSettingsUpdate != nil { for i, v := range s.ReplicaGlobalSecondaryIndexSettingsUpdate { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaGlobalSecondaryIndexSettingsUpdate", i), err.(request.ErrInvalidParams)) } } } if s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate != nil { if err := s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate.Validate(); err != nil { invalidParams.AddNested("ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRegionName sets the RegionName field's value. func (s *ReplicaSettingsUpdate) SetRegionName(v string) *ReplicaSettingsUpdate { s.RegionName = &v return s } // SetReplicaGlobalSecondaryIndexSettingsUpdate sets the ReplicaGlobalSecondaryIndexSettingsUpdate field's value. func (s *ReplicaSettingsUpdate) SetReplicaGlobalSecondaryIndexSettingsUpdate(v []*ReplicaGlobalSecondaryIndexSettingsUpdate) *ReplicaSettingsUpdate { s.ReplicaGlobalSecondaryIndexSettingsUpdate = v return s } // SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate sets the ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate field's value. func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *ReplicaSettingsUpdate { s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate = v return s } // SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value. func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsUpdate { s.ReplicaProvisionedReadCapacityUnits = &v return s } // SetReplicaTableClass sets the ReplicaTableClass field's value. func (s *ReplicaSettingsUpdate) SetReplicaTableClass(v string) *ReplicaSettingsUpdate { s.ReplicaTableClass = &v return s } // Represents one of the following: // // - A new replica to be added to an existing global table. // // - New parameters for an existing replica. // // - An existing replica to be removed from an existing global table. type ReplicaUpdate struct { _ struct{} `type:"structure"` // The parameters required for creating a replica on an existing global table. Create *CreateReplicaAction `type:"structure"` // The name of the existing replica to be removed. Delete *DeleteReplicaAction `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicaUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ReplicaUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicaUpdate"} if s.Create != nil { if err := s.Create.Validate(); err != nil { invalidParams.AddNested("Create", err.(request.ErrInvalidParams)) } } if s.Delete != nil { if err := s.Delete.Validate(); err != nil { invalidParams.AddNested("Delete", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCreate sets the Create field's value. func (s *ReplicaUpdate) SetCreate(v *CreateReplicaAction) *ReplicaUpdate { s.Create = v return s } // SetDelete sets the Delete field's value. func (s *ReplicaUpdate) SetDelete(v *DeleteReplicaAction) *ReplicaUpdate { s.Delete = v return s } // Represents one of the following: // // - A new replica to be added to an existing regional table or global table. // This request invokes the CreateTableReplica action in the destination // Region. // // - New parameters for an existing replica. This request invokes the UpdateTable // action in the destination Region. // // - An existing replica to be deleted. The request invokes the DeleteTableReplica // action in the destination Region, deleting the replica and all if its // items in the destination Region. // // When you manually remove a table or global table replica, you do not automatically // remove any associated scalable targets, scaling policies, or CloudWatch alarms. type ReplicationGroupUpdate struct { _ struct{} `type:"structure"` // The parameters required for creating a replica for the table. Create *CreateReplicationGroupMemberAction `type:"structure"` // The parameters required for deleting a replica for the table. Delete *DeleteReplicationGroupMemberAction `type:"structure"` // The parameters required for updating a replica for the table. Update *UpdateReplicationGroupMemberAction `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicationGroupUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReplicationGroupUpdate) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ReplicationGroupUpdate) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ReplicationGroupUpdate"} if s.Create != nil { if err := s.Create.Validate(); err != nil { invalidParams.AddNested("Create", err.(request.ErrInvalidParams)) } } if s.Delete != nil { if err := s.Delete.Validate(); err != nil { invalidParams.AddNested("Delete", 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 } // SetCreate sets the Create field's value. func (s *ReplicationGroupUpdate) SetCreate(v *CreateReplicationGroupMemberAction) *ReplicationGroupUpdate { s.Create = v return s } // SetDelete sets the Delete field's value. func (s *ReplicationGroupUpdate) SetDelete(v *DeleteReplicationGroupMemberAction) *ReplicationGroupUpdate { s.Delete = v return s } // SetUpdate sets the Update field's value. func (s *ReplicationGroupUpdate) SetUpdate(v *UpdateReplicationGroupMemberAction) *ReplicationGroupUpdate { s.Update = v return s } // Throughput exceeds the current throughput quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. type RequestLimitExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RequestLimitExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RequestLimitExceeded) GoString() string { return s.String() } func newErrorRequestLimitExceeded(v protocol.ResponseMetadata) error { return &RequestLimitExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *RequestLimitExceeded) Code() string { return "RequestLimitExceeded" } // Message returns the exception's message. func (s *RequestLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *RequestLimitExceeded) OrigErr() error { return nil } func (s *RequestLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *RequestLimitExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *RequestLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. type ResourceInUseException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The resource which is being attempted to be changed is in use. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceInUseException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceInUseException) GoString() string { return s.String() } func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceInUseException) OrigErr() error { return nil } func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceInUseException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceInUseException) RequestID() string { return s.RespMetadata.RequestID } // The operation tried to access a nonexistent table or index. The resource // might not be specified correctly, or its status might not be ACTIVE. type ResourceNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The resource which is being requested does not exist. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceNotFoundException) GoString() string { return s.String() } func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceNotFoundException) OrigErr() error { return nil } func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Contains details for the restore. type RestoreSummary struct { _ struct{} `type:"structure"` // Point in time or source backup time. // // RestoreDateTime is a required field RestoreDateTime *time.Time `type:"timestamp" required:"true"` // Indicates if a restore is in progress or not. // // RestoreInProgress is a required field RestoreInProgress *bool `type:"boolean" required:"true"` // The Amazon Resource Name (ARN) of the backup from which the table was restored. SourceBackupArn *string `min:"37" type:"string"` // The ARN of the source table of the backup that is being restored. SourceTableArn *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreSummary) GoString() string { return s.String() } // SetRestoreDateTime sets the RestoreDateTime field's value. func (s *RestoreSummary) SetRestoreDateTime(v time.Time) *RestoreSummary { s.RestoreDateTime = &v return s } // SetRestoreInProgress sets the RestoreInProgress field's value. func (s *RestoreSummary) SetRestoreInProgress(v bool) *RestoreSummary { s.RestoreInProgress = &v return s } // SetSourceBackupArn sets the SourceBackupArn field's value. func (s *RestoreSummary) SetSourceBackupArn(v string) *RestoreSummary { s.SourceBackupArn = &v return s } // SetSourceTableArn sets the SourceTableArn field's value. func (s *RestoreSummary) SetSourceTableArn(v string) *RestoreSummary { s.SourceTableArn = &v return s } type RestoreTableFromBackupInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) associated with the backup. // // BackupArn is a required field BackupArn *string `min:"37" type:"string" required:"true"` // The billing mode of the restored table. BillingModeOverride *string `type:"string" enum:"BillingMode"` // List of global secondary indexes for the restored table. The indexes provided // should match existing secondary indexes. You can choose to exclude some or // all of the indexes at the time of restore. GlobalSecondaryIndexOverride []*GlobalSecondaryIndex `type:"list"` // List of local secondary indexes for the restored table. The indexes provided // should match existing secondary indexes. You can choose to exclude some or // all of the indexes at the time of restore. LocalSecondaryIndexOverride []*LocalSecondaryIndex `type:"list"` // Provisioned throughput settings for the restored table. ProvisionedThroughputOverride *ProvisionedThroughput `type:"structure"` // The new server-side encryption settings for the restored table. SSESpecificationOverride *SSESpecification `type:"structure"` // The name of the new table to which the backup must be restored. // // TargetTableName is a required field TargetTableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreTableFromBackupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreTableFromBackupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RestoreTableFromBackupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RestoreTableFromBackupInput"} if s.BackupArn == nil { invalidParams.Add(request.NewErrParamRequired("BackupArn")) } if s.BackupArn != nil && len(*s.BackupArn) < 37 { invalidParams.Add(request.NewErrParamMinLen("BackupArn", 37)) } if s.TargetTableName == nil { invalidParams.Add(request.NewErrParamRequired("TargetTableName")) } if s.TargetTableName != nil && len(*s.TargetTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("TargetTableName", 3)) } if s.GlobalSecondaryIndexOverride != nil { for i, v := range s.GlobalSecondaryIndexOverride { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexOverride", i), err.(request.ErrInvalidParams)) } } } if s.LocalSecondaryIndexOverride != nil { for i, v := range s.LocalSecondaryIndexOverride { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LocalSecondaryIndexOverride", i), err.(request.ErrInvalidParams)) } } } if s.ProvisionedThroughputOverride != nil { if err := s.ProvisionedThroughputOverride.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBackupArn sets the BackupArn field's value. func (s *RestoreTableFromBackupInput) SetBackupArn(v string) *RestoreTableFromBackupInput { s.BackupArn = &v return s } // SetBillingModeOverride sets the BillingModeOverride field's value. func (s *RestoreTableFromBackupInput) SetBillingModeOverride(v string) *RestoreTableFromBackupInput { s.BillingModeOverride = &v return s } // SetGlobalSecondaryIndexOverride sets the GlobalSecondaryIndexOverride field's value. func (s *RestoreTableFromBackupInput) SetGlobalSecondaryIndexOverride(v []*GlobalSecondaryIndex) *RestoreTableFromBackupInput { s.GlobalSecondaryIndexOverride = v return s } // SetLocalSecondaryIndexOverride sets the LocalSecondaryIndexOverride field's value. func (s *RestoreTableFromBackupInput) SetLocalSecondaryIndexOverride(v []*LocalSecondaryIndex) *RestoreTableFromBackupInput { s.LocalSecondaryIndexOverride = v return s } // SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value. func (s *RestoreTableFromBackupInput) SetProvisionedThroughputOverride(v *ProvisionedThroughput) *RestoreTableFromBackupInput { s.ProvisionedThroughputOverride = v return s } // SetSSESpecificationOverride sets the SSESpecificationOverride field's value. func (s *RestoreTableFromBackupInput) SetSSESpecificationOverride(v *SSESpecification) *RestoreTableFromBackupInput { s.SSESpecificationOverride = v return s } // SetTargetTableName sets the TargetTableName field's value. func (s *RestoreTableFromBackupInput) SetTargetTableName(v string) *RestoreTableFromBackupInput { s.TargetTableName = &v return s } type RestoreTableFromBackupOutput struct { _ struct{} `type:"structure"` // The description of the table created from an existing backup. TableDescription *TableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreTableFromBackupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreTableFromBackupOutput) GoString() string { return s.String() } // SetTableDescription sets the TableDescription field's value. func (s *RestoreTableFromBackupOutput) SetTableDescription(v *TableDescription) *RestoreTableFromBackupOutput { s.TableDescription = v return s } type RestoreTableToPointInTimeInput struct { _ struct{} `type:"structure"` // The billing mode of the restored table. BillingModeOverride *string `type:"string" enum:"BillingMode"` // List of global secondary indexes for the restored table. The indexes provided // should match existing secondary indexes. You can choose to exclude some or // all of the indexes at the time of restore. GlobalSecondaryIndexOverride []*GlobalSecondaryIndex `type:"list"` // List of local secondary indexes for the restored table. The indexes provided // should match existing secondary indexes. You can choose to exclude some or // all of the indexes at the time of restore. LocalSecondaryIndexOverride []*LocalSecondaryIndex `type:"list"` // Provisioned throughput settings for the restored table. ProvisionedThroughputOverride *ProvisionedThroughput `type:"structure"` // Time in the past to restore the table to. RestoreDateTime *time.Time `type:"timestamp"` // The new server-side encryption settings for the restored table. SSESpecificationOverride *SSESpecification `type:"structure"` // The DynamoDB table that will be restored. This value is an Amazon Resource // Name (ARN). SourceTableArn *string `type:"string"` // Name of the source table that is being restored. SourceTableName *string `min:"3" type:"string"` // The name of the new table to which it must be restored to. // // TargetTableName is a required field TargetTableName *string `min:"3" type:"string" required:"true"` // Restore the table to the latest possible time. LatestRestorableDateTime is // typically 5 minutes before the current time. UseLatestRestorableTime *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreTableToPointInTimeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreTableToPointInTimeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RestoreTableToPointInTimeInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RestoreTableToPointInTimeInput"} if s.SourceTableName != nil && len(*s.SourceTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("SourceTableName", 3)) } if s.TargetTableName == nil { invalidParams.Add(request.NewErrParamRequired("TargetTableName")) } if s.TargetTableName != nil && len(*s.TargetTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("TargetTableName", 3)) } if s.GlobalSecondaryIndexOverride != nil { for i, v := range s.GlobalSecondaryIndexOverride { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexOverride", i), err.(request.ErrInvalidParams)) } } } if s.LocalSecondaryIndexOverride != nil { for i, v := range s.LocalSecondaryIndexOverride { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LocalSecondaryIndexOverride", i), err.(request.ErrInvalidParams)) } } } if s.ProvisionedThroughputOverride != nil { if err := s.ProvisionedThroughputOverride.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBillingModeOverride sets the BillingModeOverride field's value. func (s *RestoreTableToPointInTimeInput) SetBillingModeOverride(v string) *RestoreTableToPointInTimeInput { s.BillingModeOverride = &v return s } // SetGlobalSecondaryIndexOverride sets the GlobalSecondaryIndexOverride field's value. func (s *RestoreTableToPointInTimeInput) SetGlobalSecondaryIndexOverride(v []*GlobalSecondaryIndex) *RestoreTableToPointInTimeInput { s.GlobalSecondaryIndexOverride = v return s } // SetLocalSecondaryIndexOverride sets the LocalSecondaryIndexOverride field's value. func (s *RestoreTableToPointInTimeInput) SetLocalSecondaryIndexOverride(v []*LocalSecondaryIndex) *RestoreTableToPointInTimeInput { s.LocalSecondaryIndexOverride = v return s } // SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value. func (s *RestoreTableToPointInTimeInput) SetProvisionedThroughputOverride(v *ProvisionedThroughput) *RestoreTableToPointInTimeInput { s.ProvisionedThroughputOverride = v return s } // SetRestoreDateTime sets the RestoreDateTime field's value. func (s *RestoreTableToPointInTimeInput) SetRestoreDateTime(v time.Time) *RestoreTableToPointInTimeInput { s.RestoreDateTime = &v return s } // SetSSESpecificationOverride sets the SSESpecificationOverride field's value. func (s *RestoreTableToPointInTimeInput) SetSSESpecificationOverride(v *SSESpecification) *RestoreTableToPointInTimeInput { s.SSESpecificationOverride = v return s } // SetSourceTableArn sets the SourceTableArn field's value. func (s *RestoreTableToPointInTimeInput) SetSourceTableArn(v string) *RestoreTableToPointInTimeInput { s.SourceTableArn = &v return s } // SetSourceTableName sets the SourceTableName field's value. func (s *RestoreTableToPointInTimeInput) SetSourceTableName(v string) *RestoreTableToPointInTimeInput { s.SourceTableName = &v return s } // SetTargetTableName sets the TargetTableName field's value. func (s *RestoreTableToPointInTimeInput) SetTargetTableName(v string) *RestoreTableToPointInTimeInput { s.TargetTableName = &v return s } // SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. func (s *RestoreTableToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreTableToPointInTimeInput { s.UseLatestRestorableTime = &v return s } type RestoreTableToPointInTimeOutput struct { _ struct{} `type:"structure"` // Represents the properties of a table. TableDescription *TableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreTableToPointInTimeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RestoreTableToPointInTimeOutput) GoString() string { return s.String() } // SetTableDescription sets the TableDescription field's value. func (s *RestoreTableToPointInTimeOutput) SetTableDescription(v *TableDescription) *RestoreTableToPointInTimeOutput { s.TableDescription = v return s } // The S3 bucket that is being imported from. type S3BucketSource struct { _ struct{} `type:"structure"` // The S3 bucket that is being imported from. // // S3Bucket is a required field S3Bucket *string `type:"string" required:"true"` // The account number of the S3 bucket that is being imported from. If the bucket // is owned by the requester this is optional. S3BucketOwner *string `type:"string"` // The key prefix shared by all S3 Objects that are being imported. S3KeyPrefix *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s S3BucketSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s S3BucketSource) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *S3BucketSource) Validate() error { invalidParams := request.ErrInvalidParams{Context: "S3BucketSource"} if s.S3Bucket == nil { invalidParams.Add(request.NewErrParamRequired("S3Bucket")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetS3Bucket sets the S3Bucket field's value. func (s *S3BucketSource) SetS3Bucket(v string) *S3BucketSource { s.S3Bucket = &v return s } // SetS3BucketOwner sets the S3BucketOwner field's value. func (s *S3BucketSource) SetS3BucketOwner(v string) *S3BucketSource { s.S3BucketOwner = &v return s } // SetS3KeyPrefix sets the S3KeyPrefix field's value. func (s *S3BucketSource) SetS3KeyPrefix(v string) *S3BucketSource { s.S3KeyPrefix = &v return s } // The description of the server-side encryption status on the specified table. type SSEDescription struct { _ struct{} `type:"structure"` // Indicates the time, in UNIX epoch date format, when DynamoDB detected that // the table's KMS key was inaccessible. This attribute will automatically be // cleared when DynamoDB detects that the table's KMS key is accessible again. // DynamoDB will initiate the table archival process when table's KMS key remains // inaccessible for more than seven days from this date. InaccessibleEncryptionDateTime *time.Time `type:"timestamp"` // The KMS key ARN used for the KMS encryption. KMSMasterKeyArn *string `type:"string"` // Server-side encryption type. The only supported value is: // // * KMS - Server-side encryption that uses Key Management Service. The key // is stored in your account and is managed by KMS (KMS charges apply). SSEType *string `type:"string" enum:"SSEType"` // Represents the current state of server-side encryption. The only supported // values are: // // * ENABLED - Server-side encryption is enabled. // // * UPDATING - Server-side encryption is being updated. Status *string `type:"string" enum:"SSEStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SSEDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SSEDescription) GoString() string { return s.String() } // SetInaccessibleEncryptionDateTime sets the InaccessibleEncryptionDateTime field's value. func (s *SSEDescription) SetInaccessibleEncryptionDateTime(v time.Time) *SSEDescription { s.InaccessibleEncryptionDateTime = &v return s } // SetKMSMasterKeyArn sets the KMSMasterKeyArn field's value. func (s *SSEDescription) SetKMSMasterKeyArn(v string) *SSEDescription { s.KMSMasterKeyArn = &v return s } // SetSSEType sets the SSEType field's value. func (s *SSEDescription) SetSSEType(v string) *SSEDescription { s.SSEType = &v return s } // SetStatus sets the Status field's value. func (s *SSEDescription) SetStatus(v string) *SSEDescription { s.Status = &v return s } // Represents the settings used to enable server-side encryption. type SSESpecification struct { _ struct{} `type:"structure"` // Indicates whether server-side encryption is done using an Amazon Web Services // managed key or an Amazon Web Services owned key. If enabled (true), server-side // encryption type is set to KMS and an Amazon Web Services managed key is used // (KMS charges apply). If disabled (false) or not specified, server-side encryption // is set to Amazon Web Services owned key. Enabled *bool `type:"boolean"` // The KMS key that should be used for the KMS encryption. To specify a key, // use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note // that you should only provide this parameter if the key is different from // the default DynamoDB key alias/aws/dynamodb. KMSMasterKeyId *string `type:"string"` // Server-side encryption type. The only supported value is: // // * KMS - Server-side encryption that uses Key Management Service. The key // is stored in your account and is managed by KMS (KMS charges apply). SSEType *string `type:"string" enum:"SSEType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SSESpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SSESpecification) GoString() string { return s.String() } // SetEnabled sets the Enabled field's value. func (s *SSESpecification) SetEnabled(v bool) *SSESpecification { s.Enabled = &v return s } // SetKMSMasterKeyId sets the KMSMasterKeyId field's value. func (s *SSESpecification) SetKMSMasterKeyId(v string) *SSESpecification { s.KMSMasterKeyId = &v return s } // SetSSEType sets the SSEType field's value. func (s *SSESpecification) SetSSEType(v string) *SSESpecification { s.SSEType = &v return s } // Represents the input of a Scan operation. type ScanInput struct { _ struct{} `type:"structure"` // This is a legacy parameter. Use ProjectionExpression instead. For more information, // see AttributesToGet (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html) // in the Amazon DynamoDB Developer Guide. AttributesToGet []*string `min:"1" type:"list"` // This is a legacy parameter. Use FilterExpression instead. For more information, // see ConditionalOperator (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html) // in the Amazon DynamoDB Developer Guide. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"` // A Boolean value that determines the read consistency model during the scan: // // * If ConsistentRead is false, then the data returned from Scan might not // contain the results from other recently completed write operations (PutItem, // UpdateItem, or DeleteItem). // // * If ConsistentRead is true, then all of the write operations that completed // before the Scan began are guaranteed to be contained in the Scan response. // // The default setting for ConsistentRead is false. // // The ConsistentRead parameter is not supported on global secondary indexes. // If you scan a global secondary index with ConsistentRead set to true, you // will receive a ValidationException. ConsistentRead *bool `type:"boolean"` // The primary key of the first item that this operation will evaluate. Use // the value that was returned for LastEvaluatedKey in the previous operation. // // The data type for ExclusiveStartKey must be String, Number or Binary. No // set data types are allowed. // // In a parallel scan, a Scan request that includes ExclusiveStartKey must specify // the same segment whose previous Scan returned the corresponding value of // LastEvaluatedKey. ExclusiveStartKey map[string]*AttributeValue `type:"map"` // One or more substitution tokens for attribute names in an expression. The // following are some use cases for using ExpressionAttributeNames: // // * To access an attribute whose name conflicts with a DynamoDB reserved // word. // // * To create a placeholder for repeating occurrences of an attribute name // in an expression. // // * To prevent special characters in an attribute name from being misinterpreted // in an expression. // // Use the # character in an expression to dereference an attribute name. For // example, consider the following attribute name: // // * Percentile // // The name of this attribute conflicts with a reserved word, so it cannot be // used directly in an expression. (For the complete list of reserved words, // see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide). To work around this, you could specify // the following for ExpressionAttributeNames: // // * {"#P":"Percentile"} // // You could then use this substitution in an expression, as in this example: // // * #P = :val // // Tokens that begin with the : character are expression attribute values, which // are placeholders for the actual value at runtime. // // For more information on expression attribute names, see Specifying Item Attributes // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeNames map[string]*string `type:"map"` // One or more values that can be substituted in an expression. // // Use the : (colon) character in an expression to dereference an attribute // value. For example, suppose that you wanted to check whether the value of // the ProductStatus attribute was one of the following: // // Available | Backordered | Discontinued // // You would first need to specify ExpressionAttributeValues as follows: // // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} // } // // You could then use these values in an expression, such as this: // // ProductStatus IN (:avail, :back, :disc) // // For more information on expression attribute values, see Condition Expressions // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeValues map[string]*AttributeValue `type:"map"` // A string that contains conditions that DynamoDB applies after the Scan operation, // but before the data is returned to you. Items that do not satisfy the FilterExpression // criteria are not returned. // // A FilterExpression is applied after the items have already been read; the // process of filtering does not consume any additional read capacity units. // // For more information, see Filter Expressions (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.FilterExpression) // in the Amazon DynamoDB Developer Guide. FilterExpression *string `type:"string"` // The name of a secondary index to scan. This index can be any local secondary // index or global secondary index. Note that if you use the IndexName parameter, // you must also provide TableName. IndexName *string `min:"3" type:"string"` // The maximum number of items to evaluate (not necessarily the number of matching // items). If DynamoDB processes the number of items up to the limit while processing // the results, it stops the operation and returns the matching values up to // that point, and a key in LastEvaluatedKey to apply in a subsequent operation, // so that you can pick up where you left off. Also, if the processed dataset // size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation // and returns the matching values up to the limit, and a key in LastEvaluatedKey // to apply in a subsequent operation to continue the operation. For more information, // see Working with Queries (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html) // in the Amazon DynamoDB Developer Guide. Limit *int64 `min:"1" type:"integer"` // A string that identifies one or more attributes to retrieve from the specified // table or index. These attributes can include scalars, sets, or elements of // a JSON document. The attributes in the expression must be separated by commas. // // If no attribute names are specified, then all attributes will be returned. // If any of the requested attributes are not found, they will not appear in // the result. // // For more information, see Specifying Item Attributes (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ProjectionExpression *string `type:"string"` // Determines the level of detail about either provisioned or on-demand 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"` // This is a legacy parameter. Use FilterExpression instead. For more information, // see ScanFilter (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ScanFilter.html) // in the Amazon DynamoDB Developer Guide. ScanFilter map[string]*Condition `type:"map"` // For a parallel Scan request, Segment identifies an individual segment to // be scanned by an application worker. // // Segment IDs are zero-based, so the first segment is always 0. For example, // if you want to use four application threads to scan a table or an index, // then the first thread specifies a Segment value of 0, the second thread specifies // 1, and so on. // // The value of LastEvaluatedKey returned from a parallel Scan request must // be used as ExclusiveStartKey with the same segment ID in a subsequent Scan // operation. // // The value for Segment must be greater than or equal to 0, and less than the // value provided for TotalSegments. // // If you provide Segment, you must also provide TotalSegments. Segment *int64 `type:"integer"` // The attributes to be returned in the result. You can retrieve all item attributes, // specific item attributes, the count of matching items, or in the case of // an index, some or all of the attributes projected into the index. // // * ALL_ATTRIBUTES - Returns all of the item attributes from the specified // table or index. If you query a local secondary index, then for each matching // item in the index, DynamoDB fetches the entire item from the parent table. // If the index is configured to project all item attributes, then all of // the data can be obtained from the local secondary index, and no fetching // is required. // // * ALL_PROJECTED_ATTRIBUTES - Allowed only when querying an index. Retrieves // all attributes that have been projected into the index. If the index is // configured to project all attributes, this return value is equivalent // to specifying ALL_ATTRIBUTES. // // * COUNT - Returns the number of matching items, rather than the matching // items themselves. Note that this uses the same quantity of read capacity // units as getting the items, and is subject to the same item size calculations. // // * SPECIFIC_ATTRIBUTES - Returns only the attributes listed in ProjectionExpression. // This return value is equivalent to specifying ProjectionExpression without // specifying any value for Select. If you query or scan a local secondary // index and request only attributes that are projected into that index, // the operation reads only the index and not the table. If any of the requested // attributes are not projected into the local secondary index, DynamoDB // fetches each of these attributes from the parent table. This extra fetching // incurs additional throughput cost and latency. If you query or scan a // global secondary index, you can only request attributes that are projected // into the index. Global secondary index queries cannot fetch attributes // from the parent table. // // If neither Select nor ProjectionExpression are specified, DynamoDB defaults // to ALL_ATTRIBUTES when accessing a table, and ALL_PROJECTED_ATTRIBUTES when // accessing an index. You cannot use both Select and ProjectionExpression together // in a single request, unless the value for Select is SPECIFIC_ATTRIBUTES. // (This usage is equivalent to specifying ProjectionExpression without any // value for Select.) // // If you use the ProjectionExpression parameter, then the value for Select // can only be SPECIFIC_ATTRIBUTES. Any other value for Select will return an // error. Select *string `type:"string" enum:"Select"` // The name of the table containing the requested items; or, if you provide // IndexName, the name of the table to which that index belongs. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` // For a parallel Scan request, TotalSegments represents the total number of // segments into which the Scan operation will be divided. The value of TotalSegments // corresponds to the number of application workers that will perform the parallel // scan. For example, if you want to use four application threads to scan a // table or an index, specify a TotalSegments value of 4. // // The value for TotalSegments must be greater than or equal to 1, and less // than or equal to 1000000. If you specify a TotalSegments value of 1, the // Scan operation will be sequential rather than parallel. // // If you specify TotalSegments, you must also specify Segment. TotalSegments *int64 `min:"1" type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ScanInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ScanInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ScanInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ScanInput"} if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 { invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1)) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } 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.TotalSegments != nil && *s.TotalSegments < 1 { invalidParams.Add(request.NewErrParamMinValue("TotalSegments", 1)) } if s.ScanFilter != nil { for i, v := range s.ScanFilter { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScanFilter", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributesToGet sets the AttributesToGet field's value. func (s *ScanInput) SetAttributesToGet(v []*string) *ScanInput { s.AttributesToGet = v return s } // SetConditionalOperator sets the ConditionalOperator field's value. func (s *ScanInput) SetConditionalOperator(v string) *ScanInput { s.ConditionalOperator = &v return s } // SetConsistentRead sets the ConsistentRead field's value. func (s *ScanInput) SetConsistentRead(v bool) *ScanInput { s.ConsistentRead = &v return s } // SetExclusiveStartKey sets the ExclusiveStartKey field's value. func (s *ScanInput) SetExclusiveStartKey(v map[string]*AttributeValue) *ScanInput { s.ExclusiveStartKey = v return s } // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. func (s *ScanInput) SetExpressionAttributeNames(v map[string]*string) *ScanInput { s.ExpressionAttributeNames = v return s } // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. func (s *ScanInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *ScanInput { s.ExpressionAttributeValues = v return s } // SetFilterExpression sets the FilterExpression field's value. func (s *ScanInput) SetFilterExpression(v string) *ScanInput { s.FilterExpression = &v return s } // SetIndexName sets the IndexName field's value. func (s *ScanInput) SetIndexName(v string) *ScanInput { s.IndexName = &v return s } // SetLimit sets the Limit field's value. func (s *ScanInput) SetLimit(v int64) *ScanInput { s.Limit = &v return s } // SetProjectionExpression sets the ProjectionExpression field's value. func (s *ScanInput) SetProjectionExpression(v string) *ScanInput { s.ProjectionExpression = &v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *ScanInput) SetReturnConsumedCapacity(v string) *ScanInput { s.ReturnConsumedCapacity = &v return s } // SetScanFilter sets the ScanFilter field's value. func (s *ScanInput) SetScanFilter(v map[string]*Condition) *ScanInput { s.ScanFilter = v return s } // SetSegment sets the Segment field's value. func (s *ScanInput) SetSegment(v int64) *ScanInput { s.Segment = &v return s } // SetSelect sets the Select field's value. func (s *ScanInput) SetSelect(v string) *ScanInput { s.Select = &v return s } // SetTableName sets the TableName field's value. func (s *ScanInput) SetTableName(v string) *ScanInput { s.TableName = &v return s } // SetTotalSegments sets the TotalSegments field's value. func (s *ScanInput) SetTotalSegments(v int64) *ScanInput { s.TotalSegments = &v return s } // Represents the output of a Scan operation. type ScanOutput struct { _ struct{} `type:"structure"` // The capacity units consumed by the Scan 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 if the ReturnConsumedCapacity parameter was specified. For more // information, see Provisioned Throughput (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html#ItemSizeCalculations.Reads) // in the Amazon DynamoDB Developer Guide. ConsumedCapacity *ConsumedCapacity `type:"structure"` // The number of items in the response. // // If you set ScanFilter in the request, then Count is the number of items returned // after the filter was applied, and ScannedCount is the number of matching // items before the filter was applied. // // If you did not use a filter in the request, then Count is the same as ScannedCount. Count *int64 `type:"integer"` // An array of item attributes that match the scan criteria. Each element in // this array consists of an attribute name and the value for that attribute. Items []map[string]*AttributeValue `type:"list"` // The primary key of the item where the operation stopped, inclusive of the // previous result set. Use this value to start a new operation, excluding this // value in the new request. // // If LastEvaluatedKey is empty, then the "last page" of results has been processed // and there is no more data to be retrieved. // // If LastEvaluatedKey is not empty, it does not necessarily mean that there // is more data in the result set. The only way to know when you have reached // the end of the result set is when LastEvaluatedKey is empty. LastEvaluatedKey map[string]*AttributeValue `type:"map"` // The number of items evaluated, before any ScanFilter is applied. A high ScannedCount // value with few, or no, Count results indicates an inefficient Scan operation. // For more information, see Count and ScannedCount (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count) // in the Amazon DynamoDB Developer Guide. // // If you did not use a filter in the request, then ScannedCount is the same // as Count. ScannedCount *int64 `type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ScanOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ScanOutput) GoString() string { return s.String() } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *ScanOutput) SetConsumedCapacity(v *ConsumedCapacity) *ScanOutput { s.ConsumedCapacity = v return s } // SetCount sets the Count field's value. func (s *ScanOutput) SetCount(v int64) *ScanOutput { s.Count = &v return s } // SetItems sets the Items field's value. func (s *ScanOutput) SetItems(v []map[string]*AttributeValue) *ScanOutput { s.Items = v return s } // SetLastEvaluatedKey sets the LastEvaluatedKey field's value. func (s *ScanOutput) SetLastEvaluatedKey(v map[string]*AttributeValue) *ScanOutput { s.LastEvaluatedKey = v return s } // SetScannedCount sets the ScannedCount field's value. func (s *ScanOutput) SetScannedCount(v int64) *ScanOutput { s.ScannedCount = &v return s } // Contains the details of the table when the backup was created. 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. Note that this is an approximate value. ItemCount *int64 `type:"long"` // Schema of the table. // // KeySchema is a required field KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` // Read IOPs and Write IOPS on the table when the backup was created. // // ProvisionedThroughput is a required field ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"` // ARN of the table for which backup was created. TableArn *string `type:"string"` // Time when the source table was created. // // TableCreationDateTime is a required field TableCreationDateTime *time.Time `type:"timestamp" required:"true"` // Unique identifier for the table for which the backup was created. // // TableId is a required field TableId *string `type:"string" required:"true"` // The name of the table for which the backup was created. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` // Size of the table in bytes. Note that this is an approximate value. TableSizeBytes *int64 `type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SourceTableDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 return s } // SetKeySchema sets the KeySchema field's value. func (s *SourceTableDetails) SetKeySchema(v []*KeySchemaElement) *SourceTableDetails { s.KeySchema = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *SourceTableDetails) SetProvisionedThroughput(v *ProvisionedThroughput) *SourceTableDetails { s.ProvisionedThroughput = v return s } // SetTableArn sets the TableArn field's value. func (s *SourceTableDetails) SetTableArn(v string) *SourceTableDetails { s.TableArn = &v return s } // SetTableCreationDateTime sets the TableCreationDateTime field's value. func (s *SourceTableDetails) SetTableCreationDateTime(v time.Time) *SourceTableDetails { s.TableCreationDateTime = &v return s } // SetTableId sets the TableId field's value. func (s *SourceTableDetails) SetTableId(v string) *SourceTableDetails { s.TableId = &v return s } // SetTableName sets the TableName field's value. func (s *SourceTableDetails) SetTableName(v string) *SourceTableDetails { s.TableName = &v return s } // SetTableSizeBytes sets the TableSizeBytes field's value. func (s *SourceTableDetails) SetTableSizeBytes(v int64) *SourceTableDetails { s.TableSizeBytes = &v return s } // Contains the details of the features enabled on the table when the backup // was created. For example, LSIs, GSIs, streams, TTL. type SourceTableFeatureDetails struct { _ struct{} `type:"structure"` // Represents the GSI properties for the table when the backup was created. // It includes the IndexName, KeySchema, Projection, and ProvisionedThroughput // for the GSIs on the table at the time of backup. GlobalSecondaryIndexes []*GlobalSecondaryIndexInfo `type:"list"` // Represents the LSI properties for the table when the backup was created. // It includes the IndexName, KeySchema and Projection for the LSIs on the table // at the time of backup. LocalSecondaryIndexes []*LocalSecondaryIndexInfo `type:"list"` // The description of the server-side encryption status on the table when the // backup was created. SSEDescription *SSEDescription `type:"structure"` // Stream settings on the table when the backup was created. StreamDescription *StreamSpecification `type:"structure"` // Time to Live settings on the table when the backup was created. TimeToLiveDescription *TimeToLiveDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SourceTableFeatureDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SourceTableFeatureDetails) GoString() string { return s.String() } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *SourceTableFeatureDetails) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndexInfo) *SourceTableFeatureDetails { s.GlobalSecondaryIndexes = v return s } // SetLocalSecondaryIndexes sets the LocalSecondaryIndexes field's value. func (s *SourceTableFeatureDetails) SetLocalSecondaryIndexes(v []*LocalSecondaryIndexInfo) *SourceTableFeatureDetails { s.LocalSecondaryIndexes = v return s } // SetSSEDescription sets the SSEDescription field's value. func (s *SourceTableFeatureDetails) SetSSEDescription(v *SSEDescription) *SourceTableFeatureDetails { s.SSEDescription = v return s } // SetStreamDescription sets the StreamDescription field's value. func (s *SourceTableFeatureDetails) SetStreamDescription(v *StreamSpecification) *SourceTableFeatureDetails { s.StreamDescription = v return s } // SetTimeToLiveDescription sets the TimeToLiveDescription field's value. func (s *SourceTableFeatureDetails) SetTimeToLiveDescription(v *TimeToLiveDescription) *SourceTableFeatureDetails { s.TimeToLiveDescription = v return s } // Represents the DynamoDB Streams configuration for a table in DynamoDB. type StreamSpecification struct { _ struct{} `type:"structure"` // Indicates whether DynamoDB Streams is enabled (true) or disabled (false) // on the table. // // StreamEnabled is a required field StreamEnabled *bool `type:"boolean" required:"true"` // When an item in the table is modified, StreamViewType determines what information // is written to the stream for this table. Valid values for StreamViewType // are: // // * KEYS_ONLY - Only the key attributes of the modified item are written // to the stream. // // * NEW_IMAGE - The entire item, as it appears after it was modified, is // written to the stream. // // * OLD_IMAGE - The entire item, as it appeared before it was modified, // is written to the stream. // // * NEW_AND_OLD_IMAGES - Both the new and the old item images of the item // are written to the stream. StreamViewType *string `type:"string" enum:"StreamViewType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StreamSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StreamSpecification) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StreamSpecification) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StreamSpecification"} if s.StreamEnabled == nil { invalidParams.Add(request.NewErrParamRequired("StreamEnabled")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetStreamEnabled sets the StreamEnabled field's value. func (s *StreamSpecification) SetStreamEnabled(v bool) *StreamSpecification { s.StreamEnabled = &v return s } // SetStreamViewType sets the StreamViewType field's value. func (s *StreamSpecification) SetStreamViewType(v string) *StreamSpecification { s.StreamViewType = &v return s } // A target table with the specified name already exists. type TableAlreadyExistsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableAlreadyExistsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableAlreadyExistsException) GoString() string { return s.String() } func newErrorTableAlreadyExistsException(v protocol.ResponseMetadata) error { return &TableAlreadyExistsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TableAlreadyExistsException) Code() string { return "TableAlreadyExistsException" } // Message returns the exception's message. func (s *TableAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TableAlreadyExistsException) OrigErr() error { return nil } func (s *TableAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TableAlreadyExistsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TableAlreadyExistsException) RequestID() string { return s.RespMetadata.RequestID } // Represents the auto scaling configuration for a global table. type TableAutoScalingDescription struct { _ struct{} `type:"structure"` // Represents replicas of the global table. Replicas []*ReplicaAutoScalingDescription `type:"list"` // The name of the table. TableName *string `min:"3" type:"string"` // The current state of the table: // // * CREATING - The table is being created. // // * UPDATING - The table is being updated. // // * DELETING - The table is being deleted. // // * ACTIVE - The table is ready for use. TableStatus *string `type:"string" enum:"TableStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableAutoScalingDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableAutoScalingDescription) GoString() string { return s.String() } // SetReplicas sets the Replicas field's value. func (s *TableAutoScalingDescription) SetReplicas(v []*ReplicaAutoScalingDescription) *TableAutoScalingDescription { s.Replicas = v return s } // SetTableName sets the TableName field's value. func (s *TableAutoScalingDescription) SetTableName(v string) *TableAutoScalingDescription { s.TableName = &v return s } // SetTableStatus sets the TableStatus field's value. func (s *TableAutoScalingDescription) SetTableStatus(v string) *TableAutoScalingDescription { s.TableStatus = &v return s } // Contains details of the table class. type TableClassSummary struct { _ struct{} `type:"structure"` // The date and time at which the table class was last updated. LastUpdateDateTime *time.Time `type:"timestamp"` // The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS. TableClass *string `type:"string" enum:"TableClass"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableClassSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableClassSummary) GoString() string { return s.String() } // SetLastUpdateDateTime sets the LastUpdateDateTime field's value. func (s *TableClassSummary) SetLastUpdateDateTime(v time.Time) *TableClassSummary { s.LastUpdateDateTime = &v return s } // SetTableClass sets the TableClass field's value. func (s *TableClassSummary) SetTableClass(v string) *TableClassSummary { s.TableClass = &v return s } // The parameters for the table created as part of the import operation. type TableCreationParameters struct { _ struct{} `type:"structure"` // The attributes of the table created as part of the import operation. // // AttributeDefinitions is a required field AttributeDefinitions []*AttributeDefinition `type:"list" required:"true"` // The billing mode for provisioning the table created as part of the import // operation. BillingMode *string `type:"string" enum:"BillingMode"` // The Global Secondary Indexes (GSI) of the table to be created as part of // the import operation. GlobalSecondaryIndexes []*GlobalSecondaryIndex `type:"list"` // The primary key and option sort key of the table created as part of the import // operation. // // KeySchema is a required field KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` // Represents the provisioned throughput settings for a specified table or index. // The settings can be modified using the UpdateTable operation. // // For current minimum and maximum provisioned throughput values, see Service, // Account, and Table Quotas (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. ProvisionedThroughput *ProvisionedThroughput `type:"structure"` // Represents the settings used to enable server-side encryption. SSESpecification *SSESpecification `type:"structure"` // The name of the table created as part of the import operation. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableCreationParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableCreationParameters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *TableCreationParameters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "TableCreationParameters"} if s.AttributeDefinitions == nil { invalidParams.Add(request.NewErrParamRequired("AttributeDefinitions")) } if s.KeySchema == nil { invalidParams.Add(request.NewErrParamRequired("KeySchema")) } if s.KeySchema != nil && len(s.KeySchema) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) } 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.AttributeDefinitions != nil { for i, v := range s.AttributeDefinitions { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeDefinitions", i), err.(request.ErrInvalidParams)) } } } if s.GlobalSecondaryIndexes != nil { for i, v := range s.GlobalSecondaryIndexes { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexes", i), err.(request.ErrInvalidParams)) } } } if s.KeySchema != nil { for i, v := range s.KeySchema { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams)) } } } if s.ProvisionedThroughput != nil { if err := s.ProvisionedThroughput.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributeDefinitions sets the AttributeDefinitions field's value. func (s *TableCreationParameters) SetAttributeDefinitions(v []*AttributeDefinition) *TableCreationParameters { s.AttributeDefinitions = v return s } // SetBillingMode sets the BillingMode field's value. func (s *TableCreationParameters) SetBillingMode(v string) *TableCreationParameters { s.BillingMode = &v return s } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *TableCreationParameters) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndex) *TableCreationParameters { s.GlobalSecondaryIndexes = v return s } // SetKeySchema sets the KeySchema field's value. func (s *TableCreationParameters) SetKeySchema(v []*KeySchemaElement) *TableCreationParameters { s.KeySchema = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *TableCreationParameters) SetProvisionedThroughput(v *ProvisionedThroughput) *TableCreationParameters { s.ProvisionedThroughput = v return s } // SetSSESpecification sets the SSESpecification field's value. func (s *TableCreationParameters) SetSSESpecification(v *SSESpecification) *TableCreationParameters { s.SSESpecification = v return s } // SetTableName sets the TableName field's value. func (s *TableCreationParameters) SetTableName(v string) *TableCreationParameters { s.TableName = &v return s } // Represents the properties of a table. type TableDescription struct { _ struct{} `type:"structure"` // Contains information about the table archive. ArchivalSummary *ArchivalSummary `type:"structure"` // An array of AttributeDefinition objects. Each of these objects describes // one attribute in the table and index key schema. // // Each AttributeDefinition object in this array is composed of: // // * AttributeName - The name of the attribute. // // * 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"` // Indicates whether deletion protection is enabled (true) or disabled (false) // on the table. DeletionProtectionEnabled *bool `type:"boolean"` // The global secondary indexes, if any, on the table. Each index is scoped // to a given partition key value. Each element is composed of: // // * Backfilling - If true, then the index is currently in the backfilling // phase. Backfilling occurs only when a new global secondary index is added // to the table. It is the process by which DynamoDB populates the new index // with data from the table. (This attribute does not appear for indexes // that were created during a CreateTable operation.) You can delete an index // that is being created during the Backfilling phase when IndexStatus is // set to CREATING and Backfilling is true. You can't delete the index that // is being created when IndexStatus is set to CREATING and Backfilling is // false. (This attribute does not appear for indexes that were created during // a CreateTable operation.) // // * IndexName - The name of the global secondary index. // // * IndexSizeBytes - The total size of the global secondary index, in bytes. // DynamoDB updates this value approximately every six hours. Recent changes // might not be reflected in this value. // // * IndexStatus - The current status of the global secondary index: CREATING // - The index is being created. UPDATING - The index is being updated. DELETING // - The index is being deleted. ACTIVE - The index is ready for use. // // * ItemCount - The number of items in the global secondary index. DynamoDB // updates this value approximately every six hours. Recent changes might // not be reflected in this value. // // * KeySchema - Specifies the complete index key schema. The attribute names // in the key schema must be between 1 and 255 characters (inclusive). The // key schema must begin with the same partition key as the table. // // * Projection - Specifies attributes that are copied (projected) from the // table into the index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. Each attribute // specification is composed of: ProjectionType - One of the following: KEYS_ONLY // - Only the index and primary keys are projected into the index. INCLUDE // - In addition to the attributes described in KEYS_ONLY, the secondary // index will include other non-key attributes that you specify. ALL - All // of the table attributes are projected into the index. NonKeyAttributes // - A list of one or more non-key attribute names that are projected into // the secondary index. The total count of attributes provided in NonKeyAttributes, // summed across all of the secondary indexes, must not exceed 100. If you // project the same attribute into two different indexes, this counts as // two distinct attributes when determining the total. // // * ProvisionedThroughput - The provisioned throughput settings for the // global secondary index, consisting of read and write capacity units, along // with data about increases and decreases. // // If the table is in the DELETING state, no information about indexes will // be returned. GlobalSecondaryIndexes []*GlobalSecondaryIndexDescription `type:"list"` // Represents the version of global tables (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html) // in use, if the table is replicated across Amazon Web Services Regions. GlobalTableVersion *string `type:"string"` // The number of items in the specified table. DynamoDB updates this value approximately // every six hours. Recent changes might not be reflected in this value. ItemCount *int64 `type:"long"` // The primary key structure for the table. Each KeySchemaElement consists of: // // * AttributeName - The name of the attribute. // // * KeyType - The role of the attribute: HASH - partition key RANGE - sort // key The partition key of an item is also known as its hash attribute. // The term "hash attribute" derives from DynamoDB's usage of an internal // hash function to evenly distribute data items across partitions, based // on their partition key values. The sort key of an item is also known as // its range attribute. The term "range attribute" derives from the way DynamoDB // stores items with the same partition key physically close together, in // sorted order by the sort key value. // // For more information about primary keys, see Primary Key (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey) // in the Amazon DynamoDB Developer Guide. KeySchema []*KeySchemaElement `min:"1" type:"list"` // The Amazon Resource Name (ARN) that uniquely identifies the latest stream // for this table. LatestStreamArn *string `min:"37" type:"string"` // A timestamp, in ISO 8601 format, for this stream. // // Note that LatestStreamLabel is not a unique identifier for the stream, because // it is possible that a stream from another table might have the same timestamp. // However, the combination of the following three elements is guaranteed to // be unique: // // * Amazon Web Services customer ID // // * Table name // // * StreamLabel LatestStreamLabel *string `type:"string"` // Represents one or more local secondary indexes on the table. Each index is // scoped to a given partition key value. Tables with one or more local secondary // indexes are subject to an item collection size limit, where the amount of // data within a given item collection cannot exceed 10 GB. Each element is // composed of: // // * IndexName - The name of the local secondary index. // // * KeySchema - Specifies the complete index key schema. The attribute names // in the key schema must be between 1 and 255 characters (inclusive). The // key schema must begin with the same partition key as the table. // // * Projection - Specifies attributes that are copied (projected) from the // table into the index. These are in addition to the primary key attributes // and index key attributes, which are automatically projected. Each attribute // specification is composed of: ProjectionType - One of the following: KEYS_ONLY // - Only the index and primary keys are projected into the index. INCLUDE // - Only the specified table attributes are projected into the index. The // list of projected attributes is in NonKeyAttributes. ALL - All of the // table attributes are projected into the index. NonKeyAttributes - A list // of one or more non-key attribute names that are projected into the secondary // index. The total count of attributes provided in NonKeyAttributes, summed // across all of the secondary indexes, must not exceed 100. If you project // the same attribute into two different indexes, this counts as two distinct // attributes when determining the total. // // * IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB // updates this value approximately every six hours. Recent changes might // not be reflected in this value. // // * ItemCount - Represents the number of items in the index. DynamoDB updates // this value approximately every six hours. Recent changes might not be // reflected in this value. // // If the table is in the DELETING state, no information about indexes will // be returned. LocalSecondaryIndexes []*LocalSecondaryIndexDescription `type:"list"` // The provisioned throughput settings for the table, consisting of read and // write capacity units, along with data about increases and decreases. ProvisionedThroughput *ProvisionedThroughputDescription `type:"structure"` // Represents replicas of the table. Replicas []*ReplicaDescription `type:"list"` // Contains details for the restore. RestoreSummary *RestoreSummary `type:"structure"` // The description of the server-side encryption status on the specified table. SSEDescription *SSEDescription `type:"structure"` // The current DynamoDB Streams configuration for the table. StreamSpecification *StreamSpecification `type:"structure"` // The Amazon Resource Name (ARN) that uniquely identifies the table. TableArn *string `type:"string"` // Contains details of the table class. TableClassSummary *TableClassSummary `type:"structure"` // Unique identifier for the table for which the backup was created. TableId *string `type:"string"` // The name of the table. TableName *string `min:"3" type:"string"` // The total size of the specified table, in bytes. DynamoDB updates this value // approximately every six hours. Recent changes might not be reflected in this // value. TableSizeBytes *int64 `type:"long"` // The current state of the table: // // * CREATING - The table is being created. // // * UPDATING - The table/index configuration is being updated. The table/index // remains available for data operations when UPDATING. // // * DELETING - The table is being deleted. // // * ACTIVE - The table is ready for use. // // * INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the // table in inaccessible. Table operations may fail due to failure to use // the KMS key. DynamoDB will initiate the table archival process when a // table's KMS key remains inaccessible for more than seven days. // // * ARCHIVING - The table is being archived. Operations are not allowed // until archival is complete. // // * ARCHIVED - The table has been archived. See the ArchivalReason for more // information. TableStatus *string `type:"string" enum:"TableStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableDescription) GoString() string { return s.String() } // SetArchivalSummary sets the ArchivalSummary field's value. func (s *TableDescription) SetArchivalSummary(v *ArchivalSummary) *TableDescription { s.ArchivalSummary = v return s } // SetAttributeDefinitions sets the AttributeDefinitions field's value. func (s *TableDescription) SetAttributeDefinitions(v []*AttributeDefinition) *TableDescription { s.AttributeDefinitions = v 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 return s } // SetDeletionProtectionEnabled sets the DeletionProtectionEnabled field's value. func (s *TableDescription) SetDeletionProtectionEnabled(v bool) *TableDescription { s.DeletionProtectionEnabled = &v return s } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *TableDescription) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndexDescription) *TableDescription { s.GlobalSecondaryIndexes = v return s } // SetGlobalTableVersion sets the GlobalTableVersion field's value. func (s *TableDescription) SetGlobalTableVersion(v string) *TableDescription { s.GlobalTableVersion = &v return s } // SetItemCount sets the ItemCount field's value. func (s *TableDescription) SetItemCount(v int64) *TableDescription { s.ItemCount = &v return s } // SetKeySchema sets the KeySchema field's value. func (s *TableDescription) SetKeySchema(v []*KeySchemaElement) *TableDescription { s.KeySchema = v return s } // SetLatestStreamArn sets the LatestStreamArn field's value. func (s *TableDescription) SetLatestStreamArn(v string) *TableDescription { s.LatestStreamArn = &v return s } // SetLatestStreamLabel sets the LatestStreamLabel field's value. func (s *TableDescription) SetLatestStreamLabel(v string) *TableDescription { s.LatestStreamLabel = &v return s } // SetLocalSecondaryIndexes sets the LocalSecondaryIndexes field's value. func (s *TableDescription) SetLocalSecondaryIndexes(v []*LocalSecondaryIndexDescription) *TableDescription { s.LocalSecondaryIndexes = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *TableDescription) SetProvisionedThroughput(v *ProvisionedThroughputDescription) *TableDescription { s.ProvisionedThroughput = v return s } // SetReplicas sets the Replicas field's value. func (s *TableDescription) SetReplicas(v []*ReplicaDescription) *TableDescription { s.Replicas = v return s } // SetRestoreSummary sets the RestoreSummary field's value. func (s *TableDescription) SetRestoreSummary(v *RestoreSummary) *TableDescription { s.RestoreSummary = v return s } // SetSSEDescription sets the SSEDescription field's value. func (s *TableDescription) SetSSEDescription(v *SSEDescription) *TableDescription { s.SSEDescription = v return s } // SetStreamSpecification sets the StreamSpecification field's value. func (s *TableDescription) SetStreamSpecification(v *StreamSpecification) *TableDescription { s.StreamSpecification = v return s } // SetTableArn sets the TableArn field's value. func (s *TableDescription) SetTableArn(v string) *TableDescription { s.TableArn = &v return s } // SetTableClassSummary sets the TableClassSummary field's value. func (s *TableDescription) SetTableClassSummary(v *TableClassSummary) *TableDescription { s.TableClassSummary = v return s } // SetTableId sets the TableId field's value. func (s *TableDescription) SetTableId(v string) *TableDescription { s.TableId = &v return s } // SetTableName sets the TableName field's value. func (s *TableDescription) SetTableName(v string) *TableDescription { s.TableName = &v return s } // SetTableSizeBytes sets the TableSizeBytes field's value. func (s *TableDescription) SetTableSizeBytes(v int64) *TableDescription { s.TableSizeBytes = &v return s } // SetTableStatus sets the TableStatus field's value. func (s *TableDescription) SetTableStatus(v string) *TableDescription { s.TableStatus = &v return s } // A target table with the specified name is either being created or deleted. type TableInUseException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableInUseException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableInUseException) GoString() string { return s.String() } func newErrorTableInUseException(v protocol.ResponseMetadata) error { return &TableInUseException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TableInUseException) Code() string { return "TableInUseException" } // Message returns the exception's message. func (s *TableInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TableInUseException) OrigErr() error { return nil } func (s *TableInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TableInUseException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TableInUseException) RequestID() string { return s.RespMetadata.RequestID } // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. type TableNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TableNotFoundException) GoString() string { return s.String() } func newErrorTableNotFoundException(v protocol.ResponseMetadata) error { return &TableNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TableNotFoundException) Code() string { return "TableNotFoundException" } // Message returns the exception's message. func (s *TableNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TableNotFoundException) OrigErr() error { return nil } func (s *TableNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TableNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TableNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Describes a tag. A tag is a key-value pair. You can add up to 50 tags to // a single DynamoDB table. // // Amazon Web Services-assigned tag names and values are automatically assigned // the aws: prefix, which the user cannot assign. Amazon Web Services-assigned // tag names do not count towards the tag limit of 50. User-assigned tag names // have the prefix user: in the Cost Allocation Report. You cannot backdate // the application of a tag. // // For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) // in the Amazon DynamoDB Developer Guide. type Tag struct { _ struct{} `type:"structure"` // The key of the tag. Tag keys are case sensitive. Each DynamoDB table can // only have up to one tag with the same key. If you try to add an existing // tag (same key), the existing tag value will be updated to the new value. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // The value of the tag. Tag values are case-sensitive and can be null. // // Value is a required field Value *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Tag) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Tag) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Tag) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Tag"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *Tag) SetKey(v string) *Tag { s.Key = &v return s } // SetValue sets the Value field's value. func (s *Tag) SetValue(v string) *Tag { s.Value = &v return s } type TagResourceInput struct { _ struct{} `type:"structure"` // Identifies the Amazon DynamoDB resource to which tags should be added. This // value is an Amazon Resource Name (ARN). // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` // The tags to be assigned to the Amazon DynamoDB resource. // // Tags is a required field Tags []*Tag `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TagResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TagResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *TagResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) } if s.Tags == nil { invalidParams.Add(request.NewErrParamRequired("Tags")) } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceArn sets the ResourceArn field's value. func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { s.ResourceArn = &v return s } // SetTags sets the Tags field's value. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { s.Tags = v return s } type TagResourceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TagResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TagResourceOutput) GoString() string { return s.String() } // The description of the Time to Live (TTL) status on the specified table. type TimeToLiveDescription struct { _ struct{} `type:"structure"` // The name of the TTL attribute for items in the table. AttributeName *string `min:"1" type:"string"` // The TTL status for the table. TimeToLiveStatus *string `type:"string" enum:"TimeToLiveStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TimeToLiveDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TimeToLiveDescription) GoString() string { return s.String() } // SetAttributeName sets the AttributeName field's value. func (s *TimeToLiveDescription) SetAttributeName(v string) *TimeToLiveDescription { s.AttributeName = &v return s } // SetTimeToLiveStatus sets the TimeToLiveStatus field's value. func (s *TimeToLiveDescription) SetTimeToLiveStatus(v string) *TimeToLiveDescription { s.TimeToLiveStatus = &v return s } // Represents the settings used to enable or disable Time to Live (TTL) for // the specified table. type TimeToLiveSpecification struct { _ struct{} `type:"structure"` // The name of the TTL attribute used to store the expiration time for items // in the table. // // AttributeName is a required field AttributeName *string `min:"1" type:"string" required:"true"` // Indicates whether TTL is to be enabled (true) or disabled (false) on the // table. // // Enabled is a required field Enabled *bool `type:"boolean" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TimeToLiveSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TimeToLiveSpecification) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *TimeToLiveSpecification) Validate() error { invalidParams := request.ErrInvalidParams{Context: "TimeToLiveSpecification"} if s.AttributeName == nil { invalidParams.Add(request.NewErrParamRequired("AttributeName")) } if s.AttributeName != nil && len(*s.AttributeName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) } if s.Enabled == nil { invalidParams.Add(request.NewErrParamRequired("Enabled")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributeName sets the AttributeName field's value. func (s *TimeToLiveSpecification) SetAttributeName(v string) *TimeToLiveSpecification { s.AttributeName = &v return s } // SetEnabled sets the Enabled field's value. func (s *TimeToLiveSpecification) SetEnabled(v bool) *TimeToLiveSpecification { s.Enabled = &v return s } // Specifies an item to be retrieved as part of the transaction. type TransactGetItem struct { _ struct{} `type:"structure"` // Contains the primary key that identifies the item to get, together with the // name of the table that contains the item, and optionally the specific attributes // of the item to retrieve. // // Get is a required field Get *Get `type:"structure" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactGetItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 100 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactGetItemsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 100 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactGetItemsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactWriteItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 // might 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. Subsequent TransactWriteItems calls // with the same client token return the number 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 is completed. 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 might not be // idempotent. // // If you submit a request with the same client token but a change in other // parameters within the 10-minute idempotency window, DynamoDB returns an IdempotentParameterMismatch // exception. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` // Determines the level of detail about either provisioned or on-demand 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 100 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 Amazon Web Services // 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactWriteItemsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) } 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactWriteItemsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 } // The entire transaction request was canceled. // // DynamoDB cancels a TransactWriteItems request under the following circumstances: // // - A condition in one of the condition expressions is not met. // // - A table in the TransactWriteItems request is in a different account // or region. // // - More than one action in the TransactWriteItems operation targets the // same item. // // - There is insufficient provisioned capacity for the transaction to be // completed. // // - An item size becomes too large (larger than 400 KB), or 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. // // - There is an ongoing TransactWriteItems operation that conflicts with // a concurrent TransactWriteItems request. In this case the TransactWriteItems // operation fails with a TransactionCanceledException. // // DynamoDB cancels a TransactGetItems request under the following circumstances: // // - There is an ongoing TransactGetItems operation that conflicts with a // concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. // In this case the TransactGetItems operation fails with a TransactionCanceledException. // // - A table in the TransactGetItems request is in a different account or // region. // // - There is insufficient provisioned capacity for the transaction to be // completed. // // - There is a user error, such as an invalid data format. // // If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons // property. This property is not set for other languages. Transaction cancellation // reasons are ordered in the order of requested items, if an item has no error // it will have None code and Null message. // // Cancellation reason codes and possible error messages: // // - No Errors: Code: None Message: null // // - Conditional Check Failed: Code: ConditionalCheckFailed Message: The // conditional request failed. // // - Item Collection Size Limit Exceeded: Code: ItemCollectionSizeLimitExceeded // Message: Collection size exceeded. // // - Transaction Conflict: Code: TransactionConflict Message: Transaction // is ongoing for the item. // // - Provisioned Throughput Exceeded: Code: ProvisionedThroughputExceeded // Messages: The level of configured provisioned throughput for the table // was exceeded. Consider increasing your provisioning level with the UpdateTable // API. This Message is received when provisioned throughput is exceeded // is on a provisioned DynamoDB table. The level of configured provisioned // throughput for one or more global secondary indexes of the table was exceeded. // Consider increasing your provisioning level for the under-provisioned // global secondary indexes with the UpdateTable API. This message is returned // when provisioned throughput is exceeded is on a provisioned GSI. // // - Throttling Error: Code: ThrottlingError Messages: Throughput exceeds // the current capacity of your table or index. DynamoDB is automatically // scaling your table or index so please try again shortly. If exceptions // persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html. // This message is returned when writes get throttled on an On-Demand table // as DynamoDB is automatically scaling the table. Throughput exceeds the // current capacity for one or more global secondary indexes. DynamoDB is // automatically scaling your index so please try again shortly. This message // is returned when writes get throttled on an On-Demand GSI as DynamoDB // is automatically scaling the GSI. // // - Validation Error: Code: ValidationError Messages: One or more parameter // values were invalid. The update expression attempted to update the secondary // index key beyond allowed size limits. The update expression attempted // to update the secondary index key to unsupported type. An operand in the // update expression has an incorrect data type. Item size to update has // exceeded the maximum allowed size. Number overflow. Attempting to store // a number with magnitude larger than supported range. Type mismatch for // attribute to update. Nesting Levels have exceeded supported limits. The // document path provided in the update expression is invalid for update. // The provided expression refers to an attribute that does not exist in // the item. type TransactionCanceledException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A list of cancellation reasons. CancellationReasons []*CancellationReason `min:"1" type:"list"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactionCanceledException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactionCanceledException) GoString() string { return s.String() } func newErrorTransactionCanceledException(v protocol.ResponseMetadata) error { return &TransactionCanceledException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TransactionCanceledException) Code() string { return "TransactionCanceledException" } // Message returns the exception's message. func (s *TransactionCanceledException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TransactionCanceledException) OrigErr() error { return nil } func (s *TransactionCanceledException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *TransactionCanceledException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TransactionCanceledException) RequestID() string { return s.RespMetadata.RequestID } // Operation was rejected because there is an ongoing transaction for the item. type TransactionConflictException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactionConflictException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactionConflictException) GoString() string { return s.String() } func newErrorTransactionConflictException(v protocol.ResponseMetadata) error { return &TransactionConflictException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TransactionConflictException) Code() string { return "TransactionConflictException" } // Message returns the exception's message. func (s *TransactionConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TransactionConflictException) OrigErr() error { return nil } func (s *TransactionConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TransactionConflictException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TransactionConflictException) RequestID() string { return s.RespMetadata.RequestID } // The transaction with the given request token is already in progress. // // # Recommended Settings // // This is a general recommendation for handling the TransactionInProgressException. // These settings help ensure that the client retries will trigger completion // of the ongoing TransactWriteItems request. // // - Set clientExecutionTimeout to a value that allows at least one retry // to be processed after 5 seconds have elapsed since the first attempt for // the TransactWriteItems operation. // // - Set socketTimeout to a value a little lower than the requestTimeout // setting. // // - requestTimeout should be set based on the time taken for the individual // retries of a single HTTP request for your use case, but setting it to // 1 second or higher should work well to reduce chances of retries and TransactionInProgressException // errors. // // - Use exponential backoff when retrying and tune backoff if needed. // // Assuming default retry policy (https://github.com/aws/aws-sdk-java/blob/fd409dee8ae23fb8953e0bb4dbde65536a7e0514/aws-java-sdk-core/src/main/java/com/amazonaws/retry/PredefinedRetryPolicies.java#L97), // example timeout settings based on the guidelines above are as follows: // // Example timeline: // // - 0-1000 first attempt // // - 1000-1500 first sleep/delay (default retry policy uses 500 ms as base // delay for 4xx errors) // // - 1500-2500 second attempt // // - 2500-3500 second sleep/delay (500 * 2, exponential backoff) // // - 3500-4500 third attempt // // - 4500-6500 third sleep/delay (500 * 2^2) // // - 6500-7500 fourth attempt (this can trigger inline recovery since 5 seconds // have elapsed since the first attempt reached TC) type TransactionInProgressException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactionInProgressException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TransactionInProgressException) GoString() string { return s.String() } func newErrorTransactionInProgressException(v protocol.ResponseMetadata) error { return &TransactionInProgressException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TransactionInProgressException) Code() string { return "TransactionInProgressException" } // Message returns the exception's message. func (s *TransactionInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TransactionInProgressException) OrigErr() error { return nil } func (s *TransactionInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TransactionInProgressException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TransactionInProgressException) RequestID() string { return s.RespMetadata.RequestID } type UntagResourceInput struct { _ struct{} `type:"structure"` // The DynamoDB resource that the tags will be removed from. This value is an // Amazon Resource Name (ARN). // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` // A list of tag keys. Existing tags of the resource whose keys are members // of this list will be removed from the DynamoDB resource. // // TagKeys is a required field TagKeys []*string `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UntagResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UntagResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UntagResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) } if s.TagKeys == nil { invalidParams.Add(request.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceArn sets the ResourceArn field's value. func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { s.ResourceArn = &v return s } // SetTagKeys sets the TagKeys field's value. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { s.TagKeys = v return s } type UntagResourceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UntagResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 and ALL_OLD. 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Update) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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"` // Represents the settings used to enable point in time recovery. // // PointInTimeRecoverySpecification is a required field PointInTimeRecoverySpecification *PointInTimeRecoverySpecification `type:"structure" required:"true"` // The name of the table. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateContinuousBackupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateContinuousBackupsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateContinuousBackupsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateContinuousBackupsInput"} if s.PointInTimeRecoverySpecification == nil { invalidParams.Add(request.NewErrParamRequired("PointInTimeRecoverySpecification")) } 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.PointInTimeRecoverySpecification != nil { if err := s.PointInTimeRecoverySpecification.Validate(); err != nil { invalidParams.AddNested("PointInTimeRecoverySpecification", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetPointInTimeRecoverySpecification sets the PointInTimeRecoverySpecification field's value. func (s *UpdateContinuousBackupsInput) SetPointInTimeRecoverySpecification(v *PointInTimeRecoverySpecification) *UpdateContinuousBackupsInput { s.PointInTimeRecoverySpecification = v return s } // SetTableName sets the TableName field's value. func (s *UpdateContinuousBackupsInput) SetTableName(v string) *UpdateContinuousBackupsInput { s.TableName = &v return s } type UpdateContinuousBackupsOutput struct { _ struct{} `type:"structure"` // Represents the continuous backups and point in time recovery settings on // the table. ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateContinuousBackupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateContinuousBackupsOutput) GoString() string { return s.String() } // SetContinuousBackupsDescription sets the ContinuousBackupsDescription field's value. func (s *UpdateContinuousBackupsOutput) SetContinuousBackupsDescription(v *ContinuousBackupsDescription) *UpdateContinuousBackupsOutput { s.ContinuousBackupsDescription = v return s } type UpdateContributorInsightsInput struct { _ struct{} `type:"structure"` // Represents the contributor insights action. // // ContributorInsightsAction is a required field ContributorInsightsAction *string `type:"string" required:"true" enum:"ContributorInsightsAction"` // The global secondary index name, if applicable. IndexName *string `min:"3" type:"string"` // The name of the table. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateContributorInsightsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateContributorInsightsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateContributorInsightsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateContributorInsightsInput"} if s.ContributorInsightsAction == nil { invalidParams.Add(request.NewErrParamRequired("ContributorInsightsAction")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } 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 } // SetContributorInsightsAction sets the ContributorInsightsAction field's value. func (s *UpdateContributorInsightsInput) SetContributorInsightsAction(v string) *UpdateContributorInsightsInput { s.ContributorInsightsAction = &v return s } // SetIndexName sets the IndexName field's value. func (s *UpdateContributorInsightsInput) SetIndexName(v string) *UpdateContributorInsightsInput { s.IndexName = &v return s } // SetTableName sets the TableName field's value. func (s *UpdateContributorInsightsInput) SetTableName(v string) *UpdateContributorInsightsInput { s.TableName = &v return s } type UpdateContributorInsightsOutput struct { _ struct{} `type:"structure"` // The status of contributor insights ContributorInsightsStatus *string `type:"string" enum:"ContributorInsightsStatus"` // The name of the global secondary index, if applicable. IndexName *string `min:"3" type:"string"` // The name of the table. TableName *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateContributorInsightsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateContributorInsightsOutput) GoString() string { return s.String() } // SetContributorInsightsStatus sets the ContributorInsightsStatus field's value. func (s *UpdateContributorInsightsOutput) SetContributorInsightsStatus(v string) *UpdateContributorInsightsOutput { s.ContributorInsightsStatus = &v return s } // SetIndexName sets the IndexName field's value. func (s *UpdateContributorInsightsOutput) SetIndexName(v string) *UpdateContributorInsightsOutput { s.IndexName = &v return s } // SetTableName sets the TableName field's value. func (s *UpdateContributorInsightsOutput) SetTableName(v string) *UpdateContributorInsightsOutput { s.TableName = &v return s } // Represents the new provisioned throughput settings to be applied to a global // secondary index. type UpdateGlobalSecondaryIndexAction struct { _ struct{} `type:"structure"` // The name of the global secondary index to be updated. // // IndexName is a required field IndexName *string `min:"3" type:"string" required:"true"` // Represents the provisioned throughput settings for the specified global secondary // index. // // For current minimum and maximum provisioned throughput values, see Service, // Account, and Table Quotas (https://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"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalSecondaryIndexAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalSecondaryIndexAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateGlobalSecondaryIndexAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalSecondaryIndexAction"} if s.IndexName == nil { invalidParams.Add(request.NewErrParamRequired("IndexName")) } if s.IndexName != nil && len(*s.IndexName) < 3 { invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) } if s.ProvisionedThroughput == nil { invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput")) } if s.ProvisionedThroughput != nil { if err := s.ProvisionedThroughput.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIndexName sets the IndexName field's value. func (s *UpdateGlobalSecondaryIndexAction) SetIndexName(v string) *UpdateGlobalSecondaryIndexAction { s.IndexName = &v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *UpdateGlobalSecondaryIndexAction) SetProvisionedThroughput(v *ProvisionedThroughput) *UpdateGlobalSecondaryIndexAction { s.ProvisionedThroughput = v return s } type UpdateGlobalTableInput struct { _ struct{} `type:"structure"` // The global table name. // // GlobalTableName is a required field GlobalTableName *string `min:"3" type:"string" required:"true"` // A list of Regions that should be added or removed from the global table. // // ReplicaUpdates is a required field ReplicaUpdates []*ReplicaUpdate `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateGlobalTableInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalTableInput"} if s.GlobalTableName == nil { invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) } if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) } if s.ReplicaUpdates == nil { invalidParams.Add(request.NewErrParamRequired("ReplicaUpdates")) } if s.ReplicaUpdates != nil { for i, v := range s.ReplicaUpdates { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaUpdates", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetGlobalTableName sets the GlobalTableName field's value. func (s *UpdateGlobalTableInput) SetGlobalTableName(v string) *UpdateGlobalTableInput { s.GlobalTableName = &v return s } // SetReplicaUpdates sets the ReplicaUpdates field's value. func (s *UpdateGlobalTableInput) SetReplicaUpdates(v []*ReplicaUpdate) *UpdateGlobalTableInput { s.ReplicaUpdates = v return s } type UpdateGlobalTableOutput struct { _ struct{} `type:"structure"` // Contains the details of the global table. GlobalTableDescription *GlobalTableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalTableOutput) GoString() string { return s.String() } // SetGlobalTableDescription sets the GlobalTableDescription field's value. func (s *UpdateGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescription) *UpdateGlobalTableOutput { s.GlobalTableDescription = v return s } 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. // // * PROVISIONED - We recommend using PROVISIONED for predictable workloads. // PROVISIONED sets the billing mode to Provisioned Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual). // // * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable // workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand). 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"` // The name of the global table // // GlobalTableName is a required field GlobalTableName *string `min:"3" type:"string" required:"true"` // Auto scaling settings for managing provisioned write capacity for the global // table. GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"` // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. GlobalTableProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` // Represents the settings for a global table in a Region that will be modified. ReplicaSettingsUpdate []*ReplicaSettingsUpdate `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalTableSettingsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalTableSettingsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateGlobalTableSettingsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalTableSettingsInput"} if s.GlobalTableGlobalSecondaryIndexSettingsUpdate != nil && len(s.GlobalTableGlobalSecondaryIndexSettingsUpdate) < 1 { invalidParams.Add(request.NewErrParamMinLen("GlobalTableGlobalSecondaryIndexSettingsUpdate", 1)) } if s.GlobalTableName == nil { invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) } if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) } if s.GlobalTableProvisionedWriteCapacityUnits != nil && *s.GlobalTableProvisionedWriteCapacityUnits < 1 { invalidParams.Add(request.NewErrParamMinValue("GlobalTableProvisionedWriteCapacityUnits", 1)) } if s.ReplicaSettingsUpdate != nil && len(s.ReplicaSettingsUpdate) < 1 { invalidParams.Add(request.NewErrParamMinLen("ReplicaSettingsUpdate", 1)) } if s.GlobalTableGlobalSecondaryIndexSettingsUpdate != nil { for i, v := range s.GlobalTableGlobalSecondaryIndexSettingsUpdate { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalTableGlobalSecondaryIndexSettingsUpdate", i), err.(request.ErrInvalidParams)) } } } if s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate != nil { if err := s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate.Validate(); err != nil { invalidParams.AddNested("GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams)) } } if s.ReplicaSettingsUpdate != nil { for i, v := range s.ReplicaSettingsUpdate { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaSettingsUpdate", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } 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 return s } // SetGlobalTableName sets the GlobalTableName field's value. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableName(v string) *UpdateGlobalTableSettingsInput { s.GlobalTableName = &v return s } // SetGlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate sets the GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate field's value. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *UpdateGlobalTableSettingsInput { s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = v return s } // SetGlobalTableProvisionedWriteCapacityUnits sets the GlobalTableProvisionedWriteCapacityUnits field's value. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableProvisionedWriteCapacityUnits(v int64) *UpdateGlobalTableSettingsInput { s.GlobalTableProvisionedWriteCapacityUnits = &v return s } // SetReplicaSettingsUpdate sets the ReplicaSettingsUpdate field's value. func (s *UpdateGlobalTableSettingsInput) SetReplicaSettingsUpdate(v []*ReplicaSettingsUpdate) *UpdateGlobalTableSettingsInput { s.ReplicaSettingsUpdate = v return s } type UpdateGlobalTableSettingsOutput struct { _ struct{} `type:"structure"` // The name of the global table. GlobalTableName *string `min:"3" type:"string"` // The Region-specific settings for the global table. ReplicaSettings []*ReplicaSettingsDescription `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalTableSettingsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateGlobalTableSettingsOutput) GoString() string { return s.String() } // SetGlobalTableName sets the GlobalTableName field's value. func (s *UpdateGlobalTableSettingsOutput) SetGlobalTableName(v string) *UpdateGlobalTableSettingsOutput { s.GlobalTableName = &v return s } // SetReplicaSettings sets the ReplicaSettings field's value. func (s *UpdateGlobalTableSettingsOutput) SetReplicaSettings(v []*ReplicaSettingsDescription) *UpdateGlobalTableSettingsOutput { s.ReplicaSettings = v return s } // Represents the input of an UpdateItem operation. type UpdateItemInput struct { _ struct{} `type:"structure"` // This is a legacy parameter. Use UpdateExpression instead. For more information, // see AttributeUpdates (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html) // in the Amazon DynamoDB Developer Guide. AttributeUpdates map[string]*AttributeValueUpdate `type:"map"` // A condition that must be satisfied in order for a conditional update to succeed. // // An expression can contain any of the following: // // * Functions: attribute_exists | attribute_not_exists | attribute_type // | contains | begins_with | size These function names are case-sensitive. // // * Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN // // * Logical operators: AND | OR | NOT // // For more information about condition expressions, see Specifying Conditions // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html) // in the Amazon DynamoDB Developer Guide. ConditionExpression *string `type:"string"` // This is a legacy parameter. Use ConditionExpression instead. For more information, // see ConditionalOperator (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html) // in the Amazon DynamoDB Developer Guide. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"` // This is a legacy parameter. Use ConditionExpression instead. For more information, // see Expected (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html) // in the Amazon DynamoDB Developer Guide. Expected map[string]*ExpectedAttributeValue `type:"map"` // One or more substitution tokens for attribute names in an expression. The // following are some use cases for using ExpressionAttributeNames: // // * To access an attribute whose name conflicts with a DynamoDB reserved // word. // // * To create a placeholder for repeating occurrences of an attribute name // in an expression. // // * To prevent special characters in an attribute name from being misinterpreted // in an expression. // // Use the # character in an expression to dereference an attribute name. For // example, consider the following attribute name: // // * Percentile // // The name of this attribute conflicts with a reserved word, so it cannot be // used directly in an expression. (For the complete list of reserved words, // see Reserved Words (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) // in the Amazon DynamoDB Developer Guide.) To work around this, you could specify // the following for ExpressionAttributeNames: // // * {"#P":"Percentile"} // // You could then use this substitution in an expression, as in this example: // // * #P = :val // // Tokens that begin with the : character are expression attribute values, which // are placeholders for the actual value at runtime. // // For more information about expression attribute names, see Specifying Item // Attributes (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) // in the Amazon DynamoDB Developer Guide. ExpressionAttributeNames map[string]*string `type:"map"` // One or more values that can be substituted in an expression. // // Use the : (colon) character in an expression to dereference an attribute // value. For example, suppose that you wanted to check whether the value of // the ProductStatus attribute was one of the following: // // Available | Backordered | Discontinued // // You would first need to specify ExpressionAttributeValues as follows: // // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} // } // // You could then use these values in an expression, such as this: // // ProductStatus IN (:avail, :back, :disc) // // For more information on expression attribute values, see Condition Expressions // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html) // in the Amazon DynamoDB Developer Guide. 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. // // For the primary key, you must provide all of the attributes. For example, // with a simple primary key, you only need to provide a value for the partition // key. For a composite primary key, you must provide values for both the partition // key and the sort key. // // Key is a required field Key map[string]*AttributeValue `type:"map" required:"true"` // Determines the level of detail about either provisioned or on-demand 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 are returned in the response. If set to NONE // (the default), no statistics are returned. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"` // Use ReturnValues if you want to get the item attributes as they appear before // or after they are successfully updated. For UpdateItem, the valid values // are: // // * NONE - If ReturnValues is not specified, or if its value is NONE, then // nothing is returned. (This setting is the default for ReturnValues.) // // * ALL_OLD - Returns all of the attributes of the item, as they appeared // before the UpdateItem operation. // // * UPDATED_OLD - Returns only the updated attributes, as they appeared // before the UpdateItem operation. // // * ALL_NEW - Returns all of the attributes of the item, as they appear // after the UpdateItem operation. // // * UPDATED_NEW - Returns only the updated attributes, as they appear after // the UpdateItem operation. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. // // The values returned are strongly consistent. ReturnValues *string `type:"string" enum:"ReturnValue"` // An optional parameter that returns the item attributes for an UpdateItem // operation that failed a condition check. // // There is no additional cost associated with requesting a return value aside // from the small network and processing overhead of receiving a larger response. // No read capacity units are consumed. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` // The name of the table containing the item to update. // // 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 values for them. // // The following action values are available for UpdateExpression. // // * SET - Adds one or more attributes and values to an item. If any of these // attributes already exist, they are replaced by the new values. You can // also use SET to add or subtract from an attribute that is of type Number. // For example: SET myNum = myNum + :val SET supports the following functions: // if_not_exists (path, operand) - if the item does not contain an attribute // at the specified path, then if_not_exists evaluates to operand; otherwise, // it evaluates to path. You can use this function to avoid overwriting an // attribute that may already be present in the item. list_append (operand, // operand) - evaluates to a list with a new element added to it. You can // append the new element to the start or the end of the list by reversing // the order of the operands. These function names are case-sensitive. // // * REMOVE - Removes one or more attributes from an item. // // * ADD - Adds the specified value to the item, if the attribute does not // already exist. If the attribute does exist, then the behavior of ADD depends // on the data type of the attribute: If the existing attribute is a number, // and if Value is also a number, then Value is mathematically added to the // existing attribute. If Value is a negative number, then it is subtracted // from the existing attribute. If you use ADD to increment or decrement // a number value for an item that doesn't exist before the update, DynamoDB // uses 0 as the initial value. Similarly, if you use ADD for an existing // item to increment or decrement an attribute value that doesn't exist before // the update, DynamoDB uses 0 as the initial value. For example, suppose // that the item you want to update doesn't have an attribute named itemcount, // but you decide to ADD the number 3 to this attribute anyway. DynamoDB // will create the itemcount attribute, set its initial value to 0, and finally // add 3 to it. The result will be a new itemcount attribute in the item, // with a value of 3. If the existing data type is a set and if Value is // also a set, then Value is added to the existing set. For example, if the // attribute value is the set [1,2], and the ADD action specified [3], then // the final attribute value is [1,2,3]. An error occurs if an ADD action // is specified for a set attribute and the attribute type specified does // not match the existing set type. Both sets must have the same primitive // data type. For example, if the existing data type is a set of strings, // the Value must also be a set of strings. The ADD action only supports // Number and set data types. In addition, ADD can only be used on top-level // attributes, not nested attributes. // // * DELETE - Deletes an element from a set. If a set of values is specified, // then those values are subtracted from the old set. For example, if the // attribute value was the set [a,b,c] and the DELETE action specifies [a,c], // then the final attribute value is [b]. Specifying an empty set is an error. // The DELETE action only supports set data types. In addition, DELETE can // only be used on top-level attributes, not nested attributes. // // You can have many actions in a single expression, such as the following: // SET a=:value1, b=:value2 DELETE :value3, :value4, :value5 // // For more information on update expressions, see Modifying Items and Attributes // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html) // in the Amazon DynamoDB Developer Guide. UpdateExpression *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateItemInput"} 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 } // SetAttributeUpdates sets the AttributeUpdates field's value. func (s *UpdateItemInput) SetAttributeUpdates(v map[string]*AttributeValueUpdate) *UpdateItemInput { s.AttributeUpdates = v return s } // SetConditionExpression sets the ConditionExpression field's value. func (s *UpdateItemInput) SetConditionExpression(v string) *UpdateItemInput { s.ConditionExpression = &v return s } // SetConditionalOperator sets the ConditionalOperator field's value. func (s *UpdateItemInput) SetConditionalOperator(v string) *UpdateItemInput { s.ConditionalOperator = &v return s } // SetExpected sets the Expected field's value. func (s *UpdateItemInput) SetExpected(v map[string]*ExpectedAttributeValue) *UpdateItemInput { s.Expected = v return s } // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. func (s *UpdateItemInput) SetExpressionAttributeNames(v map[string]*string) *UpdateItemInput { s.ExpressionAttributeNames = v return s } // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. func (s *UpdateItemInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *UpdateItemInput { s.ExpressionAttributeValues = v return s } // SetKey sets the Key field's value. func (s *UpdateItemInput) SetKey(v map[string]*AttributeValue) *UpdateItemInput { s.Key = v return s } // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. func (s *UpdateItemInput) SetReturnConsumedCapacity(v string) *UpdateItemInput { s.ReturnConsumedCapacity = &v return s } // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value. func (s *UpdateItemInput) SetReturnItemCollectionMetrics(v string) *UpdateItemInput { s.ReturnItemCollectionMetrics = &v return s } // SetReturnValues sets the ReturnValues field's value. func (s *UpdateItemInput) SetReturnValues(v string) *UpdateItemInput { s.ReturnValues = &v return s } // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. func (s *UpdateItemInput) SetReturnValuesOnConditionCheckFailure(v string) *UpdateItemInput { s.ReturnValuesOnConditionCheckFailure = &v return s } // SetTableName sets the TableName field's value. func (s *UpdateItemInput) SetTableName(v string) *UpdateItemInput { s.TableName = &v return s } // SetUpdateExpression sets the UpdateExpression field's value. func (s *UpdateItemInput) SetUpdateExpression(v string) *UpdateItemInput { s.UpdateExpression = &v return s } // Represents the output of an UpdateItem operation. type UpdateItemOutput struct { _ struct{} `type:"structure"` // A map of attribute values as they appear before or after the UpdateItem operation, // as determined by the ReturnValues parameter. // // The Attributes map is only present if the update was successful and ReturnValues // was specified as something other than NONE in the request. Each element represents // one attribute. Attributes map[string]*AttributeValue `type:"map"` // The capacity units consumed by the UpdateItem 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 if the ReturnConsumedCapacity parameter was specified. For // more information, see Provisioned Throughput (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html#ItemSizeCalculations.Reads) // in the Amazon DynamoDB Developer Guide. ConsumedCapacity *ConsumedCapacity `type:"structure"` // Information about item collections, if any, that were affected by the UpdateItem // operation. ItemCollectionMetrics is only returned if the ReturnItemCollectionMetrics // parameter was specified. If the table does not have any local secondary indexes, // this information is not returned in the response. // // Each ItemCollectionMetrics element consists of: // // * ItemCollectionKey - The partition key value of the item collection. // This is the same as the partition key value of the item itself. // // * SizeEstimateRangeGB - An estimate of item collection size, in gigabytes. // This value is a two-element array containing a lower bound and an upper // bound for the estimate. The estimate includes the size of all the items // in the table, plus the size of all attributes projected into all of the // local secondary indexes on that table. Use this estimate to measure whether // a local secondary index is approaching its size limit. The estimate is // subject to change over time; therefore, do not rely on the precision or // accuracy of the estimate. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateItemOutput) GoString() string { return s.String() } // SetAttributes sets the Attributes field's value. func (s *UpdateItemOutput) SetAttributes(v map[string]*AttributeValue) *UpdateItemOutput { s.Attributes = v return s } // SetConsumedCapacity sets the ConsumedCapacity field's value. func (s *UpdateItemOutput) SetConsumedCapacity(v *ConsumedCapacity) *UpdateItemOutput { s.ConsumedCapacity = v return s } // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value. func (s *UpdateItemOutput) SetItemCollectionMetrics(v *ItemCollectionMetrics) *UpdateItemOutput { s.ItemCollectionMetrics = v return s } // Represents a replica to be modified. type UpdateReplicationGroupMemberAction struct { _ struct{} `type:"structure"` // Replica-specific global secondary index settings. GlobalSecondaryIndexes []*ReplicaGlobalSecondaryIndex `min:"1" type:"list"` // The KMS key of the replica that should be used for KMS encryption. To specify // a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. // Note that you should only provide this parameter if the key is different // from the default DynamoDB KMS key alias/aws/dynamodb. KMSMasterKeyId *string `type:"string"` // Replica-specific provisioned throughput. If not specified, uses the source // table's provisioned throughput settings. ProvisionedThroughputOverride *ProvisionedThroughputOverride `type:"structure"` // The Region where the replica exists. // // RegionName is a required field RegionName *string `type:"string" required:"true"` // Replica-specific table class. If not specified, uses the source table's table // class. TableClassOverride *string `type:"string" enum:"TableClass"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateReplicationGroupMemberAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateReplicationGroupMemberAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateReplicationGroupMemberAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateReplicationGroupMemberAction"} if s.GlobalSecondaryIndexes != nil && len(s.GlobalSecondaryIndexes) < 1 { invalidParams.Add(request.NewErrParamMinLen("GlobalSecondaryIndexes", 1)) } if s.RegionName == nil { invalidParams.Add(request.NewErrParamRequired("RegionName")) } if s.GlobalSecondaryIndexes != nil { for i, v := range s.GlobalSecondaryIndexes { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexes", i), err.(request.ErrInvalidParams)) } } } if s.ProvisionedThroughputOverride != nil { if err := s.ProvisionedThroughputOverride.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughputOverride", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *UpdateReplicationGroupMemberAction) SetGlobalSecondaryIndexes(v []*ReplicaGlobalSecondaryIndex) *UpdateReplicationGroupMemberAction { s.GlobalSecondaryIndexes = v return s } // SetKMSMasterKeyId sets the KMSMasterKeyId field's value. func (s *UpdateReplicationGroupMemberAction) SetKMSMasterKeyId(v string) *UpdateReplicationGroupMemberAction { s.KMSMasterKeyId = &v return s } // SetProvisionedThroughputOverride sets the ProvisionedThroughputOverride field's value. func (s *UpdateReplicationGroupMemberAction) SetProvisionedThroughputOverride(v *ProvisionedThroughputOverride) *UpdateReplicationGroupMemberAction { s.ProvisionedThroughputOverride = v return s } // SetRegionName sets the RegionName field's value. func (s *UpdateReplicationGroupMemberAction) SetRegionName(v string) *UpdateReplicationGroupMemberAction { s.RegionName = &v return s } // SetTableClassOverride sets the TableClassOverride field's value. func (s *UpdateReplicationGroupMemberAction) SetTableClassOverride(v string) *UpdateReplicationGroupMemberAction { s.TableClassOverride = &v return s } // Represents the input of an UpdateTable operation. type UpdateTableInput struct { _ struct{} `type:"structure"` // An array of attributes that describe the key schema for the table and indexes. // If you are adding a new global secondary index to the table, AttributeDefinitions // 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 - We recommend using PROVISIONED for predictable workloads. // PROVISIONED sets the billing mode to Provisioned Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual). // // * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable // workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand). BillingMode *string `type:"string" enum:"BillingMode"` // Indicates whether deletion protection is to be enabled (true) or disabled // (false) on the table. DeletionProtectionEnabled *bool `type:"boolean"` // An array of one or more global secondary indexes for the table. For each // index in the array, you can request one action: // // * Create - add a new global secondary index to the table. // // * Update - modify the provisioned throughput settings of an existing global // secondary index. // // * Delete - remove a global secondary index from the table. // // You can create or delete only one global secondary index per UpdateTable // operation. // // For more information, see Managing Global Secondary Indexes (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html) // in the Amazon DynamoDB Developer Guide. GlobalSecondaryIndexUpdates []*GlobalSecondaryIndexUpdate `type:"list"` // The new provisioned throughput settings for the specified table or index. ProvisionedThroughput *ProvisionedThroughput `type:"structure"` // A list of replica update actions (create, delete, or update) for the table. // // This property only applies to Version 2019.11.21 (Current) (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // of global tables. ReplicaUpdates []*ReplicationGroupUpdate `min:"1" type:"list"` // The new server-side encryption settings for the specified table. SSESpecification *SSESpecification `type:"structure"` // Represents the DynamoDB Streams configuration for the table. // // You receive a ResourceInUseException if you try to enable a stream on a table // that already has a stream, or if you try to disable a stream on a table that // doesn't have a stream. StreamSpecification *StreamSpecification `type:"structure"` // The table class of the table to be updated. Valid values are STANDARD and // STANDARD_INFREQUENT_ACCESS. TableClass *string `type:"string" enum:"TableClass"` // The name of the table to be updated. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateTableInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateTableInput"} if s.ReplicaUpdates != nil && len(s.ReplicaUpdates) < 1 { invalidParams.Add(request.NewErrParamMinLen("ReplicaUpdates", 1)) } 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.AttributeDefinitions != nil { for i, v := range s.AttributeDefinitions { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeDefinitions", i), err.(request.ErrInvalidParams)) } } } if s.GlobalSecondaryIndexUpdates != nil { for i, v := range s.GlobalSecondaryIndexUpdates { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexUpdates", i), err.(request.ErrInvalidParams)) } } } if s.ProvisionedThroughput != nil { if err := s.ProvisionedThroughput.Validate(); err != nil { invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams)) } } if s.ReplicaUpdates != nil { for i, v := range s.ReplicaUpdates { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaUpdates", i), err.(request.ErrInvalidParams)) } } } if s.StreamSpecification != nil { if err := s.StreamSpecification.Validate(); err != nil { invalidParams.AddNested("StreamSpecification", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAttributeDefinitions sets the AttributeDefinitions field's value. func (s *UpdateTableInput) SetAttributeDefinitions(v []*AttributeDefinition) *UpdateTableInput { s.AttributeDefinitions = v return s } // SetBillingMode sets the BillingMode field's value. func (s *UpdateTableInput) SetBillingMode(v string) *UpdateTableInput { s.BillingMode = &v return s } // SetDeletionProtectionEnabled sets the DeletionProtectionEnabled field's value. func (s *UpdateTableInput) SetDeletionProtectionEnabled(v bool) *UpdateTableInput { s.DeletionProtectionEnabled = &v return s } // SetGlobalSecondaryIndexUpdates sets the GlobalSecondaryIndexUpdates field's value. func (s *UpdateTableInput) SetGlobalSecondaryIndexUpdates(v []*GlobalSecondaryIndexUpdate) *UpdateTableInput { s.GlobalSecondaryIndexUpdates = v return s } // SetProvisionedThroughput sets the ProvisionedThroughput field's value. func (s *UpdateTableInput) SetProvisionedThroughput(v *ProvisionedThroughput) *UpdateTableInput { s.ProvisionedThroughput = v return s } // SetReplicaUpdates sets the ReplicaUpdates field's value. func (s *UpdateTableInput) SetReplicaUpdates(v []*ReplicationGroupUpdate) *UpdateTableInput { s.ReplicaUpdates = v return s } // SetSSESpecification sets the SSESpecification field's value. func (s *UpdateTableInput) SetSSESpecification(v *SSESpecification) *UpdateTableInput { s.SSESpecification = v return s } // SetStreamSpecification sets the StreamSpecification field's value. func (s *UpdateTableInput) SetStreamSpecification(v *StreamSpecification) *UpdateTableInput { s.StreamSpecification = v return s } // SetTableClass sets the TableClass field's value. func (s *UpdateTableInput) SetTableClass(v string) *UpdateTableInput { s.TableClass = &v return s } // SetTableName sets the TableName field's value. func (s *UpdateTableInput) SetTableName(v string) *UpdateTableInput { s.TableName = &v return s } // Represents the output of an UpdateTable operation. type UpdateTableOutput struct { _ struct{} `type:"structure"` // Represents the properties of the table. TableDescription *TableDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTableOutput) GoString() string { return s.String() } // SetTableDescription sets the TableDescription field's value. func (s *UpdateTableOutput) SetTableDescription(v *TableDescription) *UpdateTableOutput { s.TableDescription = v return s } type UpdateTableReplicaAutoScalingInput struct { _ struct{} `type:"structure"` // Represents the auto scaling settings of the global secondary indexes of the // replica to be updated. GlobalSecondaryIndexUpdates []*GlobalSecondaryIndexAutoScalingUpdate `min:"1" type:"list"` // Represents the auto scaling settings to be modified for a global table or // global secondary index. ProvisionedWriteCapacityAutoScalingUpdate *AutoScalingSettingsUpdate `type:"structure"` // Represents the auto scaling settings of replicas of the table that will be // modified. ReplicaUpdates []*ReplicaAutoScalingUpdate `min:"1" type:"list"` // The name of the global table to be updated. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTableReplicaAutoScalingInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTableReplicaAutoScalingInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateTableReplicaAutoScalingInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateTableReplicaAutoScalingInput"} if s.GlobalSecondaryIndexUpdates != nil && len(s.GlobalSecondaryIndexUpdates) < 1 { invalidParams.Add(request.NewErrParamMinLen("GlobalSecondaryIndexUpdates", 1)) } if s.ReplicaUpdates != nil && len(s.ReplicaUpdates) < 1 { invalidParams.Add(request.NewErrParamMinLen("ReplicaUpdates", 1)) } 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.GlobalSecondaryIndexUpdates != nil { for i, v := range s.GlobalSecondaryIndexUpdates { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexUpdates", i), err.(request.ErrInvalidParams)) } } } if s.ProvisionedWriteCapacityAutoScalingUpdate != nil { if err := s.ProvisionedWriteCapacityAutoScalingUpdate.Validate(); err != nil { invalidParams.AddNested("ProvisionedWriteCapacityAutoScalingUpdate", err.(request.ErrInvalidParams)) } } if s.ReplicaUpdates != nil { for i, v := range s.ReplicaUpdates { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaUpdates", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetGlobalSecondaryIndexUpdates sets the GlobalSecondaryIndexUpdates field's value. func (s *UpdateTableReplicaAutoScalingInput) SetGlobalSecondaryIndexUpdates(v []*GlobalSecondaryIndexAutoScalingUpdate) *UpdateTableReplicaAutoScalingInput { s.GlobalSecondaryIndexUpdates = v return s } // SetProvisionedWriteCapacityAutoScalingUpdate sets the ProvisionedWriteCapacityAutoScalingUpdate field's value. func (s *UpdateTableReplicaAutoScalingInput) SetProvisionedWriteCapacityAutoScalingUpdate(v *AutoScalingSettingsUpdate) *UpdateTableReplicaAutoScalingInput { s.ProvisionedWriteCapacityAutoScalingUpdate = v return s } // SetReplicaUpdates sets the ReplicaUpdates field's value. func (s *UpdateTableReplicaAutoScalingInput) SetReplicaUpdates(v []*ReplicaAutoScalingUpdate) *UpdateTableReplicaAutoScalingInput { s.ReplicaUpdates = v return s } // SetTableName sets the TableName field's value. func (s *UpdateTableReplicaAutoScalingInput) SetTableName(v string) *UpdateTableReplicaAutoScalingInput { s.TableName = &v return s } type UpdateTableReplicaAutoScalingOutput struct { _ struct{} `type:"structure"` // Returns information about the auto scaling settings of a table with replicas. TableAutoScalingDescription *TableAutoScalingDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTableReplicaAutoScalingOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTableReplicaAutoScalingOutput) GoString() string { return s.String() } // SetTableAutoScalingDescription sets the TableAutoScalingDescription field's value. func (s *UpdateTableReplicaAutoScalingOutput) SetTableAutoScalingDescription(v *TableAutoScalingDescription) *UpdateTableReplicaAutoScalingOutput { s.TableAutoScalingDescription = v return s } // Represents the input of an UpdateTimeToLive operation. type UpdateTimeToLiveInput struct { _ struct{} `type:"structure"` // The name of the table to be configured. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` // Represents the settings used to enable or disable Time to Live for the specified // table. // // TimeToLiveSpecification is a required field TimeToLiveSpecification *TimeToLiveSpecification `type:"structure" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTimeToLiveInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTimeToLiveInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateTimeToLiveInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateTimeToLiveInput"} 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.TimeToLiveSpecification == nil { invalidParams.Add(request.NewErrParamRequired("TimeToLiveSpecification")) } if s.TimeToLiveSpecification != nil { if err := s.TimeToLiveSpecification.Validate(); err != nil { invalidParams.AddNested("TimeToLiveSpecification", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetTableName sets the TableName field's value. func (s *UpdateTimeToLiveInput) SetTableName(v string) *UpdateTimeToLiveInput { s.TableName = &v return s } // SetTimeToLiveSpecification sets the TimeToLiveSpecification field's value. func (s *UpdateTimeToLiveInput) SetTimeToLiveSpecification(v *TimeToLiveSpecification) *UpdateTimeToLiveInput { s.TimeToLiveSpecification = v return s } type UpdateTimeToLiveOutput struct { _ struct{} `type:"structure"` // Represents the output of an UpdateTimeToLive operation. TimeToLiveSpecification *TimeToLiveSpecification `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTimeToLiveOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateTimeToLiveOutput) GoString() string { return s.String() } // SetTimeToLiveSpecification sets the TimeToLiveSpecification field's value. func (s *UpdateTimeToLiveOutput) SetTimeToLiveSpecification(v *TimeToLiveSpecification) *UpdateTimeToLiveOutput { s.TimeToLiveSpecification = v return s } // Represents an operation to perform - either DeleteItem or PutItem. You can // only request one of these operations, not both, in a single WriteRequest. // If you do need to perform both of these operations, you need to provide two // separate WriteRequest objects. type WriteRequest struct { _ struct{} `type:"structure"` // A request to perform a DeleteItem operation. DeleteRequest *DeleteRequest `type:"structure"` // A request to perform a PutItem operation. PutRequest *PutRequest `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s WriteRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s WriteRequest) GoString() string { return s.String() } // SetDeleteRequest sets the DeleteRequest field's value. func (s *WriteRequest) SetDeleteRequest(v *DeleteRequest) *WriteRequest { s.DeleteRequest = v return s } // SetPutRequest sets the PutRequest field's value. func (s *WriteRequest) SetPutRequest(v *PutRequest) *WriteRequest { s.PutRequest = v return s } const ( // AttributeActionAdd is a AttributeAction enum value AttributeActionAdd = "ADD" // AttributeActionPut is a AttributeAction enum value AttributeActionPut = "PUT" // AttributeActionDelete is a AttributeAction enum value AttributeActionDelete = "DELETE" ) // AttributeAction_Values returns all elements of the AttributeAction enum func AttributeAction_Values() []string { return []string{ AttributeActionAdd, AttributeActionPut, AttributeActionDelete, } } const ( // BackupStatusCreating is a BackupStatus enum value BackupStatusCreating = "CREATING" // BackupStatusDeleted is a BackupStatus enum value BackupStatusDeleted = "DELETED" // BackupStatusAvailable is a BackupStatus enum value BackupStatusAvailable = "AVAILABLE" ) // BackupStatus_Values returns all elements of the BackupStatus enum func BackupStatus_Values() []string { return []string{ BackupStatusCreating, BackupStatusDeleted, BackupStatusAvailable, } } const ( // BackupTypeUser is a BackupType enum value BackupTypeUser = "USER" // BackupTypeSystem is a BackupType enum value BackupTypeSystem = "SYSTEM" // BackupTypeAwsBackup is a BackupType enum value BackupTypeAwsBackup = "AWS_BACKUP" ) // BackupType_Values returns all elements of the BackupType enum func BackupType_Values() []string { return []string{ BackupTypeUser, BackupTypeSystem, BackupTypeAwsBackup, } } const ( // BackupTypeFilterUser is a BackupTypeFilter enum value BackupTypeFilterUser = "USER" // BackupTypeFilterSystem is a BackupTypeFilter enum value BackupTypeFilterSystem = "SYSTEM" // BackupTypeFilterAwsBackup is a BackupTypeFilter enum value BackupTypeFilterAwsBackup = "AWS_BACKUP" // BackupTypeFilterAll is a BackupTypeFilter enum value BackupTypeFilterAll = "ALL" ) // BackupTypeFilter_Values returns all elements of the BackupTypeFilter enum func BackupTypeFilter_Values() []string { return []string{ BackupTypeFilterUser, BackupTypeFilterSystem, BackupTypeFilterAwsBackup, BackupTypeFilterAll, } } const ( // BatchStatementErrorCodeEnumConditionalCheckFailed is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumConditionalCheckFailed = "ConditionalCheckFailed" // BatchStatementErrorCodeEnumItemCollectionSizeLimitExceeded is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumItemCollectionSizeLimitExceeded = "ItemCollectionSizeLimitExceeded" // BatchStatementErrorCodeEnumRequestLimitExceeded is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumRequestLimitExceeded = "RequestLimitExceeded" // BatchStatementErrorCodeEnumValidationError is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumValidationError = "ValidationError" // BatchStatementErrorCodeEnumProvisionedThroughputExceeded is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumProvisionedThroughputExceeded = "ProvisionedThroughputExceeded" // BatchStatementErrorCodeEnumTransactionConflict is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumTransactionConflict = "TransactionConflict" // BatchStatementErrorCodeEnumThrottlingError is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumThrottlingError = "ThrottlingError" // BatchStatementErrorCodeEnumInternalServerError is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumInternalServerError = "InternalServerError" // BatchStatementErrorCodeEnumResourceNotFound is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumResourceNotFound = "ResourceNotFound" // BatchStatementErrorCodeEnumAccessDenied is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumAccessDenied = "AccessDenied" // BatchStatementErrorCodeEnumDuplicateItem is a BatchStatementErrorCodeEnum enum value BatchStatementErrorCodeEnumDuplicateItem = "DuplicateItem" ) // BatchStatementErrorCodeEnum_Values returns all elements of the BatchStatementErrorCodeEnum enum func BatchStatementErrorCodeEnum_Values() []string { return []string{ BatchStatementErrorCodeEnumConditionalCheckFailed, BatchStatementErrorCodeEnumItemCollectionSizeLimitExceeded, BatchStatementErrorCodeEnumRequestLimitExceeded, BatchStatementErrorCodeEnumValidationError, BatchStatementErrorCodeEnumProvisionedThroughputExceeded, BatchStatementErrorCodeEnumTransactionConflict, BatchStatementErrorCodeEnumThrottlingError, BatchStatementErrorCodeEnumInternalServerError, BatchStatementErrorCodeEnumResourceNotFound, BatchStatementErrorCodeEnumAccessDenied, BatchStatementErrorCodeEnumDuplicateItem, } } const ( // BillingModeProvisioned is a BillingMode enum value BillingModeProvisioned = "PROVISIONED" // BillingModePayPerRequest is a BillingMode enum value BillingModePayPerRequest = "PAY_PER_REQUEST" ) // BillingMode_Values returns all elements of the BillingMode enum func BillingMode_Values() []string { return []string{ BillingModeProvisioned, BillingModePayPerRequest, } } const ( // ComparisonOperatorEq is a ComparisonOperator enum value ComparisonOperatorEq = "EQ" // ComparisonOperatorNe is a ComparisonOperator enum value ComparisonOperatorNe = "NE" // ComparisonOperatorIn is a ComparisonOperator enum value ComparisonOperatorIn = "IN" // ComparisonOperatorLe is a ComparisonOperator enum value ComparisonOperatorLe = "LE" // ComparisonOperatorLt is a ComparisonOperator enum value ComparisonOperatorLt = "LT" // ComparisonOperatorGe is a ComparisonOperator enum value ComparisonOperatorGe = "GE" // ComparisonOperatorGt is a ComparisonOperator enum value ComparisonOperatorGt = "GT" // ComparisonOperatorBetween is a ComparisonOperator enum value ComparisonOperatorBetween = "BETWEEN" // ComparisonOperatorNotNull is a ComparisonOperator enum value ComparisonOperatorNotNull = "NOT_NULL" // ComparisonOperatorNull is a ComparisonOperator enum value ComparisonOperatorNull = "NULL" // ComparisonOperatorContains is a ComparisonOperator enum value ComparisonOperatorContains = "CONTAINS" // ComparisonOperatorNotContains is a ComparisonOperator enum value ComparisonOperatorNotContains = "NOT_CONTAINS" // ComparisonOperatorBeginsWith is a ComparisonOperator enum value ComparisonOperatorBeginsWith = "BEGINS_WITH" ) // ComparisonOperator_Values returns all elements of the ComparisonOperator enum func ComparisonOperator_Values() []string { return []string{ ComparisonOperatorEq, ComparisonOperatorNe, ComparisonOperatorIn, ComparisonOperatorLe, ComparisonOperatorLt, ComparisonOperatorGe, ComparisonOperatorGt, ComparisonOperatorBetween, ComparisonOperatorNotNull, ComparisonOperatorNull, ComparisonOperatorContains, ComparisonOperatorNotContains, ComparisonOperatorBeginsWith, } } const ( // ConditionalOperatorAnd is a ConditionalOperator enum value ConditionalOperatorAnd = "AND" // ConditionalOperatorOr is a ConditionalOperator enum value ConditionalOperatorOr = "OR" ) // ConditionalOperator_Values returns all elements of the ConditionalOperator enum func ConditionalOperator_Values() []string { return []string{ ConditionalOperatorAnd, ConditionalOperatorOr, } } const ( // ContinuousBackupsStatusEnabled is a ContinuousBackupsStatus enum value ContinuousBackupsStatusEnabled = "ENABLED" // ContinuousBackupsStatusDisabled is a ContinuousBackupsStatus enum value ContinuousBackupsStatusDisabled = "DISABLED" ) // ContinuousBackupsStatus_Values returns all elements of the ContinuousBackupsStatus enum func ContinuousBackupsStatus_Values() []string { return []string{ ContinuousBackupsStatusEnabled, ContinuousBackupsStatusDisabled, } } const ( // ContributorInsightsActionEnable is a ContributorInsightsAction enum value ContributorInsightsActionEnable = "ENABLE" // ContributorInsightsActionDisable is a ContributorInsightsAction enum value ContributorInsightsActionDisable = "DISABLE" ) // ContributorInsightsAction_Values returns all elements of the ContributorInsightsAction enum func ContributorInsightsAction_Values() []string { return []string{ ContributorInsightsActionEnable, ContributorInsightsActionDisable, } } const ( // ContributorInsightsStatusEnabling is a ContributorInsightsStatus enum value ContributorInsightsStatusEnabling = "ENABLING" // ContributorInsightsStatusEnabled is a ContributorInsightsStatus enum value ContributorInsightsStatusEnabled = "ENABLED" // ContributorInsightsStatusDisabling is a ContributorInsightsStatus enum value ContributorInsightsStatusDisabling = "DISABLING" // ContributorInsightsStatusDisabled is a ContributorInsightsStatus enum value ContributorInsightsStatusDisabled = "DISABLED" // ContributorInsightsStatusFailed is a ContributorInsightsStatus enum value ContributorInsightsStatusFailed = "FAILED" ) // ContributorInsightsStatus_Values returns all elements of the ContributorInsightsStatus enum func ContributorInsightsStatus_Values() []string { return []string{ ContributorInsightsStatusEnabling, ContributorInsightsStatusEnabled, ContributorInsightsStatusDisabling, ContributorInsightsStatusDisabled, ContributorInsightsStatusFailed, } } const ( // DestinationStatusEnabling is a DestinationStatus enum value DestinationStatusEnabling = "ENABLING" // DestinationStatusActive is a DestinationStatus enum value DestinationStatusActive = "ACTIVE" // DestinationStatusDisabling is a DestinationStatus enum value DestinationStatusDisabling = "DISABLING" // DestinationStatusDisabled is a DestinationStatus enum value DestinationStatusDisabled = "DISABLED" // DestinationStatusEnableFailed is a DestinationStatus enum value DestinationStatusEnableFailed = "ENABLE_FAILED" ) // DestinationStatus_Values returns all elements of the DestinationStatus enum func DestinationStatus_Values() []string { return []string{ DestinationStatusEnabling, DestinationStatusActive, DestinationStatusDisabling, DestinationStatusDisabled, DestinationStatusEnableFailed, } } const ( // ExportFormatDynamodbJson is a ExportFormat enum value ExportFormatDynamodbJson = "DYNAMODB_JSON" // ExportFormatIon is a ExportFormat enum value ExportFormatIon = "ION" ) // ExportFormat_Values returns all elements of the ExportFormat enum func ExportFormat_Values() []string { return []string{ ExportFormatDynamodbJson, ExportFormatIon, } } const ( // ExportStatusInProgress is a ExportStatus enum value ExportStatusInProgress = "IN_PROGRESS" // ExportStatusCompleted is a ExportStatus enum value ExportStatusCompleted = "COMPLETED" // ExportStatusFailed is a ExportStatus enum value ExportStatusFailed = "FAILED" ) // ExportStatus_Values returns all elements of the ExportStatus enum func ExportStatus_Values() []string { return []string{ ExportStatusInProgress, ExportStatusCompleted, ExportStatusFailed, } } const ( // ExportTypeFullExport is a ExportType enum value ExportTypeFullExport = "FULL_EXPORT" // ExportTypeIncrementalExport is a ExportType enum value ExportTypeIncrementalExport = "INCREMENTAL_EXPORT" ) // ExportType_Values returns all elements of the ExportType enum func ExportType_Values() []string { return []string{ ExportTypeFullExport, ExportTypeIncrementalExport, } } const ( // ExportViewTypeNewImage is a ExportViewType enum value ExportViewTypeNewImage = "NEW_IMAGE" // ExportViewTypeNewAndOldImages is a ExportViewType enum value ExportViewTypeNewAndOldImages = "NEW_AND_OLD_IMAGES" ) // ExportViewType_Values returns all elements of the ExportViewType enum func ExportViewType_Values() []string { return []string{ ExportViewTypeNewImage, ExportViewTypeNewAndOldImages, } } const ( // GlobalTableStatusCreating is a GlobalTableStatus enum value GlobalTableStatusCreating = "CREATING" // GlobalTableStatusActive is a GlobalTableStatus enum value GlobalTableStatusActive = "ACTIVE" // GlobalTableStatusDeleting is a GlobalTableStatus enum value GlobalTableStatusDeleting = "DELETING" // GlobalTableStatusUpdating is a GlobalTableStatus enum value GlobalTableStatusUpdating = "UPDATING" ) // GlobalTableStatus_Values returns all elements of the GlobalTableStatus enum func GlobalTableStatus_Values() []string { return []string{ GlobalTableStatusCreating, GlobalTableStatusActive, GlobalTableStatusDeleting, GlobalTableStatusUpdating, } } const ( // ImportStatusInProgress is a ImportStatus enum value ImportStatusInProgress = "IN_PROGRESS" // ImportStatusCompleted is a ImportStatus enum value ImportStatusCompleted = "COMPLETED" // ImportStatusCancelling is a ImportStatus enum value ImportStatusCancelling = "CANCELLING" // ImportStatusCancelled is a ImportStatus enum value ImportStatusCancelled = "CANCELLED" // ImportStatusFailed is a ImportStatus enum value ImportStatusFailed = "FAILED" ) // ImportStatus_Values returns all elements of the ImportStatus enum func ImportStatus_Values() []string { return []string{ ImportStatusInProgress, ImportStatusCompleted, ImportStatusCancelling, ImportStatusCancelled, ImportStatusFailed, } } const ( // IndexStatusCreating is a IndexStatus enum value IndexStatusCreating = "CREATING" // IndexStatusUpdating is a IndexStatus enum value IndexStatusUpdating = "UPDATING" // IndexStatusDeleting is a IndexStatus enum value IndexStatusDeleting = "DELETING" // IndexStatusActive is a IndexStatus enum value IndexStatusActive = "ACTIVE" ) // IndexStatus_Values returns all elements of the IndexStatus enum func IndexStatus_Values() []string { return []string{ IndexStatusCreating, IndexStatusUpdating, IndexStatusDeleting, IndexStatusActive, } } const ( // InputCompressionTypeGzip is a InputCompressionType enum value InputCompressionTypeGzip = "GZIP" // InputCompressionTypeZstd is a InputCompressionType enum value InputCompressionTypeZstd = "ZSTD" // InputCompressionTypeNone is a InputCompressionType enum value InputCompressionTypeNone = "NONE" ) // InputCompressionType_Values returns all elements of the InputCompressionType enum func InputCompressionType_Values() []string { return []string{ InputCompressionTypeGzip, InputCompressionTypeZstd, InputCompressionTypeNone, } } const ( // InputFormatDynamodbJson is a InputFormat enum value InputFormatDynamodbJson = "DYNAMODB_JSON" // InputFormatIon is a InputFormat enum value InputFormatIon = "ION" // InputFormatCsv is a InputFormat enum value InputFormatCsv = "CSV" ) // InputFormat_Values returns all elements of the InputFormat enum func InputFormat_Values() []string { return []string{ InputFormatDynamodbJson, InputFormatIon, InputFormatCsv, } } const ( // KeyTypeHash is a KeyType enum value KeyTypeHash = "HASH" // KeyTypeRange is a KeyType enum value KeyTypeRange = "RANGE" ) // KeyType_Values returns all elements of the KeyType enum func KeyType_Values() []string { return []string{ KeyTypeHash, KeyTypeRange, } } const ( // PointInTimeRecoveryStatusEnabled is a PointInTimeRecoveryStatus enum value PointInTimeRecoveryStatusEnabled = "ENABLED" // PointInTimeRecoveryStatusDisabled is a PointInTimeRecoveryStatus enum value PointInTimeRecoveryStatusDisabled = "DISABLED" ) // PointInTimeRecoveryStatus_Values returns all elements of the PointInTimeRecoveryStatus enum func PointInTimeRecoveryStatus_Values() []string { return []string{ PointInTimeRecoveryStatusEnabled, PointInTimeRecoveryStatusDisabled, } } const ( // ProjectionTypeAll is a ProjectionType enum value ProjectionTypeAll = "ALL" // ProjectionTypeKeysOnly is a ProjectionType enum value ProjectionTypeKeysOnly = "KEYS_ONLY" // ProjectionTypeInclude is a ProjectionType enum value ProjectionTypeInclude = "INCLUDE" ) // ProjectionType_Values returns all elements of the ProjectionType enum func ProjectionType_Values() []string { return []string{ ProjectionTypeAll, ProjectionTypeKeysOnly, ProjectionTypeInclude, } } const ( // ReplicaStatusCreating is a ReplicaStatus enum value ReplicaStatusCreating = "CREATING" // ReplicaStatusCreationFailed is a ReplicaStatus enum value ReplicaStatusCreationFailed = "CREATION_FAILED" // ReplicaStatusUpdating is a ReplicaStatus enum value ReplicaStatusUpdating = "UPDATING" // ReplicaStatusDeleting is a ReplicaStatus enum value ReplicaStatusDeleting = "DELETING" // ReplicaStatusActive is a ReplicaStatus enum value ReplicaStatusActive = "ACTIVE" // ReplicaStatusRegionDisabled is a ReplicaStatus enum value ReplicaStatusRegionDisabled = "REGION_DISABLED" // ReplicaStatusInaccessibleEncryptionCredentials is a ReplicaStatus enum value ReplicaStatusInaccessibleEncryptionCredentials = "INACCESSIBLE_ENCRYPTION_CREDENTIALS" ) // ReplicaStatus_Values returns all elements of the ReplicaStatus enum func ReplicaStatus_Values() []string { return []string{ ReplicaStatusCreating, ReplicaStatusCreationFailed, ReplicaStatusUpdating, ReplicaStatusDeleting, ReplicaStatusActive, ReplicaStatusRegionDisabled, ReplicaStatusInaccessibleEncryptionCredentials, } } // Determines the level of detail about either provisioned or on-demand 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. const ( // ReturnConsumedCapacityIndexes is a ReturnConsumedCapacity enum value ReturnConsumedCapacityIndexes = "INDEXES" // ReturnConsumedCapacityTotal is a ReturnConsumedCapacity enum value ReturnConsumedCapacityTotal = "TOTAL" // ReturnConsumedCapacityNone is a ReturnConsumedCapacity enum value ReturnConsumedCapacityNone = "NONE" ) // ReturnConsumedCapacity_Values returns all elements of the ReturnConsumedCapacity enum func ReturnConsumedCapacity_Values() []string { return []string{ ReturnConsumedCapacityIndexes, ReturnConsumedCapacityTotal, ReturnConsumedCapacityNone, } } const ( // ReturnItemCollectionMetricsSize is a ReturnItemCollectionMetrics enum value ReturnItemCollectionMetricsSize = "SIZE" // ReturnItemCollectionMetricsNone is a ReturnItemCollectionMetrics enum value ReturnItemCollectionMetricsNone = "NONE" ) // ReturnItemCollectionMetrics_Values returns all elements of the ReturnItemCollectionMetrics enum func ReturnItemCollectionMetrics_Values() []string { return []string{ ReturnItemCollectionMetricsSize, ReturnItemCollectionMetricsNone, } } const ( // ReturnValueNone is a ReturnValue enum value ReturnValueNone = "NONE" // ReturnValueAllOld is a ReturnValue enum value ReturnValueAllOld = "ALL_OLD" // ReturnValueUpdatedOld is a ReturnValue enum value ReturnValueUpdatedOld = "UPDATED_OLD" // ReturnValueAllNew is a ReturnValue enum value ReturnValueAllNew = "ALL_NEW" // ReturnValueUpdatedNew is a ReturnValue enum value ReturnValueUpdatedNew = "UPDATED_NEW" ) // ReturnValue_Values returns all elements of the ReturnValue enum func ReturnValue_Values() []string { return []string{ ReturnValueNone, ReturnValueAllOld, ReturnValueUpdatedOld, ReturnValueAllNew, ReturnValueUpdatedNew, } } const ( // ReturnValuesOnConditionCheckFailureAllOld is a ReturnValuesOnConditionCheckFailure enum value ReturnValuesOnConditionCheckFailureAllOld = "ALL_OLD" // ReturnValuesOnConditionCheckFailureNone is a ReturnValuesOnConditionCheckFailure enum value ReturnValuesOnConditionCheckFailureNone = "NONE" ) // ReturnValuesOnConditionCheckFailure_Values returns all elements of the ReturnValuesOnConditionCheckFailure enum func ReturnValuesOnConditionCheckFailure_Values() []string { return []string{ ReturnValuesOnConditionCheckFailureAllOld, ReturnValuesOnConditionCheckFailureNone, } } const ( // S3SseAlgorithmAes256 is a S3SseAlgorithm enum value S3SseAlgorithmAes256 = "AES256" // S3SseAlgorithmKms is a S3SseAlgorithm enum value S3SseAlgorithmKms = "KMS" ) // S3SseAlgorithm_Values returns all elements of the S3SseAlgorithm enum func S3SseAlgorithm_Values() []string { return []string{ S3SseAlgorithmAes256, S3SseAlgorithmKms, } } const ( // SSEStatusEnabling is a SSEStatus enum value SSEStatusEnabling = "ENABLING" // SSEStatusEnabled is a SSEStatus enum value SSEStatusEnabled = "ENABLED" // SSEStatusDisabling is a SSEStatus enum value SSEStatusDisabling = "DISABLING" // SSEStatusDisabled is a SSEStatus enum value SSEStatusDisabled = "DISABLED" // SSEStatusUpdating is a SSEStatus enum value SSEStatusUpdating = "UPDATING" ) // SSEStatus_Values returns all elements of the SSEStatus enum func SSEStatus_Values() []string { return []string{ SSEStatusEnabling, SSEStatusEnabled, SSEStatusDisabling, SSEStatusDisabled, SSEStatusUpdating, } } const ( // SSETypeAes256 is a SSEType enum value SSETypeAes256 = "AES256" // SSETypeKms is a SSEType enum value SSETypeKms = "KMS" ) // SSEType_Values returns all elements of the SSEType enum func SSEType_Values() []string { return []string{ SSETypeAes256, SSETypeKms, } } const ( // ScalarAttributeTypeS is a ScalarAttributeType enum value ScalarAttributeTypeS = "S" // ScalarAttributeTypeN is a ScalarAttributeType enum value ScalarAttributeTypeN = "N" // ScalarAttributeTypeB is a ScalarAttributeType enum value ScalarAttributeTypeB = "B" ) // ScalarAttributeType_Values returns all elements of the ScalarAttributeType enum func ScalarAttributeType_Values() []string { return []string{ ScalarAttributeTypeS, ScalarAttributeTypeN, ScalarAttributeTypeB, } } const ( // SelectAllAttributes is a Select enum value SelectAllAttributes = "ALL_ATTRIBUTES" // SelectAllProjectedAttributes is a Select enum value SelectAllProjectedAttributes = "ALL_PROJECTED_ATTRIBUTES" // SelectSpecificAttributes is a Select enum value SelectSpecificAttributes = "SPECIFIC_ATTRIBUTES" // SelectCount is a Select enum value SelectCount = "COUNT" ) // Select_Values returns all elements of the Select enum func Select_Values() []string { return []string{ SelectAllAttributes, SelectAllProjectedAttributes, SelectSpecificAttributes, SelectCount, } } const ( // StreamViewTypeNewImage is a StreamViewType enum value StreamViewTypeNewImage = "NEW_IMAGE" // StreamViewTypeOldImage is a StreamViewType enum value StreamViewTypeOldImage = "OLD_IMAGE" // StreamViewTypeNewAndOldImages is a StreamViewType enum value StreamViewTypeNewAndOldImages = "NEW_AND_OLD_IMAGES" // StreamViewTypeKeysOnly is a StreamViewType enum value StreamViewTypeKeysOnly = "KEYS_ONLY" ) // StreamViewType_Values returns all elements of the StreamViewType enum func StreamViewType_Values() []string { return []string{ StreamViewTypeNewImage, StreamViewTypeOldImage, StreamViewTypeNewAndOldImages, StreamViewTypeKeysOnly, } } const ( // TableClassStandard is a TableClass enum value TableClassStandard = "STANDARD" // TableClassStandardInfrequentAccess is a TableClass enum value TableClassStandardInfrequentAccess = "STANDARD_INFREQUENT_ACCESS" ) // TableClass_Values returns all elements of the TableClass enum func TableClass_Values() []string { return []string{ TableClassStandard, TableClassStandardInfrequentAccess, } } const ( // TableStatusCreating is a TableStatus enum value TableStatusCreating = "CREATING" // TableStatusUpdating is a TableStatus enum value TableStatusUpdating = "UPDATING" // TableStatusDeleting is a TableStatus enum value TableStatusDeleting = "DELETING" // TableStatusActive is a TableStatus enum value TableStatusActive = "ACTIVE" // TableStatusInaccessibleEncryptionCredentials is a TableStatus enum value TableStatusInaccessibleEncryptionCredentials = "INACCESSIBLE_ENCRYPTION_CREDENTIALS" // TableStatusArchiving is a TableStatus enum value TableStatusArchiving = "ARCHIVING" // TableStatusArchived is a TableStatus enum value TableStatusArchived = "ARCHIVED" ) // TableStatus_Values returns all elements of the TableStatus enum func TableStatus_Values() []string { return []string{ TableStatusCreating, TableStatusUpdating, TableStatusDeleting, TableStatusActive, TableStatusInaccessibleEncryptionCredentials, TableStatusArchiving, TableStatusArchived, } } const ( // TimeToLiveStatusEnabling is a TimeToLiveStatus enum value TimeToLiveStatusEnabling = "ENABLING" // TimeToLiveStatusDisabling is a TimeToLiveStatus enum value TimeToLiveStatusDisabling = "DISABLING" // TimeToLiveStatusEnabled is a TimeToLiveStatus enum value TimeToLiveStatusEnabled = "ENABLED" // TimeToLiveStatusDisabled is a TimeToLiveStatus enum value TimeToLiveStatusDisabled = "DISABLED" ) // TimeToLiveStatus_Values returns all elements of the TimeToLiveStatus enum func TimeToLiveStatus_Values() []string { return []string{ TimeToLiveStatusEnabling, TimeToLiveStatusDisabling, TimeToLiveStatusEnabled, TimeToLiveStatusDisabled, } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/dynamodb/customizations.go ================================================ package dynamodb import ( "bytes" "hash/crc32" "io" "io/ioutil" "strconv" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" ) func init() { initClient = func(c *client.Client) { if c.Config.Retryer == nil { // Only override the retryer with a custom one if the config // does not already contain a retryer setCustomRetryer(c) } c.Handlers.Build.PushBack(disableCompression) c.Handlers.Unmarshal.PushFront(validateCRC32) } } func setCustomRetryer(c *client.Client) { maxRetries := aws.IntValue(c.Config.MaxRetries) if c.Config.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries { maxRetries = 10 } c.Retryer = client.DefaultRetryer{ NumMaxRetries: maxRetries, MinRetryDelay: 50 * time.Millisecond, } } func drainBody(b io.ReadCloser, length int64) (out *bytes.Buffer, err error) { if length < 0 { length = 0 } buf := bytes.NewBuffer(make([]byte, 0, length)) if _, err = buf.ReadFrom(b); err != nil { return nil, err } if err = b.Close(); err != nil { return nil, err } return buf, nil } func disableCompression(r *request.Request) { r.HTTPRequest.Header.Set("Accept-Encoding", "identity") } func validateCRC32(r *request.Request) { if r.Error != nil { return // already have an error, no need to verify CRC } // Checksum validation is off, skip if aws.BoolValue(r.Config.DisableComputeChecksums) { return } // Try to get CRC from response header := r.HTTPResponse.Header.Get("X-Amz-Crc32") if header == "" { return // No header, skip } expected, err := strconv.ParseUint(header, 10, 32) if err != nil { return // Could not determine CRC value, skip } buf, err := drainBody(r.HTTPResponse.Body, r.HTTPResponse.ContentLength) if err != nil { // failed to read the response body, skip return } // Reset body for subsequent reads r.HTTPResponse.Body = ioutil.NopCloser(bytes.NewReader(buf.Bytes())) // Compute the CRC checksum crc := crc32.ChecksumIEEE(buf.Bytes()) if crc != uint32(expected) { // CRC does not match, set a retryable error r.Retryable = aws.Bool(true) r.Error = awserr.New("CRC32CheckFailed", "CRC32 integrity check failed", nil) } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package dynamodb provides the client and types for making API // requests to Amazon DynamoDB. // // Amazon DynamoDB is a fully managed NoSQL database service that provides fast // and predictable performance with seamless scalability. DynamoDB lets you // offload the administrative burdens of operating and scaling a distributed // database, so that you don't have to worry about hardware provisioning, setup // and configuration, replication, software patching, or cluster scaling. // // With DynamoDB, you can create database tables that can store and retrieve // any amount of data, and serve any level of request traffic. You can scale // up or scale down your tables' throughput capacity without downtime or performance // degradation, and use the Amazon Web Services Management Console to monitor // resource utilization and performance metrics. // // DynamoDB automatically spreads the data and traffic for your tables over // a sufficient number of servers to handle your throughput and storage requirements, // while maintaining consistent and fast performance. All of your data is stored // on solid state disks (SSDs) and automatically replicated across multiple // Availability Zones in an Amazon Web Services Region, providing built-in high // availability and data durability. // // See https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10 for more information on this service. // // See dynamodb package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/ // // # Using the Client // // To contact Amazon DynamoDB 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 DynamoDB client DynamoDB for more // information on creating client for this service. // https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/#New package dynamodb ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc_custom.go ================================================ /* AttributeValue Marshaling and Unmarshaling Helpers Utility helpers to marshal and unmarshal AttributeValue to and from Go types can be found in the dynamodbattribute sub package. This package provides specialized functions for the common ways of working with AttributeValues. Such as map[string]*AttributeValue, []*AttributeValue, and directly with *AttributeValue. This is helpful for marshaling Go types for API operations such as PutItem, and unmarshaling Query and Scan APIs' responses. See the dynamodbattribute package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/dynamodbattribute/ # Expression Builders The expression package provides utility types and functions to build DynamoDB expression for type safe construction of API ExpressionAttributeNames, and ExpressionAttribute Values. The package represents the various DynamoDB Expressions as structs named accordingly. For example, ConditionBuilder represents a DynamoDB Condition Expression, an UpdateBuilder represents a DynamoDB Update Expression, and so on. See the expression package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/expression/ */ package dynamodb ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package dynamodb import ( "github.com/aws/aws-sdk-go/private/protocol" ) const ( // ErrCodeBackupInUseException for service response error code // "BackupInUseException". // // There is another ongoing conflicting backup control plane operation on the // table. The backup is either being created, deleted or restored to a table. ErrCodeBackupInUseException = "BackupInUseException" // ErrCodeBackupNotFoundException for service response error code // "BackupNotFoundException". // // Backup not found for the given BackupARN. ErrCodeBackupNotFoundException = "BackupNotFoundException" // ErrCodeConditionalCheckFailedException for service response error code // "ConditionalCheckFailedException". // // A condition specified in the operation could not be evaluated. ErrCodeConditionalCheckFailedException = "ConditionalCheckFailedException" // ErrCodeContinuousBackupsUnavailableException for service response error code // "ContinuousBackupsUnavailableException". // // Backups have not yet been enabled for this table. ErrCodeContinuousBackupsUnavailableException = "ContinuousBackupsUnavailableException" // ErrCodeDuplicateItemException for service response error code // "DuplicateItemException". // // There was an attempt to insert an item with the same primary key as an item // that already exists in the DynamoDB table. ErrCodeDuplicateItemException = "DuplicateItemException" // ErrCodeExportConflictException for service response error code // "ExportConflictException". // // There was a conflict when writing to the specified S3 bucket. ErrCodeExportConflictException = "ExportConflictException" // ErrCodeExportNotFoundException for service response error code // "ExportNotFoundException". // // The specified export was not found. ErrCodeExportNotFoundException = "ExportNotFoundException" // ErrCodeGlobalTableAlreadyExistsException for service response error code // "GlobalTableAlreadyExistsException". // // The specified global table already exists. ErrCodeGlobalTableAlreadyExistsException = "GlobalTableAlreadyExistsException" // ErrCodeGlobalTableNotFoundException for service response error code // "GlobalTableNotFoundException". // // 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" // ErrCodeImportConflictException for service response error code // "ImportConflictException". // // There was a conflict when importing from the specified S3 source. This can // occur when the current import conflicts with a previous import request that // had the same client token. ErrCodeImportConflictException = "ImportConflictException" // ErrCodeImportNotFoundException for service response error code // "ImportNotFoundException". // // The specified import was not found. ErrCodeImportNotFoundException = "ImportNotFoundException" // ErrCodeIndexNotFoundException for service response error code // "IndexNotFoundException". // // The operation tried to access a nonexistent index. ErrCodeIndexNotFoundException = "IndexNotFoundException" // ErrCodeInternalServerError for service response error code // "InternalServerError". // // An error occurred on the server side. ErrCodeInternalServerError = "InternalServerError" // ErrCodeInvalidExportTimeException for service response error code // "InvalidExportTimeException". // // The specified ExportTime is outside of the point in time recovery window. ErrCodeInvalidExportTimeException = "InvalidExportTimeException" // ErrCodeInvalidRestoreTimeException for service response error code // "InvalidRestoreTimeException". // // An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime // and LatestRestorableDateTime. ErrCodeInvalidRestoreTimeException = "InvalidRestoreTimeException" // ErrCodeItemCollectionSizeLimitExceededException for service response error code // "ItemCollectionSizeLimitExceededException". // // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. ErrCodeItemCollectionSizeLimitExceededException = "ItemCollectionSizeLimitExceededException" // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // // There is no limit to the number of daily on-demand backups that can be taken. // // For most purposes, up to 500 simultaneous table operations are allowed per // account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, // RestoreTableFromBackup, and RestoreTableToPointInTime. // // When you are creating a table with one or more secondary indexes, you can // have up to 250 such requests running at a time. However, if the table or // index specifications are complex, then DynamoDB might temporarily reduce // the number of concurrent operations. // // When importing into DynamoDB, up to 50 simultaneous import table operations // are allowed per account. // // There is a soft account quota of 2,500 tables. // // GetRecords was called with a value of more than 1000 for the limit request // parameter. // // More than 2 processes are reading from the same streams shard at the same // time. Exceeding this limit may result in request throttling. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodePointInTimeRecoveryUnavailableException for service response error code // "PointInTimeRecoveryUnavailableException". // // Point in time recovery has not yet been enabled for this source table. ErrCodePointInTimeRecoveryUnavailableException = "PointInTimeRecoveryUnavailableException" // ErrCodeProvisionedThroughputExceededException for service response error code // "ProvisionedThroughputExceededException". // // Your request rate is too high. The Amazon Web Services SDKs for DynamoDB // automatically retry requests that receive this exception. Your request is // eventually successful, unless your retry queue is too large to finish. Reduce // the frequency of requests and use exponential backoff. For more information, // go to Error Retries and Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. ErrCodeProvisionedThroughputExceededException = "ProvisionedThroughputExceededException" // ErrCodeReplicaAlreadyExistsException for service response error code // "ReplicaAlreadyExistsException". // // The specified replica is already part of the global table. ErrCodeReplicaAlreadyExistsException = "ReplicaAlreadyExistsException" // ErrCodeReplicaNotFoundException for service response error code // "ReplicaNotFoundException". // // 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 quota for your account. Please // contact Amazon Web Services Support (https://aws.amazon.com/support) to request // a quota increase. ErrCodeRequestLimitExceeded = "RequestLimitExceeded" // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. ErrCodeResourceInUseException = "ResourceInUseException" // ErrCodeResourceNotFoundException for service response error code // "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. ErrCodeResourceNotFoundException = "ResourceNotFoundException" // ErrCodeTableAlreadyExistsException for service response error code // "TableAlreadyExistsException". // // A target table with the specified name already exists. ErrCodeTableAlreadyExistsException = "TableAlreadyExistsException" // ErrCodeTableInUseException for service response error code // "TableInUseException". // // A target table with the specified name is either being created or deleted. ErrCodeTableInUseException = "TableInUseException" // ErrCodeTableNotFoundException for service response error code // "TableNotFoundException". // // A source table with the name TableName does not currently exist within the // subscriber's account or the subscriber is operating in the wrong Amazon Web // Services Region. ErrCodeTableNotFoundException = "TableNotFoundException" // ErrCodeTransactionCanceledException for service response error code // "TransactionCanceledException". // // The entire transaction request was canceled. // // DynamoDB cancels a TransactWriteItems request under the following circumstances: // // * A condition in one of the condition expressions is not met. // // * A table in the TransactWriteItems request is in a different account // or region. // // * More than one action in the TransactWriteItems operation targets the // same item. // // * There is insufficient provisioned capacity for the transaction to be // completed. // // * An item size becomes too large (larger than 400 KB), or 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. // // * There is an ongoing TransactWriteItems operation that conflicts with // a concurrent TransactWriteItems request. In this case the TransactWriteItems // operation fails with a TransactionCanceledException. // // DynamoDB cancels a TransactGetItems request under the following circumstances: // // * There is an ongoing TransactGetItems operation that conflicts with a // concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. // In this case the TransactGetItems operation fails with a TransactionCanceledException. // // * A table in the TransactGetItems request is in a different account or // region. // // * There is insufficient provisioned capacity for the transaction to be // completed. // // * There is a user error, such as an invalid data format. // // If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons // property. This property is not set for other languages. Transaction cancellation // reasons are ordered in the order of requested items, if an item has no error // it will have None code and Null message. // // Cancellation reason codes and possible error messages: // // * No Errors: Code: None Message: null // // * Conditional Check Failed: Code: ConditionalCheckFailed Message: The // conditional request failed. // // * Item Collection Size Limit Exceeded: Code: ItemCollectionSizeLimitExceeded // Message: Collection size exceeded. // // * Transaction Conflict: Code: TransactionConflict Message: Transaction // is ongoing for the item. // // * Provisioned Throughput Exceeded: Code: ProvisionedThroughputExceeded // Messages: The level of configured provisioned throughput for the table // was exceeded. Consider increasing your provisioning level with the UpdateTable // API. This Message is received when provisioned throughput is exceeded // is on a provisioned DynamoDB table. The level of configured provisioned // throughput for one or more global secondary indexes of the table was exceeded. // Consider increasing your provisioning level for the under-provisioned // global secondary indexes with the UpdateTable API. This message is returned // when provisioned throughput is exceeded is on a provisioned GSI. // // * Throttling Error: Code: ThrottlingError Messages: Throughput exceeds // the current capacity of your table or index. DynamoDB is automatically // scaling your table or index so please try again shortly. If exceptions // persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html. // This message is returned when writes get throttled on an On-Demand table // as DynamoDB is automatically scaling the table. Throughput exceeds the // current capacity for one or more global secondary indexes. DynamoDB is // automatically scaling your index so please try again shortly. This message // is returned when writes get throttled on an On-Demand GSI as DynamoDB // is automatically scaling the GSI. // // * Validation Error: Code: ValidationError Messages: One or more parameter // values were invalid. The update expression attempted to update the secondary // index key beyond allowed size limits. The update expression attempted // to update the secondary index key to unsupported type. An operand in the // update expression has an incorrect data type. Item size to update has // exceeded the maximum allowed size. Number overflow. Attempting to store // a number with magnitude larger than supported range. Type mismatch for // attribute to update. Nesting Levels have exceeded supported limits. The // document path provided in the update expression is invalid for update. // The provided expression refers to an attribute that does not exist in // the item. 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. // // Recommended Settings // // This is a general recommendation for handling the TransactionInProgressException. // These settings help ensure that the client retries will trigger completion // of the ongoing TransactWriteItems request. // // * Set clientExecutionTimeout to a value that allows at least one retry // to be processed after 5 seconds have elapsed since the first attempt for // the TransactWriteItems operation. // // * Set socketTimeout to a value a little lower than the requestTimeout // setting. // // * requestTimeout should be set based on the time taken for the individual // retries of a single HTTP request for your use case, but setting it to // 1 second or higher should work well to reduce chances of retries and TransactionInProgressException // errors. // // * Use exponential backoff when retrying and tune backoff if needed. // // Assuming default retry policy (https://github.com/aws/aws-sdk-java/blob/fd409dee8ae23fb8953e0bb4dbde65536a7e0514/aws-java-sdk-core/src/main/java/com/amazonaws/retry/PredefinedRetryPolicies.java#L97), // example timeout settings based on the guidelines above are as follows: // // Example timeline: // // * 0-1000 first attempt // // * 1000-1500 first sleep/delay (default retry policy uses 500 ms as base // delay for 4xx errors) // // * 1500-2500 second attempt // // * 2500-3500 second sleep/delay (500 * 2, exponential backoff) // // * 3500-4500 third attempt // // * 4500-6500 third sleep/delay (500 * 2^2) // // * 6500-7500 fourth attempt (this can trigger inline recovery since 5 seconds // have elapsed since the first attempt reached TC) ErrCodeTransactionInProgressException = "TransactionInProgressException" ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "BackupInUseException": newErrorBackupInUseException, "BackupNotFoundException": newErrorBackupNotFoundException, "ConditionalCheckFailedException": newErrorConditionalCheckFailedException, "ContinuousBackupsUnavailableException": newErrorContinuousBackupsUnavailableException, "DuplicateItemException": newErrorDuplicateItemException, "ExportConflictException": newErrorExportConflictException, "ExportNotFoundException": newErrorExportNotFoundException, "GlobalTableAlreadyExistsException": newErrorGlobalTableAlreadyExistsException, "GlobalTableNotFoundException": newErrorGlobalTableNotFoundException, "IdempotentParameterMismatchException": newErrorIdempotentParameterMismatchException, "ImportConflictException": newErrorImportConflictException, "ImportNotFoundException": newErrorImportNotFoundException, "IndexNotFoundException": newErrorIndexNotFoundException, "InternalServerError": newErrorInternalServerError, "InvalidExportTimeException": newErrorInvalidExportTimeException, "InvalidRestoreTimeException": newErrorInvalidRestoreTimeException, "ItemCollectionSizeLimitExceededException": newErrorItemCollectionSizeLimitExceededException, "LimitExceededException": newErrorLimitExceededException, "PointInTimeRecoveryUnavailableException": newErrorPointInTimeRecoveryUnavailableException, "ProvisionedThroughputExceededException": newErrorProvisionedThroughputExceededException, "ReplicaAlreadyExistsException": newErrorReplicaAlreadyExistsException, "ReplicaNotFoundException": newErrorReplicaNotFoundException, "RequestLimitExceeded": newErrorRequestLimitExceeded, "ResourceInUseException": newErrorResourceInUseException, "ResourceNotFoundException": newErrorResourceNotFoundException, "TableAlreadyExistsException": newErrorTableAlreadyExistsException, "TableInUseException": newErrorTableInUseException, "TableNotFoundException": newErrorTableNotFoundException, "TransactionCanceledException": newErrorTransactionCanceledException, "TransactionConflictException": newErrorTransactionConflictException, "TransactionInProgressException": newErrorTransactionInProgressException, } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package dynamodb 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" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) // DynamoDB provides the API operation methods for making requests to // Amazon DynamoDB. See this package's package overview docs // for details on the service. // // DynamoDB methods are safe to use concurrently. It is not safe to // modify mutate any of the struct's properties though. type DynamoDB struct { *client.Client endpointCache *crr.EndpointCache } // 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 = "dynamodb" // Name of service. EndpointsID = ServiceName // ID to lookup a service endpoint with. ServiceID = "DynamoDB" // ServiceID is a unique identifier of a specific service. ) // New creates a new instance of the DynamoDB client with a session. // If additional configuration is needed for the client instance use the optional // aws.Config parameter to add your extra config. // // Example: // // mySession := session.Must(session.NewSession()) // // // Create a DynamoDB client from just a session. // svc := dynamodb.New(mySession) // // // Create a DynamoDB client with additional configuration // svc := dynamodb.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *DynamoDB { c := p.ClientConfig(EndpointsID, cfgs...) if c.SigningNameDerived || len(c.SigningName) == 0 { c.SigningName = EndpointsID // No Fallback } return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) } // newClient creates, initializes and returns a new service client instance. func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *DynamoDB { svc := &DynamoDB{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: ServiceName, ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, PartitionID: partitionID, Endpoint: endpoint, APIVersion: "2012-08-10", ResolvedRegion: resolvedRegion, JSONVersion: "1.0", TargetPrefix: "DynamoDB_20120810", }, handlers, ), } svc.endpointCache = crr.NewEndpointCache(10) // 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( protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), ) // Run custom client initialization if present if initClient != nil { initClient(svc.Client) } return svc } // newRequest creates a new request for a DynamoDB operation and runs any // custom request initialization. func (c *DynamoDB) 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/dynamodb/waiters.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package dynamodb import ( "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" ) // WaitUntilTableExists uses the DynamoDB API operation // DescribeTable 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 *DynamoDB) WaitUntilTableExists(input *DescribeTableInput) error { return c.WaitUntilTableExistsWithContext(aws.BackgroundContext(), input) } // WaitUntilTableExistsWithContext is an extended version of WaitUntilTableExists. // 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 *DynamoDB) WaitUntilTableExistsWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilTableExists", MaxAttempts: 25, Delay: request.ConstantWaiterDelay(20 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.PathWaiterMatch, Argument: "Table.TableStatus", Expected: "ACTIVE", }, { State: request.RetryWaiterState, Matcher: request.ErrorWaiterMatch, Expected: "ResourceNotFoundException", }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *DescribeTableInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeTableRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) } // WaitUntilTableNotExists uses the DynamoDB API operation // DescribeTable 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 *DynamoDB) WaitUntilTableNotExists(input *DescribeTableInput) error { return c.WaitUntilTableNotExistsWithContext(aws.BackgroundContext(), input) } // WaitUntilTableNotExistsWithContext is an extended version of WaitUntilTableNotExists. // 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 *DynamoDB) WaitUntilTableNotExistsWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilTableNotExists", MaxAttempts: 25, Delay: request.ConstantWaiterDelay(20 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.ErrorWaiterMatch, Expected: "ResourceNotFoundException", }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *DescribeTableInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeTableRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssm/api.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ssm 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 opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See AddTagsToResource for more information on using the AddTagsToResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the AddTagsToResourceRequest method. // req, resp := client.AddTagsToResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/AddTagsToResource func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { op := &request.Operation{ Name: opAddTagsToResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AddTagsToResourceInput{} } output = &AddTagsToResourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // AddTagsToResource API operation for Amazon Simple Systems Manager (SSM). // // Adds or overwrites one or more tags for the specified resource. Tags are // metadata that you can assign to your automations, documents, managed nodes, // maintenance windows, Parameter Store parameters, and patch baselines. Tags // enable you to categorize your resources in different ways, for example, by // purpose, owner, or environment. Each tag consists of a key and an optional // value, both of which you define. For example, you could define a set of tags // for your account's managed nodes that helps you track each node's owner and // stack level. For example: // // - Key=Owner,Value=DbAdmin // // - Key=Owner,Value=SysAdmin // // - Key=Owner,Value=Dev // // - Key=Stack,Value=Production // // - Key=Stack,Value=Pre-Production // // - Key=Stack,Value=Test // // Most resources can have a maximum of 50 tags. Automations can have a maximum // of 5 tags. // // We recommend that you devise a set of tag keys that meets your needs for // each resource type. Using a consistent set of tag keys makes it easier for // you to manage your resources. You can search and filter the resources based // on the tags you add. Tags don't have any semantic meaning to and are interpreted // strictly as a string of characters. // // For more information about using tags with Amazon Elastic Compute Cloud (Amazon // EC2) instances, see Tagging your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) // in the Amazon EC2 User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation AddTagsToResource for usage and error information. // // Returned Error Types: // // - InvalidResourceType // The resource type isn't valid. For example, if you are attempting to tag // an EC2 instance, the instance must be a registered managed node. // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - InternalServerError // An error occurred on the server side. // // - TooManyTagsError // The Targets parameter includes too many tags. Remove one or more tags and // try the command again. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/AddTagsToResource func (c *SSM) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { req, out := c.AddTagsToResourceRequest(input) return out, req.Send() } // AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of // the ability to pass a context and additional request options. // // See AddTagsToResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { req, out := c.AddTagsToResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opAssociateOpsItemRelatedItem = "AssociateOpsItemRelatedItem" // AssociateOpsItemRelatedItemRequest generates a "aws/request.Request" representing the // client's request for the AssociateOpsItemRelatedItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See AssociateOpsItemRelatedItem for more information on using the AssociateOpsItemRelatedItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the AssociateOpsItemRelatedItemRequest method. // req, resp := client.AssociateOpsItemRelatedItemRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/AssociateOpsItemRelatedItem func (c *SSM) AssociateOpsItemRelatedItemRequest(input *AssociateOpsItemRelatedItemInput) (req *request.Request, output *AssociateOpsItemRelatedItemOutput) { op := &request.Operation{ Name: opAssociateOpsItemRelatedItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AssociateOpsItemRelatedItemInput{} } output = &AssociateOpsItemRelatedItemOutput{} req = c.newRequest(op, input, output) return } // AssociateOpsItemRelatedItem API operation for Amazon Simple Systems Manager (SSM). // // Associates a related item to a Systems Manager OpsCenter OpsItem. For example, // you can associate an Incident Manager incident or analysis with an OpsItem. // Incident Manager and OpsCenter are capabilities of Amazon Web Services Systems // Manager. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation AssociateOpsItemRelatedItem for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - OpsItemNotFoundException // The specified OpsItem ID doesn't exist. Verify the ID and try again. // // - OpsItemLimitExceededException // The request caused OpsItems to exceed one or more quotas. // // - OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments // and try again. // // - OpsItemRelatedItemAlreadyExistsException // The Amazon Resource Name (ARN) is already associated with the OpsItem. // // - OpsItemConflictException // The specified OpsItem is in the process of being deleted. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/AssociateOpsItemRelatedItem func (c *SSM) AssociateOpsItemRelatedItem(input *AssociateOpsItemRelatedItemInput) (*AssociateOpsItemRelatedItemOutput, error) { req, out := c.AssociateOpsItemRelatedItemRequest(input) return out, req.Send() } // AssociateOpsItemRelatedItemWithContext is the same as AssociateOpsItemRelatedItem with the addition of // the ability to pass a context and additional request options. // // See AssociateOpsItemRelatedItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) AssociateOpsItemRelatedItemWithContext(ctx aws.Context, input *AssociateOpsItemRelatedItemInput, opts ...request.Option) (*AssociateOpsItemRelatedItemOutput, error) { req, out := c.AssociateOpsItemRelatedItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCancelCommand = "CancelCommand" // CancelCommandRequest generates a "aws/request.Request" representing the // client's request for the CancelCommand operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CancelCommand for more information on using the CancelCommand // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CancelCommandRequest method. // req, resp := client.CancelCommandRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelCommand func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Request, output *CancelCommandOutput) { op := &request.Operation{ Name: opCancelCommand, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CancelCommandInput{} } output = &CancelCommandOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // CancelCommand API operation for Amazon Simple Systems Manager (SSM). // // Attempts to cancel the command specified by the Command ID. There is no guarantee // that the command will be terminated and the underlying process stopped. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation CancelCommand for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidCommandId // The specified command ID isn't valid. Verify the ID and try again. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - DuplicateInstanceId // You can't specify a managed node ID in more than one association. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelCommand func (c *SSM) CancelCommand(input *CancelCommandInput) (*CancelCommandOutput, error) { req, out := c.CancelCommandRequest(input) return out, req.Send() } // CancelCommandWithContext is the same as CancelCommand with the addition of // the ability to pass a context and additional request options. // // See CancelCommand for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CancelCommandWithContext(ctx aws.Context, input *CancelCommandInput, opts ...request.Option) (*CancelCommandOutput, error) { req, out := c.CancelCommandRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCancelMaintenanceWindowExecution = "CancelMaintenanceWindowExecution" // CancelMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the // client's request for the CancelMaintenanceWindowExecution operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CancelMaintenanceWindowExecution for more information on using the CancelMaintenanceWindowExecution // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CancelMaintenanceWindowExecutionRequest method. // req, resp := client.CancelMaintenanceWindowExecutionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution func (c *SSM) CancelMaintenanceWindowExecutionRequest(input *CancelMaintenanceWindowExecutionInput) (req *request.Request, output *CancelMaintenanceWindowExecutionOutput) { op := &request.Operation{ Name: opCancelMaintenanceWindowExecution, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CancelMaintenanceWindowExecutionInput{} } output = &CancelMaintenanceWindowExecutionOutput{} req = c.newRequest(op, input, output) return } // CancelMaintenanceWindowExecution API operation for Amazon Simple Systems Manager (SSM). // // Stops a maintenance window execution that is already in progress and cancels // any tasks in the window that haven't already starting running. Tasks already // in progress will continue to completion. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation CancelMaintenanceWindowExecution for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution func (c *SSM) CancelMaintenanceWindowExecution(input *CancelMaintenanceWindowExecutionInput) (*CancelMaintenanceWindowExecutionOutput, error) { req, out := c.CancelMaintenanceWindowExecutionRequest(input) return out, req.Send() } // CancelMaintenanceWindowExecutionWithContext is the same as CancelMaintenanceWindowExecution with the addition of // the ability to pass a context and additional request options. // // See CancelMaintenanceWindowExecution for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CancelMaintenanceWindowExecutionWithContext(ctx aws.Context, input *CancelMaintenanceWindowExecutionInput, opts ...request.Option) (*CancelMaintenanceWindowExecutionOutput, error) { req, out := c.CancelMaintenanceWindowExecutionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateActivation = "CreateActivation" // CreateActivationRequest generates a "aws/request.Request" representing the // client's request for the CreateActivation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateActivation for more information on using the CreateActivation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateActivationRequest method. // req, resp := client.CreateActivationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateActivation func (c *SSM) CreateActivationRequest(input *CreateActivationInput) (req *request.Request, output *CreateActivationOutput) { op := &request.Operation{ Name: opCreateActivation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateActivationInput{} } output = &CreateActivationOutput{} req = c.newRequest(op, input, output) return } // CreateActivation API operation for Amazon Simple Systems Manager (SSM). // // Generates an activation code and activation ID you can use to register your // on-premises servers, edge devices, or virtual machine (VM) with Amazon Web // Services Systems Manager. Registering these machines with Systems Manager // makes it possible to manage them using Systems Manager capabilities. You // use the activation code and ID when installing SSM Agent on machines in your // hybrid environment. For more information about requirements for managing // on-premises machines using Systems Manager, see Setting up Amazon Web Services // Systems Manager for hybrid environments (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html) // in the Amazon Web Services Systems Manager User Guide. // // Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises // servers and VMs that are configured for Systems Manager are all called managed // 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 Amazon Simple Systems Manager (SSM)'s // API operation CreateActivation for usage and error information. // // Returned Error Types: // // - InvalidParameters // You must specify values for all required parameters in the Amazon Web Services // Systems Manager document (SSM document). You can only supply values to parameters // defined in the SSM document. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateActivation func (c *SSM) CreateActivation(input *CreateActivationInput) (*CreateActivationOutput, error) { req, out := c.CreateActivationRequest(input) return out, req.Send() } // CreateActivationWithContext is the same as CreateActivation with the addition of // the ability to pass a context and additional request options. // // See CreateActivation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreateActivationWithContext(ctx aws.Context, input *CreateActivationInput, opts ...request.Option) (*CreateActivationOutput, error) { req, out := c.CreateActivationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateAssociation = "CreateAssociation" // CreateAssociationRequest generates a "aws/request.Request" representing the // client's request for the CreateAssociation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateAssociation for more information on using the CreateAssociation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateAssociationRequest method. // req, resp := client.CreateAssociationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociation func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *request.Request, output *CreateAssociationOutput) { op := &request.Operation{ Name: opCreateAssociation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateAssociationInput{} } output = &CreateAssociationOutput{} req = c.newRequest(op, input, output) return } // CreateAssociation API operation for Amazon Simple Systems Manager (SSM). // // A State Manager association defines the state that you want to maintain on // your managed nodes. For example, an association can specify that anti-virus // software must be installed and running on your managed nodes, or that certain // ports must be closed. For static targets, the association specifies a schedule // for when the configuration is reapplied. For dynamic targets, such as an // Amazon Web Services resource group or an Amazon Web Services autoscaling // group, State Manager, a capability of Amazon Web Services Systems Manager // applies the configuration when new managed nodes are added to the group. // The association also specifies actions to take when applying the configuration. // For example, an association for anti-virus software might run once a day. // If the software isn't installed, then State Manager installs it. If the software // is installed, but the service isn't running, then the association might instruct // State Manager to start 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 Amazon Simple Systems Manager (SSM)'s // API operation CreateAssociation for usage and error information. // // Returned Error Types: // // - AssociationAlreadyExists // The specified association already exists. // // - AssociationLimitExceeded // You can have at most 2,000 active associations. // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - UnsupportedPlatformType // The document doesn't support the platform type of the given managed node // ID(s). For example, you sent an document for a Windows managed node to a // Linux node. // // - InvalidOutputLocation // The output location isn't valid or doesn't exist. // // - InvalidParameters // You must specify values for all required parameters in the Amazon Web Services // Systems Manager document (SSM document). You can only supply values to parameters // defined in the SSM document. // // - InvalidTarget // The target isn't valid or doesn't exist. It might not be configured for Systems // Manager or you might not have permission to perform the operation. // // - InvalidSchedule // The schedule is invalid. Verify your cron or rate expression and try again. // // - InvalidTargetMaps // TargetMap parameter isn't valid. // // - InvalidTag // The specified tag key or value isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociation func (c *SSM) CreateAssociation(input *CreateAssociationInput) (*CreateAssociationOutput, error) { req, out := c.CreateAssociationRequest(input) return out, req.Send() } // CreateAssociationWithContext is the same as CreateAssociation with the addition of // the ability to pass a context and additional request options. // // See CreateAssociation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreateAssociationWithContext(ctx aws.Context, input *CreateAssociationInput, opts ...request.Option) (*CreateAssociationOutput, error) { req, out := c.CreateAssociationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateAssociationBatch = "CreateAssociationBatch" // CreateAssociationBatchRequest generates a "aws/request.Request" representing the // client's request for the CreateAssociationBatch operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateAssociationBatch for more information on using the CreateAssociationBatch // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateAssociationBatchRequest method. // req, resp := client.CreateAssociationBatchRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociationBatch func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) (req *request.Request, output *CreateAssociationBatchOutput) { op := &request.Operation{ Name: opCreateAssociationBatch, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateAssociationBatchInput{} } output = &CreateAssociationBatchOutput{} req = c.newRequest(op, input, output) return } // CreateAssociationBatch API operation for Amazon Simple Systems Manager (SSM). // // Associates the specified Amazon Web Services Systems Manager document (SSM // document) with the specified managed nodes or targets. // // When you associate a document with one or more managed nodes using IDs or // tags, Amazon Web Services Systems Manager Agent (SSM Agent) running on the // managed node processes the document and configures the node as specified. // // If you associate a document with a managed node that already has an associated // 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 // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation CreateAssociationBatch for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidParameters // You must specify values for all required parameters in the Amazon Web Services // Systems Manager document (SSM document). You can only supply values to parameters // defined in the SSM document. // // - DuplicateInstanceId // You can't specify a managed node ID in more than one association. // // - AssociationLimitExceeded // You can have at most 2,000 active associations. // // - UnsupportedPlatformType // The document doesn't support the platform type of the given managed node // ID(s). For example, you sent an document for a Windows managed node to a // Linux node. // // - InvalidOutputLocation // The output location isn't valid or doesn't exist. // // - InvalidTarget // The target isn't valid or doesn't exist. It might not be configured for Systems // Manager or you might not have permission to perform the operation. // // - InvalidSchedule // The schedule is invalid. Verify your cron or rate expression and try again. // // - InvalidTargetMaps // TargetMap parameter isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateAssociationBatch func (c *SSM) CreateAssociationBatch(input *CreateAssociationBatchInput) (*CreateAssociationBatchOutput, error) { req, out := c.CreateAssociationBatchRequest(input) return out, req.Send() } // CreateAssociationBatchWithContext is the same as CreateAssociationBatch with the addition of // the ability to pass a context and additional request options. // // See CreateAssociationBatch for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreateAssociationBatchWithContext(ctx aws.Context, input *CreateAssociationBatchInput, opts ...request.Option) (*CreateAssociationBatchOutput, error) { req, out := c.CreateAssociationBatchRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateDocument = "CreateDocument" // CreateDocumentRequest generates a "aws/request.Request" representing the // client's request for the CreateDocument operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateDocument for more information on using the CreateDocument // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateDocumentRequest method. // req, resp := client.CreateDocumentRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateDocument func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Request, output *CreateDocumentOutput) { op := &request.Operation{ Name: opCreateDocument, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateDocumentInput{} } output = &CreateDocumentOutput{} req = c.newRequest(op, input, output) return } // CreateDocument API operation for Amazon Simple Systems Manager (SSM). // // Creates a Amazon Web Services Systems Manager (SSM document). An SSM document // defines the actions that Systems Manager performs on your managed nodes. // For more information about SSM documents, including information about supported // schemas, features, and syntax, see Amazon Web Services Systems Manager Documents // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html) // in the Amazon Web Services Systems Manager 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 Simple Systems Manager (SSM)'s // API operation CreateDocument for usage and error information. // // Returned Error Types: // // - DocumentAlreadyExists // The specified document already exists. // // - MaxDocumentSizeExceeded // The size limit of a document is 64 KB. // // - InternalServerError // An error occurred on the server side. // // - InvalidDocumentContent // The content for the document isn't valid. // // - DocumentLimitExceeded // You can have at most 500 active SSM documents. // // - InvalidDocumentSchemaVersion // The version of the document schema isn't supported. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateDocument func (c *SSM) CreateDocument(input *CreateDocumentInput) (*CreateDocumentOutput, error) { req, out := c.CreateDocumentRequest(input) return out, req.Send() } // CreateDocumentWithContext is the same as CreateDocument with the addition of // the ability to pass a context and additional request options. // // See CreateDocument for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreateDocumentWithContext(ctx aws.Context, input *CreateDocumentInput, opts ...request.Option) (*CreateDocumentOutput, error) { req, out := c.CreateDocumentRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateMaintenanceWindow = "CreateMaintenanceWindow" // CreateMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the CreateMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateMaintenanceWindow for more information on using the CreateMaintenanceWindow // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateMaintenanceWindowRequest method. // req, resp := client.CreateMaintenanceWindowRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateMaintenanceWindow func (c *SSM) CreateMaintenanceWindowRequest(input *CreateMaintenanceWindowInput) (req *request.Request, output *CreateMaintenanceWindowOutput) { op := &request.Operation{ Name: opCreateMaintenanceWindow, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateMaintenanceWindowInput{} } output = &CreateMaintenanceWindowOutput{} req = c.newRequest(op, input, output) return } // CreateMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). // // Creates a new maintenance window. // // The value you specify for Duration determines the specific end time for the // maintenance window based on the time it begins. No maintenance window tasks // are permitted to start after the resulting endtime minus the number of hours // you specify for Cutoff. For example, if the maintenance window starts at // 3 PM, the duration is three hours, and the value you specify for Cutoff is // one hour, no maintenance window tasks can start after 5 PM. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation CreateMaintenanceWindow for usage and error information. // // Returned Error Types: // // - IdempotentParameterMismatch // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. // // - ResourceLimitExceededException // Error returned when the caller has exceeded the default resource quotas. // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager // service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateMaintenanceWindow func (c *SSM) CreateMaintenanceWindow(input *CreateMaintenanceWindowInput) (*CreateMaintenanceWindowOutput, error) { req, out := c.CreateMaintenanceWindowRequest(input) return out, req.Send() } // CreateMaintenanceWindowWithContext is the same as CreateMaintenanceWindow with the addition of // the ability to pass a context and additional request options. // // See CreateMaintenanceWindow for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreateMaintenanceWindowWithContext(ctx aws.Context, input *CreateMaintenanceWindowInput, opts ...request.Option) (*CreateMaintenanceWindowOutput, error) { req, out := c.CreateMaintenanceWindowRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateOpsItem = "CreateOpsItem" // CreateOpsItemRequest generates a "aws/request.Request" representing the // client's request for the CreateOpsItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateOpsItem for more information on using the CreateOpsItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateOpsItemRequest method. // req, resp := client.CreateOpsItemRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateOpsItem func (c *SSM) CreateOpsItemRequest(input *CreateOpsItemInput) (req *request.Request, output *CreateOpsItemOutput) { op := &request.Operation{ Name: opCreateOpsItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateOpsItemInput{} } output = &CreateOpsItemOutput{} req = c.newRequest(op, input, output) return } // CreateOpsItem API operation for Amazon Simple Systems Manager (SSM). // // Creates a new OpsItem. You must have permission in Identity and Access Management // (IAM) to create a new OpsItem. For more information, see Set up OpsCenter // (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html) // in the Amazon Web Services Systems Manager User Guide. // // Operations engineers and IT professionals use Amazon Web Services Systems // Manager OpsCenter to view, investigate, and remediate operational issues // impacting the performance and health of their Amazon Web Services resources. // For more information, see Amazon Web Services Systems Manager OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the Amazon Web Services Systems Manager 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 Simple Systems Manager (SSM)'s // API operation CreateOpsItem for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - OpsItemAlreadyExistsException // The OpsItem already exists. // // - OpsItemLimitExceededException // The request caused OpsItems to exceed one or more quotas. // // - OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments // and try again. // // - OpsItemAccessDeniedException // You don't have permission to view OpsItems in the specified account. Verify // that your account is configured either as a Systems Manager delegated administrator // or that you are logged into the Organizations management account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateOpsItem func (c *SSM) CreateOpsItem(input *CreateOpsItemInput) (*CreateOpsItemOutput, error) { req, out := c.CreateOpsItemRequest(input) return out, req.Send() } // CreateOpsItemWithContext is the same as CreateOpsItem with the addition of // the ability to pass a context and additional request options. // // See CreateOpsItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreateOpsItemWithContext(ctx aws.Context, input *CreateOpsItemInput, opts ...request.Option) (*CreateOpsItemOutput, error) { req, out := c.CreateOpsItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateOpsMetadata = "CreateOpsMetadata" // CreateOpsMetadataRequest generates a "aws/request.Request" representing the // client's request for the CreateOpsMetadata operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateOpsMetadata for more information on using the CreateOpsMetadata // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateOpsMetadataRequest method. // req, resp := client.CreateOpsMetadataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateOpsMetadata func (c *SSM) CreateOpsMetadataRequest(input *CreateOpsMetadataInput) (req *request.Request, output *CreateOpsMetadataOutput) { op := &request.Operation{ Name: opCreateOpsMetadata, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateOpsMetadataInput{} } output = &CreateOpsMetadataOutput{} req = c.newRequest(op, input, output) return } // CreateOpsMetadata API operation for Amazon Simple Systems Manager (SSM). // // If you create a new application in Application Manager, Amazon Web Services // Systems Manager calls this API operation to specify information about the // new application, including the application type. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation CreateOpsMetadata for usage and error information. // // Returned Error Types: // // - OpsMetadataAlreadyExistsException // An OpsMetadata object already exists for the selected resource. // // - OpsMetadataTooManyUpdatesException // The system is processing too many concurrent updates. Wait a few moments // and try again. // // - OpsMetadataInvalidArgumentException // One of the arguments passed is invalid. // // - OpsMetadataLimitExceededException // Your account reached the maximum number of OpsMetadata objects allowed by // Application Manager. The maximum is 200 OpsMetadata objects. Delete one or // more OpsMetadata object and try again. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateOpsMetadata func (c *SSM) CreateOpsMetadata(input *CreateOpsMetadataInput) (*CreateOpsMetadataOutput, error) { req, out := c.CreateOpsMetadataRequest(input) return out, req.Send() } // CreateOpsMetadataWithContext is the same as CreateOpsMetadata with the addition of // the ability to pass a context and additional request options. // // See CreateOpsMetadata for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreateOpsMetadataWithContext(ctx aws.Context, input *CreateOpsMetadataInput, opts ...request.Option) (*CreateOpsMetadataOutput, error) { req, out := c.CreateOpsMetadataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreatePatchBaseline = "CreatePatchBaseline" // CreatePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the CreatePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreatePatchBaseline for more information on using the CreatePatchBaseline // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreatePatchBaselineRequest method. // req, resp := client.CreatePatchBaselineRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreatePatchBaseline func (c *SSM) CreatePatchBaselineRequest(input *CreatePatchBaselineInput) (req *request.Request, output *CreatePatchBaselineOutput) { op := &request.Operation{ Name: opCreatePatchBaseline, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreatePatchBaselineInput{} } output = &CreatePatchBaselineOutput{} req = c.newRequest(op, input, output) return } // CreatePatchBaseline API operation for Amazon Simple Systems Manager (SSM). // // Creates a patch baseline. // // For information about valid key-value pairs in PatchFilters for each supported // operating system type, see PatchFilter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation CreatePatchBaseline for usage and error information. // // Returned Error Types: // // - IdempotentParameterMismatch // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. // // - ResourceLimitExceededException // Error returned when the caller has exceeded the default resource quotas. // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager // service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreatePatchBaseline func (c *SSM) CreatePatchBaseline(input *CreatePatchBaselineInput) (*CreatePatchBaselineOutput, error) { req, out := c.CreatePatchBaselineRequest(input) return out, req.Send() } // CreatePatchBaselineWithContext is the same as CreatePatchBaseline with the addition of // the ability to pass a context and additional request options. // // See CreatePatchBaseline for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreatePatchBaselineWithContext(ctx aws.Context, input *CreatePatchBaselineInput, opts ...request.Option) (*CreatePatchBaselineOutput, error) { req, out := c.CreatePatchBaselineRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateResourceDataSync = "CreateResourceDataSync" // CreateResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateResourceDataSync for more information on using the CreateResourceDataSync // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateResourceDataSyncRequest method. // req, resp := client.CreateResourceDataSyncRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateResourceDataSync func (c *SSM) CreateResourceDataSyncRequest(input *CreateResourceDataSyncInput) (req *request.Request, output *CreateResourceDataSyncOutput) { op := &request.Operation{ Name: opCreateResourceDataSync, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateResourceDataSyncInput{} } output = &CreateResourceDataSyncOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // CreateResourceDataSync API operation for Amazon Simple Systems Manager (SSM). // // A resource data sync helps you view data from multiple sources in a single // location. Amazon Web Services Systems Manager offers two types of resource // data sync: SyncToDestination and SyncFromSource. // // You can configure Systems Manager Inventory to use the SyncToDestination // type to synchronize Inventory data from multiple Amazon Web Services Regions // to a single Amazon Simple Storage Service (Amazon S3) bucket. For more information, // see Configuring resource data sync for Inventory (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html) // in the Amazon Web Services Systems Manager User Guide. // // You can configure Systems Manager Explorer to use the SyncFromSource type // to synchronize operational work items (OpsItems) and operational data (OpsData) // from multiple Amazon Web Services Regions to a single Amazon S3 bucket. This // type can synchronize OpsItems and OpsData from multiple Amazon Web Services // accounts and Amazon Web Services Regions or EntireOrganization by using Organizations. // For more information, see Setting up Systems Manager Explorer to display // data from multiple accounts and Regions (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html) // in the Amazon Web Services Systems Manager User Guide. // // A resource data sync is an asynchronous operation that returns immediately. // After a successful initial sync is completed, the system continuously syncs // data. To check the status of a sync, use the ListResourceDataSync. // // By default, data isn't encrypted in Amazon S3. We strongly recommend that // you enable encryption in Amazon S3 to ensure secure data storage. We also // recommend that you secure access to the Amazon S3 bucket by creating a restrictive // bucket 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 Simple Systems Manager (SSM)'s // API operation CreateResourceDataSync for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ResourceDataSyncCountExceededException // You have exceeded the allowed maximum sync configurations. // // - ResourceDataSyncAlreadyExistsException // A sync configuration with the same name already exists. // // - ResourceDataSyncInvalidConfigurationException // The specified sync configuration is invalid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CreateResourceDataSync func (c *SSM) CreateResourceDataSync(input *CreateResourceDataSyncInput) (*CreateResourceDataSyncOutput, error) { req, out := c.CreateResourceDataSyncRequest(input) return out, req.Send() } // CreateResourceDataSyncWithContext is the same as CreateResourceDataSync with the addition of // the ability to pass a context and additional request options. // // See CreateResourceDataSync for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) CreateResourceDataSyncWithContext(ctx aws.Context, input *CreateResourceDataSyncInput, opts ...request.Option) (*CreateResourceDataSyncOutput, error) { req, out := c.CreateResourceDataSyncRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteActivation = "DeleteActivation" // DeleteActivationRequest generates a "aws/request.Request" representing the // client's request for the DeleteActivation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteActivation for more information on using the DeleteActivation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteActivationRequest method. // req, resp := client.DeleteActivationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteActivation func (c *SSM) DeleteActivationRequest(input *DeleteActivationInput) (req *request.Request, output *DeleteActivationOutput) { op := &request.Operation{ Name: opDeleteActivation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteActivationInput{} } output = &DeleteActivationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteActivation API operation for Amazon Simple Systems Manager (SSM). // // Deletes an activation. You aren't required to delete an activation. If you // delete an activation, you can no longer use it to register additional managed // nodes. Deleting an activation doesn't de-register managed nodes. You must // manually de-register managed 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 Amazon Simple Systems Manager (SSM)'s // API operation DeleteActivation for usage and error information. // // Returned Error Types: // // - InvalidActivationId // The activation ID isn't valid. Verify the you entered the correct ActivationId // or ActivationCode and try again. // // - InvalidActivation // The activation isn't valid. The activation might have been deleted, or the // ActivationId and the ActivationCode don't match. // // - InternalServerError // An error occurred on the server side. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteActivation func (c *SSM) DeleteActivation(input *DeleteActivationInput) (*DeleteActivationOutput, error) { req, out := c.DeleteActivationRequest(input) return out, req.Send() } // DeleteActivationWithContext is the same as DeleteActivation with the addition of // the ability to pass a context and additional request options. // // See DeleteActivation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteActivationWithContext(ctx aws.Context, input *DeleteActivationInput, opts ...request.Option) (*DeleteActivationOutput, error) { req, out := c.DeleteActivationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteAssociation = "DeleteAssociation" // DeleteAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssociation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteAssociation for more information on using the DeleteAssociation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteAssociationRequest method. // req, resp := client.DeleteAssociationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteAssociation func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *request.Request, output *DeleteAssociationOutput) { op := &request.Operation{ Name: opDeleteAssociation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteAssociationInput{} } output = &DeleteAssociationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteAssociation API operation for Amazon Simple Systems Manager (SSM). // // Disassociates the specified Amazon Web Services Systems Manager document // (SSM document) from the specified managed node. If you created the association // by using the Targets parameter, then you must delete the association by using // the association ID. // // When you disassociate a document from a managed node, it doesn't change the // configuration of the node. To change the configuration state of a managed // node after you disassociate a document, you must create a new document with // the desired configuration and associate it with the 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 Amazon Simple Systems Manager (SSM)'s // API operation DeleteAssociation for usage and error information. // // Returned Error Types: // // - AssociationDoesNotExist // The specified association doesn't exist. // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteAssociation func (c *SSM) DeleteAssociation(input *DeleteAssociationInput) (*DeleteAssociationOutput, error) { req, out := c.DeleteAssociationRequest(input) return out, req.Send() } // DeleteAssociationWithContext is the same as DeleteAssociation with the addition of // the ability to pass a context and additional request options. // // See DeleteAssociation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteAssociationWithContext(ctx aws.Context, input *DeleteAssociationInput, opts ...request.Option) (*DeleteAssociationOutput, error) { req, out := c.DeleteAssociationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteDocument = "DeleteDocument" // DeleteDocumentRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocument operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteDocument for more information on using the DeleteDocument // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteDocumentRequest method. // req, resp := client.DeleteDocumentRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteDocument func (c *SSM) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Request, output *DeleteDocumentOutput) { op := &request.Operation{ Name: opDeleteDocument, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteDocumentInput{} } output = &DeleteDocumentOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteDocument API operation for Amazon Simple Systems Manager (SSM). // // Deletes the Amazon Web Services Systems Manager document (SSM document) and // all managed node associations to the document. // // Before you delete the document, we recommend that you use DeleteAssociation // to disassociate all managed nodes that are associated with the document. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeleteDocument for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentOperation // You attempted to delete a document while it is still shared. You must stop // sharing the document before you can delete it. // // - AssociatedInstances // You must disassociate a document from all managed nodes before you can delete // it. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteDocument func (c *SSM) DeleteDocument(input *DeleteDocumentInput) (*DeleteDocumentOutput, error) { req, out := c.DeleteDocumentRequest(input) return out, req.Send() } // DeleteDocumentWithContext is the same as DeleteDocument with the addition of // the ability to pass a context and additional request options. // // See DeleteDocument for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteDocumentWithContext(ctx aws.Context, input *DeleteDocumentInput, opts ...request.Option) (*DeleteDocumentOutput, error) { req, out := c.DeleteDocumentRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteInventory = "DeleteInventory" // DeleteInventoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteInventory operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteInventory for more information on using the DeleteInventory // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteInventoryRequest method. // req, resp := client.DeleteInventoryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory func (c *SSM) DeleteInventoryRequest(input *DeleteInventoryInput) (req *request.Request, output *DeleteInventoryOutput) { op := &request.Operation{ Name: opDeleteInventory, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteInventoryInput{} } output = &DeleteInventoryOutput{} req = c.newRequest(op, input, output) return } // DeleteInventory API operation for Amazon Simple Systems Manager (SSM). // // Delete a custom inventory type or the data associated with a custom Inventory // type. Deleting a custom inventory type is also referred to as deleting a // custom inventory schema. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeleteInventory for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidTypeNameException // The parameter type name isn't valid. // // - InvalidOptionException // The delete inventory option specified isn't valid. Verify the option and // try again. // // - InvalidDeleteInventoryParametersException // One or more of the parameters specified for the delete operation isn't valid. // Verify all parameters and try again. // // - InvalidInventoryRequestException // The request isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory func (c *SSM) DeleteInventory(input *DeleteInventoryInput) (*DeleteInventoryOutput, error) { req, out := c.DeleteInventoryRequest(input) return out, req.Send() } // DeleteInventoryWithContext is the same as DeleteInventory with the addition of // the ability to pass a context and additional request options. // // See DeleteInventory for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteInventoryWithContext(ctx aws.Context, input *DeleteInventoryInput, opts ...request.Option) (*DeleteInventoryOutput, error) { req, out := c.DeleteInventoryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteMaintenanceWindow = "DeleteMaintenanceWindow" // DeleteMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeleteMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteMaintenanceWindow for more information on using the DeleteMaintenanceWindow // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteMaintenanceWindowRequest method. // req, resp := client.DeleteMaintenanceWindowRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteMaintenanceWindow func (c *SSM) DeleteMaintenanceWindowRequest(input *DeleteMaintenanceWindowInput) (req *request.Request, output *DeleteMaintenanceWindowOutput) { op := &request.Operation{ Name: opDeleteMaintenanceWindow, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteMaintenanceWindowInput{} } output = &DeleteMaintenanceWindowOutput{} req = c.newRequest(op, input, output) return } // DeleteMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). // // Deletes a maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeleteMaintenanceWindow for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteMaintenanceWindow func (c *SSM) DeleteMaintenanceWindow(input *DeleteMaintenanceWindowInput) (*DeleteMaintenanceWindowOutput, error) { req, out := c.DeleteMaintenanceWindowRequest(input) return out, req.Send() } // DeleteMaintenanceWindowWithContext is the same as DeleteMaintenanceWindow with the addition of // the ability to pass a context and additional request options. // // See DeleteMaintenanceWindow for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteMaintenanceWindowWithContext(ctx aws.Context, input *DeleteMaintenanceWindowInput, opts ...request.Option) (*DeleteMaintenanceWindowOutput, error) { req, out := c.DeleteMaintenanceWindowRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteOpsItem = "DeleteOpsItem" // DeleteOpsItemRequest generates a "aws/request.Request" representing the // client's request for the DeleteOpsItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteOpsItem for more information on using the DeleteOpsItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteOpsItemRequest method. // req, resp := client.DeleteOpsItemRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteOpsItem func (c *SSM) DeleteOpsItemRequest(input *DeleteOpsItemInput) (req *request.Request, output *DeleteOpsItemOutput) { op := &request.Operation{ Name: opDeleteOpsItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteOpsItemInput{} } output = &DeleteOpsItemOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteOpsItem API operation for Amazon Simple Systems Manager (SSM). // // Delete an OpsItem. You must have permission in Identity and Access Management // (IAM) to delete an OpsItem. // // Note the following important information about this operation. // // - Deleting an OpsItem is irreversible. You can't restore a deleted OpsItem. // // - This operation uses an eventual consistency model, which means the system // can take a few minutes to complete this operation. If you delete an OpsItem // and immediately call, for example, GetOpsItem, the deleted OpsItem might // still appear in the response. // // - This operation is idempotent. The system doesn't throw an exception // if you repeatedly call this operation for the same OpsItem. If the first // call is successful, all additional calls return the same successful response // as the first call. // // - This operation doesn't support cross-account calls. A delegated administrator // or management account can't delete OpsItems in other accounts, even if // OpsCenter has been set up for cross-account administration. For more information // about cross-account administration, see Setting up OpsCenter to centrally // manage OpsItems across accounts (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setting-up-cross-account.html) // in the Systems Manager 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 Simple Systems Manager (SSM)'s // API operation DeleteOpsItem for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments // and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteOpsItem func (c *SSM) DeleteOpsItem(input *DeleteOpsItemInput) (*DeleteOpsItemOutput, error) { req, out := c.DeleteOpsItemRequest(input) return out, req.Send() } // DeleteOpsItemWithContext is the same as DeleteOpsItem with the addition of // the ability to pass a context and additional request options. // // See DeleteOpsItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteOpsItemWithContext(ctx aws.Context, input *DeleteOpsItemInput, opts ...request.Option) (*DeleteOpsItemOutput, error) { req, out := c.DeleteOpsItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteOpsMetadata = "DeleteOpsMetadata" // DeleteOpsMetadataRequest generates a "aws/request.Request" representing the // client's request for the DeleteOpsMetadata operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteOpsMetadata for more information on using the DeleteOpsMetadata // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteOpsMetadataRequest method. // req, resp := client.DeleteOpsMetadataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteOpsMetadata func (c *SSM) DeleteOpsMetadataRequest(input *DeleteOpsMetadataInput) (req *request.Request, output *DeleteOpsMetadataOutput) { op := &request.Operation{ Name: opDeleteOpsMetadata, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteOpsMetadataInput{} } output = &DeleteOpsMetadataOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteOpsMetadata API operation for Amazon Simple Systems Manager (SSM). // // Delete OpsMetadata related to an application. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeleteOpsMetadata for usage and error information. // // Returned Error Types: // // - OpsMetadataNotFoundException // The OpsMetadata object doesn't exist. // // - OpsMetadataInvalidArgumentException // One of the arguments passed is invalid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteOpsMetadata func (c *SSM) DeleteOpsMetadata(input *DeleteOpsMetadataInput) (*DeleteOpsMetadataOutput, error) { req, out := c.DeleteOpsMetadataRequest(input) return out, req.Send() } // DeleteOpsMetadataWithContext is the same as DeleteOpsMetadata with the addition of // the ability to pass a context and additional request options. // // See DeleteOpsMetadata for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteOpsMetadataWithContext(ctx aws.Context, input *DeleteOpsMetadataInput, opts ...request.Option) (*DeleteOpsMetadataOutput, error) { req, out := c.DeleteOpsMetadataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteParameter = "DeleteParameter" // DeleteParameterRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteParameter for more information on using the DeleteParameter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteParameterRequest method. // req, resp := client.DeleteParameterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameter func (c *SSM) DeleteParameterRequest(input *DeleteParameterInput) (req *request.Request, output *DeleteParameterOutput) { op := &request.Operation{ Name: opDeleteParameter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteParameterInput{} } output = &DeleteParameterOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteParameter API operation for Amazon Simple Systems Manager (SSM). // // Delete a parameter from the system. After deleting a parameter, wait for // at least 30 seconds to create a parameter with the same name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeleteParameter for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ParameterNotFound // The parameter couldn't be found. Verify the name and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameter func (c *SSM) DeleteParameter(input *DeleteParameterInput) (*DeleteParameterOutput, error) { req, out := c.DeleteParameterRequest(input) return out, req.Send() } // DeleteParameterWithContext is the same as DeleteParameter with the addition of // the ability to pass a context and additional request options. // // See DeleteParameter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteParameterWithContext(ctx aws.Context, input *DeleteParameterInput, opts ...request.Option) (*DeleteParameterOutput, error) { req, out := c.DeleteParameterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteParameters = "DeleteParameters" // DeleteParametersRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteParameters for more information on using the DeleteParameters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteParametersRequest method. // req, resp := client.DeleteParametersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameters func (c *SSM) DeleteParametersRequest(input *DeleteParametersInput) (req *request.Request, output *DeleteParametersOutput) { op := &request.Operation{ Name: opDeleteParameters, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteParametersInput{} } output = &DeleteParametersOutput{} req = c.newRequest(op, input, output) return } // DeleteParameters API operation for Amazon Simple Systems Manager (SSM). // // Delete a list of parameters. After deleting a parameter, wait for at least // 30 seconds to create a parameter with the same name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeleteParameters for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteParameters func (c *SSM) DeleteParameters(input *DeleteParametersInput) (*DeleteParametersOutput, error) { req, out := c.DeleteParametersRequest(input) return out, req.Send() } // DeleteParametersWithContext is the same as DeleteParameters with the addition of // the ability to pass a context and additional request options. // // See DeleteParameters for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteParametersWithContext(ctx aws.Context, input *DeleteParametersInput, opts ...request.Option) (*DeleteParametersOutput, error) { req, out := c.DeleteParametersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeletePatchBaseline = "DeletePatchBaseline" // DeletePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the DeletePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeletePatchBaseline for more information on using the DeletePatchBaseline // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeletePatchBaselineRequest method. // req, resp := client.DeletePatchBaselineRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeletePatchBaseline func (c *SSM) DeletePatchBaselineRequest(input *DeletePatchBaselineInput) (req *request.Request, output *DeletePatchBaselineOutput) { op := &request.Operation{ Name: opDeletePatchBaseline, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeletePatchBaselineInput{} } output = &DeletePatchBaselineOutput{} req = c.newRequest(op, input, output) return } // DeletePatchBaseline API operation for Amazon Simple Systems Manager (SSM). // // Deletes a patch baseline. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeletePatchBaseline for usage and error information. // // Returned Error Types: // // - ResourceInUseException // Error returned if an attempt is made to delete a patch baseline that is registered // for a patch group. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeletePatchBaseline func (c *SSM) DeletePatchBaseline(input *DeletePatchBaselineInput) (*DeletePatchBaselineOutput, error) { req, out := c.DeletePatchBaselineRequest(input) return out, req.Send() } // DeletePatchBaselineWithContext is the same as DeletePatchBaseline with the addition of // the ability to pass a context and additional request options. // // See DeletePatchBaseline for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeletePatchBaselineWithContext(ctx aws.Context, input *DeletePatchBaselineInput, opts ...request.Option) (*DeletePatchBaselineOutput, error) { req, out := c.DeletePatchBaselineRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteResourceDataSync = "DeleteResourceDataSync" // DeleteResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteResourceDataSync for more information on using the DeleteResourceDataSync // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeleteResourceDataSyncRequest method. // req, resp := client.DeleteResourceDataSyncRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteResourceDataSync func (c *SSM) DeleteResourceDataSyncRequest(input *DeleteResourceDataSyncInput) (req *request.Request, output *DeleteResourceDataSyncOutput) { op := &request.Operation{ Name: opDeleteResourceDataSync, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteResourceDataSyncInput{} } output = &DeleteResourceDataSyncOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteResourceDataSync API operation for Amazon Simple Systems Manager (SSM). // // Deletes a resource data sync configuration. After the configuration is deleted, // changes to data on managed nodes are no longer synced to or from the target. // Deleting a sync configuration doesn't delete data. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeleteResourceDataSync for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ResourceDataSyncNotFoundException // The specified sync name wasn't found. // // - ResourceDataSyncInvalidConfigurationException // The specified sync configuration is invalid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteResourceDataSync func (c *SSM) DeleteResourceDataSync(input *DeleteResourceDataSyncInput) (*DeleteResourceDataSyncOutput, error) { req, out := c.DeleteResourceDataSyncRequest(input) return out, req.Send() } // DeleteResourceDataSyncWithContext is the same as DeleteResourceDataSync with the addition of // the ability to pass a context and additional request options. // // See DeleteResourceDataSync for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeleteResourceDataSyncWithContext(ctx aws.Context, input *DeleteResourceDataSyncInput, opts ...request.Option) (*DeleteResourceDataSyncOutput, error) { req, out := c.DeleteResourceDataSyncRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) 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/ssm-2014-11-06/DeleteResourcePolicy func (c *SSM) 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 Amazon Simple Systems Manager (SSM). // // Deletes a Systems Manager resource policy. A resource policy helps you to // define the IAM entity (for example, an Amazon Web Services account) that // can manage your Systems Manager resources. Currently, OpsItemGroup is the // only resource that supports Systems Manager resource policies. The resource // policy for OpsItemGroup enables Amazon Web Services accounts to view and // interact with OpsCenter operational work items (OpsItems). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeleteResourcePolicy for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ResourcePolicyInvalidParameterException // One or more parameters specified for the call aren't valid. Verify the parameters // and their values and try again. // // - ResourcePolicyConflictException // The hash provided in the call doesn't match the stored hash. This exception // is thrown when trying to update an obsolete policy version or when multiple // requests to update a policy are sent. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteResourcePolicy func (c *SSM) 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 *SSM) 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 opDeregisterManagedInstance = "DeregisterManagedInstance" // DeregisterManagedInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterManagedInstance operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeregisterManagedInstance for more information on using the DeregisterManagedInstance // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeregisterManagedInstanceRequest method. // req, resp := client.DeregisterManagedInstanceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterManagedInstance func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceInput) (req *request.Request, output *DeregisterManagedInstanceOutput) { op := &request.Operation{ Name: opDeregisterManagedInstance, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeregisterManagedInstanceInput{} } output = &DeregisterManagedInstanceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeregisterManagedInstance API operation for Amazon Simple Systems Manager (SSM). // // Removes the server or virtual machine from the list of registered servers. // You can reregister the node again at any time. If you don't plan to use Run // Command on the server, we suggest uninstalling SSM Agent 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 Simple Systems Manager (SSM)'s // API operation DeregisterManagedInstance for usage and error information. // // Returned Error Types: // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterManagedInstance func (c *SSM) DeregisterManagedInstance(input *DeregisterManagedInstanceInput) (*DeregisterManagedInstanceOutput, error) { req, out := c.DeregisterManagedInstanceRequest(input) return out, req.Send() } // DeregisterManagedInstanceWithContext is the same as DeregisterManagedInstance with the addition of // the ability to pass a context and additional request options. // // See DeregisterManagedInstance for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeregisterManagedInstanceWithContext(ctx aws.Context, input *DeregisterManagedInstanceInput, opts ...request.Option) (*DeregisterManagedInstanceOutput, error) { req, out := c.DeregisterManagedInstanceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeregisterPatchBaselineForPatchGroup = "DeregisterPatchBaselineForPatchGroup" // DeregisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the DeregisterPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeregisterPatchBaselineForPatchGroup for more information on using the DeregisterPatchBaselineForPatchGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeregisterPatchBaselineForPatchGroupRequest method. // req, resp := client.DeregisterPatchBaselineForPatchGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterPatchBaselineForPatchGroup func (c *SSM) DeregisterPatchBaselineForPatchGroupRequest(input *DeregisterPatchBaselineForPatchGroupInput) (req *request.Request, output *DeregisterPatchBaselineForPatchGroupOutput) { op := &request.Operation{ Name: opDeregisterPatchBaselineForPatchGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeregisterPatchBaselineForPatchGroupInput{} } output = &DeregisterPatchBaselineForPatchGroupOutput{} req = c.newRequest(op, input, output) return } // DeregisterPatchBaselineForPatchGroup API operation for Amazon Simple Systems Manager (SSM). // // Removes a patch group from a patch baseline. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeregisterPatchBaselineForPatchGroup for usage and error information. // // Returned Error Types: // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterPatchBaselineForPatchGroup func (c *SSM) DeregisterPatchBaselineForPatchGroup(input *DeregisterPatchBaselineForPatchGroupInput) (*DeregisterPatchBaselineForPatchGroupOutput, error) { req, out := c.DeregisterPatchBaselineForPatchGroupRequest(input) return out, req.Send() } // DeregisterPatchBaselineForPatchGroupWithContext is the same as DeregisterPatchBaselineForPatchGroup with the addition of // the ability to pass a context and additional request options. // // See DeregisterPatchBaselineForPatchGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeregisterPatchBaselineForPatchGroupWithContext(ctx aws.Context, input *DeregisterPatchBaselineForPatchGroupInput, opts ...request.Option) (*DeregisterPatchBaselineForPatchGroupOutput, error) { req, out := c.DeregisterPatchBaselineForPatchGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeregisterTargetFromMaintenanceWindow = "DeregisterTargetFromMaintenanceWindow" // DeregisterTargetFromMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTargetFromMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeregisterTargetFromMaintenanceWindow for more information on using the DeregisterTargetFromMaintenanceWindow // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeregisterTargetFromMaintenanceWindowRequest method. // req, resp := client.DeregisterTargetFromMaintenanceWindowRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTargetFromMaintenanceWindow func (c *SSM) DeregisterTargetFromMaintenanceWindowRequest(input *DeregisterTargetFromMaintenanceWindowInput) (req *request.Request, output *DeregisterTargetFromMaintenanceWindowOutput) { op := &request.Operation{ Name: opDeregisterTargetFromMaintenanceWindow, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeregisterTargetFromMaintenanceWindowInput{} } output = &DeregisterTargetFromMaintenanceWindowOutput{} req = c.newRequest(op, input, output) return } // DeregisterTargetFromMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). // // Removes a target from a maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeregisterTargetFromMaintenanceWindow for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // - TargetInUseException // You specified the Safe option for the DeregisterTargetFromMaintenanceWindow // operation, but the target is still referenced in a task. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTargetFromMaintenanceWindow func (c *SSM) DeregisterTargetFromMaintenanceWindow(input *DeregisterTargetFromMaintenanceWindowInput) (*DeregisterTargetFromMaintenanceWindowOutput, error) { req, out := c.DeregisterTargetFromMaintenanceWindowRequest(input) return out, req.Send() } // DeregisterTargetFromMaintenanceWindowWithContext is the same as DeregisterTargetFromMaintenanceWindow with the addition of // the ability to pass a context and additional request options. // // See DeregisterTargetFromMaintenanceWindow for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeregisterTargetFromMaintenanceWindowWithContext(ctx aws.Context, input *DeregisterTargetFromMaintenanceWindowInput, opts ...request.Option) (*DeregisterTargetFromMaintenanceWindowOutput, error) { req, out := c.DeregisterTargetFromMaintenanceWindowRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeregisterTaskFromMaintenanceWindow = "DeregisterTaskFromMaintenanceWindow" // DeregisterTaskFromMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTaskFromMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeregisterTaskFromMaintenanceWindow for more information on using the DeregisterTaskFromMaintenanceWindow // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DeregisterTaskFromMaintenanceWindowRequest method. // req, resp := client.DeregisterTaskFromMaintenanceWindowRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTaskFromMaintenanceWindow func (c *SSM) DeregisterTaskFromMaintenanceWindowRequest(input *DeregisterTaskFromMaintenanceWindowInput) (req *request.Request, output *DeregisterTaskFromMaintenanceWindowOutput) { op := &request.Operation{ Name: opDeregisterTaskFromMaintenanceWindow, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeregisterTaskFromMaintenanceWindowInput{} } output = &DeregisterTaskFromMaintenanceWindowOutput{} req = c.newRequest(op, input, output) return } // DeregisterTaskFromMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). // // Removes a task from a maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DeregisterTaskFromMaintenanceWindow for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeregisterTaskFromMaintenanceWindow func (c *SSM) DeregisterTaskFromMaintenanceWindow(input *DeregisterTaskFromMaintenanceWindowInput) (*DeregisterTaskFromMaintenanceWindowOutput, error) { req, out := c.DeregisterTaskFromMaintenanceWindowRequest(input) return out, req.Send() } // DeregisterTaskFromMaintenanceWindowWithContext is the same as DeregisterTaskFromMaintenanceWindow with the addition of // the ability to pass a context and additional request options. // // See DeregisterTaskFromMaintenanceWindow for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DeregisterTaskFromMaintenanceWindowWithContext(ctx aws.Context, input *DeregisterTaskFromMaintenanceWindowInput, opts ...request.Option) (*DeregisterTaskFromMaintenanceWindowOutput, error) { req, out := c.DeregisterTaskFromMaintenanceWindowRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeActivations = "DescribeActivations" // DescribeActivationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeActivations for more information on using the DescribeActivations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeActivationsRequest method. // req, resp := client.DescribeActivationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeActivations func (c *SSM) DescribeActivationsRequest(input *DescribeActivationsInput) (req *request.Request, output *DescribeActivationsOutput) { op := &request.Operation{ Name: opDescribeActivations, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeActivationsInput{} } output = &DescribeActivationsOutput{} req = c.newRequest(op, input, output) return } // DescribeActivations API operation for Amazon Simple Systems Manager (SSM). // // Describes details about the activation, such as the date and time the activation // was created, its expiration date, the Identity and Access Management (IAM) // role assigned to the managed nodes in the activation, and the number of nodes // registered by using this activation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeActivations for usage and error information. // // Returned Error Types: // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidNextToken // The specified token isn't valid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeActivations func (c *SSM) DescribeActivations(input *DescribeActivationsInput) (*DescribeActivationsOutput, error) { req, out := c.DescribeActivationsRequest(input) return out, req.Send() } // DescribeActivationsWithContext is the same as DescribeActivations with the addition of // the ability to pass a context and additional request options. // // See DescribeActivations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeActivationsWithContext(ctx aws.Context, input *DescribeActivationsInput, opts ...request.Option) (*DescribeActivationsOutput, error) { req, out := c.DescribeActivationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeActivationsPages iterates over the pages of a DescribeActivations operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeActivations 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 DescribeActivations operation. // pageNum := 0 // err := client.DescribeActivationsPages(params, // func(page *ssm.DescribeActivationsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeActivationsPages(input *DescribeActivationsInput, fn func(*DescribeActivationsOutput, bool) bool) error { return c.DescribeActivationsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeActivationsPagesWithContext same as DescribeActivationsPages 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 *SSM) DescribeActivationsPagesWithContext(ctx aws.Context, input *DescribeActivationsInput, fn func(*DescribeActivationsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeActivationsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeActivationsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeActivationsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeAssociation = "DescribeAssociation" // DescribeAssociationRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeAssociation for more information on using the DescribeAssociation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeAssociationRequest method. // req, resp := client.DescribeAssociationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociation func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req *request.Request, output *DescribeAssociationOutput) { op := &request.Operation{ Name: opDescribeAssociation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeAssociationInput{} } output = &DescribeAssociationOutput{} req = c.newRequest(op, input, output) return } // DescribeAssociation API operation for Amazon Simple Systems Manager (SSM). // // Describes the association for the specified target or managed node. If you // created the association by using the Targets parameter, then you must retrieve // the association by using the association 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 Simple Systems Manager (SSM)'s // API operation DescribeAssociation for usage and error information. // // Returned Error Types: // // - AssociationDoesNotExist // The specified association doesn't exist. // // - InvalidAssociationVersion // The version you specified isn't valid. Use ListAssociationVersions to view // all versions of an association according to the association ID. Or, use the // $LATEST parameter to view the latest version of the association. // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociation func (c *SSM) DescribeAssociation(input *DescribeAssociationInput) (*DescribeAssociationOutput, error) { req, out := c.DescribeAssociationRequest(input) return out, req.Send() } // DescribeAssociationWithContext is the same as DescribeAssociation with the addition of // the ability to pass a context and additional request options. // // See DescribeAssociation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeAssociationWithContext(ctx aws.Context, input *DescribeAssociationInput, opts ...request.Option) (*DescribeAssociationOutput, error) { req, out := c.DescribeAssociationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeAssociationExecutionTargets = "DescribeAssociationExecutionTargets" // DescribeAssociationExecutionTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociationExecutionTargets operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeAssociationExecutionTargets for more information on using the DescribeAssociationExecutionTargets // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeAssociationExecutionTargetsRequest method. // req, resp := client.DescribeAssociationExecutionTargetsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets func (c *SSM) DescribeAssociationExecutionTargetsRequest(input *DescribeAssociationExecutionTargetsInput) (req *request.Request, output *DescribeAssociationExecutionTargetsOutput) { op := &request.Operation{ Name: opDescribeAssociationExecutionTargets, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeAssociationExecutionTargetsInput{} } output = &DescribeAssociationExecutionTargetsOutput{} req = c.newRequest(op, input, output) return } // DescribeAssociationExecutionTargets API operation for Amazon Simple Systems Manager (SSM). // // Views information about a specific execution of a specific association. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeAssociationExecutionTargets for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - AssociationDoesNotExist // The specified association doesn't exist. // // - InvalidNextToken // The specified token isn't valid. // // - AssociationExecutionDoesNotExist // The specified execution ID doesn't exist. Verify the ID number and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets func (c *SSM) DescribeAssociationExecutionTargets(input *DescribeAssociationExecutionTargetsInput) (*DescribeAssociationExecutionTargetsOutput, error) { req, out := c.DescribeAssociationExecutionTargetsRequest(input) return out, req.Send() } // DescribeAssociationExecutionTargetsWithContext is the same as DescribeAssociationExecutionTargets with the addition of // the ability to pass a context and additional request options. // // See DescribeAssociationExecutionTargets for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeAssociationExecutionTargetsWithContext(ctx aws.Context, input *DescribeAssociationExecutionTargetsInput, opts ...request.Option) (*DescribeAssociationExecutionTargetsOutput, error) { req, out := c.DescribeAssociationExecutionTargetsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeAssociationExecutionTargetsPages iterates over the pages of a DescribeAssociationExecutionTargets operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeAssociationExecutionTargets 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 DescribeAssociationExecutionTargets operation. // pageNum := 0 // err := client.DescribeAssociationExecutionTargetsPages(params, // func(page *ssm.DescribeAssociationExecutionTargetsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeAssociationExecutionTargetsPages(input *DescribeAssociationExecutionTargetsInput, fn func(*DescribeAssociationExecutionTargetsOutput, bool) bool) error { return c.DescribeAssociationExecutionTargetsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeAssociationExecutionTargetsPagesWithContext same as DescribeAssociationExecutionTargetsPages 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 *SSM) DescribeAssociationExecutionTargetsPagesWithContext(ctx aws.Context, input *DescribeAssociationExecutionTargetsInput, fn func(*DescribeAssociationExecutionTargetsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeAssociationExecutionTargetsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeAssociationExecutionTargetsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeAssociationExecutionTargetsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeAssociationExecutions = "DescribeAssociationExecutions" // DescribeAssociationExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociationExecutions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeAssociationExecutions for more information on using the DescribeAssociationExecutions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeAssociationExecutionsRequest method. // req, resp := client.DescribeAssociationExecutionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions func (c *SSM) DescribeAssociationExecutionsRequest(input *DescribeAssociationExecutionsInput) (req *request.Request, output *DescribeAssociationExecutionsOutput) { op := &request.Operation{ Name: opDescribeAssociationExecutions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeAssociationExecutionsInput{} } output = &DescribeAssociationExecutionsOutput{} req = c.newRequest(op, input, output) return } // DescribeAssociationExecutions API operation for Amazon Simple Systems Manager (SSM). // // Views all executions for a specific association 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 Simple Systems Manager (SSM)'s // API operation DescribeAssociationExecutions for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - AssociationDoesNotExist // The specified association doesn't exist. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions func (c *SSM) DescribeAssociationExecutions(input *DescribeAssociationExecutionsInput) (*DescribeAssociationExecutionsOutput, error) { req, out := c.DescribeAssociationExecutionsRequest(input) return out, req.Send() } // DescribeAssociationExecutionsWithContext is the same as DescribeAssociationExecutions with the addition of // the ability to pass a context and additional request options. // // See DescribeAssociationExecutions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeAssociationExecutionsWithContext(ctx aws.Context, input *DescribeAssociationExecutionsInput, opts ...request.Option) (*DescribeAssociationExecutionsOutput, error) { req, out := c.DescribeAssociationExecutionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeAssociationExecutionsPages iterates over the pages of a DescribeAssociationExecutions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeAssociationExecutions 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 DescribeAssociationExecutions operation. // pageNum := 0 // err := client.DescribeAssociationExecutionsPages(params, // func(page *ssm.DescribeAssociationExecutionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeAssociationExecutionsPages(input *DescribeAssociationExecutionsInput, fn func(*DescribeAssociationExecutionsOutput, bool) bool) error { return c.DescribeAssociationExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeAssociationExecutionsPagesWithContext same as DescribeAssociationExecutionsPages 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 *SSM) DescribeAssociationExecutionsPagesWithContext(ctx aws.Context, input *DescribeAssociationExecutionsInput, fn func(*DescribeAssociationExecutionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeAssociationExecutionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeAssociationExecutionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeAssociationExecutionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeAutomationExecutions = "DescribeAutomationExecutions" // DescribeAutomationExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutomationExecutions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeAutomationExecutions for more information on using the DescribeAutomationExecutions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeAutomationExecutionsRequest method. // req, resp := client.DescribeAutomationExecutionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationExecutions func (c *SSM) DescribeAutomationExecutionsRequest(input *DescribeAutomationExecutionsInput) (req *request.Request, output *DescribeAutomationExecutionsOutput) { op := &request.Operation{ Name: opDescribeAutomationExecutions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeAutomationExecutionsInput{} } output = &DescribeAutomationExecutionsOutput{} req = c.newRequest(op, input, output) return } // DescribeAutomationExecutions API operation for Amazon Simple Systems Manager (SSM). // // Provides details about all active and terminated Automation executions. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeAutomationExecutions for usage and error information. // // Returned Error Types: // // - InvalidFilterKey // The specified key isn't valid. // // - InvalidFilterValue // The filter value isn't valid. Verify the value and try again. // // - InvalidNextToken // The specified token isn't valid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationExecutions func (c *SSM) DescribeAutomationExecutions(input *DescribeAutomationExecutionsInput) (*DescribeAutomationExecutionsOutput, error) { req, out := c.DescribeAutomationExecutionsRequest(input) return out, req.Send() } // DescribeAutomationExecutionsWithContext is the same as DescribeAutomationExecutions with the addition of // the ability to pass a context and additional request options. // // See DescribeAutomationExecutions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeAutomationExecutionsWithContext(ctx aws.Context, input *DescribeAutomationExecutionsInput, opts ...request.Option) (*DescribeAutomationExecutionsOutput, error) { req, out := c.DescribeAutomationExecutionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeAutomationExecutionsPages iterates over the pages of a DescribeAutomationExecutions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeAutomationExecutions 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 DescribeAutomationExecutions operation. // pageNum := 0 // err := client.DescribeAutomationExecutionsPages(params, // func(page *ssm.DescribeAutomationExecutionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeAutomationExecutionsPages(input *DescribeAutomationExecutionsInput, fn func(*DescribeAutomationExecutionsOutput, bool) bool) error { return c.DescribeAutomationExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeAutomationExecutionsPagesWithContext same as DescribeAutomationExecutionsPages 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 *SSM) DescribeAutomationExecutionsPagesWithContext(ctx aws.Context, input *DescribeAutomationExecutionsInput, fn func(*DescribeAutomationExecutionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeAutomationExecutionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeAutomationExecutionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeAutomationExecutionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeAutomationStepExecutions = "DescribeAutomationStepExecutions" // DescribeAutomationStepExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutomationStepExecutions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeAutomationStepExecutions for more information on using the DescribeAutomationStepExecutions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeAutomationStepExecutionsRequest method. // req, resp := client.DescribeAutomationStepExecutionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationStepExecutions func (c *SSM) DescribeAutomationStepExecutionsRequest(input *DescribeAutomationStepExecutionsInput) (req *request.Request, output *DescribeAutomationStepExecutionsOutput) { op := &request.Operation{ Name: opDescribeAutomationStepExecutions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeAutomationStepExecutionsInput{} } output = &DescribeAutomationStepExecutionsOutput{} req = c.newRequest(op, input, output) return } // DescribeAutomationStepExecutions API operation for Amazon Simple Systems Manager (SSM). // // Information about all active and terminated step executions in an Automation // workflow. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeAutomationStepExecutions for usage and error information. // // Returned Error Types: // // - AutomationExecutionNotFoundException // There is no automation execution information for the requested automation // execution ID. // // - InvalidNextToken // The specified token isn't valid. // // - InvalidFilterKey // The specified key isn't valid. // // - InvalidFilterValue // The filter value isn't valid. Verify the value and try again. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAutomationStepExecutions func (c *SSM) DescribeAutomationStepExecutions(input *DescribeAutomationStepExecutionsInput) (*DescribeAutomationStepExecutionsOutput, error) { req, out := c.DescribeAutomationStepExecutionsRequest(input) return out, req.Send() } // DescribeAutomationStepExecutionsWithContext is the same as DescribeAutomationStepExecutions with the addition of // the ability to pass a context and additional request options. // // See DescribeAutomationStepExecutions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeAutomationStepExecutionsWithContext(ctx aws.Context, input *DescribeAutomationStepExecutionsInput, opts ...request.Option) (*DescribeAutomationStepExecutionsOutput, error) { req, out := c.DescribeAutomationStepExecutionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeAutomationStepExecutionsPages iterates over the pages of a DescribeAutomationStepExecutions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeAutomationStepExecutions 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 DescribeAutomationStepExecutions operation. // pageNum := 0 // err := client.DescribeAutomationStepExecutionsPages(params, // func(page *ssm.DescribeAutomationStepExecutionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeAutomationStepExecutionsPages(input *DescribeAutomationStepExecutionsInput, fn func(*DescribeAutomationStepExecutionsOutput, bool) bool) error { return c.DescribeAutomationStepExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeAutomationStepExecutionsPagesWithContext same as DescribeAutomationStepExecutionsPages 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 *SSM) DescribeAutomationStepExecutionsPagesWithContext(ctx aws.Context, input *DescribeAutomationStepExecutionsInput, fn func(*DescribeAutomationStepExecutionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeAutomationStepExecutionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeAutomationStepExecutionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeAutomationStepExecutionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeAvailablePatches = "DescribeAvailablePatches" // DescribeAvailablePatchesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailablePatches operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeAvailablePatches for more information on using the DescribeAvailablePatches // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeAvailablePatchesRequest method. // req, resp := client.DescribeAvailablePatchesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAvailablePatches func (c *SSM) DescribeAvailablePatchesRequest(input *DescribeAvailablePatchesInput) (req *request.Request, output *DescribeAvailablePatchesOutput) { op := &request.Operation{ Name: opDescribeAvailablePatches, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeAvailablePatchesInput{} } output = &DescribeAvailablePatchesOutput{} req = c.newRequest(op, input, output) return } // DescribeAvailablePatches API operation for Amazon Simple Systems Manager (SSM). // // Lists all patches eligible to be included in a patch baseline. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeAvailablePatches for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAvailablePatches func (c *SSM) DescribeAvailablePatches(input *DescribeAvailablePatchesInput) (*DescribeAvailablePatchesOutput, error) { req, out := c.DescribeAvailablePatchesRequest(input) return out, req.Send() } // DescribeAvailablePatchesWithContext is the same as DescribeAvailablePatches with the addition of // the ability to pass a context and additional request options. // // See DescribeAvailablePatches for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeAvailablePatchesWithContext(ctx aws.Context, input *DescribeAvailablePatchesInput, opts ...request.Option) (*DescribeAvailablePatchesOutput, error) { req, out := c.DescribeAvailablePatchesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeAvailablePatchesPages iterates over the pages of a DescribeAvailablePatches operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeAvailablePatches 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 DescribeAvailablePatches operation. // pageNum := 0 // err := client.DescribeAvailablePatchesPages(params, // func(page *ssm.DescribeAvailablePatchesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeAvailablePatchesPages(input *DescribeAvailablePatchesInput, fn func(*DescribeAvailablePatchesOutput, bool) bool) error { return c.DescribeAvailablePatchesPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeAvailablePatchesPagesWithContext same as DescribeAvailablePatchesPages 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 *SSM) DescribeAvailablePatchesPagesWithContext(ctx aws.Context, input *DescribeAvailablePatchesInput, fn func(*DescribeAvailablePatchesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeAvailablePatchesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeAvailablePatchesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeAvailablePatchesOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeDocument = "DescribeDocument" // DescribeDocumentRequest generates a "aws/request.Request" representing the // client's request for the DescribeDocument operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeDocument for more information on using the DescribeDocument // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeDocumentRequest method. // req, resp := client.DescribeDocumentRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeDocument func (c *SSM) DescribeDocumentRequest(input *DescribeDocumentInput) (req *request.Request, output *DescribeDocumentOutput) { op := &request.Operation{ Name: opDescribeDocument, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeDocumentInput{} } output = &DescribeDocumentOutput{} req = c.newRequest(op, input, output) return } // DescribeDocument API operation for Amazon Simple Systems Manager (SSM). // // Describes the specified Amazon Web Services Systems Manager document (SSM // document). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeDocument for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeDocument func (c *SSM) DescribeDocument(input *DescribeDocumentInput) (*DescribeDocumentOutput, error) { req, out := c.DescribeDocumentRequest(input) return out, req.Send() } // DescribeDocumentWithContext is the same as DescribeDocument with the addition of // the ability to pass a context and additional request options. // // See DescribeDocument for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeDocumentWithContext(ctx aws.Context, input *DescribeDocumentInput, opts ...request.Option) (*DescribeDocumentOutput, error) { req, out := c.DescribeDocumentRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeDocumentPermission = "DescribeDocumentPermission" // DescribeDocumentPermissionRequest generates a "aws/request.Request" representing the // client's request for the DescribeDocumentPermission operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeDocumentPermission for more information on using the DescribeDocumentPermission // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeDocumentPermissionRequest method. // req, resp := client.DescribeDocumentPermissionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeDocumentPermission func (c *SSM) DescribeDocumentPermissionRequest(input *DescribeDocumentPermissionInput) (req *request.Request, output *DescribeDocumentPermissionOutput) { op := &request.Operation{ Name: opDescribeDocumentPermission, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeDocumentPermissionInput{} } output = &DescribeDocumentPermissionOutput{} req = c.newRequest(op, input, output) return } // DescribeDocumentPermission API operation for Amazon Simple Systems Manager (SSM). // // Describes the permissions for a Amazon Web Services Systems Manager document // (SSM document). If you created the document, you are the owner. If a document // is shared, it can either be shared privately (by specifying a user's Amazon // Web Services account ID) or publicly (All). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeDocumentPermission for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidNextToken // The specified token isn't valid. // // - InvalidPermissionType // The permission type isn't supported. Share is the only supported permission // type. // // - 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/DescribeDocumentPermission func (c *SSM) DescribeDocumentPermission(input *DescribeDocumentPermissionInput) (*DescribeDocumentPermissionOutput, error) { req, out := c.DescribeDocumentPermissionRequest(input) return out, req.Send() } // DescribeDocumentPermissionWithContext is the same as DescribeDocumentPermission with the addition of // the ability to pass a context and additional request options. // // See DescribeDocumentPermission for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeDocumentPermissionWithContext(ctx aws.Context, input *DescribeDocumentPermissionInput, opts ...request.Option) (*DescribeDocumentPermissionOutput, error) { req, out := c.DescribeDocumentPermissionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeEffectiveInstanceAssociations = "DescribeEffectiveInstanceAssociations" // DescribeEffectiveInstanceAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEffectiveInstanceAssociations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeEffectiveInstanceAssociations for more information on using the DescribeEffectiveInstanceAssociations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeEffectiveInstanceAssociationsRequest method. // req, resp := client.DescribeEffectiveInstanceAssociationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectiveInstanceAssociations func (c *SSM) DescribeEffectiveInstanceAssociationsRequest(input *DescribeEffectiveInstanceAssociationsInput) (req *request.Request, output *DescribeEffectiveInstanceAssociationsOutput) { op := &request.Operation{ Name: opDescribeEffectiveInstanceAssociations, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeEffectiveInstanceAssociationsInput{} } output = &DescribeEffectiveInstanceAssociationsOutput{} req = c.newRequest(op, input, output) return } // DescribeEffectiveInstanceAssociations API operation for Amazon Simple Systems Manager (SSM). // // All associations for the managed node(s). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeEffectiveInstanceAssociations for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectiveInstanceAssociations func (c *SSM) DescribeEffectiveInstanceAssociations(input *DescribeEffectiveInstanceAssociationsInput) (*DescribeEffectiveInstanceAssociationsOutput, error) { req, out := c.DescribeEffectiveInstanceAssociationsRequest(input) return out, req.Send() } // DescribeEffectiveInstanceAssociationsWithContext is the same as DescribeEffectiveInstanceAssociations with the addition of // the ability to pass a context and additional request options. // // See DescribeEffectiveInstanceAssociations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeEffectiveInstanceAssociationsWithContext(ctx aws.Context, input *DescribeEffectiveInstanceAssociationsInput, opts ...request.Option) (*DescribeEffectiveInstanceAssociationsOutput, error) { req, out := c.DescribeEffectiveInstanceAssociationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeEffectiveInstanceAssociationsPages iterates over the pages of a DescribeEffectiveInstanceAssociations operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeEffectiveInstanceAssociations 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 DescribeEffectiveInstanceAssociations operation. // pageNum := 0 // err := client.DescribeEffectiveInstanceAssociationsPages(params, // func(page *ssm.DescribeEffectiveInstanceAssociationsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeEffectiveInstanceAssociationsPages(input *DescribeEffectiveInstanceAssociationsInput, fn func(*DescribeEffectiveInstanceAssociationsOutput, bool) bool) error { return c.DescribeEffectiveInstanceAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeEffectiveInstanceAssociationsPagesWithContext same as DescribeEffectiveInstanceAssociationsPages 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 *SSM) DescribeEffectiveInstanceAssociationsPagesWithContext(ctx aws.Context, input *DescribeEffectiveInstanceAssociationsInput, fn func(*DescribeEffectiveInstanceAssociationsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeEffectiveInstanceAssociationsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeEffectiveInstanceAssociationsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeEffectiveInstanceAssociationsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeEffectivePatchesForPatchBaseline = "DescribeEffectivePatchesForPatchBaseline" // DescribeEffectivePatchesForPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the DescribeEffectivePatchesForPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeEffectivePatchesForPatchBaseline for more information on using the DescribeEffectivePatchesForPatchBaseline // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeEffectivePatchesForPatchBaselineRequest method. // req, resp := client.DescribeEffectivePatchesForPatchBaselineRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectivePatchesForPatchBaseline func (c *SSM) DescribeEffectivePatchesForPatchBaselineRequest(input *DescribeEffectivePatchesForPatchBaselineInput) (req *request.Request, output *DescribeEffectivePatchesForPatchBaselineOutput) { op := &request.Operation{ Name: opDescribeEffectivePatchesForPatchBaseline, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeEffectivePatchesForPatchBaselineInput{} } output = &DescribeEffectivePatchesForPatchBaselineOutput{} req = c.newRequest(op, input, output) return } // DescribeEffectivePatchesForPatchBaseline API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the current effective patches (the patch and the approval state) // for the specified patch baseline. Applies to patch baselines for Windows // only. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeEffectivePatchesForPatchBaseline for usage and error information. // // Returned Error Types: // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - UnsupportedOperatingSystem // The operating systems you specified isn't supported, or the operation isn't // supported for the operating system. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeEffectivePatchesForPatchBaseline func (c *SSM) DescribeEffectivePatchesForPatchBaseline(input *DescribeEffectivePatchesForPatchBaselineInput) (*DescribeEffectivePatchesForPatchBaselineOutput, error) { req, out := c.DescribeEffectivePatchesForPatchBaselineRequest(input) return out, req.Send() } // DescribeEffectivePatchesForPatchBaselineWithContext is the same as DescribeEffectivePatchesForPatchBaseline with the addition of // the ability to pass a context and additional request options. // // See DescribeEffectivePatchesForPatchBaseline for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeEffectivePatchesForPatchBaselineWithContext(ctx aws.Context, input *DescribeEffectivePatchesForPatchBaselineInput, opts ...request.Option) (*DescribeEffectivePatchesForPatchBaselineOutput, error) { req, out := c.DescribeEffectivePatchesForPatchBaselineRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeEffectivePatchesForPatchBaselinePages iterates over the pages of a DescribeEffectivePatchesForPatchBaseline operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeEffectivePatchesForPatchBaseline 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 DescribeEffectivePatchesForPatchBaseline operation. // pageNum := 0 // err := client.DescribeEffectivePatchesForPatchBaselinePages(params, // func(page *ssm.DescribeEffectivePatchesForPatchBaselineOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeEffectivePatchesForPatchBaselinePages(input *DescribeEffectivePatchesForPatchBaselineInput, fn func(*DescribeEffectivePatchesForPatchBaselineOutput, bool) bool) error { return c.DescribeEffectivePatchesForPatchBaselinePagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeEffectivePatchesForPatchBaselinePagesWithContext same as DescribeEffectivePatchesForPatchBaselinePages 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 *SSM) DescribeEffectivePatchesForPatchBaselinePagesWithContext(ctx aws.Context, input *DescribeEffectivePatchesForPatchBaselineInput, fn func(*DescribeEffectivePatchesForPatchBaselineOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeEffectivePatchesForPatchBaselineInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeEffectivePatchesForPatchBaselineRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeEffectivePatchesForPatchBaselineOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeInstanceAssociationsStatus = "DescribeInstanceAssociationsStatus" // DescribeInstanceAssociationsStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceAssociationsStatus operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeInstanceAssociationsStatus for more information on using the DescribeInstanceAssociationsStatus // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeInstanceAssociationsStatusRequest method. // req, resp := client.DescribeInstanceAssociationsStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceAssociationsStatus func (c *SSM) DescribeInstanceAssociationsStatusRequest(input *DescribeInstanceAssociationsStatusInput) (req *request.Request, output *DescribeInstanceAssociationsStatusOutput) { op := &request.Operation{ Name: opDescribeInstanceAssociationsStatus, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeInstanceAssociationsStatusInput{} } output = &DescribeInstanceAssociationsStatusOutput{} req = c.newRequest(op, input, output) return } // DescribeInstanceAssociationsStatus API operation for Amazon Simple Systems Manager (SSM). // // The status of the associations for the managed node(s). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeInstanceAssociationsStatus for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceAssociationsStatus func (c *SSM) DescribeInstanceAssociationsStatus(input *DescribeInstanceAssociationsStatusInput) (*DescribeInstanceAssociationsStatusOutput, error) { req, out := c.DescribeInstanceAssociationsStatusRequest(input) return out, req.Send() } // DescribeInstanceAssociationsStatusWithContext is the same as DescribeInstanceAssociationsStatus with the addition of // the ability to pass a context and additional request options. // // See DescribeInstanceAssociationsStatus for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeInstanceAssociationsStatusWithContext(ctx aws.Context, input *DescribeInstanceAssociationsStatusInput, opts ...request.Option) (*DescribeInstanceAssociationsStatusOutput, error) { req, out := c.DescribeInstanceAssociationsStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeInstanceAssociationsStatusPages iterates over the pages of a DescribeInstanceAssociationsStatus operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeInstanceAssociationsStatus 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 DescribeInstanceAssociationsStatus operation. // pageNum := 0 // err := client.DescribeInstanceAssociationsStatusPages(params, // func(page *ssm.DescribeInstanceAssociationsStatusOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeInstanceAssociationsStatusPages(input *DescribeInstanceAssociationsStatusInput, fn func(*DescribeInstanceAssociationsStatusOutput, bool) bool) error { return c.DescribeInstanceAssociationsStatusPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeInstanceAssociationsStatusPagesWithContext same as DescribeInstanceAssociationsStatusPages 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 *SSM) DescribeInstanceAssociationsStatusPagesWithContext(ctx aws.Context, input *DescribeInstanceAssociationsStatusInput, fn func(*DescribeInstanceAssociationsStatusOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeInstanceAssociationsStatusInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeInstanceAssociationsStatusRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeInstanceAssociationsStatusOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeInstanceInformation = "DescribeInstanceInformation" // DescribeInstanceInformationRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceInformation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeInstanceInformation for more information on using the DescribeInstanceInformation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeInstanceInformationRequest method. // req, resp := client.DescribeInstanceInformationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceInformation func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformationInput) (req *request.Request, output *DescribeInstanceInformationOutput) { op := &request.Operation{ Name: opDescribeInstanceInformation, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeInstanceInformationInput{} } output = &DescribeInstanceInformationOutput{} req = c.newRequest(op, input, output) return } // DescribeInstanceInformation API operation for Amazon Simple Systems Manager (SSM). // // Provides information about one or more of your managed nodes, including the // operating system platform, SSM Agent version, association status, and IP // address. This operation does not return information for nodes that are either // Stopped or Terminated. // // If you specify one or more node IDs, the operation returns information for // those managed nodes. If you don't specify node IDs, it returns information // for all your managed nodes. If you specify a node ID that isn't valid or // a node that you don't own, you receive an error. // // The IamRole field returned for this API operation is the Identity and Access // Management (IAM) role assigned to on-premises managed nodes. This operation // does not return the IAM role for EC2 instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeInstanceInformation for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidNextToken // The specified token isn't valid. // // - InvalidInstanceInformationFilterValue // The specified filter value isn't valid. // // - InvalidFilterKey // The specified key isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceInformation func (c *SSM) DescribeInstanceInformation(input *DescribeInstanceInformationInput) (*DescribeInstanceInformationOutput, error) { req, out := c.DescribeInstanceInformationRequest(input) return out, req.Send() } // DescribeInstanceInformationWithContext is the same as DescribeInstanceInformation with the addition of // the ability to pass a context and additional request options. // // See DescribeInstanceInformation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeInstanceInformationWithContext(ctx aws.Context, input *DescribeInstanceInformationInput, opts ...request.Option) (*DescribeInstanceInformationOutput, error) { req, out := c.DescribeInstanceInformationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeInstanceInformationPages iterates over the pages of a DescribeInstanceInformation operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeInstanceInformation 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 DescribeInstanceInformation operation. // pageNum := 0 // err := client.DescribeInstanceInformationPages(params, // func(page *ssm.DescribeInstanceInformationOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeInstanceInformationPages(input *DescribeInstanceInformationInput, fn func(*DescribeInstanceInformationOutput, bool) bool) error { return c.DescribeInstanceInformationPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeInstanceInformationPagesWithContext same as DescribeInstanceInformationPages 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 *SSM) DescribeInstanceInformationPagesWithContext(ctx aws.Context, input *DescribeInstanceInformationInput, fn func(*DescribeInstanceInformationOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeInstanceInformationInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeInstanceInformationRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeInstanceInformationOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeInstancePatchStates = "DescribeInstancePatchStates" // DescribeInstancePatchStatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatchStates operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeInstancePatchStates for more information on using the DescribeInstancePatchStates // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeInstancePatchStatesRequest method. // req, resp := client.DescribeInstancePatchStatesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStates func (c *SSM) DescribeInstancePatchStatesRequest(input *DescribeInstancePatchStatesInput) (req *request.Request, output *DescribeInstancePatchStatesOutput) { op := &request.Operation{ Name: opDescribeInstancePatchStates, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeInstancePatchStatesInput{} } output = &DescribeInstancePatchStatesOutput{} req = c.newRequest(op, input, output) return } // DescribeInstancePatchStates API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the high-level patch state of one or more managed 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 Amazon Simple Systems Manager (SSM)'s // API operation DescribeInstancePatchStates for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStates func (c *SSM) DescribeInstancePatchStates(input *DescribeInstancePatchStatesInput) (*DescribeInstancePatchStatesOutput, error) { req, out := c.DescribeInstancePatchStatesRequest(input) return out, req.Send() } // DescribeInstancePatchStatesWithContext is the same as DescribeInstancePatchStates with the addition of // the ability to pass a context and additional request options. // // See DescribeInstancePatchStates for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeInstancePatchStatesWithContext(ctx aws.Context, input *DescribeInstancePatchStatesInput, opts ...request.Option) (*DescribeInstancePatchStatesOutput, error) { req, out := c.DescribeInstancePatchStatesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeInstancePatchStatesPages iterates over the pages of a DescribeInstancePatchStates operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeInstancePatchStates 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 DescribeInstancePatchStates operation. // pageNum := 0 // err := client.DescribeInstancePatchStatesPages(params, // func(page *ssm.DescribeInstancePatchStatesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeInstancePatchStatesPages(input *DescribeInstancePatchStatesInput, fn func(*DescribeInstancePatchStatesOutput, bool) bool) error { return c.DescribeInstancePatchStatesPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeInstancePatchStatesPagesWithContext same as DescribeInstancePatchStatesPages 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 *SSM) DescribeInstancePatchStatesPagesWithContext(ctx aws.Context, input *DescribeInstancePatchStatesInput, fn func(*DescribeInstancePatchStatesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeInstancePatchStatesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeInstancePatchStatesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeInstancePatchStatesOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeInstancePatchStatesForPatchGroup = "DescribeInstancePatchStatesForPatchGroup" // DescribeInstancePatchStatesForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatchStatesForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeInstancePatchStatesForPatchGroup for more information on using the DescribeInstancePatchStatesForPatchGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeInstancePatchStatesForPatchGroupRequest method. // req, resp := client.DescribeInstancePatchStatesForPatchGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStatesForPatchGroup func (c *SSM) DescribeInstancePatchStatesForPatchGroupRequest(input *DescribeInstancePatchStatesForPatchGroupInput) (req *request.Request, output *DescribeInstancePatchStatesForPatchGroupOutput) { op := &request.Operation{ Name: opDescribeInstancePatchStatesForPatchGroup, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeInstancePatchStatesForPatchGroupInput{} } output = &DescribeInstancePatchStatesForPatchGroupOutput{} req = c.newRequest(op, input, output) return } // DescribeInstancePatchStatesForPatchGroup API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the high-level patch state for the managed nodes in the specified // patch group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeInstancePatchStatesForPatchGroup for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatchStatesForPatchGroup func (c *SSM) DescribeInstancePatchStatesForPatchGroup(input *DescribeInstancePatchStatesForPatchGroupInput) (*DescribeInstancePatchStatesForPatchGroupOutput, error) { req, out := c.DescribeInstancePatchStatesForPatchGroupRequest(input) return out, req.Send() } // DescribeInstancePatchStatesForPatchGroupWithContext is the same as DescribeInstancePatchStatesForPatchGroup with the addition of // the ability to pass a context and additional request options. // // See DescribeInstancePatchStatesForPatchGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeInstancePatchStatesForPatchGroupWithContext(ctx aws.Context, input *DescribeInstancePatchStatesForPatchGroupInput, opts ...request.Option) (*DescribeInstancePatchStatesForPatchGroupOutput, error) { req, out := c.DescribeInstancePatchStatesForPatchGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeInstancePatchStatesForPatchGroupPages iterates over the pages of a DescribeInstancePatchStatesForPatchGroup operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeInstancePatchStatesForPatchGroup 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 DescribeInstancePatchStatesForPatchGroup operation. // pageNum := 0 // err := client.DescribeInstancePatchStatesForPatchGroupPages(params, // func(page *ssm.DescribeInstancePatchStatesForPatchGroupOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeInstancePatchStatesForPatchGroupPages(input *DescribeInstancePatchStatesForPatchGroupInput, fn func(*DescribeInstancePatchStatesForPatchGroupOutput, bool) bool) error { return c.DescribeInstancePatchStatesForPatchGroupPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeInstancePatchStatesForPatchGroupPagesWithContext same as DescribeInstancePatchStatesForPatchGroupPages 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 *SSM) DescribeInstancePatchStatesForPatchGroupPagesWithContext(ctx aws.Context, input *DescribeInstancePatchStatesForPatchGroupInput, fn func(*DescribeInstancePatchStatesForPatchGroupOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeInstancePatchStatesForPatchGroupInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeInstancePatchStatesForPatchGroupRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeInstancePatchStatesForPatchGroupOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeInstancePatches = "DescribeInstancePatches" // DescribeInstancePatchesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatches operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeInstancePatches for more information on using the DescribeInstancePatches // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeInstancePatchesRequest method. // req, resp := client.DescribeInstancePatchesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatches func (c *SSM) DescribeInstancePatchesRequest(input *DescribeInstancePatchesInput) (req *request.Request, output *DescribeInstancePatchesOutput) { op := &request.Operation{ Name: opDescribeInstancePatches, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeInstancePatchesInput{} } output = &DescribeInstancePatchesOutput{} req = c.newRequest(op, input, output) return } // DescribeInstancePatches API operation for Amazon Simple Systems Manager (SSM). // // Retrieves information about the patches on the specified managed node and // their state relative to the patch baseline being used for the 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 Amazon Simple Systems Manager (SSM)'s // API operation DescribeInstancePatches for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstancePatches func (c *SSM) DescribeInstancePatches(input *DescribeInstancePatchesInput) (*DescribeInstancePatchesOutput, error) { req, out := c.DescribeInstancePatchesRequest(input) return out, req.Send() } // DescribeInstancePatchesWithContext is the same as DescribeInstancePatches with the addition of // the ability to pass a context and additional request options. // // See DescribeInstancePatches for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeInstancePatchesWithContext(ctx aws.Context, input *DescribeInstancePatchesInput, opts ...request.Option) (*DescribeInstancePatchesOutput, error) { req, out := c.DescribeInstancePatchesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeInstancePatchesPages iterates over the pages of a DescribeInstancePatches operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeInstancePatches 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 DescribeInstancePatches operation. // pageNum := 0 // err := client.DescribeInstancePatchesPages(params, // func(page *ssm.DescribeInstancePatchesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeInstancePatchesPages(input *DescribeInstancePatchesInput, fn func(*DescribeInstancePatchesOutput, bool) bool) error { return c.DescribeInstancePatchesPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeInstancePatchesPagesWithContext same as DescribeInstancePatchesPages 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 *SSM) DescribeInstancePatchesPagesWithContext(ctx aws.Context, input *DescribeInstancePatchesInput, fn func(*DescribeInstancePatchesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeInstancePatchesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeInstancePatchesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeInstancePatchesOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeInventoryDeletions = "DescribeInventoryDeletions" // DescribeInventoryDeletionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInventoryDeletions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeInventoryDeletions for more information on using the DescribeInventoryDeletions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeInventoryDeletionsRequest method. // req, resp := client.DescribeInventoryDeletionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions func (c *SSM) DescribeInventoryDeletionsRequest(input *DescribeInventoryDeletionsInput) (req *request.Request, output *DescribeInventoryDeletionsOutput) { op := &request.Operation{ Name: opDescribeInventoryDeletions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeInventoryDeletionsInput{} } output = &DescribeInventoryDeletionsOutput{} req = c.newRequest(op, input, output) return } // DescribeInventoryDeletions API operation for Amazon Simple Systems Manager (SSM). // // Describes a specific delete inventory 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 Simple Systems Manager (SSM)'s // API operation DescribeInventoryDeletions for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDeletionIdException // The ID specified for the delete operation doesn't exist or isn't valid. Verify // the ID and try again. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions func (c *SSM) DescribeInventoryDeletions(input *DescribeInventoryDeletionsInput) (*DescribeInventoryDeletionsOutput, error) { req, out := c.DescribeInventoryDeletionsRequest(input) return out, req.Send() } // DescribeInventoryDeletionsWithContext is the same as DescribeInventoryDeletions with the addition of // the ability to pass a context and additional request options. // // See DescribeInventoryDeletions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeInventoryDeletionsWithContext(ctx aws.Context, input *DescribeInventoryDeletionsInput, opts ...request.Option) (*DescribeInventoryDeletionsOutput, error) { req, out := c.DescribeInventoryDeletionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeInventoryDeletionsPages iterates over the pages of a DescribeInventoryDeletions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeInventoryDeletions 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 DescribeInventoryDeletions operation. // pageNum := 0 // err := client.DescribeInventoryDeletionsPages(params, // func(page *ssm.DescribeInventoryDeletionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeInventoryDeletionsPages(input *DescribeInventoryDeletionsInput, fn func(*DescribeInventoryDeletionsOutput, bool) bool) error { return c.DescribeInventoryDeletionsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeInventoryDeletionsPagesWithContext same as DescribeInventoryDeletionsPages 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 *SSM) DescribeInventoryDeletionsPagesWithContext(ctx aws.Context, input *DescribeInventoryDeletionsInput, fn func(*DescribeInventoryDeletionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeInventoryDeletionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeInventoryDeletionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeInventoryDeletionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeMaintenanceWindowExecutionTaskInvocations = "DescribeMaintenanceWindowExecutionTaskInvocations" // DescribeMaintenanceWindowExecutionTaskInvocationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutionTaskInvocations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeMaintenanceWindowExecutionTaskInvocations for more information on using the DescribeMaintenanceWindowExecutionTaskInvocations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeMaintenanceWindowExecutionTaskInvocationsRequest method. // req, resp := client.DescribeMaintenanceWindowExecutionTaskInvocationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTaskInvocations func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input *DescribeMaintenanceWindowExecutionTaskInvocationsInput) (req *request.Request, output *DescribeMaintenanceWindowExecutionTaskInvocationsOutput) { op := &request.Operation{ Name: opDescribeMaintenanceWindowExecutionTaskInvocations, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeMaintenanceWindowExecutionTaskInvocationsInput{} } output = &DescribeMaintenanceWindowExecutionTaskInvocationsOutput{} req = c.newRequest(op, input, output) return } // DescribeMaintenanceWindowExecutionTaskInvocations API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the individual task executions (one per target) for a particular // task run as part of a maintenance window 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 Amazon Simple Systems Manager (SSM)'s // API operation DescribeMaintenanceWindowExecutionTaskInvocations for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTaskInvocations func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocations(input *DescribeMaintenanceWindowExecutionTaskInvocationsInput) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) { req, out := c.DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input) return out, req.Send() } // DescribeMaintenanceWindowExecutionTaskInvocationsWithContext is the same as DescribeMaintenanceWindowExecutionTaskInvocations with the addition of // the ability to pass a context and additional request options. // // See DescribeMaintenanceWindowExecutionTaskInvocations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocationsWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionTaskInvocationsInput, opts ...request.Option) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) { req, out := c.DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeMaintenanceWindowExecutionTaskInvocationsPages iterates over the pages of a DescribeMaintenanceWindowExecutionTaskInvocations operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeMaintenanceWindowExecutionTaskInvocations 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 DescribeMaintenanceWindowExecutionTaskInvocations operation. // pageNum := 0 // err := client.DescribeMaintenanceWindowExecutionTaskInvocationsPages(params, // func(page *ssm.DescribeMaintenanceWindowExecutionTaskInvocationsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocationsPages(input *DescribeMaintenanceWindowExecutionTaskInvocationsInput, fn func(*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, bool) bool) error { return c.DescribeMaintenanceWindowExecutionTaskInvocationsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeMaintenanceWindowExecutionTaskInvocationsPagesWithContext same as DescribeMaintenanceWindowExecutionTaskInvocationsPages 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 *SSM) DescribeMaintenanceWindowExecutionTaskInvocationsPagesWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionTaskInvocationsInput, fn func(*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeMaintenanceWindowExecutionTaskInvocationsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeMaintenanceWindowExecutionTaskInvocationsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeMaintenanceWindowExecutionTaskInvocationsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeMaintenanceWindowExecutionTasks = "DescribeMaintenanceWindowExecutionTasks" // DescribeMaintenanceWindowExecutionTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutionTasks operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeMaintenanceWindowExecutionTasks for more information on using the DescribeMaintenanceWindowExecutionTasks // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeMaintenanceWindowExecutionTasksRequest method. // req, resp := client.DescribeMaintenanceWindowExecutionTasksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTasks func (c *SSM) DescribeMaintenanceWindowExecutionTasksRequest(input *DescribeMaintenanceWindowExecutionTasksInput) (req *request.Request, output *DescribeMaintenanceWindowExecutionTasksOutput) { op := &request.Operation{ Name: opDescribeMaintenanceWindowExecutionTasks, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeMaintenanceWindowExecutionTasksInput{} } output = &DescribeMaintenanceWindowExecutionTasksOutput{} req = c.newRequest(op, input, output) return } // DescribeMaintenanceWindowExecutionTasks API operation for Amazon Simple Systems Manager (SSM). // // For a given maintenance window execution, lists the tasks that were run. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeMaintenanceWindowExecutionTasks for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutionTasks func (c *SSM) DescribeMaintenanceWindowExecutionTasks(input *DescribeMaintenanceWindowExecutionTasksInput) (*DescribeMaintenanceWindowExecutionTasksOutput, error) { req, out := c.DescribeMaintenanceWindowExecutionTasksRequest(input) return out, req.Send() } // DescribeMaintenanceWindowExecutionTasksWithContext is the same as DescribeMaintenanceWindowExecutionTasks with the addition of // the ability to pass a context and additional request options. // // See DescribeMaintenanceWindowExecutionTasks for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeMaintenanceWindowExecutionTasksWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionTasksInput, opts ...request.Option) (*DescribeMaintenanceWindowExecutionTasksOutput, error) { req, out := c.DescribeMaintenanceWindowExecutionTasksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeMaintenanceWindowExecutionTasksPages iterates over the pages of a DescribeMaintenanceWindowExecutionTasks operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeMaintenanceWindowExecutionTasks 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 DescribeMaintenanceWindowExecutionTasks operation. // pageNum := 0 // err := client.DescribeMaintenanceWindowExecutionTasksPages(params, // func(page *ssm.DescribeMaintenanceWindowExecutionTasksOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeMaintenanceWindowExecutionTasksPages(input *DescribeMaintenanceWindowExecutionTasksInput, fn func(*DescribeMaintenanceWindowExecutionTasksOutput, bool) bool) error { return c.DescribeMaintenanceWindowExecutionTasksPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeMaintenanceWindowExecutionTasksPagesWithContext same as DescribeMaintenanceWindowExecutionTasksPages 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 *SSM) DescribeMaintenanceWindowExecutionTasksPagesWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionTasksInput, fn func(*DescribeMaintenanceWindowExecutionTasksOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeMaintenanceWindowExecutionTasksInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeMaintenanceWindowExecutionTasksRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeMaintenanceWindowExecutionTasksOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeMaintenanceWindowExecutions = "DescribeMaintenanceWindowExecutions" // DescribeMaintenanceWindowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeMaintenanceWindowExecutions for more information on using the DescribeMaintenanceWindowExecutions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeMaintenanceWindowExecutionsRequest method. // req, resp := client.DescribeMaintenanceWindowExecutionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutions func (c *SSM) DescribeMaintenanceWindowExecutionsRequest(input *DescribeMaintenanceWindowExecutionsInput) (req *request.Request, output *DescribeMaintenanceWindowExecutionsOutput) { op := &request.Operation{ Name: opDescribeMaintenanceWindowExecutions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeMaintenanceWindowExecutionsInput{} } output = &DescribeMaintenanceWindowExecutionsOutput{} req = c.newRequest(op, input, output) return } // DescribeMaintenanceWindowExecutions API operation for Amazon Simple Systems Manager (SSM). // // Lists the executions of a maintenance window. This includes information about // when the maintenance window was scheduled to be active, and information about // tasks registered and run with the maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeMaintenanceWindowExecutions for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowExecutions func (c *SSM) DescribeMaintenanceWindowExecutions(input *DescribeMaintenanceWindowExecutionsInput) (*DescribeMaintenanceWindowExecutionsOutput, error) { req, out := c.DescribeMaintenanceWindowExecutionsRequest(input) return out, req.Send() } // DescribeMaintenanceWindowExecutionsWithContext is the same as DescribeMaintenanceWindowExecutions with the addition of // the ability to pass a context and additional request options. // // See DescribeMaintenanceWindowExecutions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeMaintenanceWindowExecutionsWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionsInput, opts ...request.Option) (*DescribeMaintenanceWindowExecutionsOutput, error) { req, out := c.DescribeMaintenanceWindowExecutionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeMaintenanceWindowExecutionsPages iterates over the pages of a DescribeMaintenanceWindowExecutions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeMaintenanceWindowExecutions 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 DescribeMaintenanceWindowExecutions operation. // pageNum := 0 // err := client.DescribeMaintenanceWindowExecutionsPages(params, // func(page *ssm.DescribeMaintenanceWindowExecutionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeMaintenanceWindowExecutionsPages(input *DescribeMaintenanceWindowExecutionsInput, fn func(*DescribeMaintenanceWindowExecutionsOutput, bool) bool) error { return c.DescribeMaintenanceWindowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeMaintenanceWindowExecutionsPagesWithContext same as DescribeMaintenanceWindowExecutionsPages 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 *SSM) DescribeMaintenanceWindowExecutionsPagesWithContext(ctx aws.Context, input *DescribeMaintenanceWindowExecutionsInput, fn func(*DescribeMaintenanceWindowExecutionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeMaintenanceWindowExecutionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeMaintenanceWindowExecutionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeMaintenanceWindowExecutionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeMaintenanceWindowSchedule = "DescribeMaintenanceWindowSchedule" // DescribeMaintenanceWindowScheduleRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowSchedule operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeMaintenanceWindowSchedule for more information on using the DescribeMaintenanceWindowSchedule // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeMaintenanceWindowScheduleRequest method. // req, resp := client.DescribeMaintenanceWindowScheduleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule func (c *SSM) DescribeMaintenanceWindowScheduleRequest(input *DescribeMaintenanceWindowScheduleInput) (req *request.Request, output *DescribeMaintenanceWindowScheduleOutput) { op := &request.Operation{ Name: opDescribeMaintenanceWindowSchedule, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeMaintenanceWindowScheduleInput{} } output = &DescribeMaintenanceWindowScheduleOutput{} req = c.newRequest(op, input, output) return } // DescribeMaintenanceWindowSchedule API operation for Amazon Simple Systems Manager (SSM). // // Retrieves information about upcoming executions of a maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeMaintenanceWindowSchedule for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule func (c *SSM) DescribeMaintenanceWindowSchedule(input *DescribeMaintenanceWindowScheduleInput) (*DescribeMaintenanceWindowScheduleOutput, error) { req, out := c.DescribeMaintenanceWindowScheduleRequest(input) return out, req.Send() } // DescribeMaintenanceWindowScheduleWithContext is the same as DescribeMaintenanceWindowSchedule with the addition of // the ability to pass a context and additional request options. // // See DescribeMaintenanceWindowSchedule for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeMaintenanceWindowScheduleWithContext(ctx aws.Context, input *DescribeMaintenanceWindowScheduleInput, opts ...request.Option) (*DescribeMaintenanceWindowScheduleOutput, error) { req, out := c.DescribeMaintenanceWindowScheduleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeMaintenanceWindowSchedulePages iterates over the pages of a DescribeMaintenanceWindowSchedule operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeMaintenanceWindowSchedule 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 DescribeMaintenanceWindowSchedule operation. // pageNum := 0 // err := client.DescribeMaintenanceWindowSchedulePages(params, // func(page *ssm.DescribeMaintenanceWindowScheduleOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeMaintenanceWindowSchedulePages(input *DescribeMaintenanceWindowScheduleInput, fn func(*DescribeMaintenanceWindowScheduleOutput, bool) bool) error { return c.DescribeMaintenanceWindowSchedulePagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeMaintenanceWindowSchedulePagesWithContext same as DescribeMaintenanceWindowSchedulePages 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 *SSM) DescribeMaintenanceWindowSchedulePagesWithContext(ctx aws.Context, input *DescribeMaintenanceWindowScheduleInput, fn func(*DescribeMaintenanceWindowScheduleOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeMaintenanceWindowScheduleInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeMaintenanceWindowScheduleRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeMaintenanceWindowScheduleOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeMaintenanceWindowTargets = "DescribeMaintenanceWindowTargets" // DescribeMaintenanceWindowTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowTargets operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeMaintenanceWindowTargets for more information on using the DescribeMaintenanceWindowTargets // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeMaintenanceWindowTargetsRequest method. // req, resp := client.DescribeMaintenanceWindowTargetsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTargets func (c *SSM) DescribeMaintenanceWindowTargetsRequest(input *DescribeMaintenanceWindowTargetsInput) (req *request.Request, output *DescribeMaintenanceWindowTargetsOutput) { op := &request.Operation{ Name: opDescribeMaintenanceWindowTargets, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeMaintenanceWindowTargetsInput{} } output = &DescribeMaintenanceWindowTargetsOutput{} req = c.newRequest(op, input, output) return } // DescribeMaintenanceWindowTargets API operation for Amazon Simple Systems Manager (SSM). // // Lists the targets registered with the maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeMaintenanceWindowTargets for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTargets func (c *SSM) DescribeMaintenanceWindowTargets(input *DescribeMaintenanceWindowTargetsInput) (*DescribeMaintenanceWindowTargetsOutput, error) { req, out := c.DescribeMaintenanceWindowTargetsRequest(input) return out, req.Send() } // DescribeMaintenanceWindowTargetsWithContext is the same as DescribeMaintenanceWindowTargets with the addition of // the ability to pass a context and additional request options. // // See DescribeMaintenanceWindowTargets for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeMaintenanceWindowTargetsWithContext(ctx aws.Context, input *DescribeMaintenanceWindowTargetsInput, opts ...request.Option) (*DescribeMaintenanceWindowTargetsOutput, error) { req, out := c.DescribeMaintenanceWindowTargetsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeMaintenanceWindowTargetsPages iterates over the pages of a DescribeMaintenanceWindowTargets operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeMaintenanceWindowTargets 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 DescribeMaintenanceWindowTargets operation. // pageNum := 0 // err := client.DescribeMaintenanceWindowTargetsPages(params, // func(page *ssm.DescribeMaintenanceWindowTargetsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeMaintenanceWindowTargetsPages(input *DescribeMaintenanceWindowTargetsInput, fn func(*DescribeMaintenanceWindowTargetsOutput, bool) bool) error { return c.DescribeMaintenanceWindowTargetsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeMaintenanceWindowTargetsPagesWithContext same as DescribeMaintenanceWindowTargetsPages 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 *SSM) DescribeMaintenanceWindowTargetsPagesWithContext(ctx aws.Context, input *DescribeMaintenanceWindowTargetsInput, fn func(*DescribeMaintenanceWindowTargetsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeMaintenanceWindowTargetsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeMaintenanceWindowTargetsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeMaintenanceWindowTargetsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeMaintenanceWindowTasks = "DescribeMaintenanceWindowTasks" // DescribeMaintenanceWindowTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowTasks operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeMaintenanceWindowTasks for more information on using the DescribeMaintenanceWindowTasks // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeMaintenanceWindowTasksRequest method. // req, resp := client.DescribeMaintenanceWindowTasksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTasks func (c *SSM) DescribeMaintenanceWindowTasksRequest(input *DescribeMaintenanceWindowTasksInput) (req *request.Request, output *DescribeMaintenanceWindowTasksOutput) { op := &request.Operation{ Name: opDescribeMaintenanceWindowTasks, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeMaintenanceWindowTasksInput{} } output = &DescribeMaintenanceWindowTasksOutput{} req = c.newRequest(op, input, output) return } // DescribeMaintenanceWindowTasks API operation for Amazon Simple Systems Manager (SSM). // // Lists the tasks in a maintenance window. // // For maintenance window tasks without a specified target, you can't supply // values for --max-errors and --max-concurrency. Instead, the system inserts // a placeholder value of 1, which may be reported in the response to this command. // These values don't affect the running of your task and can be 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. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeMaintenanceWindowTasks for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowTasks func (c *SSM) DescribeMaintenanceWindowTasks(input *DescribeMaintenanceWindowTasksInput) (*DescribeMaintenanceWindowTasksOutput, error) { req, out := c.DescribeMaintenanceWindowTasksRequest(input) return out, req.Send() } // DescribeMaintenanceWindowTasksWithContext is the same as DescribeMaintenanceWindowTasks with the addition of // the ability to pass a context and additional request options. // // See DescribeMaintenanceWindowTasks for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeMaintenanceWindowTasksWithContext(ctx aws.Context, input *DescribeMaintenanceWindowTasksInput, opts ...request.Option) (*DescribeMaintenanceWindowTasksOutput, error) { req, out := c.DescribeMaintenanceWindowTasksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeMaintenanceWindowTasksPages iterates over the pages of a DescribeMaintenanceWindowTasks operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeMaintenanceWindowTasks 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 DescribeMaintenanceWindowTasks operation. // pageNum := 0 // err := client.DescribeMaintenanceWindowTasksPages(params, // func(page *ssm.DescribeMaintenanceWindowTasksOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeMaintenanceWindowTasksPages(input *DescribeMaintenanceWindowTasksInput, fn func(*DescribeMaintenanceWindowTasksOutput, bool) bool) error { return c.DescribeMaintenanceWindowTasksPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeMaintenanceWindowTasksPagesWithContext same as DescribeMaintenanceWindowTasksPages 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 *SSM) DescribeMaintenanceWindowTasksPagesWithContext(ctx aws.Context, input *DescribeMaintenanceWindowTasksInput, fn func(*DescribeMaintenanceWindowTasksOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeMaintenanceWindowTasksInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeMaintenanceWindowTasksRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeMaintenanceWindowTasksOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeMaintenanceWindows = "DescribeMaintenanceWindows" // DescribeMaintenanceWindowsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindows operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeMaintenanceWindows for more information on using the DescribeMaintenanceWindows // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeMaintenanceWindowsRequest method. // req, resp := client.DescribeMaintenanceWindowsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindows func (c *SSM) DescribeMaintenanceWindowsRequest(input *DescribeMaintenanceWindowsInput) (req *request.Request, output *DescribeMaintenanceWindowsOutput) { op := &request.Operation{ Name: opDescribeMaintenanceWindows, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeMaintenanceWindowsInput{} } output = &DescribeMaintenanceWindowsOutput{} req = c.newRequest(op, input, output) return } // DescribeMaintenanceWindows API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the maintenance windows in an Amazon Web Services 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 Simple Systems Manager (SSM)'s // API operation DescribeMaintenanceWindows for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindows func (c *SSM) DescribeMaintenanceWindows(input *DescribeMaintenanceWindowsInput) (*DescribeMaintenanceWindowsOutput, error) { req, out := c.DescribeMaintenanceWindowsRequest(input) return out, req.Send() } // DescribeMaintenanceWindowsWithContext is the same as DescribeMaintenanceWindows with the addition of // the ability to pass a context and additional request options. // // See DescribeMaintenanceWindows for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeMaintenanceWindowsWithContext(ctx aws.Context, input *DescribeMaintenanceWindowsInput, opts ...request.Option) (*DescribeMaintenanceWindowsOutput, error) { req, out := c.DescribeMaintenanceWindowsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeMaintenanceWindowsPages iterates over the pages of a DescribeMaintenanceWindows operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeMaintenanceWindows 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 DescribeMaintenanceWindows operation. // pageNum := 0 // err := client.DescribeMaintenanceWindowsPages(params, // func(page *ssm.DescribeMaintenanceWindowsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeMaintenanceWindowsPages(input *DescribeMaintenanceWindowsInput, fn func(*DescribeMaintenanceWindowsOutput, bool) bool) error { return c.DescribeMaintenanceWindowsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeMaintenanceWindowsPagesWithContext same as DescribeMaintenanceWindowsPages 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 *SSM) DescribeMaintenanceWindowsPagesWithContext(ctx aws.Context, input *DescribeMaintenanceWindowsInput, fn func(*DescribeMaintenanceWindowsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeMaintenanceWindowsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeMaintenanceWindowsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeMaintenanceWindowsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeMaintenanceWindowsForTarget = "DescribeMaintenanceWindowsForTarget" // DescribeMaintenanceWindowsForTargetRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowsForTarget operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeMaintenanceWindowsForTarget for more information on using the DescribeMaintenanceWindowsForTarget // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeMaintenanceWindowsForTargetRequest method. // req, resp := client.DescribeMaintenanceWindowsForTargetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget func (c *SSM) DescribeMaintenanceWindowsForTargetRequest(input *DescribeMaintenanceWindowsForTargetInput) (req *request.Request, output *DescribeMaintenanceWindowsForTargetOutput) { op := &request.Operation{ Name: opDescribeMaintenanceWindowsForTarget, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeMaintenanceWindowsForTargetInput{} } output = &DescribeMaintenanceWindowsForTargetOutput{} req = c.newRequest(op, input, output) return } // DescribeMaintenanceWindowsForTarget API operation for Amazon Simple Systems Manager (SSM). // // Retrieves information about the maintenance window targets or tasks that // a managed node is associated with. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeMaintenanceWindowsForTarget for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget func (c *SSM) DescribeMaintenanceWindowsForTarget(input *DescribeMaintenanceWindowsForTargetInput) (*DescribeMaintenanceWindowsForTargetOutput, error) { req, out := c.DescribeMaintenanceWindowsForTargetRequest(input) return out, req.Send() } // DescribeMaintenanceWindowsForTargetWithContext is the same as DescribeMaintenanceWindowsForTarget with the addition of // the ability to pass a context and additional request options. // // See DescribeMaintenanceWindowsForTarget for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeMaintenanceWindowsForTargetWithContext(ctx aws.Context, input *DescribeMaintenanceWindowsForTargetInput, opts ...request.Option) (*DescribeMaintenanceWindowsForTargetOutput, error) { req, out := c.DescribeMaintenanceWindowsForTargetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeMaintenanceWindowsForTargetPages iterates over the pages of a DescribeMaintenanceWindowsForTarget operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeMaintenanceWindowsForTarget 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 DescribeMaintenanceWindowsForTarget operation. // pageNum := 0 // err := client.DescribeMaintenanceWindowsForTargetPages(params, // func(page *ssm.DescribeMaintenanceWindowsForTargetOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeMaintenanceWindowsForTargetPages(input *DescribeMaintenanceWindowsForTargetInput, fn func(*DescribeMaintenanceWindowsForTargetOutput, bool) bool) error { return c.DescribeMaintenanceWindowsForTargetPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeMaintenanceWindowsForTargetPagesWithContext same as DescribeMaintenanceWindowsForTargetPages 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 *SSM) DescribeMaintenanceWindowsForTargetPagesWithContext(ctx aws.Context, input *DescribeMaintenanceWindowsForTargetInput, fn func(*DescribeMaintenanceWindowsForTargetOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeMaintenanceWindowsForTargetInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeMaintenanceWindowsForTargetRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeMaintenanceWindowsForTargetOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeOpsItems = "DescribeOpsItems" // DescribeOpsItemsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOpsItems operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeOpsItems for more information on using the DescribeOpsItems // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeOpsItemsRequest method. // req, resp := client.DescribeOpsItemsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeOpsItems func (c *SSM) DescribeOpsItemsRequest(input *DescribeOpsItemsInput) (req *request.Request, output *DescribeOpsItemsOutput) { op := &request.Operation{ Name: opDescribeOpsItems, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeOpsItemsInput{} } output = &DescribeOpsItemsOutput{} req = c.newRequest(op, input, output) return } // DescribeOpsItems API operation for Amazon Simple Systems Manager (SSM). // // Query a set of OpsItems. You must have permission in Identity and Access // Management (IAM) to query a list of OpsItems. For more information, see Set // up OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html) // in the Amazon Web Services Systems Manager User Guide. // // Operations engineers and IT professionals use Amazon Web Services Systems // Manager OpsCenter to view, investigate, and remediate operational issues // impacting the performance and health of their Amazon Web Services resources. // For more information, see OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the Amazon Web Services Systems Manager 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 Simple Systems Manager (SSM)'s // API operation DescribeOpsItems for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeOpsItems func (c *SSM) DescribeOpsItems(input *DescribeOpsItemsInput) (*DescribeOpsItemsOutput, error) { req, out := c.DescribeOpsItemsRequest(input) return out, req.Send() } // DescribeOpsItemsWithContext is the same as DescribeOpsItems with the addition of // the ability to pass a context and additional request options. // // See DescribeOpsItems for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeOpsItemsWithContext(ctx aws.Context, input *DescribeOpsItemsInput, opts ...request.Option) (*DescribeOpsItemsOutput, error) { req, out := c.DescribeOpsItemsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeOpsItemsPages iterates over the pages of a DescribeOpsItems operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeOpsItems 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 DescribeOpsItems operation. // pageNum := 0 // err := client.DescribeOpsItemsPages(params, // func(page *ssm.DescribeOpsItemsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeOpsItemsPages(input *DescribeOpsItemsInput, fn func(*DescribeOpsItemsOutput, bool) bool) error { return c.DescribeOpsItemsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeOpsItemsPagesWithContext same as DescribeOpsItemsPages 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 *SSM) DescribeOpsItemsPagesWithContext(ctx aws.Context, input *DescribeOpsItemsInput, fn func(*DescribeOpsItemsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeOpsItemsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeOpsItemsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeOpsItemsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeParameters = "DescribeParameters" // DescribeParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeParameters for more information on using the DescribeParameters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeParametersRequest method. // req, resp := client.DescribeParametersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeParameters func (c *SSM) DescribeParametersRequest(input *DescribeParametersInput) (req *request.Request, output *DescribeParametersOutput) { op := &request.Operation{ Name: opDescribeParameters, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeParametersInput{} } output = &DescribeParametersOutput{} req = c.newRequest(op, input, output) return } // DescribeParameters API operation for Amazon Simple Systems Manager (SSM). // // Get information about a parameter. // // Request results are returned on a best-effort basis. If you specify MaxResults // in the request, the response includes information up to the limit specified. // The number of items returned, however, can be between zero and the value // of MaxResults. If the service reaches an internal limit while processing // the results, it stops the operation and returns the matching values up to // that point and a NextToken. You can specify the NextToken in a subsequent // call to get the next set of results. // // If you change the KMS key alias for the KMS key used to encrypt a parameter, // then you must also update the key alias the parameter uses to reference KMS. // Otherwise, DescribeParameters retrieves whatever the original key alias was // referencing. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeParameters for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidFilterKey // The specified key isn't valid. // // - InvalidFilterOption // The specified filter option isn't valid. Valid options are Equals and BeginsWith. // For Path filter, valid options are Recursive and OneLevel. // // - InvalidFilterValue // The filter value isn't valid. Verify the value and try again. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeParameters func (c *SSM) DescribeParameters(input *DescribeParametersInput) (*DescribeParametersOutput, error) { req, out := c.DescribeParametersRequest(input) return out, req.Send() } // DescribeParametersWithContext is the same as DescribeParameters with the addition of // the ability to pass a context and additional request options. // // See DescribeParameters for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeParametersWithContext(ctx aws.Context, input *DescribeParametersInput, opts ...request.Option) (*DescribeParametersOutput, error) { req, out := c.DescribeParametersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeParametersPages iterates over the pages of a DescribeParameters operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeParameters 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 DescribeParameters operation. // pageNum := 0 // err := client.DescribeParametersPages(params, // func(page *ssm.DescribeParametersOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeParametersPages(input *DescribeParametersInput, fn func(*DescribeParametersOutput, bool) bool) error { return c.DescribeParametersPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeParametersPagesWithContext same as DescribeParametersPages 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 *SSM) DescribeParametersPagesWithContext(ctx aws.Context, input *DescribeParametersInput, fn func(*DescribeParametersOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeParametersInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeParametersRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeParametersOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribePatchBaselines = "DescribePatchBaselines" // DescribePatchBaselinesRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchBaselines operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribePatchBaselines for more information on using the DescribePatchBaselines // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribePatchBaselinesRequest method. // req, resp := client.DescribePatchBaselinesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchBaselines func (c *SSM) DescribePatchBaselinesRequest(input *DescribePatchBaselinesInput) (req *request.Request, output *DescribePatchBaselinesOutput) { op := &request.Operation{ Name: opDescribePatchBaselines, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribePatchBaselinesInput{} } output = &DescribePatchBaselinesOutput{} req = c.newRequest(op, input, output) return } // DescribePatchBaselines API operation for Amazon Simple Systems Manager (SSM). // // Lists the patch baselines in your Amazon Web Services 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 Simple Systems Manager (SSM)'s // API operation DescribePatchBaselines for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchBaselines func (c *SSM) DescribePatchBaselines(input *DescribePatchBaselinesInput) (*DescribePatchBaselinesOutput, error) { req, out := c.DescribePatchBaselinesRequest(input) return out, req.Send() } // DescribePatchBaselinesWithContext is the same as DescribePatchBaselines with the addition of // the ability to pass a context and additional request options. // // See DescribePatchBaselines for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribePatchBaselinesWithContext(ctx aws.Context, input *DescribePatchBaselinesInput, opts ...request.Option) (*DescribePatchBaselinesOutput, error) { req, out := c.DescribePatchBaselinesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribePatchBaselinesPages iterates over the pages of a DescribePatchBaselines operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribePatchBaselines 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 DescribePatchBaselines operation. // pageNum := 0 // err := client.DescribePatchBaselinesPages(params, // func(page *ssm.DescribePatchBaselinesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribePatchBaselinesPages(input *DescribePatchBaselinesInput, fn func(*DescribePatchBaselinesOutput, bool) bool) error { return c.DescribePatchBaselinesPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribePatchBaselinesPagesWithContext same as DescribePatchBaselinesPages 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 *SSM) DescribePatchBaselinesPagesWithContext(ctx aws.Context, input *DescribePatchBaselinesInput, fn func(*DescribePatchBaselinesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribePatchBaselinesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribePatchBaselinesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribePatchBaselinesOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribePatchGroupState = "DescribePatchGroupState" // DescribePatchGroupStateRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchGroupState operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribePatchGroupState for more information on using the DescribePatchGroupState // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribePatchGroupStateRequest method. // req, resp := client.DescribePatchGroupStateRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroupState func (c *SSM) DescribePatchGroupStateRequest(input *DescribePatchGroupStateInput) (req *request.Request, output *DescribePatchGroupStateOutput) { op := &request.Operation{ Name: opDescribePatchGroupState, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribePatchGroupStateInput{} } output = &DescribePatchGroupStateOutput{} req = c.newRequest(op, input, output) return } // DescribePatchGroupState API operation for Amazon Simple Systems Manager (SSM). // // Returns high-level aggregated patch compliance state information for a patch // group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribePatchGroupState for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroupState func (c *SSM) DescribePatchGroupState(input *DescribePatchGroupStateInput) (*DescribePatchGroupStateOutput, error) { req, out := c.DescribePatchGroupStateRequest(input) return out, req.Send() } // DescribePatchGroupStateWithContext is the same as DescribePatchGroupState with the addition of // the ability to pass a context and additional request options. // // See DescribePatchGroupState for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribePatchGroupStateWithContext(ctx aws.Context, input *DescribePatchGroupStateInput, opts ...request.Option) (*DescribePatchGroupStateOutput, error) { req, out := c.DescribePatchGroupStateRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribePatchGroups = "DescribePatchGroups" // DescribePatchGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribePatchGroups for more information on using the DescribePatchGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribePatchGroupsRequest method. // req, resp := client.DescribePatchGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroups func (c *SSM) DescribePatchGroupsRequest(input *DescribePatchGroupsInput) (req *request.Request, output *DescribePatchGroupsOutput) { op := &request.Operation{ Name: opDescribePatchGroups, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribePatchGroupsInput{} } output = &DescribePatchGroupsOutput{} req = c.newRequest(op, input, output) return } // DescribePatchGroups API operation for Amazon Simple Systems Manager (SSM). // // Lists all patch groups that have been registered with patch baselines. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribePatchGroups for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchGroups func (c *SSM) DescribePatchGroups(input *DescribePatchGroupsInput) (*DescribePatchGroupsOutput, error) { req, out := c.DescribePatchGroupsRequest(input) return out, req.Send() } // DescribePatchGroupsWithContext is the same as DescribePatchGroups with the addition of // the ability to pass a context and additional request options. // // See DescribePatchGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribePatchGroupsWithContext(ctx aws.Context, input *DescribePatchGroupsInput, opts ...request.Option) (*DescribePatchGroupsOutput, error) { req, out := c.DescribePatchGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribePatchGroupsPages iterates over the pages of a DescribePatchGroups operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribePatchGroups 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 DescribePatchGroups operation. // pageNum := 0 // err := client.DescribePatchGroupsPages(params, // func(page *ssm.DescribePatchGroupsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribePatchGroupsPages(input *DescribePatchGroupsInput, fn func(*DescribePatchGroupsOutput, bool) bool) error { return c.DescribePatchGroupsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribePatchGroupsPagesWithContext same as DescribePatchGroupsPages 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 *SSM) DescribePatchGroupsPagesWithContext(ctx aws.Context, input *DescribePatchGroupsInput, fn func(*DescribePatchGroupsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribePatchGroupsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribePatchGroupsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribePatchGroupsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribePatchProperties = "DescribePatchProperties" // DescribePatchPropertiesRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchProperties operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribePatchProperties for more information on using the DescribePatchProperties // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribePatchPropertiesRequest method. // req, resp := client.DescribePatchPropertiesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchProperties func (c *SSM) DescribePatchPropertiesRequest(input *DescribePatchPropertiesInput) (req *request.Request, output *DescribePatchPropertiesOutput) { op := &request.Operation{ Name: opDescribePatchProperties, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribePatchPropertiesInput{} } output = &DescribePatchPropertiesOutput{} req = c.newRequest(op, input, output) return } // DescribePatchProperties API operation for Amazon Simple Systems Manager (SSM). // // Lists the properties of available patches organized by product, product family, // classification, severity, and other properties of available patches. You // can use the reported properties in the filters you specify in requests for // operations such as CreatePatchBaseline, UpdatePatchBaseline, DescribeAvailablePatches, // and DescribePatchBaselines. // // The following section lists the properties that can be used in filters for // each major operating system type: // // AMAZON_LINUX // // Valid properties: PRODUCT | CLASSIFICATION | SEVERITY // // AMAZON_LINUX_2 // // Valid properties: PRODUCT | CLASSIFICATION | SEVERITY // // # CENTOS // // Valid properties: PRODUCT | CLASSIFICATION | SEVERITY // // # DEBIAN // // Valid properties: PRODUCT | PRIORITY // // # MACOS // // Valid properties: PRODUCT | CLASSIFICATION // // ORACLE_LINUX // // Valid properties: PRODUCT | CLASSIFICATION | SEVERITY // // REDHAT_ENTERPRISE_LINUX // // Valid properties: PRODUCT | CLASSIFICATION | SEVERITY // // # SUSE // // Valid properties: PRODUCT | CLASSIFICATION | SEVERITY // // # UBUNTU // // Valid properties: PRODUCT | PRIORITY // // # WINDOWS // // Valid properties: PRODUCT | PRODUCT_FAMILY | CLASSIFICATION | MSRC_SEVERITY // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribePatchProperties for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribePatchProperties func (c *SSM) DescribePatchProperties(input *DescribePatchPropertiesInput) (*DescribePatchPropertiesOutput, error) { req, out := c.DescribePatchPropertiesRequest(input) return out, req.Send() } // DescribePatchPropertiesWithContext is the same as DescribePatchProperties with the addition of // the ability to pass a context and additional request options. // // See DescribePatchProperties for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribePatchPropertiesWithContext(ctx aws.Context, input *DescribePatchPropertiesInput, opts ...request.Option) (*DescribePatchPropertiesOutput, error) { req, out := c.DescribePatchPropertiesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribePatchPropertiesPages iterates over the pages of a DescribePatchProperties operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribePatchProperties 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 DescribePatchProperties operation. // pageNum := 0 // err := client.DescribePatchPropertiesPages(params, // func(page *ssm.DescribePatchPropertiesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribePatchPropertiesPages(input *DescribePatchPropertiesInput, fn func(*DescribePatchPropertiesOutput, bool) bool) error { return c.DescribePatchPropertiesPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribePatchPropertiesPagesWithContext same as DescribePatchPropertiesPages 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 *SSM) DescribePatchPropertiesPagesWithContext(ctx aws.Context, input *DescribePatchPropertiesInput, fn func(*DescribePatchPropertiesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribePatchPropertiesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribePatchPropertiesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribePatchPropertiesOutput), !p.HasNextPage()) { break } } return p.Err() } const opDescribeSessions = "DescribeSessions" // DescribeSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSessions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeSessions for more information on using the DescribeSessions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DescribeSessionsRequest method. // req, resp := client.DescribeSessionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeSessions func (c *SSM) DescribeSessionsRequest(input *DescribeSessionsInput) (req *request.Request, output *DescribeSessionsOutput) { op := &request.Operation{ Name: opDescribeSessions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &DescribeSessionsInput{} } output = &DescribeSessionsOutput{} req = c.newRequest(op, input, output) return } // DescribeSessions API operation for Amazon Simple Systems Manager (SSM). // // Retrieves a list of all active sessions (both connected and disconnected) // or terminated sessions from the past 30 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. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DescribeSessions for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidFilterKey // The specified key isn't valid. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeSessions func (c *SSM) DescribeSessions(input *DescribeSessionsInput) (*DescribeSessionsOutput, error) { req, out := c.DescribeSessionsRequest(input) return out, req.Send() } // DescribeSessionsWithContext is the same as DescribeSessions with the addition of // the ability to pass a context and additional request options. // // See DescribeSessions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DescribeSessionsWithContext(ctx aws.Context, input *DescribeSessionsInput, opts ...request.Option) (*DescribeSessionsOutput, error) { req, out := c.DescribeSessionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // DescribeSessionsPages iterates over the pages of a DescribeSessions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See DescribeSessions 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 DescribeSessions operation. // pageNum := 0 // err := client.DescribeSessionsPages(params, // func(page *ssm.DescribeSessionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) DescribeSessionsPages(input *DescribeSessionsInput, fn func(*DescribeSessionsOutput, bool) bool) error { return c.DescribeSessionsPagesWithContext(aws.BackgroundContext(), input, fn) } // DescribeSessionsPagesWithContext same as DescribeSessionsPages 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 *SSM) DescribeSessionsPagesWithContext(ctx aws.Context, input *DescribeSessionsInput, fn func(*DescribeSessionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeSessionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.DescribeSessionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*DescribeSessionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opDisassociateOpsItemRelatedItem = "DisassociateOpsItemRelatedItem" // DisassociateOpsItemRelatedItemRequest generates a "aws/request.Request" representing the // client's request for the DisassociateOpsItemRelatedItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DisassociateOpsItemRelatedItem for more information on using the DisassociateOpsItemRelatedItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DisassociateOpsItemRelatedItemRequest method. // req, resp := client.DisassociateOpsItemRelatedItemRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DisassociateOpsItemRelatedItem func (c *SSM) DisassociateOpsItemRelatedItemRequest(input *DisassociateOpsItemRelatedItemInput) (req *request.Request, output *DisassociateOpsItemRelatedItemOutput) { op := &request.Operation{ Name: opDisassociateOpsItemRelatedItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DisassociateOpsItemRelatedItemInput{} } output = &DisassociateOpsItemRelatedItemOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DisassociateOpsItemRelatedItem API operation for Amazon Simple Systems Manager (SSM). // // Deletes the association between an OpsItem and a related item. For example, // this API operation can delete an Incident Manager incident from an OpsItem. // Incident Manager is a capability of Amazon Web Services Systems Manager. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation DisassociateOpsItemRelatedItem for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - OpsItemRelatedItemAssociationNotFoundException // The association wasn't found using the parameters you specified in the call. // Verify the information and try again. // // - OpsItemNotFoundException // The specified OpsItem ID doesn't exist. Verify the ID and try again. // // - OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments // and try again. // // - OpsItemConflictException // The specified OpsItem is in the process of being deleted. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DisassociateOpsItemRelatedItem func (c *SSM) DisassociateOpsItemRelatedItem(input *DisassociateOpsItemRelatedItemInput) (*DisassociateOpsItemRelatedItemOutput, error) { req, out := c.DisassociateOpsItemRelatedItemRequest(input) return out, req.Send() } // DisassociateOpsItemRelatedItemWithContext is the same as DisassociateOpsItemRelatedItem with the addition of // the ability to pass a context and additional request options. // // See DisassociateOpsItemRelatedItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) DisassociateOpsItemRelatedItemWithContext(ctx aws.Context, input *DisassociateOpsItemRelatedItemInput, opts ...request.Option) (*DisassociateOpsItemRelatedItemOutput, error) { req, out := c.DisassociateOpsItemRelatedItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetAutomationExecution = "GetAutomationExecution" // GetAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetAutomationExecution for more information on using the GetAutomationExecution // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetAutomationExecutionRequest method. // req, resp := client.GetAutomationExecutionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetAutomationExecution func (c *SSM) GetAutomationExecutionRequest(input *GetAutomationExecutionInput) (req *request.Request, output *GetAutomationExecutionOutput) { op := &request.Operation{ Name: opGetAutomationExecution, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetAutomationExecutionInput{} } output = &GetAutomationExecutionOutput{} req = c.newRequest(op, input, output) return } // GetAutomationExecution API operation for Amazon Simple Systems Manager (SSM). // // Get detailed information about a particular Automation 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 Amazon Simple Systems Manager (SSM)'s // API operation GetAutomationExecution for usage and error information. // // Returned Error Types: // // - AutomationExecutionNotFoundException // There is no automation execution information for the requested automation // execution ID. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetAutomationExecution func (c *SSM) GetAutomationExecution(input *GetAutomationExecutionInput) (*GetAutomationExecutionOutput, error) { req, out := c.GetAutomationExecutionRequest(input) return out, req.Send() } // GetAutomationExecutionWithContext is the same as GetAutomationExecution with the addition of // the ability to pass a context and additional request options. // // See GetAutomationExecution for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetAutomationExecutionWithContext(ctx aws.Context, input *GetAutomationExecutionInput, opts ...request.Option) (*GetAutomationExecutionOutput, error) { req, out := c.GetAutomationExecutionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetCalendarState = "GetCalendarState" // GetCalendarStateRequest generates a "aws/request.Request" representing the // client's request for the GetCalendarState operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetCalendarState for more information on using the GetCalendarState // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetCalendarStateRequest method. // req, resp := client.GetCalendarStateRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetCalendarState func (c *SSM) GetCalendarStateRequest(input *GetCalendarStateInput) (req *request.Request, output *GetCalendarStateOutput) { op := &request.Operation{ Name: opGetCalendarState, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetCalendarStateInput{} } output = &GetCalendarStateOutput{} req = c.newRequest(op, input, output) return } // GetCalendarState API operation for Amazon Simple Systems Manager (SSM). // // Gets the state of a Amazon Web Services Systems Manager change calendar at // the current time or a specified time. If you specify a time, GetCalendarState // returns the state of the calendar at that specific time, and returns the // next time that the change calendar state will transition. If you don't specify // a time, GetCalendarState uses the current time. Change Calendar entries have // two possible states: OPEN or CLOSED. // // If you specify more than one calendar in a request, the command returns the // status of OPEN only if all calendars in the request are open. If one or more // calendars in the request are closed, the status returned is CLOSED. // // For more information about Change Calendar, a capability of Amazon Web Services // Systems Manager, see Amazon Web Services Systems Manager Change Calendar // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar.html) // in the Amazon Web Services Systems Manager 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 Simple Systems Manager (SSM)'s // API operation GetCalendarState for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentType // The SSM document type isn't valid. Valid document types are described in // the DocumentType property. // // - UnsupportedCalendarException // The calendar entry contained in the specified SSM document isn't supported. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetCalendarState func (c *SSM) GetCalendarState(input *GetCalendarStateInput) (*GetCalendarStateOutput, error) { req, out := c.GetCalendarStateRequest(input) return out, req.Send() } // GetCalendarStateWithContext is the same as GetCalendarState with the addition of // the ability to pass a context and additional request options. // // See GetCalendarState for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetCalendarStateWithContext(ctx aws.Context, input *GetCalendarStateInput, opts ...request.Option) (*GetCalendarStateOutput, error) { req, out := c.GetCalendarStateRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetCommandInvocation = "GetCommandInvocation" // GetCommandInvocationRequest generates a "aws/request.Request" representing the // client's request for the GetCommandInvocation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetCommandInvocation for more information on using the GetCommandInvocation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetCommandInvocationRequest method. // req, resp := client.GetCommandInvocationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetCommandInvocation func (c *SSM) GetCommandInvocationRequest(input *GetCommandInvocationInput) (req *request.Request, output *GetCommandInvocationOutput) { op := &request.Operation{ Name: opGetCommandInvocation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetCommandInvocationInput{} } output = &GetCommandInvocationOutput{} req = c.newRequest(op, input, output) return } // GetCommandInvocation API operation for Amazon Simple Systems Manager (SSM). // // Returns detailed information about command execution for an invocation or // plugin. // // GetCommandInvocation only gives the execution status of a plugin in a document. // To get the command execution status on a specific managed node, use ListCommandInvocations. // To get the command execution status across managed nodes, use ListCommands. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetCommandInvocation for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidCommandId // The specified command ID isn't valid. Verify the ID and try again. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidPluginName // The plugin name isn't valid. // // - InvocationDoesNotExist // The command ID and managed node ID you specified didn't match any invocations. // Verify the command ID and the managed node ID and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetCommandInvocation func (c *SSM) GetCommandInvocation(input *GetCommandInvocationInput) (*GetCommandInvocationOutput, error) { req, out := c.GetCommandInvocationRequest(input) return out, req.Send() } // GetCommandInvocationWithContext is the same as GetCommandInvocation with the addition of // the ability to pass a context and additional request options. // // See GetCommandInvocation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetCommandInvocationWithContext(ctx aws.Context, input *GetCommandInvocationInput, opts ...request.Option) (*GetCommandInvocationOutput, error) { req, out := c.GetCommandInvocationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetConnectionStatus = "GetConnectionStatus" // GetConnectionStatusRequest generates a "aws/request.Request" representing the // client's request for the GetConnectionStatus operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetConnectionStatus for more information on using the GetConnectionStatus // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetConnectionStatusRequest method. // req, resp := client.GetConnectionStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetConnectionStatus func (c *SSM) GetConnectionStatusRequest(input *GetConnectionStatusInput) (req *request.Request, output *GetConnectionStatusOutput) { op := &request.Operation{ Name: opGetConnectionStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetConnectionStatusInput{} } output = &GetConnectionStatusOutput{} req = c.newRequest(op, input, output) return } // GetConnectionStatus API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the Session Manager connection status for a managed node to determine // whether it is running and ready to receive Session Manager connections. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetConnectionStatus for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetConnectionStatus func (c *SSM) GetConnectionStatus(input *GetConnectionStatusInput) (*GetConnectionStatusOutput, error) { req, out := c.GetConnectionStatusRequest(input) return out, req.Send() } // GetConnectionStatusWithContext is the same as GetConnectionStatus with the addition of // the ability to pass a context and additional request options. // // See GetConnectionStatus for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetConnectionStatusWithContext(ctx aws.Context, input *GetConnectionStatusInput, opts ...request.Option) (*GetConnectionStatusOutput, error) { req, out := c.GetConnectionStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetDefaultPatchBaseline = "GetDefaultPatchBaseline" // GetDefaultPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the GetDefaultPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetDefaultPatchBaseline for more information on using the GetDefaultPatchBaseline // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetDefaultPatchBaselineRequest method. // req, resp := client.GetDefaultPatchBaselineRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDefaultPatchBaseline func (c *SSM) GetDefaultPatchBaselineRequest(input *GetDefaultPatchBaselineInput) (req *request.Request, output *GetDefaultPatchBaselineOutput) { op := &request.Operation{ Name: opGetDefaultPatchBaseline, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetDefaultPatchBaselineInput{} } output = &GetDefaultPatchBaselineOutput{} req = c.newRequest(op, input, output) return } // GetDefaultPatchBaseline API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the default patch baseline. Amazon Web Services Systems Manager // supports creating multiple default patch baselines. For example, you can // create a default patch baseline for each operating system. // // If you don't specify an operating system value, the default patch baseline // for Windows is 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 // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetDefaultPatchBaseline for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDefaultPatchBaseline func (c *SSM) GetDefaultPatchBaseline(input *GetDefaultPatchBaselineInput) (*GetDefaultPatchBaselineOutput, error) { req, out := c.GetDefaultPatchBaselineRequest(input) return out, req.Send() } // GetDefaultPatchBaselineWithContext is the same as GetDefaultPatchBaseline with the addition of // the ability to pass a context and additional request options. // // See GetDefaultPatchBaseline for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetDefaultPatchBaselineWithContext(ctx aws.Context, input *GetDefaultPatchBaselineInput, opts ...request.Option) (*GetDefaultPatchBaselineOutput, error) { req, out := c.GetDefaultPatchBaselineRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetDeployablePatchSnapshotForInstance = "GetDeployablePatchSnapshotForInstance" // GetDeployablePatchSnapshotForInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeployablePatchSnapshotForInstance operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetDeployablePatchSnapshotForInstance for more information on using the GetDeployablePatchSnapshotForInstance // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetDeployablePatchSnapshotForInstanceRequest method. // req, resp := client.GetDeployablePatchSnapshotForInstanceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDeployablePatchSnapshotForInstance func (c *SSM) GetDeployablePatchSnapshotForInstanceRequest(input *GetDeployablePatchSnapshotForInstanceInput) (req *request.Request, output *GetDeployablePatchSnapshotForInstanceOutput) { op := &request.Operation{ Name: opGetDeployablePatchSnapshotForInstance, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetDeployablePatchSnapshotForInstanceInput{} } output = &GetDeployablePatchSnapshotForInstanceOutput{} req = c.newRequest(op, input, output) return } // GetDeployablePatchSnapshotForInstance API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the current snapshot for the patch baseline the managed node uses. // This API is primarily used by the AWS-RunPatchBaseline Systems Manager document // (SSM document). // // If you run the command locally, such as with the Command Line Interface (CLI), // the system attempts to use your local Amazon Web Services credentials and // the operation fails. To avoid this, you can run the command in the Amazon // Web Services Systems Manager console. Use Run Command, a capability of Amazon // Web Services Systems Manager, with an SSM document that enables you to target // a managed node with a script or command. For example, run the command using // the AWS-RunShellScript document or the AWS-RunPowerShellScript document. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetDeployablePatchSnapshotForInstance for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - UnsupportedOperatingSystem // The operating systems you specified isn't supported, or the operation isn't // supported for the operating system. // // - UnsupportedFeatureRequiredException // Patching for applications released by Microsoft is only available on EC2 // instances and advanced instances. To patch applications released by Microsoft // on on-premises servers and VMs, you must enable advanced instances. For more // information, see Enabling the advanced-instances tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) // in the Amazon Web Services Systems Manager User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDeployablePatchSnapshotForInstance func (c *SSM) GetDeployablePatchSnapshotForInstance(input *GetDeployablePatchSnapshotForInstanceInput) (*GetDeployablePatchSnapshotForInstanceOutput, error) { req, out := c.GetDeployablePatchSnapshotForInstanceRequest(input) return out, req.Send() } // GetDeployablePatchSnapshotForInstanceWithContext is the same as GetDeployablePatchSnapshotForInstance with the addition of // the ability to pass a context and additional request options. // // See GetDeployablePatchSnapshotForInstance for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetDeployablePatchSnapshotForInstanceWithContext(ctx aws.Context, input *GetDeployablePatchSnapshotForInstanceInput, opts ...request.Option) (*GetDeployablePatchSnapshotForInstanceOutput, error) { req, out := c.GetDeployablePatchSnapshotForInstanceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetDocument = "GetDocument" // GetDocumentRequest generates a "aws/request.Request" representing the // client's request for the GetDocument operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetDocument for more information on using the GetDocument // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetDocumentRequest method. // req, resp := client.GetDocumentRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDocument func (c *SSM) GetDocumentRequest(input *GetDocumentInput) (req *request.Request, output *GetDocumentOutput) { op := &request.Operation{ Name: opGetDocument, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetDocumentInput{} } output = &GetDocumentOutput{} req = c.newRequest(op, input, output) return } // GetDocument API operation for Amazon Simple Systems Manager (SSM). // // Gets the contents of the specified Amazon Web Services Systems Manager document // (SSM document). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetDocument for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDocument func (c *SSM) GetDocument(input *GetDocumentInput) (*GetDocumentOutput, error) { req, out := c.GetDocumentRequest(input) return out, req.Send() } // GetDocumentWithContext is the same as GetDocument with the addition of // the ability to pass a context and additional request options. // // See GetDocument for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetDocumentWithContext(ctx aws.Context, input *GetDocumentInput, opts ...request.Option) (*GetDocumentOutput, error) { req, out := c.GetDocumentRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetInventory = "GetInventory" // GetInventoryRequest generates a "aws/request.Request" representing the // client's request for the GetInventory operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetInventory for more information on using the GetInventory // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetInventoryRequest method. // req, resp := client.GetInventoryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventory func (c *SSM) GetInventoryRequest(input *GetInventoryInput) (req *request.Request, output *GetInventoryOutput) { op := &request.Operation{ Name: opGetInventory, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &GetInventoryInput{} } output = &GetInventoryOutput{} req = c.newRequest(op, input, output) return } // GetInventory API operation for Amazon Simple Systems Manager (SSM). // // Query inventory information. This includes managed node status, such as Stopped // or Terminated. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetInventory for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidInventoryGroupException // The specified inventory group isn't valid. // // - InvalidNextToken // The specified token isn't valid. // // - InvalidTypeNameException // The parameter type name isn't valid. // // - InvalidAggregatorException // The specified aggregator isn't valid for inventory groups. Verify that the // aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. // // - InvalidResultAttributeException // The specified inventory item result attribute isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventory func (c *SSM) GetInventory(input *GetInventoryInput) (*GetInventoryOutput, error) { req, out := c.GetInventoryRequest(input) return out, req.Send() } // GetInventoryWithContext is the same as GetInventory with the addition of // the ability to pass a context and additional request options. // // See GetInventory for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetInventoryWithContext(ctx aws.Context, input *GetInventoryInput, opts ...request.Option) (*GetInventoryOutput, error) { req, out := c.GetInventoryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // GetInventoryPages iterates over the pages of a GetInventory operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See GetInventory 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 GetInventory operation. // pageNum := 0 // err := client.GetInventoryPages(params, // func(page *ssm.GetInventoryOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) GetInventoryPages(input *GetInventoryInput, fn func(*GetInventoryOutput, bool) bool) error { return c.GetInventoryPagesWithContext(aws.BackgroundContext(), input, fn) } // GetInventoryPagesWithContext same as GetInventoryPages 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 *SSM) GetInventoryPagesWithContext(ctx aws.Context, input *GetInventoryInput, fn func(*GetInventoryOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *GetInventoryInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetInventoryRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*GetInventoryOutput), !p.HasNextPage()) { break } } return p.Err() } const opGetInventorySchema = "GetInventorySchema" // GetInventorySchemaRequest generates a "aws/request.Request" representing the // client's request for the GetInventorySchema operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetInventorySchema for more information on using the GetInventorySchema // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetInventorySchemaRequest method. // req, resp := client.GetInventorySchemaRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventorySchema func (c *SSM) GetInventorySchemaRequest(input *GetInventorySchemaInput) (req *request.Request, output *GetInventorySchemaOutput) { op := &request.Operation{ Name: opGetInventorySchema, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &GetInventorySchemaInput{} } output = &GetInventorySchemaOutput{} req = c.newRequest(op, input, output) return } // GetInventorySchema API operation for Amazon Simple Systems Manager (SSM). // // Return a list of inventory type names for the account, or return a list of // attribute names for a specific Inventory item type. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetInventorySchema for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidTypeNameException // The parameter type name isn't valid. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetInventorySchema func (c *SSM) GetInventorySchema(input *GetInventorySchemaInput) (*GetInventorySchemaOutput, error) { req, out := c.GetInventorySchemaRequest(input) return out, req.Send() } // GetInventorySchemaWithContext is the same as GetInventorySchema with the addition of // the ability to pass a context and additional request options. // // See GetInventorySchema for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetInventorySchemaWithContext(ctx aws.Context, input *GetInventorySchemaInput, opts ...request.Option) (*GetInventorySchemaOutput, error) { req, out := c.GetInventorySchemaRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // GetInventorySchemaPages iterates over the pages of a GetInventorySchema operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See GetInventorySchema 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 GetInventorySchema operation. // pageNum := 0 // err := client.GetInventorySchemaPages(params, // func(page *ssm.GetInventorySchemaOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) GetInventorySchemaPages(input *GetInventorySchemaInput, fn func(*GetInventorySchemaOutput, bool) bool) error { return c.GetInventorySchemaPagesWithContext(aws.BackgroundContext(), input, fn) } // GetInventorySchemaPagesWithContext same as GetInventorySchemaPages 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 *SSM) GetInventorySchemaPagesWithContext(ctx aws.Context, input *GetInventorySchemaInput, fn func(*GetInventorySchemaOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *GetInventorySchemaInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetInventorySchemaRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*GetInventorySchemaOutput), !p.HasNextPage()) { break } } return p.Err() } const opGetMaintenanceWindow = "GetMaintenanceWindow" // GetMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetMaintenanceWindow for more information on using the GetMaintenanceWindow // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetMaintenanceWindowRequest method. // req, resp := client.GetMaintenanceWindowRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindow func (c *SSM) GetMaintenanceWindowRequest(input *GetMaintenanceWindowInput) (req *request.Request, output *GetMaintenanceWindowOutput) { op := &request.Operation{ Name: opGetMaintenanceWindow, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetMaintenanceWindowInput{} } output = &GetMaintenanceWindowOutput{} req = c.newRequest(op, input, output) return } // GetMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). // // Retrieves a maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetMaintenanceWindow for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindow func (c *SSM) GetMaintenanceWindow(input *GetMaintenanceWindowInput) (*GetMaintenanceWindowOutput, error) { req, out := c.GetMaintenanceWindowRequest(input) return out, req.Send() } // GetMaintenanceWindowWithContext is the same as GetMaintenanceWindow with the addition of // the ability to pass a context and additional request options. // // See GetMaintenanceWindow for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetMaintenanceWindowWithContext(ctx aws.Context, input *GetMaintenanceWindowInput, opts ...request.Option) (*GetMaintenanceWindowOutput, error) { req, out := c.GetMaintenanceWindowRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetMaintenanceWindowExecution = "GetMaintenanceWindowExecution" // GetMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecution operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetMaintenanceWindowExecution for more information on using the GetMaintenanceWindowExecution // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetMaintenanceWindowExecutionRequest method. // req, resp := client.GetMaintenanceWindowExecutionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecution func (c *SSM) GetMaintenanceWindowExecutionRequest(input *GetMaintenanceWindowExecutionInput) (req *request.Request, output *GetMaintenanceWindowExecutionOutput) { op := &request.Operation{ Name: opGetMaintenanceWindowExecution, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetMaintenanceWindowExecutionInput{} } output = &GetMaintenanceWindowExecutionOutput{} req = c.newRequest(op, input, output) return } // GetMaintenanceWindowExecution API operation for Amazon Simple Systems Manager (SSM). // // Retrieves details about a specific a maintenance window 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 Amazon Simple Systems Manager (SSM)'s // API operation GetMaintenanceWindowExecution for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecution func (c *SSM) GetMaintenanceWindowExecution(input *GetMaintenanceWindowExecutionInput) (*GetMaintenanceWindowExecutionOutput, error) { req, out := c.GetMaintenanceWindowExecutionRequest(input) return out, req.Send() } // GetMaintenanceWindowExecutionWithContext is the same as GetMaintenanceWindowExecution with the addition of // the ability to pass a context and additional request options. // // See GetMaintenanceWindowExecution for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetMaintenanceWindowExecutionWithContext(ctx aws.Context, input *GetMaintenanceWindowExecutionInput, opts ...request.Option) (*GetMaintenanceWindowExecutionOutput, error) { req, out := c.GetMaintenanceWindowExecutionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetMaintenanceWindowExecutionTask = "GetMaintenanceWindowExecutionTask" // GetMaintenanceWindowExecutionTaskRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecutionTask operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetMaintenanceWindowExecutionTask for more information on using the GetMaintenanceWindowExecutionTask // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetMaintenanceWindowExecutionTaskRequest method. // req, resp := client.GetMaintenanceWindowExecutionTaskRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTask func (c *SSM) GetMaintenanceWindowExecutionTaskRequest(input *GetMaintenanceWindowExecutionTaskInput) (req *request.Request, output *GetMaintenanceWindowExecutionTaskOutput) { op := &request.Operation{ Name: opGetMaintenanceWindowExecutionTask, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetMaintenanceWindowExecutionTaskInput{} } output = &GetMaintenanceWindowExecutionTaskOutput{} req = c.newRequest(op, input, output) return } // GetMaintenanceWindowExecutionTask API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the details about a specific task run as part of a maintenance // window 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 Amazon Simple Systems Manager (SSM)'s // API operation GetMaintenanceWindowExecutionTask for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTask func (c *SSM) GetMaintenanceWindowExecutionTask(input *GetMaintenanceWindowExecutionTaskInput) (*GetMaintenanceWindowExecutionTaskOutput, error) { req, out := c.GetMaintenanceWindowExecutionTaskRequest(input) return out, req.Send() } // GetMaintenanceWindowExecutionTaskWithContext is the same as GetMaintenanceWindowExecutionTask with the addition of // the ability to pass a context and additional request options. // // See GetMaintenanceWindowExecutionTask for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetMaintenanceWindowExecutionTaskWithContext(ctx aws.Context, input *GetMaintenanceWindowExecutionTaskInput, opts ...request.Option) (*GetMaintenanceWindowExecutionTaskOutput, error) { req, out := c.GetMaintenanceWindowExecutionTaskRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetMaintenanceWindowExecutionTaskInvocation = "GetMaintenanceWindowExecutionTaskInvocation" // GetMaintenanceWindowExecutionTaskInvocationRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecutionTaskInvocation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetMaintenanceWindowExecutionTaskInvocation for more information on using the GetMaintenanceWindowExecutionTaskInvocation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetMaintenanceWindowExecutionTaskInvocationRequest method. // req, resp := client.GetMaintenanceWindowExecutionTaskInvocationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTaskInvocation func (c *SSM) GetMaintenanceWindowExecutionTaskInvocationRequest(input *GetMaintenanceWindowExecutionTaskInvocationInput) (req *request.Request, output *GetMaintenanceWindowExecutionTaskInvocationOutput) { op := &request.Operation{ Name: opGetMaintenanceWindowExecutionTaskInvocation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetMaintenanceWindowExecutionTaskInvocationInput{} } output = &GetMaintenanceWindowExecutionTaskInvocationOutput{} req = c.newRequest(op, input, output) return } // GetMaintenanceWindowExecutionTaskInvocation API operation for Amazon Simple Systems Manager (SSM). // // Retrieves information about a specific task running on a specific 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 Amazon Simple Systems Manager (SSM)'s // API operation GetMaintenanceWindowExecutionTaskInvocation for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowExecutionTaskInvocation func (c *SSM) GetMaintenanceWindowExecutionTaskInvocation(input *GetMaintenanceWindowExecutionTaskInvocationInput) (*GetMaintenanceWindowExecutionTaskInvocationOutput, error) { req, out := c.GetMaintenanceWindowExecutionTaskInvocationRequest(input) return out, req.Send() } // GetMaintenanceWindowExecutionTaskInvocationWithContext is the same as GetMaintenanceWindowExecutionTaskInvocation with the addition of // the ability to pass a context and additional request options. // // See GetMaintenanceWindowExecutionTaskInvocation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetMaintenanceWindowExecutionTaskInvocationWithContext(ctx aws.Context, input *GetMaintenanceWindowExecutionTaskInvocationInput, opts ...request.Option) (*GetMaintenanceWindowExecutionTaskInvocationOutput, error) { req, out := c.GetMaintenanceWindowExecutionTaskInvocationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetMaintenanceWindowTask = "GetMaintenanceWindowTask" // GetMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowTask operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetMaintenanceWindowTask for more information on using the GetMaintenanceWindowTask // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetMaintenanceWindowTaskRequest method. // req, resp := client.GetMaintenanceWindowTaskRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowTask func (c *SSM) GetMaintenanceWindowTaskRequest(input *GetMaintenanceWindowTaskInput) (req *request.Request, output *GetMaintenanceWindowTaskOutput) { op := &request.Operation{ Name: opGetMaintenanceWindowTask, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetMaintenanceWindowTaskInput{} } output = &GetMaintenanceWindowTaskOutput{} req = c.newRequest(op, input, output) return } // GetMaintenanceWindowTask API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the details of a maintenance window task. // // For maintenance window tasks without a specified target, you can't supply // values for --max-errors and --max-concurrency. Instead, the system inserts // a placeholder value of 1, which may be reported in the response to this command. // These values don't affect the running of your task and can be ignored. // // To retrieve a list of tasks in a maintenance window, instead use the DescribeMaintenanceWindowTasks // command. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetMaintenanceWindowTask for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetMaintenanceWindowTask func (c *SSM) GetMaintenanceWindowTask(input *GetMaintenanceWindowTaskInput) (*GetMaintenanceWindowTaskOutput, error) { req, out := c.GetMaintenanceWindowTaskRequest(input) return out, req.Send() } // GetMaintenanceWindowTaskWithContext is the same as GetMaintenanceWindowTask with the addition of // the ability to pass a context and additional request options. // // See GetMaintenanceWindowTask for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetMaintenanceWindowTaskWithContext(ctx aws.Context, input *GetMaintenanceWindowTaskInput, opts ...request.Option) (*GetMaintenanceWindowTaskOutput, error) { req, out := c.GetMaintenanceWindowTaskRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetOpsItem = "GetOpsItem" // GetOpsItemRequest generates a "aws/request.Request" representing the // client's request for the GetOpsItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetOpsItem for more information on using the GetOpsItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetOpsItemRequest method. // req, resp := client.GetOpsItemRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsItem func (c *SSM) GetOpsItemRequest(input *GetOpsItemInput) (req *request.Request, output *GetOpsItemOutput) { op := &request.Operation{ Name: opGetOpsItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetOpsItemInput{} } output = &GetOpsItemOutput{} req = c.newRequest(op, input, output) return } // GetOpsItem API operation for Amazon Simple Systems Manager (SSM). // // Get information about an OpsItem by using the ID. You must have permission // in Identity and Access Management (IAM) to view information about an OpsItem. // For more information, see Set up OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html) // in the Amazon Web Services Systems Manager User Guide. // // Operations engineers and IT professionals use Amazon Web Services Systems // Manager OpsCenter to view, investigate, and remediate operational issues // impacting the performance and health of their Amazon Web Services resources. // For more information, see OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the Amazon Web Services Systems Manager 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 Simple Systems Manager (SSM)'s // API operation GetOpsItem for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - OpsItemNotFoundException // The specified OpsItem ID doesn't exist. Verify the ID and try again. // // - OpsItemAccessDeniedException // You don't have permission to view OpsItems in the specified account. Verify // that your account is configured either as a Systems Manager delegated administrator // or that you are logged into the Organizations management account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsItem func (c *SSM) GetOpsItem(input *GetOpsItemInput) (*GetOpsItemOutput, error) { req, out := c.GetOpsItemRequest(input) return out, req.Send() } // GetOpsItemWithContext is the same as GetOpsItem with the addition of // the ability to pass a context and additional request options. // // See GetOpsItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetOpsItemWithContext(ctx aws.Context, input *GetOpsItemInput, opts ...request.Option) (*GetOpsItemOutput, error) { req, out := c.GetOpsItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetOpsMetadata = "GetOpsMetadata" // GetOpsMetadataRequest generates a "aws/request.Request" representing the // client's request for the GetOpsMetadata operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetOpsMetadata for more information on using the GetOpsMetadata // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetOpsMetadataRequest method. // req, resp := client.GetOpsMetadataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsMetadata func (c *SSM) GetOpsMetadataRequest(input *GetOpsMetadataInput) (req *request.Request, output *GetOpsMetadataOutput) { op := &request.Operation{ Name: opGetOpsMetadata, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetOpsMetadataInput{} } output = &GetOpsMetadataOutput{} req = c.newRequest(op, input, output) return } // GetOpsMetadata API operation for Amazon Simple Systems Manager (SSM). // // View operational metadata related to an application in Application Manager. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetOpsMetadata for usage and error information. // // Returned Error Types: // // - OpsMetadataNotFoundException // The OpsMetadata object doesn't exist. // // - OpsMetadataInvalidArgumentException // One of the arguments passed is invalid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsMetadata func (c *SSM) GetOpsMetadata(input *GetOpsMetadataInput) (*GetOpsMetadataOutput, error) { req, out := c.GetOpsMetadataRequest(input) return out, req.Send() } // GetOpsMetadataWithContext is the same as GetOpsMetadata with the addition of // the ability to pass a context and additional request options. // // See GetOpsMetadata for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetOpsMetadataWithContext(ctx aws.Context, input *GetOpsMetadataInput, opts ...request.Option) (*GetOpsMetadataOutput, error) { req, out := c.GetOpsMetadataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetOpsSummary = "GetOpsSummary" // GetOpsSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetOpsSummary operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetOpsSummary for more information on using the GetOpsSummary // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetOpsSummaryRequest method. // req, resp := client.GetOpsSummaryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsSummary func (c *SSM) GetOpsSummaryRequest(input *GetOpsSummaryInput) (req *request.Request, output *GetOpsSummaryOutput) { op := &request.Operation{ Name: opGetOpsSummary, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &GetOpsSummaryInput{} } output = &GetOpsSummaryOutput{} req = c.newRequest(op, input, output) return } // GetOpsSummary API operation for Amazon Simple Systems Manager (SSM). // // View a summary of operations metadata (OpsData) based on specified filters // and aggregators. OpsData can include information about Amazon Web Services // Systems Manager OpsCenter operational workitems (OpsItems) as well as information // about any Amazon Web Services resource or service configured to report OpsData // to Amazon Web Services Systems Manager Explorer. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetOpsSummary for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ResourceDataSyncNotFoundException // The specified sync name wasn't found. // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidNextToken // The specified token isn't valid. // // - InvalidTypeNameException // The parameter type name isn't valid. // // - InvalidAggregatorException // The specified aggregator isn't valid for inventory groups. Verify that the // aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetOpsSummary func (c *SSM) GetOpsSummary(input *GetOpsSummaryInput) (*GetOpsSummaryOutput, error) { req, out := c.GetOpsSummaryRequest(input) return out, req.Send() } // GetOpsSummaryWithContext is the same as GetOpsSummary with the addition of // the ability to pass a context and additional request options. // // See GetOpsSummary for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetOpsSummaryWithContext(ctx aws.Context, input *GetOpsSummaryInput, opts ...request.Option) (*GetOpsSummaryOutput, error) { req, out := c.GetOpsSummaryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // GetOpsSummaryPages iterates over the pages of a GetOpsSummary operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See GetOpsSummary 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 GetOpsSummary operation. // pageNum := 0 // err := client.GetOpsSummaryPages(params, // func(page *ssm.GetOpsSummaryOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) GetOpsSummaryPages(input *GetOpsSummaryInput, fn func(*GetOpsSummaryOutput, bool) bool) error { return c.GetOpsSummaryPagesWithContext(aws.BackgroundContext(), input, fn) } // GetOpsSummaryPagesWithContext same as GetOpsSummaryPages 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 *SSM) GetOpsSummaryPagesWithContext(ctx aws.Context, input *GetOpsSummaryInput, fn func(*GetOpsSummaryOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *GetOpsSummaryInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetOpsSummaryRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*GetOpsSummaryOutput), !p.HasNextPage()) { break } } return p.Err() } const opGetParameter = "GetParameter" // GetParameterRequest generates a "aws/request.Request" representing the // client's request for the GetParameter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetParameter for more information on using the GetParameter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetParameterRequest method. // req, resp := client.GetParameterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameter func (c *SSM) GetParameterRequest(input *GetParameterInput) (req *request.Request, output *GetParameterOutput) { op := &request.Operation{ Name: opGetParameter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetParameterInput{} } output = &GetParameterOutput{} req = c.newRequest(op, input, output) return } // GetParameter API operation for Amazon Simple Systems Manager (SSM). // // Get information about a single parameter by specifying the parameter name. // // To get information about more than one parameter at a time, use the GetParameters // 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 Simple Systems Manager (SSM)'s // API operation GetParameter for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidKeyId // The query key ID isn't valid. // // - ParameterNotFound // The parameter couldn't be found. Verify the name and try again. // // - ParameterVersionNotFound // The specified parameter version wasn't found. Verify the parameter name and // version, and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameter func (c *SSM) GetParameter(input *GetParameterInput) (*GetParameterOutput, error) { req, out := c.GetParameterRequest(input) return out, req.Send() } // GetParameterWithContext is the same as GetParameter with the addition of // the ability to pass a context and additional request options. // // See GetParameter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetParameterWithContext(ctx aws.Context, input *GetParameterInput, opts ...request.Option) (*GetParameterOutput, error) { req, out := c.GetParameterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetParameterHistory = "GetParameterHistory" // GetParameterHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetParameterHistory operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetParameterHistory for more information on using the GetParameterHistory // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetParameterHistoryRequest method. // req, resp := client.GetParameterHistoryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameterHistory func (c *SSM) GetParameterHistoryRequest(input *GetParameterHistoryInput) (req *request.Request, output *GetParameterHistoryOutput) { op := &request.Operation{ Name: opGetParameterHistory, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &GetParameterHistoryInput{} } output = &GetParameterHistoryOutput{} req = c.newRequest(op, input, output) return } // GetParameterHistory API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the history of all changes to a parameter. // // If you change the KMS key alias for the KMS key used to encrypt a parameter, // then you must also update the key alias the parameter uses to reference KMS. // Otherwise, GetParameterHistory retrieves whatever the original key alias // was referencing. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetParameterHistory for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ParameterNotFound // The parameter couldn't be found. Verify the name and try again. // // - InvalidNextToken // The specified token isn't valid. // // - InvalidKeyId // The query key ID isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameterHistory func (c *SSM) GetParameterHistory(input *GetParameterHistoryInput) (*GetParameterHistoryOutput, error) { req, out := c.GetParameterHistoryRequest(input) return out, req.Send() } // GetParameterHistoryWithContext is the same as GetParameterHistory with the addition of // the ability to pass a context and additional request options. // // See GetParameterHistory for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetParameterHistoryWithContext(ctx aws.Context, input *GetParameterHistoryInput, opts ...request.Option) (*GetParameterHistoryOutput, error) { req, out := c.GetParameterHistoryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // GetParameterHistoryPages iterates over the pages of a GetParameterHistory operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See GetParameterHistory 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 GetParameterHistory operation. // pageNum := 0 // err := client.GetParameterHistoryPages(params, // func(page *ssm.GetParameterHistoryOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) GetParameterHistoryPages(input *GetParameterHistoryInput, fn func(*GetParameterHistoryOutput, bool) bool) error { return c.GetParameterHistoryPagesWithContext(aws.BackgroundContext(), input, fn) } // GetParameterHistoryPagesWithContext same as GetParameterHistoryPages 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 *SSM) GetParameterHistoryPagesWithContext(ctx aws.Context, input *GetParameterHistoryInput, fn func(*GetParameterHistoryOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *GetParameterHistoryInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetParameterHistoryRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*GetParameterHistoryOutput), !p.HasNextPage()) { break } } return p.Err() } const opGetParameters = "GetParameters" // GetParametersRequest generates a "aws/request.Request" representing the // client's request for the GetParameters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetParameters for more information on using the GetParameters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetParametersRequest method. // req, resp := client.GetParametersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameters func (c *SSM) GetParametersRequest(input *GetParametersInput) (req *request.Request, output *GetParametersOutput) { op := &request.Operation{ Name: opGetParameters, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetParametersInput{} } output = &GetParametersOutput{} req = c.newRequest(op, input, output) return } // GetParameters API operation for Amazon Simple Systems Manager (SSM). // // Get information about one or more parameters by specifying multiple parameter // names. // // To get information about a single parameter, you can use the GetParameter // operation 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 // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetParameters for usage and error information. // // Returned Error Types: // // - InvalidKeyId // The query key ID isn't valid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameters func (c *SSM) GetParameters(input *GetParametersInput) (*GetParametersOutput, error) { req, out := c.GetParametersRequest(input) return out, req.Send() } // GetParametersWithContext is the same as GetParameters with the addition of // the ability to pass a context and additional request options. // // See GetParameters for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetParametersWithContext(ctx aws.Context, input *GetParametersInput, opts ...request.Option) (*GetParametersOutput, error) { req, out := c.GetParametersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetParametersByPath = "GetParametersByPath" // GetParametersByPathRequest generates a "aws/request.Request" representing the // client's request for the GetParametersByPath operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetParametersByPath for more information on using the GetParametersByPath // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetParametersByPathRequest method. // req, resp := client.GetParametersByPathRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParametersByPath func (c *SSM) GetParametersByPathRequest(input *GetParametersByPathInput) (req *request.Request, output *GetParametersByPathOutput) { op := &request.Operation{ Name: opGetParametersByPath, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &GetParametersByPathInput{} } output = &GetParametersByPathOutput{} req = c.newRequest(op, input, output) return } // GetParametersByPath API operation for Amazon Simple Systems Manager (SSM). // // Retrieve information about one or more parameters in a specific hierarchy. // // Request results are returned on a best-effort basis. If you specify MaxResults // in the request, the response includes information up to the limit specified. // The number of items returned, however, can be between zero and the value // of MaxResults. If the service reaches an internal limit while processing // the results, it stops the operation and returns the matching values up to // that point and a NextToken. You can specify the NextToken in a subsequent // call to get the next set of 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 Simple Systems Manager (SSM)'s // API operation GetParametersByPath for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidFilterKey // The specified key isn't valid. // // - InvalidFilterOption // The specified filter option isn't valid. Valid options are Equals and BeginsWith. // For Path filter, valid options are Recursive and OneLevel. // // - InvalidFilterValue // The filter value isn't valid. Verify the value and try again. // // - InvalidKeyId // The query key ID isn't valid. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParametersByPath func (c *SSM) GetParametersByPath(input *GetParametersByPathInput) (*GetParametersByPathOutput, error) { req, out := c.GetParametersByPathRequest(input) return out, req.Send() } // GetParametersByPathWithContext is the same as GetParametersByPath with the addition of // the ability to pass a context and additional request options. // // See GetParametersByPath for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetParametersByPathWithContext(ctx aws.Context, input *GetParametersByPathInput, opts ...request.Option) (*GetParametersByPathOutput, error) { req, out := c.GetParametersByPathRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // GetParametersByPathPages iterates over the pages of a GetParametersByPath operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See GetParametersByPath 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 GetParametersByPath operation. // pageNum := 0 // err := client.GetParametersByPathPages(params, // func(page *ssm.GetParametersByPathOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) GetParametersByPathPages(input *GetParametersByPathInput, fn func(*GetParametersByPathOutput, bool) bool) error { return c.GetParametersByPathPagesWithContext(aws.BackgroundContext(), input, fn) } // GetParametersByPathPagesWithContext same as GetParametersByPathPages 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 *SSM) GetParametersByPathPagesWithContext(ctx aws.Context, input *GetParametersByPathInput, fn func(*GetParametersByPathOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *GetParametersByPathInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetParametersByPathRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*GetParametersByPathOutput), !p.HasNextPage()) { break } } return p.Err() } const opGetPatchBaseline = "GetPatchBaseline" // GetPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the GetPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetPatchBaseline for more information on using the GetPatchBaseline // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetPatchBaselineRequest method. // req, resp := client.GetPatchBaselineRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaseline func (c *SSM) GetPatchBaselineRequest(input *GetPatchBaselineInput) (req *request.Request, output *GetPatchBaselineOutput) { op := &request.Operation{ Name: opGetPatchBaseline, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetPatchBaselineInput{} } output = &GetPatchBaselineOutput{} req = c.newRequest(op, input, output) return } // GetPatchBaseline API operation for Amazon Simple Systems Manager (SSM). // // Retrieves information about a patch baseline. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetPatchBaseline for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaseline func (c *SSM) GetPatchBaseline(input *GetPatchBaselineInput) (*GetPatchBaselineOutput, error) { req, out := c.GetPatchBaselineRequest(input) return out, req.Send() } // GetPatchBaselineWithContext is the same as GetPatchBaseline with the addition of // the ability to pass a context and additional request options. // // See GetPatchBaseline for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetPatchBaselineWithContext(ctx aws.Context, input *GetPatchBaselineInput, opts ...request.Option) (*GetPatchBaselineOutput, error) { req, out := c.GetPatchBaselineRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetPatchBaselineForPatchGroup = "GetPatchBaselineForPatchGroup" // GetPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the GetPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetPatchBaselineForPatchGroup for more information on using the GetPatchBaselineForPatchGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetPatchBaselineForPatchGroupRequest method. // req, resp := client.GetPatchBaselineForPatchGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaselineForPatchGroup func (c *SSM) GetPatchBaselineForPatchGroupRequest(input *GetPatchBaselineForPatchGroupInput) (req *request.Request, output *GetPatchBaselineForPatchGroupOutput) { op := &request.Operation{ Name: opGetPatchBaselineForPatchGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetPatchBaselineForPatchGroupInput{} } output = &GetPatchBaselineForPatchGroupOutput{} req = c.newRequest(op, input, output) return } // GetPatchBaselineForPatchGroup API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the patch baseline that should be used for the specified patch // group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation GetPatchBaselineForPatchGroup for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetPatchBaselineForPatchGroup func (c *SSM) GetPatchBaselineForPatchGroup(input *GetPatchBaselineForPatchGroupInput) (*GetPatchBaselineForPatchGroupOutput, error) { req, out := c.GetPatchBaselineForPatchGroupRequest(input) return out, req.Send() } // GetPatchBaselineForPatchGroupWithContext is the same as GetPatchBaselineForPatchGroup with the addition of // the ability to pass a context and additional request options. // // See GetPatchBaselineForPatchGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetPatchBaselineForPatchGroupWithContext(ctx aws.Context, input *GetPatchBaselineForPatchGroupInput, opts ...request.Option) (*GetPatchBaselineForPatchGroupOutput, error) { req, out := c.GetPatchBaselineForPatchGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetResourcePolicies = "GetResourcePolicies" // GetResourcePoliciesRequest generates a "aws/request.Request" representing the // client's request for the GetResourcePolicies operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetResourcePolicies for more information on using the GetResourcePolicies // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetResourcePoliciesRequest method. // req, resp := client.GetResourcePoliciesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetResourcePolicies func (c *SSM) GetResourcePoliciesRequest(input *GetResourcePoliciesInput) (req *request.Request, output *GetResourcePoliciesOutput) { op := &request.Operation{ Name: opGetResourcePolicies, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &GetResourcePoliciesInput{} } output = &GetResourcePoliciesOutput{} req = c.newRequest(op, input, output) return } // GetResourcePolicies API operation for Amazon Simple Systems Manager (SSM). // // Returns an array of the Policy 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 Systems Manager (SSM)'s // API operation GetResourcePolicies for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ResourcePolicyInvalidParameterException // One or more parameters specified for the call aren't valid. Verify the parameters // and their values and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetResourcePolicies func (c *SSM) GetResourcePolicies(input *GetResourcePoliciesInput) (*GetResourcePoliciesOutput, error) { req, out := c.GetResourcePoliciesRequest(input) return out, req.Send() } // GetResourcePoliciesWithContext is the same as GetResourcePolicies with the addition of // the ability to pass a context and additional request options. // // See GetResourcePolicies for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetResourcePoliciesWithContext(ctx aws.Context, input *GetResourcePoliciesInput, opts ...request.Option) (*GetResourcePoliciesOutput, error) { req, out := c.GetResourcePoliciesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // GetResourcePoliciesPages iterates over the pages of a GetResourcePolicies operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See GetResourcePolicies 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 GetResourcePolicies operation. // pageNum := 0 // err := client.GetResourcePoliciesPages(params, // func(page *ssm.GetResourcePoliciesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) GetResourcePoliciesPages(input *GetResourcePoliciesInput, fn func(*GetResourcePoliciesOutput, bool) bool) error { return c.GetResourcePoliciesPagesWithContext(aws.BackgroundContext(), input, fn) } // GetResourcePoliciesPagesWithContext same as GetResourcePoliciesPages 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 *SSM) GetResourcePoliciesPagesWithContext(ctx aws.Context, input *GetResourcePoliciesInput, fn func(*GetResourcePoliciesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *GetResourcePoliciesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetResourcePoliciesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*GetResourcePoliciesOutput), !p.HasNextPage()) { break } } return p.Err() } const opGetServiceSetting = "GetServiceSetting" // GetServiceSettingRequest generates a "aws/request.Request" representing the // client's request for the GetServiceSetting operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetServiceSetting for more information on using the GetServiceSetting // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetServiceSettingRequest method. // req, resp := client.GetServiceSettingRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetServiceSetting func (c *SSM) GetServiceSettingRequest(input *GetServiceSettingInput) (req *request.Request, output *GetServiceSettingOutput) { op := &request.Operation{ Name: opGetServiceSetting, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetServiceSettingInput{} } output = &GetServiceSettingOutput{} req = c.newRequest(op, input, output) return } // GetServiceSetting API operation for Amazon Simple Systems Manager (SSM). // // ServiceSetting is an account-level setting for an Amazon Web Services service. // This setting defines how a user interacts with or uses a service or a feature // of a service. For example, if an Amazon Web Services service charges money // to the account based on feature or service usage, then the Amazon Web Services // service team might create a default setting of false. This means the user // can't use this feature unless they change the setting to true and intentionally // opt in for a paid feature. // // Services map a SettingId object to a setting value. Amazon Web Services services // teams define the default value for a SettingId. You can't create a new SettingId, // but you can overwrite the default value if you have the ssm:UpdateServiceSetting // permission for the setting. Use the UpdateServiceSetting API operation to // change the default setting. Or use the ResetServiceSetting to change the // value back to the original value defined by the Amazon Web Services service // team. // // Query the current service setting for the Amazon Web Services 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 Simple Systems Manager (SSM)'s // API operation GetServiceSetting for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ServiceSettingNotFound // The specified service setting wasn't found. Either the service name or the // setting hasn't been provisioned by the Amazon Web Services service team. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetServiceSetting func (c *SSM) GetServiceSetting(input *GetServiceSettingInput) (*GetServiceSettingOutput, error) { req, out := c.GetServiceSettingRequest(input) return out, req.Send() } // GetServiceSettingWithContext is the same as GetServiceSetting with the addition of // the ability to pass a context and additional request options. // // See GetServiceSetting for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) GetServiceSettingWithContext(ctx aws.Context, input *GetServiceSettingInput, opts ...request.Option) (*GetServiceSettingOutput, error) { req, out := c.GetServiceSettingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opLabelParameterVersion = "LabelParameterVersion" // LabelParameterVersionRequest generates a "aws/request.Request" representing the // client's request for the LabelParameterVersion operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See LabelParameterVersion for more information on using the LabelParameterVersion // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the LabelParameterVersionRequest method. // req, resp := client.LabelParameterVersionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/LabelParameterVersion func (c *SSM) LabelParameterVersionRequest(input *LabelParameterVersionInput) (req *request.Request, output *LabelParameterVersionOutput) { op := &request.Operation{ Name: opLabelParameterVersion, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &LabelParameterVersionInput{} } output = &LabelParameterVersionOutput{} req = c.newRequest(op, input, output) return } // LabelParameterVersion API operation for Amazon Simple Systems Manager (SSM). // // A parameter label is a user-defined alias to help you manage different versions // of a parameter. When you modify a parameter, Amazon Web Services Systems // Manager automatically saves a new version and increments the version number // by one. A label can help you remember the purpose of a parameter when there // are multiple versions. // // Parameter labels have the following requirements and restrictions. // // - A version of a parameter can have a maximum of 10 labels. // // - You can't attach the same label to different versions of the same parameter. // For example, if version 1 has the label Production, then you can't attach // Production to version 2. // // - You can move a label from one version of a parameter to another. // // - You can't create a label when you create a new parameter. You must attach // a label to a specific version of a parameter. // // - If you no longer want to use a parameter label, then you can either // delete it or move it to a different version of a parameter. // // - A label can have a maximum of 100 characters. // // - Labels can contain letters (case sensitive), numbers, periods (.), hyphens // (-), or underscores (_). // // - Labels can't begin with a number, "aws" or "ssm" (not case sensitive). // If a label fails to meet these requirements, then the label isn't associated // with a parameter and the system displays it in the list of InvalidLabels. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation LabelParameterVersion for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // - ParameterNotFound // The parameter couldn't be found. Verify the name and try again. // // - ParameterVersionNotFound // The specified parameter version wasn't found. Verify the parameter name and // version, and try again. // // - ParameterVersionLabelLimitExceeded // A parameter version can have a maximum of ten labels. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/LabelParameterVersion func (c *SSM) LabelParameterVersion(input *LabelParameterVersionInput) (*LabelParameterVersionOutput, error) { req, out := c.LabelParameterVersionRequest(input) return out, req.Send() } // LabelParameterVersionWithContext is the same as LabelParameterVersion with the addition of // the ability to pass a context and additional request options. // // See LabelParameterVersion for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) LabelParameterVersionWithContext(ctx aws.Context, input *LabelParameterVersionInput, opts ...request.Option) (*LabelParameterVersionOutput, error) { req, out := c.LabelParameterVersionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListAssociationVersions = "ListAssociationVersions" // ListAssociationVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListAssociationVersions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListAssociationVersions for more information on using the ListAssociationVersions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListAssociationVersionsRequest method. // req, resp := client.ListAssociationVersionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociationVersions func (c *SSM) ListAssociationVersionsRequest(input *ListAssociationVersionsInput) (req *request.Request, output *ListAssociationVersionsOutput) { op := &request.Operation{ Name: opListAssociationVersions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListAssociationVersionsInput{} } output = &ListAssociationVersionsOutput{} req = c.newRequest(op, input, output) return } // ListAssociationVersions API operation for Amazon Simple Systems Manager (SSM). // // Retrieves all versions of an association for a specific association 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 Simple Systems Manager (SSM)'s // API operation ListAssociationVersions for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidNextToken // The specified token isn't valid. // // - AssociationDoesNotExist // The specified association doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociationVersions func (c *SSM) ListAssociationVersions(input *ListAssociationVersionsInput) (*ListAssociationVersionsOutput, error) { req, out := c.ListAssociationVersionsRequest(input) return out, req.Send() } // ListAssociationVersionsWithContext is the same as ListAssociationVersions with the addition of // the ability to pass a context and additional request options. // // See ListAssociationVersions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListAssociationVersionsWithContext(ctx aws.Context, input *ListAssociationVersionsInput, opts ...request.Option) (*ListAssociationVersionsOutput, error) { req, out := c.ListAssociationVersionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListAssociationVersionsPages iterates over the pages of a ListAssociationVersions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListAssociationVersions 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 ListAssociationVersions operation. // pageNum := 0 // err := client.ListAssociationVersionsPages(params, // func(page *ssm.ListAssociationVersionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListAssociationVersionsPages(input *ListAssociationVersionsInput, fn func(*ListAssociationVersionsOutput, bool) bool) error { return c.ListAssociationVersionsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListAssociationVersionsPagesWithContext same as ListAssociationVersionsPages 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 *SSM) ListAssociationVersionsPagesWithContext(ctx aws.Context, input *ListAssociationVersionsInput, fn func(*ListAssociationVersionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListAssociationVersionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListAssociationVersionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListAssociationVersionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListAssociations = "ListAssociations" // ListAssociationsRequest generates a "aws/request.Request" representing the // client's request for the ListAssociations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListAssociations for more information on using the ListAssociations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListAssociationsRequest method. // req, resp := client.ListAssociationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociations func (c *SSM) ListAssociationsRequest(input *ListAssociationsInput) (req *request.Request, output *ListAssociationsOutput) { op := &request.Operation{ Name: opListAssociations, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListAssociationsInput{} } output = &ListAssociationsOutput{} req = c.newRequest(op, input, output) return } // ListAssociations API operation for Amazon Simple Systems Manager (SSM). // // Returns all State Manager associations in the current Amazon Web Services // account and Amazon Web Services Region. You can limit the results to a specific // State Manager association document or managed node by specifying a filter. // State Manager is a capability of Amazon Web Services Systems Manager. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListAssociations for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListAssociations func (c *SSM) ListAssociations(input *ListAssociationsInput) (*ListAssociationsOutput, error) { req, out := c.ListAssociationsRequest(input) return out, req.Send() } // ListAssociationsWithContext is the same as ListAssociations with the addition of // the ability to pass a context and additional request options. // // See ListAssociations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListAssociationsWithContext(ctx aws.Context, input *ListAssociationsInput, opts ...request.Option) (*ListAssociationsOutput, error) { req, out := c.ListAssociationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListAssociationsPages iterates over the pages of a ListAssociations operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListAssociations 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 ListAssociations operation. // pageNum := 0 // err := client.ListAssociationsPages(params, // func(page *ssm.ListAssociationsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListAssociationsPages(input *ListAssociationsInput, fn func(*ListAssociationsOutput, bool) bool) error { return c.ListAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListAssociationsPagesWithContext same as ListAssociationsPages 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 *SSM) ListAssociationsPagesWithContext(ctx aws.Context, input *ListAssociationsInput, fn func(*ListAssociationsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListAssociationsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListAssociationsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListAssociationsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListCommandInvocations = "ListCommandInvocations" // ListCommandInvocationsRequest generates a "aws/request.Request" representing the // client's request for the ListCommandInvocations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListCommandInvocations for more information on using the ListCommandInvocations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListCommandInvocationsRequest method. // req, resp := client.ListCommandInvocationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommandInvocations func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) (req *request.Request, output *ListCommandInvocationsOutput) { op := &request.Operation{ Name: opListCommandInvocations, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListCommandInvocationsInput{} } output = &ListCommandInvocationsOutput{} req = c.newRequest(op, input, output) return } // ListCommandInvocations API operation for Amazon Simple Systems Manager (SSM). // // An invocation is copy of a command sent to a specific managed node. A command // can apply to one or more managed nodes. A command invocation applies to one // managed node. For example, if a user runs SendCommand against three managed // nodes, then a command invocation is created for each requested managed node // ID. ListCommandInvocations provide status about command 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 Amazon Simple Systems Manager (SSM)'s // API operation ListCommandInvocations for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidCommandId // The specified command ID isn't valid. Verify the ID and try again. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidFilterKey // The specified key isn't valid. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommandInvocations func (c *SSM) ListCommandInvocations(input *ListCommandInvocationsInput) (*ListCommandInvocationsOutput, error) { req, out := c.ListCommandInvocationsRequest(input) return out, req.Send() } // ListCommandInvocationsWithContext is the same as ListCommandInvocations with the addition of // the ability to pass a context and additional request options. // // See ListCommandInvocations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListCommandInvocationsWithContext(ctx aws.Context, input *ListCommandInvocationsInput, opts ...request.Option) (*ListCommandInvocationsOutput, error) { req, out := c.ListCommandInvocationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListCommandInvocationsPages iterates over the pages of a ListCommandInvocations operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListCommandInvocations 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 ListCommandInvocations operation. // pageNum := 0 // err := client.ListCommandInvocationsPages(params, // func(page *ssm.ListCommandInvocationsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListCommandInvocationsPages(input *ListCommandInvocationsInput, fn func(*ListCommandInvocationsOutput, bool) bool) error { return c.ListCommandInvocationsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListCommandInvocationsPagesWithContext same as ListCommandInvocationsPages 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 *SSM) ListCommandInvocationsPagesWithContext(ctx aws.Context, input *ListCommandInvocationsInput, fn func(*ListCommandInvocationsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListCommandInvocationsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListCommandInvocationsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListCommandInvocationsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListCommands = "ListCommands" // ListCommandsRequest generates a "aws/request.Request" representing the // client's request for the ListCommands operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListCommands for more information on using the ListCommands // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListCommandsRequest method. // req, resp := client.ListCommandsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommands func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Request, output *ListCommandsOutput) { op := &request.Operation{ Name: opListCommands, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListCommandsInput{} } output = &ListCommandsOutput{} req = c.newRequest(op, input, output) return } // ListCommands API operation for Amazon Simple Systems Manager (SSM). // // Lists the commands requested by users of the Amazon Web Services 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 Simple Systems Manager (SSM)'s // API operation ListCommands for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidCommandId // The specified command ID isn't valid. Verify the ID and try again. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidFilterKey // The specified key isn't valid. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListCommands func (c *SSM) ListCommands(input *ListCommandsInput) (*ListCommandsOutput, error) { req, out := c.ListCommandsRequest(input) return out, req.Send() } // ListCommandsWithContext is the same as ListCommands with the addition of // the ability to pass a context and additional request options. // // See ListCommands for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListCommandsWithContext(ctx aws.Context, input *ListCommandsInput, opts ...request.Option) (*ListCommandsOutput, error) { req, out := c.ListCommandsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListCommandsPages iterates over the pages of a ListCommands operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListCommands 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 ListCommands operation. // pageNum := 0 // err := client.ListCommandsPages(params, // func(page *ssm.ListCommandsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListCommandsPages(input *ListCommandsInput, fn func(*ListCommandsOutput, bool) bool) error { return c.ListCommandsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListCommandsPagesWithContext same as ListCommandsPages 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 *SSM) ListCommandsPagesWithContext(ctx aws.Context, input *ListCommandsInput, fn func(*ListCommandsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListCommandsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListCommandsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListCommandsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListComplianceItems = "ListComplianceItems" // ListComplianceItemsRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceItems operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListComplianceItems for more information on using the ListComplianceItems // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListComplianceItemsRequest method. // req, resp := client.ListComplianceItemsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceItems func (c *SSM) ListComplianceItemsRequest(input *ListComplianceItemsInput) (req *request.Request, output *ListComplianceItemsOutput) { op := &request.Operation{ Name: opListComplianceItems, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListComplianceItemsInput{} } output = &ListComplianceItemsOutput{} req = c.newRequest(op, input, output) return } // ListComplianceItems API operation for Amazon Simple Systems Manager (SSM). // // For a specified resource ID, this API operation returns a list of compliance // statuses for different resource types. Currently, you can only specify one // resource ID per call. List results depend on the criteria specified in the // filter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListComplianceItems for usage and error information. // // Returned Error Types: // // - InvalidResourceType // The resource type isn't valid. For example, if you are attempting to tag // an EC2 instance, the instance must be a registered managed node. // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - InternalServerError // An error occurred on the server side. // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceItems func (c *SSM) ListComplianceItems(input *ListComplianceItemsInput) (*ListComplianceItemsOutput, error) { req, out := c.ListComplianceItemsRequest(input) return out, req.Send() } // ListComplianceItemsWithContext is the same as ListComplianceItems with the addition of // the ability to pass a context and additional request options. // // See ListComplianceItems for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListComplianceItemsWithContext(ctx aws.Context, input *ListComplianceItemsInput, opts ...request.Option) (*ListComplianceItemsOutput, error) { req, out := c.ListComplianceItemsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListComplianceItemsPages iterates over the pages of a ListComplianceItems operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListComplianceItems 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 ListComplianceItems operation. // pageNum := 0 // err := client.ListComplianceItemsPages(params, // func(page *ssm.ListComplianceItemsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListComplianceItemsPages(input *ListComplianceItemsInput, fn func(*ListComplianceItemsOutput, bool) bool) error { return c.ListComplianceItemsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListComplianceItemsPagesWithContext same as ListComplianceItemsPages 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 *SSM) ListComplianceItemsPagesWithContext(ctx aws.Context, input *ListComplianceItemsInput, fn func(*ListComplianceItemsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListComplianceItemsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListComplianceItemsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListComplianceItemsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListComplianceSummaries = "ListComplianceSummaries" // ListComplianceSummariesRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceSummaries operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListComplianceSummaries for more information on using the ListComplianceSummaries // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListComplianceSummariesRequest method. // req, resp := client.ListComplianceSummariesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceSummaries func (c *SSM) ListComplianceSummariesRequest(input *ListComplianceSummariesInput) (req *request.Request, output *ListComplianceSummariesOutput) { op := &request.Operation{ Name: opListComplianceSummaries, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListComplianceSummariesInput{} } output = &ListComplianceSummariesOutput{} req = c.newRequest(op, input, output) return } // ListComplianceSummaries API operation for Amazon Simple Systems Manager (SSM). // // Returns a summary count of compliant and non-compliant resources for a compliance // type. For example, this call can return State Manager associations, patches, // or custom compliance types according to the filter criteria that you specify. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListComplianceSummaries for usage and error information. // // Returned Error Types: // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidNextToken // The specified token isn't valid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListComplianceSummaries func (c *SSM) ListComplianceSummaries(input *ListComplianceSummariesInput) (*ListComplianceSummariesOutput, error) { req, out := c.ListComplianceSummariesRequest(input) return out, req.Send() } // ListComplianceSummariesWithContext is the same as ListComplianceSummaries with the addition of // the ability to pass a context and additional request options. // // See ListComplianceSummaries for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListComplianceSummariesWithContext(ctx aws.Context, input *ListComplianceSummariesInput, opts ...request.Option) (*ListComplianceSummariesOutput, error) { req, out := c.ListComplianceSummariesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListComplianceSummariesPages iterates over the pages of a ListComplianceSummaries operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListComplianceSummaries 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 ListComplianceSummaries operation. // pageNum := 0 // err := client.ListComplianceSummariesPages(params, // func(page *ssm.ListComplianceSummariesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListComplianceSummariesPages(input *ListComplianceSummariesInput, fn func(*ListComplianceSummariesOutput, bool) bool) error { return c.ListComplianceSummariesPagesWithContext(aws.BackgroundContext(), input, fn) } // ListComplianceSummariesPagesWithContext same as ListComplianceSummariesPages 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 *SSM) ListComplianceSummariesPagesWithContext(ctx aws.Context, input *ListComplianceSummariesInput, fn func(*ListComplianceSummariesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListComplianceSummariesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListComplianceSummariesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListComplianceSummariesOutput), !p.HasNextPage()) { break } } return p.Err() } const opListDocumentMetadataHistory = "ListDocumentMetadataHistory" // ListDocumentMetadataHistoryRequest generates a "aws/request.Request" representing the // client's request for the ListDocumentMetadataHistory operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListDocumentMetadataHistory for more information on using the ListDocumentMetadataHistory // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListDocumentMetadataHistoryRequest method. // req, resp := client.ListDocumentMetadataHistoryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocumentMetadataHistory func (c *SSM) ListDocumentMetadataHistoryRequest(input *ListDocumentMetadataHistoryInput) (req *request.Request, output *ListDocumentMetadataHistoryOutput) { op := &request.Operation{ Name: opListDocumentMetadataHistory, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListDocumentMetadataHistoryInput{} } output = &ListDocumentMetadataHistoryOutput{} req = c.newRequest(op, input, output) return } // ListDocumentMetadataHistory API operation for Amazon Simple Systems Manager (SSM). // // Information about approval reviews for a version of a change template in // Change Manager. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListDocumentMetadataHistory for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocumentMetadataHistory func (c *SSM) ListDocumentMetadataHistory(input *ListDocumentMetadataHistoryInput) (*ListDocumentMetadataHistoryOutput, error) { req, out := c.ListDocumentMetadataHistoryRequest(input) return out, req.Send() } // ListDocumentMetadataHistoryWithContext is the same as ListDocumentMetadataHistory with the addition of // the ability to pass a context and additional request options. // // See ListDocumentMetadataHistory for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListDocumentMetadataHistoryWithContext(ctx aws.Context, input *ListDocumentMetadataHistoryInput, opts ...request.Option) (*ListDocumentMetadataHistoryOutput, error) { req, out := c.ListDocumentMetadataHistoryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListDocumentVersions = "ListDocumentVersions" // ListDocumentVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListDocumentVersions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListDocumentVersions for more information on using the ListDocumentVersions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListDocumentVersionsRequest method. // req, resp := client.ListDocumentVersionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocumentVersions func (c *SSM) ListDocumentVersionsRequest(input *ListDocumentVersionsInput) (req *request.Request, output *ListDocumentVersionsOutput) { op := &request.Operation{ Name: opListDocumentVersions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListDocumentVersionsInput{} } output = &ListDocumentVersionsOutput{} req = c.newRequest(op, input, output) return } // ListDocumentVersions API operation for Amazon Simple Systems Manager (SSM). // // List all versions for a document. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListDocumentVersions for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidNextToken // The specified token isn't valid. // // - InvalidDocument // The specified SSM document doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocumentVersions func (c *SSM) ListDocumentVersions(input *ListDocumentVersionsInput) (*ListDocumentVersionsOutput, error) { req, out := c.ListDocumentVersionsRequest(input) return out, req.Send() } // ListDocumentVersionsWithContext is the same as ListDocumentVersions with the addition of // the ability to pass a context and additional request options. // // See ListDocumentVersions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListDocumentVersionsWithContext(ctx aws.Context, input *ListDocumentVersionsInput, opts ...request.Option) (*ListDocumentVersionsOutput, error) { req, out := c.ListDocumentVersionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListDocumentVersionsPages iterates over the pages of a ListDocumentVersions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListDocumentVersions 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 ListDocumentVersions operation. // pageNum := 0 // err := client.ListDocumentVersionsPages(params, // func(page *ssm.ListDocumentVersionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListDocumentVersionsPages(input *ListDocumentVersionsInput, fn func(*ListDocumentVersionsOutput, bool) bool) error { return c.ListDocumentVersionsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListDocumentVersionsPagesWithContext same as ListDocumentVersionsPages 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 *SSM) ListDocumentVersionsPagesWithContext(ctx aws.Context, input *ListDocumentVersionsInput, fn func(*ListDocumentVersionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListDocumentVersionsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListDocumentVersionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListDocumentVersionsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListDocuments = "ListDocuments" // ListDocumentsRequest generates a "aws/request.Request" representing the // client's request for the ListDocuments operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListDocuments for more information on using the ListDocuments // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListDocumentsRequest method. // req, resp := client.ListDocumentsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocuments func (c *SSM) ListDocumentsRequest(input *ListDocumentsInput) (req *request.Request, output *ListDocumentsOutput) { op := &request.Operation{ Name: opListDocuments, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListDocumentsInput{} } output = &ListDocumentsOutput{} req = c.newRequest(op, input, output) return } // ListDocuments API operation for Amazon Simple Systems Manager (SSM). // // Returns all Systems Manager (SSM) documents in the current Amazon Web Services // account and Amazon Web Services Region. You can limit the results of this // request by using a filter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListDocuments for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidNextToken // The specified token isn't valid. // // - InvalidFilterKey // The specified key isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocuments func (c *SSM) ListDocuments(input *ListDocumentsInput) (*ListDocumentsOutput, error) { req, out := c.ListDocumentsRequest(input) return out, req.Send() } // ListDocumentsWithContext is the same as ListDocuments with the addition of // the ability to pass a context and additional request options. // // See ListDocuments for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListDocumentsWithContext(ctx aws.Context, input *ListDocumentsInput, opts ...request.Option) (*ListDocumentsOutput, error) { req, out := c.ListDocumentsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListDocumentsPages iterates over the pages of a ListDocuments operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListDocuments 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 ListDocuments operation. // pageNum := 0 // err := client.ListDocumentsPages(params, // func(page *ssm.ListDocumentsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListDocumentsPages(input *ListDocumentsInput, fn func(*ListDocumentsOutput, bool) bool) error { return c.ListDocumentsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListDocumentsPagesWithContext same as ListDocumentsPages 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 *SSM) ListDocumentsPagesWithContext(ctx aws.Context, input *ListDocumentsInput, fn func(*ListDocumentsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListDocumentsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListDocumentsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListDocumentsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListInventoryEntries = "ListInventoryEntries" // ListInventoryEntriesRequest generates a "aws/request.Request" representing the // client's request for the ListInventoryEntries operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListInventoryEntries for more information on using the ListInventoryEntries // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListInventoryEntriesRequest method. // req, resp := client.ListInventoryEntriesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListInventoryEntries func (c *SSM) ListInventoryEntriesRequest(input *ListInventoryEntriesInput) (req *request.Request, output *ListInventoryEntriesOutput) { op := &request.Operation{ Name: opListInventoryEntries, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListInventoryEntriesInput{} } output = &ListInventoryEntriesOutput{} req = c.newRequest(op, input, output) return } // ListInventoryEntries API operation for Amazon Simple Systems Manager (SSM). // // A list of inventory items returned by the request. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListInventoryEntries for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidTypeNameException // The parameter type name isn't valid. // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListInventoryEntries func (c *SSM) ListInventoryEntries(input *ListInventoryEntriesInput) (*ListInventoryEntriesOutput, error) { req, out := c.ListInventoryEntriesRequest(input) return out, req.Send() } // ListInventoryEntriesWithContext is the same as ListInventoryEntries with the addition of // the ability to pass a context and additional request options. // // See ListInventoryEntries for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListInventoryEntriesWithContext(ctx aws.Context, input *ListInventoryEntriesInput, opts ...request.Option) (*ListInventoryEntriesOutput, error) { req, out := c.ListInventoryEntriesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListOpsItemEvents = "ListOpsItemEvents" // ListOpsItemEventsRequest generates a "aws/request.Request" representing the // client's request for the ListOpsItemEvents operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListOpsItemEvents for more information on using the ListOpsItemEvents // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListOpsItemEventsRequest method. // req, resp := client.ListOpsItemEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListOpsItemEvents func (c *SSM) ListOpsItemEventsRequest(input *ListOpsItemEventsInput) (req *request.Request, output *ListOpsItemEventsOutput) { op := &request.Operation{ Name: opListOpsItemEvents, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListOpsItemEventsInput{} } output = &ListOpsItemEventsOutput{} req = c.newRequest(op, input, output) return } // ListOpsItemEvents API operation for Amazon Simple Systems Manager (SSM). // // Returns a list of all OpsItem events in the current Amazon Web Services Region // and Amazon Web Services account. You can limit the results to events associated // with specific OpsItems by specifying a filter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListOpsItemEvents for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - OpsItemNotFoundException // The specified OpsItem ID doesn't exist. Verify the ID and try again. // // - OpsItemLimitExceededException // The request caused OpsItems to exceed one or more quotas. // // - OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments // and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListOpsItemEvents func (c *SSM) ListOpsItemEvents(input *ListOpsItemEventsInput) (*ListOpsItemEventsOutput, error) { req, out := c.ListOpsItemEventsRequest(input) return out, req.Send() } // ListOpsItemEventsWithContext is the same as ListOpsItemEvents with the addition of // the ability to pass a context and additional request options. // // See ListOpsItemEvents for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListOpsItemEventsWithContext(ctx aws.Context, input *ListOpsItemEventsInput, opts ...request.Option) (*ListOpsItemEventsOutput, error) { req, out := c.ListOpsItemEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListOpsItemEventsPages iterates over the pages of a ListOpsItemEvents operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListOpsItemEvents 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 ListOpsItemEvents operation. // pageNum := 0 // err := client.ListOpsItemEventsPages(params, // func(page *ssm.ListOpsItemEventsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListOpsItemEventsPages(input *ListOpsItemEventsInput, fn func(*ListOpsItemEventsOutput, bool) bool) error { return c.ListOpsItemEventsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListOpsItemEventsPagesWithContext same as ListOpsItemEventsPages 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 *SSM) ListOpsItemEventsPagesWithContext(ctx aws.Context, input *ListOpsItemEventsInput, fn func(*ListOpsItemEventsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListOpsItemEventsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListOpsItemEventsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListOpsItemEventsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListOpsItemRelatedItems = "ListOpsItemRelatedItems" // ListOpsItemRelatedItemsRequest generates a "aws/request.Request" representing the // client's request for the ListOpsItemRelatedItems operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListOpsItemRelatedItems for more information on using the ListOpsItemRelatedItems // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListOpsItemRelatedItemsRequest method. // req, resp := client.ListOpsItemRelatedItemsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListOpsItemRelatedItems func (c *SSM) ListOpsItemRelatedItemsRequest(input *ListOpsItemRelatedItemsInput) (req *request.Request, output *ListOpsItemRelatedItemsOutput) { op := &request.Operation{ Name: opListOpsItemRelatedItems, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListOpsItemRelatedItemsInput{} } output = &ListOpsItemRelatedItemsOutput{} req = c.newRequest(op, input, output) return } // ListOpsItemRelatedItems API operation for Amazon Simple Systems Manager (SSM). // // Lists all related-item resources associated with a Systems Manager OpsCenter // OpsItem. OpsCenter is a capability of Amazon Web Services Systems Manager. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListOpsItemRelatedItems for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments // and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListOpsItemRelatedItems func (c *SSM) ListOpsItemRelatedItems(input *ListOpsItemRelatedItemsInput) (*ListOpsItemRelatedItemsOutput, error) { req, out := c.ListOpsItemRelatedItemsRequest(input) return out, req.Send() } // ListOpsItemRelatedItemsWithContext is the same as ListOpsItemRelatedItems with the addition of // the ability to pass a context and additional request options. // // See ListOpsItemRelatedItems for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListOpsItemRelatedItemsWithContext(ctx aws.Context, input *ListOpsItemRelatedItemsInput, opts ...request.Option) (*ListOpsItemRelatedItemsOutput, error) { req, out := c.ListOpsItemRelatedItemsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListOpsItemRelatedItemsPages iterates over the pages of a ListOpsItemRelatedItems operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListOpsItemRelatedItems 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 ListOpsItemRelatedItems operation. // pageNum := 0 // err := client.ListOpsItemRelatedItemsPages(params, // func(page *ssm.ListOpsItemRelatedItemsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListOpsItemRelatedItemsPages(input *ListOpsItemRelatedItemsInput, fn func(*ListOpsItemRelatedItemsOutput, bool) bool) error { return c.ListOpsItemRelatedItemsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListOpsItemRelatedItemsPagesWithContext same as ListOpsItemRelatedItemsPages 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 *SSM) ListOpsItemRelatedItemsPagesWithContext(ctx aws.Context, input *ListOpsItemRelatedItemsInput, fn func(*ListOpsItemRelatedItemsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListOpsItemRelatedItemsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListOpsItemRelatedItemsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListOpsItemRelatedItemsOutput), !p.HasNextPage()) { break } } return p.Err() } const opListOpsMetadata = "ListOpsMetadata" // ListOpsMetadataRequest generates a "aws/request.Request" representing the // client's request for the ListOpsMetadata operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListOpsMetadata for more information on using the ListOpsMetadata // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListOpsMetadataRequest method. // req, resp := client.ListOpsMetadataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListOpsMetadata func (c *SSM) ListOpsMetadataRequest(input *ListOpsMetadataInput) (req *request.Request, output *ListOpsMetadataOutput) { op := &request.Operation{ Name: opListOpsMetadata, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListOpsMetadataInput{} } output = &ListOpsMetadataOutput{} req = c.newRequest(op, input, output) return } // ListOpsMetadata API operation for Amazon Simple Systems Manager (SSM). // // Amazon Web Services Systems Manager calls this API operation when displaying // all Application Manager OpsMetadata objects or blobs. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListOpsMetadata for usage and error information. // // Returned Error Types: // // - OpsMetadataInvalidArgumentException // One of the arguments passed is invalid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListOpsMetadata func (c *SSM) ListOpsMetadata(input *ListOpsMetadataInput) (*ListOpsMetadataOutput, error) { req, out := c.ListOpsMetadataRequest(input) return out, req.Send() } // ListOpsMetadataWithContext is the same as ListOpsMetadata with the addition of // the ability to pass a context and additional request options. // // See ListOpsMetadata for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListOpsMetadataWithContext(ctx aws.Context, input *ListOpsMetadataInput, opts ...request.Option) (*ListOpsMetadataOutput, error) { req, out := c.ListOpsMetadataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListOpsMetadataPages iterates over the pages of a ListOpsMetadata operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListOpsMetadata 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 ListOpsMetadata operation. // pageNum := 0 // err := client.ListOpsMetadataPages(params, // func(page *ssm.ListOpsMetadataOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListOpsMetadataPages(input *ListOpsMetadataInput, fn func(*ListOpsMetadataOutput, bool) bool) error { return c.ListOpsMetadataPagesWithContext(aws.BackgroundContext(), input, fn) } // ListOpsMetadataPagesWithContext same as ListOpsMetadataPages 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 *SSM) ListOpsMetadataPagesWithContext(ctx aws.Context, input *ListOpsMetadataInput, fn func(*ListOpsMetadataOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListOpsMetadataInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListOpsMetadataRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListOpsMetadataOutput), !p.HasNextPage()) { break } } return p.Err() } const opListResourceComplianceSummaries = "ListResourceComplianceSummaries" // ListResourceComplianceSummariesRequest generates a "aws/request.Request" representing the // client's request for the ListResourceComplianceSummaries operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListResourceComplianceSummaries for more information on using the ListResourceComplianceSummaries // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListResourceComplianceSummariesRequest method. // req, resp := client.ListResourceComplianceSummariesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceComplianceSummaries func (c *SSM) ListResourceComplianceSummariesRequest(input *ListResourceComplianceSummariesInput) (req *request.Request, output *ListResourceComplianceSummariesOutput) { op := &request.Operation{ Name: opListResourceComplianceSummaries, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListResourceComplianceSummariesInput{} } output = &ListResourceComplianceSummariesOutput{} req = c.newRequest(op, input, output) return } // ListResourceComplianceSummaries API operation for Amazon Simple Systems Manager (SSM). // // Returns a resource-level summary count. The summary includes information // about compliant and non-compliant statuses and detailed compliance-item severity // counts, according to the filter criteria you specify. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListResourceComplianceSummaries for usage and error information. // // Returned Error Types: // // - InvalidFilter // The filter name isn't valid. Verify the you entered the correct name and // try again. // // - InvalidNextToken // The specified token isn't valid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceComplianceSummaries func (c *SSM) ListResourceComplianceSummaries(input *ListResourceComplianceSummariesInput) (*ListResourceComplianceSummariesOutput, error) { req, out := c.ListResourceComplianceSummariesRequest(input) return out, req.Send() } // ListResourceComplianceSummariesWithContext is the same as ListResourceComplianceSummaries with the addition of // the ability to pass a context and additional request options. // // See ListResourceComplianceSummaries for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListResourceComplianceSummariesWithContext(ctx aws.Context, input *ListResourceComplianceSummariesInput, opts ...request.Option) (*ListResourceComplianceSummariesOutput, error) { req, out := c.ListResourceComplianceSummariesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListResourceComplianceSummariesPages iterates over the pages of a ListResourceComplianceSummaries operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListResourceComplianceSummaries 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 ListResourceComplianceSummaries operation. // pageNum := 0 // err := client.ListResourceComplianceSummariesPages(params, // func(page *ssm.ListResourceComplianceSummariesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListResourceComplianceSummariesPages(input *ListResourceComplianceSummariesInput, fn func(*ListResourceComplianceSummariesOutput, bool) bool) error { return c.ListResourceComplianceSummariesPagesWithContext(aws.BackgroundContext(), input, fn) } // ListResourceComplianceSummariesPagesWithContext same as ListResourceComplianceSummariesPages 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 *SSM) ListResourceComplianceSummariesPagesWithContext(ctx aws.Context, input *ListResourceComplianceSummariesInput, fn func(*ListResourceComplianceSummariesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListResourceComplianceSummariesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListResourceComplianceSummariesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListResourceComplianceSummariesOutput), !p.HasNextPage()) { break } } return p.Err() } const opListResourceDataSync = "ListResourceDataSync" // ListResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the ListResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListResourceDataSync for more information on using the ListResourceDataSync // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListResourceDataSyncRequest method. // req, resp := client.ListResourceDataSyncRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceDataSync func (c *SSM) ListResourceDataSyncRequest(input *ListResourceDataSyncInput) (req *request.Request, output *ListResourceDataSyncOutput) { op := &request.Operation{ Name: opListResourceDataSync, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, LimitToken: "MaxResults", TruncationToken: "", }, } if input == nil { input = &ListResourceDataSyncInput{} } output = &ListResourceDataSyncOutput{} req = c.newRequest(op, input, output) return } // ListResourceDataSync API operation for Amazon Simple Systems Manager (SSM). // // Lists your resource data sync configurations. Includes information about // the last time a sync attempted to start, the last sync status, and the last // time a sync successfully completed. // // The number of sync configurations might be too large to return using a single // call to ListResourceDataSync. You can limit the number of sync configurations // returned by using the MaxResults parameter. To determine whether there are // more sync configurations to list, check the value of NextToken in the output. // If there are more sync configurations to list, you can request them by specifying // the NextToken returned in the call to the parameter of a subsequent 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 Amazon Simple Systems Manager (SSM)'s // API operation ListResourceDataSync for usage and error information. // // Returned Error Types: // // - ResourceDataSyncInvalidConfigurationException // The specified sync configuration is invalid. // // - InternalServerError // An error occurred on the server side. // // - InvalidNextToken // The specified token isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListResourceDataSync func (c *SSM) ListResourceDataSync(input *ListResourceDataSyncInput) (*ListResourceDataSyncOutput, error) { req, out := c.ListResourceDataSyncRequest(input) return out, req.Send() } // ListResourceDataSyncWithContext is the same as ListResourceDataSync with the addition of // the ability to pass a context and additional request options. // // See ListResourceDataSync for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ListResourceDataSyncWithContext(ctx aws.Context, input *ListResourceDataSyncInput, opts ...request.Option) (*ListResourceDataSyncOutput, error) { req, out := c.ListResourceDataSyncRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListResourceDataSyncPages iterates over the pages of a ListResourceDataSync operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListResourceDataSync 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 ListResourceDataSync operation. // pageNum := 0 // err := client.ListResourceDataSyncPages(params, // func(page *ssm.ListResourceDataSyncOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSM) ListResourceDataSyncPages(input *ListResourceDataSyncInput, fn func(*ListResourceDataSyncOutput, bool) bool) error { return c.ListResourceDataSyncPagesWithContext(aws.BackgroundContext(), input, fn) } // ListResourceDataSyncPagesWithContext same as ListResourceDataSyncPages 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 *SSM) ListResourceDataSyncPagesWithContext(ctx aws.Context, input *ListResourceDataSyncInput, fn func(*ListResourceDataSyncOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListResourceDataSyncInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListResourceDataSyncRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListResourceDataSyncOutput), !p.HasNextPage()) { break } } 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/ssm-2014-11-06/ListTagsForResource func (c *SSM) 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 Simple Systems Manager (SSM). // // Returns a list of the tags assigned to the specified resource. // // For information about the ID format for each supported resource type, see // AddTagsToResource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ListTagsForResource for usage and error information. // // Returned Error Types: // // - InvalidResourceType // The resource type isn't valid. For example, if you are attempting to tag // an EC2 instance, the instance must be a registered managed node. // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListTagsForResource func (c *SSM) 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 *SSM) 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 opModifyDocumentPermission = "ModifyDocumentPermission" // ModifyDocumentPermissionRequest generates a "aws/request.Request" representing the // client's request for the ModifyDocumentPermission operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ModifyDocumentPermission for more information on using the ModifyDocumentPermission // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ModifyDocumentPermissionRequest method. // req, resp := client.ModifyDocumentPermissionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ModifyDocumentPermission func (c *SSM) ModifyDocumentPermissionRequest(input *ModifyDocumentPermissionInput) (req *request.Request, output *ModifyDocumentPermissionOutput) { op := &request.Operation{ Name: opModifyDocumentPermission, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ModifyDocumentPermissionInput{} } output = &ModifyDocumentPermissionOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // ModifyDocumentPermission API operation for Amazon Simple Systems Manager (SSM). // // Shares a Amazon Web Services Systems Manager document (SSM document)publicly // or privately. If you share a document privately, you must specify the Amazon // Web Services user IDs for those people who can use the document. If you share // a document publicly, you must specify All as the account 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 Simple Systems Manager (SSM)'s // API operation ModifyDocumentPermission for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidPermissionType // The permission type isn't supported. Share is the only supported permission // type. // // - DocumentPermissionLimit // The document can't be shared with more Amazon Web Services accounts. You // can specify a maximum of 20 accounts per API operation to share a private // document. // // By default, you can share a private document with a maximum of 1,000 accounts // and publicly share up to five documents. // // If you need to increase the quota for privately or publicly shared Systems // Manager documents, contact Amazon Web Services Support. // // - DocumentLimitExceeded // You can have at most 500 active SSM documents. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ModifyDocumentPermission func (c *SSM) ModifyDocumentPermission(input *ModifyDocumentPermissionInput) (*ModifyDocumentPermissionOutput, error) { req, out := c.ModifyDocumentPermissionRequest(input) return out, req.Send() } // ModifyDocumentPermissionWithContext is the same as ModifyDocumentPermission with the addition of // the ability to pass a context and additional request options. // // See ModifyDocumentPermission for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ModifyDocumentPermissionWithContext(ctx aws.Context, input *ModifyDocumentPermissionInput, opts ...request.Option) (*ModifyDocumentPermissionOutput, error) { req, out := c.ModifyDocumentPermissionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutComplianceItems = "PutComplianceItems" // PutComplianceItemsRequest generates a "aws/request.Request" representing the // client's request for the PutComplianceItems operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See PutComplianceItems for more information on using the PutComplianceItems // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the PutComplianceItemsRequest method. // req, resp := client.PutComplianceItemsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutComplianceItems func (c *SSM) PutComplianceItemsRequest(input *PutComplianceItemsInput) (req *request.Request, output *PutComplianceItemsOutput) { op := &request.Operation{ Name: opPutComplianceItems, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutComplianceItemsInput{} } output = &PutComplianceItemsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutComplianceItems API operation for Amazon Simple Systems Manager (SSM). // // Registers a compliance type and other compliance details on a designated // resource. This operation lets you register custom compliance details with // a resource. This call overwrites existing compliance information on the resource, // so you must provide a full list of compliance items each time that you send // the request. // // ComplianceType can be one of the following: // // - ExecutionId: The execution ID when the patch, association, or custom // compliance item was applied. // // - ExecutionType: Specify patch, association, or Custom:string. // // - ExecutionTime. The time the patch, association, or custom compliance // item was applied to the managed node. // // - Id: The patch, association, or custom compliance ID. // // - Title: A title. // // - Status: The status of the compliance item. For example, approved for // patches, or Failed for associations. // // - Severity: A patch severity. For example, Critical. // // - DocumentName: An SSM document name. For example, AWS-RunPatchBaseline. // // - DocumentVersion: An SSM document version number. For example, 4. // // - Classification: A patch classification. For example, security updates. // // - PatchBaselineId: A patch baseline ID. // // - PatchSeverity: A patch severity. For example, Critical. // // - PatchState: A patch state. For example, InstancesWithFailedPatches. // // - PatchGroup: The name of a patch group. // // - InstalledTime: The time the association, patch, or custom compliance // item was applied to the resource. Specify the time by using the following // format: yyyy-MM-dd'T'HH:mm:ss'Z' // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation PutComplianceItems for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidItemContentException // One or more content items isn't valid. // // - TotalSizeLimitExceededException // The size of inventory data has exceeded the total size limit for the resource. // // - ItemSizeLimitExceededException // The inventory item size has exceeded the size limit. // // - ComplianceTypeCountLimitExceededException // You specified too many custom compliance types. You can specify a maximum // of 10 different types. // // - InvalidResourceType // The resource type isn't valid. For example, if you are attempting to tag // an EC2 instance, the instance must be a registered managed node. // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutComplianceItems func (c *SSM) PutComplianceItems(input *PutComplianceItemsInput) (*PutComplianceItemsOutput, error) { req, out := c.PutComplianceItemsRequest(input) return out, req.Send() } // PutComplianceItemsWithContext is the same as PutComplianceItems with the addition of // the ability to pass a context and additional request options. // // See PutComplianceItems for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) PutComplianceItemsWithContext(ctx aws.Context, input *PutComplianceItemsInput, opts ...request.Option) (*PutComplianceItemsOutput, error) { req, out := c.PutComplianceItemsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutInventory = "PutInventory" // PutInventoryRequest generates a "aws/request.Request" representing the // client's request for the PutInventory operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See PutInventory for more information on using the PutInventory // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the PutInventoryRequest method. // req, resp := client.PutInventoryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutInventory func (c *SSM) PutInventoryRequest(input *PutInventoryInput) (req *request.Request, output *PutInventoryOutput) { op := &request.Operation{ Name: opPutInventory, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutInventoryInput{} } output = &PutInventoryOutput{} req = c.newRequest(op, input, output) return } // PutInventory API operation for Amazon Simple Systems Manager (SSM). // // Bulk update custom inventory items on one or more managed nodes. The request // adds an inventory item, if it doesn't already exist, or updates an inventory // item, if it does 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 // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation PutInventory for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidTypeNameException // The parameter type name isn't valid. // // - InvalidItemContentException // One or more content items isn't valid. // // - TotalSizeLimitExceededException // The size of inventory data has exceeded the total size limit for the resource. // // - ItemSizeLimitExceededException // The inventory item size has exceeded the size limit. // // - ItemContentMismatchException // The inventory item has invalid content. // // - CustomSchemaCountLimitExceededException // You have exceeded the limit for custom schemas. Delete one or more custom // schemas and try again. // // - UnsupportedInventorySchemaVersionException // Inventory item type schema version has to match supported versions in the // service. Check output of GetInventorySchema to see the available schema version // for each type. // // - UnsupportedInventoryItemContextException // The Context attribute that you specified for the InventoryItem isn't allowed // for this inventory type. You can only use the Context attribute with inventory // types like AWS:ComplianceItem. // // - InvalidInventoryItemContextException // You specified invalid keys or values in the Context attribute for InventoryItem. // Verify the keys and values, and try again. // // - SubTypeCountLimitExceededException // The sub-type count exceeded the limit for the inventory type. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutInventory func (c *SSM) PutInventory(input *PutInventoryInput) (*PutInventoryOutput, error) { req, out := c.PutInventoryRequest(input) return out, req.Send() } // PutInventoryWithContext is the same as PutInventory with the addition of // the ability to pass a context and additional request options. // // See PutInventory for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) PutInventoryWithContext(ctx aws.Context, input *PutInventoryInput, opts ...request.Option) (*PutInventoryOutput, error) { req, out := c.PutInventoryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutParameter = "PutParameter" // PutParameterRequest generates a "aws/request.Request" representing the // client's request for the PutParameter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See PutParameter for more information on using the PutParameter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the PutParameterRequest method. // req, resp := client.PutParameterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutParameter func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Request, output *PutParameterOutput) { op := &request.Operation{ Name: opPutParameter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutParameterInput{} } output = &PutParameterOutput{} req = c.newRequest(op, input, output) return } // PutParameter API operation for Amazon Simple Systems Manager (SSM). // // Add a parameter to the 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 Amazon Simple Systems Manager (SSM)'s // API operation PutParameter for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidKeyId // The query key ID isn't valid. // // - ParameterLimitExceeded // You have exceeded the number of parameters for this Amazon Web Services account. // Delete one or more parameters and try again. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // - ParameterAlreadyExists // The parameter already exists. You can't create duplicate parameters. // // - HierarchyLevelLimitExceededException // A hierarchy can have a maximum of 15 levels. For more information, see Requirements // and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the Amazon Web Services Systems Manager User Guide. // // - HierarchyTypeMismatchException // Parameter Store doesn't support changing a parameter type in a hierarchy. // For example, you can't change a parameter from a String type to a SecureString // type. You must create a new, unique parameter. // // - InvalidAllowedPatternException // The request doesn't meet the regular expression requirement. // // - ParameterMaxVersionLimitExceeded // Parameter Store retains the 100 most recently created versions of a parameter. // After this number of versions has been created, Parameter Store deletes the // oldest version when a new one is created. However, if the oldest version // has a label attached to it, Parameter Store won't delete the version and // instead presents this error message: // // An error occurred (ParameterMaxVersionLimitExceeded) when calling the PutParameter // operation: You attempted to create a new version of parameter-name by calling // the PutParameter API with the overwrite flag. Version version-number, the // oldest version, can't be deleted because it has a label associated with it. // Move the label to another version of the parameter, and try again. // // This safeguard is to prevent parameter versions with mission critical labels // assigned to them from being deleted. To continue creating new parameters, // first move the label from the oldest version of the parameter to a newer // one for use in your operations. For information about moving parameter labels, // see Move a parameter label (console) (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html#sysman-paramstore-labels-console-move) // or Move a parameter label (CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html#sysman-paramstore-labels-cli-move) // in the Amazon Web Services Systems Manager User Guide. // // - ParameterPatternMismatchException // The parameter name isn't valid. // // - UnsupportedParameterType // The parameter type isn't supported. // // - PoliciesLimitExceededException // You specified more than the maximum number of allowed policies for the parameter. // The maximum is 10. // // - InvalidPolicyTypeException // The policy type isn't supported. Parameter Store supports the following policy // types: Expiration, ExpirationNotification, and NoChangeNotification. // // - InvalidPolicyAttributeException // A policy attribute or its value is invalid. // // - IncompatiblePolicyException // There is a conflict in the policies specified for this parameter. You can't, // for example, specify two Expiration policies for a parameter. Review your // policies, and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutParameter func (c *SSM) PutParameter(input *PutParameterInput) (*PutParameterOutput, error) { req, out := c.PutParameterRequest(input) return out, req.Send() } // PutParameterWithContext is the same as PutParameter with the addition of // the ability to pass a context and additional request options. // // See PutParameter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) PutParameterWithContext(ctx aws.Context, input *PutParameterInput, opts ...request.Option) (*PutParameterOutput, error) { req, out := c.PutParameterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) 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/ssm-2014-11-06/PutResourcePolicy func (c *SSM) 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 Amazon Simple Systems Manager (SSM). // // Creates or updates a Systems Manager resource policy. A resource policy helps // you to define the IAM entity (for example, an Amazon Web Services account) // that can manage your Systems Manager resources. Currently, OpsItemGroup is // the only resource that supports Systems Manager resource policies. The resource // policy for OpsItemGroup enables Amazon Web Services accounts to view and // interact with OpsCenter operational work items (OpsItems). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation PutResourcePolicy for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ResourcePolicyInvalidParameterException // One or more parameters specified for the call aren't valid. Verify the parameters // and their values and try again. // // - ResourcePolicyLimitExceededException // The PutResourcePolicy API action enforces two limits. A policy can't be greater // than 1024 bytes in size. And only one policy can be attached to OpsItemGroup. // Verify these limits and try again. // // - ResourcePolicyConflictException // The hash provided in the call doesn't match the stored hash. This exception // is thrown when trying to update an obsolete policy version or when multiple // requests to update a policy are sent. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/PutResourcePolicy func (c *SSM) 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 *SSM) 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 opRegisterDefaultPatchBaseline = "RegisterDefaultPatchBaseline" // RegisterDefaultPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the RegisterDefaultPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See RegisterDefaultPatchBaseline for more information on using the RegisterDefaultPatchBaseline // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the RegisterDefaultPatchBaselineRequest method. // req, resp := client.RegisterDefaultPatchBaselineRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterDefaultPatchBaseline func (c *SSM) RegisterDefaultPatchBaselineRequest(input *RegisterDefaultPatchBaselineInput) (req *request.Request, output *RegisterDefaultPatchBaselineOutput) { op := &request.Operation{ Name: opRegisterDefaultPatchBaseline, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &RegisterDefaultPatchBaselineInput{} } output = &RegisterDefaultPatchBaselineOutput{} req = c.newRequest(op, input, output) return } // RegisterDefaultPatchBaseline API operation for Amazon Simple Systems Manager (SSM). // // Defines the default patch baseline for the relevant operating system. // // To reset the Amazon Web Services-predefined patch baseline as the default, // specify the full patch baseline Amazon Resource Name (ARN) as the baseline // ID value. For example, for CentOS, specify arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0574b43a65ea646ed // instead of pb-0574b43a65ea646ed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation RegisterDefaultPatchBaseline for usage and error information. // // Returned Error Types: // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterDefaultPatchBaseline func (c *SSM) RegisterDefaultPatchBaseline(input *RegisterDefaultPatchBaselineInput) (*RegisterDefaultPatchBaselineOutput, error) { req, out := c.RegisterDefaultPatchBaselineRequest(input) return out, req.Send() } // RegisterDefaultPatchBaselineWithContext is the same as RegisterDefaultPatchBaseline with the addition of // the ability to pass a context and additional request options. // // See RegisterDefaultPatchBaseline for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) RegisterDefaultPatchBaselineWithContext(ctx aws.Context, input *RegisterDefaultPatchBaselineInput, opts ...request.Option) (*RegisterDefaultPatchBaselineOutput, error) { req, out := c.RegisterDefaultPatchBaselineRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opRegisterPatchBaselineForPatchGroup = "RegisterPatchBaselineForPatchGroup" // RegisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the RegisterPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See RegisterPatchBaselineForPatchGroup for more information on using the RegisterPatchBaselineForPatchGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the RegisterPatchBaselineForPatchGroupRequest method. // req, resp := client.RegisterPatchBaselineForPatchGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterPatchBaselineForPatchGroup func (c *SSM) RegisterPatchBaselineForPatchGroupRequest(input *RegisterPatchBaselineForPatchGroupInput) (req *request.Request, output *RegisterPatchBaselineForPatchGroupOutput) { op := &request.Operation{ Name: opRegisterPatchBaselineForPatchGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &RegisterPatchBaselineForPatchGroupInput{} } output = &RegisterPatchBaselineForPatchGroupOutput{} req = c.newRequest(op, input, output) return } // RegisterPatchBaselineForPatchGroup API operation for Amazon Simple Systems Manager (SSM). // // Registers a patch baseline for a patch group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation RegisterPatchBaselineForPatchGroup for usage and error information. // // Returned Error Types: // // - AlreadyExistsException // Error returned if an attempt is made to register a patch group with a patch // baseline that is already registered with a different patch baseline. // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - ResourceLimitExceededException // Error returned when the caller has exceeded the default resource quotas. // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager // service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterPatchBaselineForPatchGroup func (c *SSM) RegisterPatchBaselineForPatchGroup(input *RegisterPatchBaselineForPatchGroupInput) (*RegisterPatchBaselineForPatchGroupOutput, error) { req, out := c.RegisterPatchBaselineForPatchGroupRequest(input) return out, req.Send() } // RegisterPatchBaselineForPatchGroupWithContext is the same as RegisterPatchBaselineForPatchGroup with the addition of // the ability to pass a context and additional request options. // // See RegisterPatchBaselineForPatchGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) RegisterPatchBaselineForPatchGroupWithContext(ctx aws.Context, input *RegisterPatchBaselineForPatchGroupInput, opts ...request.Option) (*RegisterPatchBaselineForPatchGroupOutput, error) { req, out := c.RegisterPatchBaselineForPatchGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opRegisterTargetWithMaintenanceWindow = "RegisterTargetWithMaintenanceWindow" // RegisterTargetWithMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the RegisterTargetWithMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See RegisterTargetWithMaintenanceWindow for more information on using the RegisterTargetWithMaintenanceWindow // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the RegisterTargetWithMaintenanceWindowRequest method. // req, resp := client.RegisterTargetWithMaintenanceWindowRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTargetWithMaintenanceWindow func (c *SSM) RegisterTargetWithMaintenanceWindowRequest(input *RegisterTargetWithMaintenanceWindowInput) (req *request.Request, output *RegisterTargetWithMaintenanceWindowOutput) { op := &request.Operation{ Name: opRegisterTargetWithMaintenanceWindow, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &RegisterTargetWithMaintenanceWindowInput{} } output = &RegisterTargetWithMaintenanceWindowOutput{} req = c.newRequest(op, input, output) return } // RegisterTargetWithMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). // // Registers a target with a maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation RegisterTargetWithMaintenanceWindow for usage and error information. // // Returned Error Types: // // - IdempotentParameterMismatch // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - ResourceLimitExceededException // Error returned when the caller has exceeded the default resource quotas. // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager // service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTargetWithMaintenanceWindow func (c *SSM) RegisterTargetWithMaintenanceWindow(input *RegisterTargetWithMaintenanceWindowInput) (*RegisterTargetWithMaintenanceWindowOutput, error) { req, out := c.RegisterTargetWithMaintenanceWindowRequest(input) return out, req.Send() } // RegisterTargetWithMaintenanceWindowWithContext is the same as RegisterTargetWithMaintenanceWindow with the addition of // the ability to pass a context and additional request options. // // See RegisterTargetWithMaintenanceWindow for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) RegisterTargetWithMaintenanceWindowWithContext(ctx aws.Context, input *RegisterTargetWithMaintenanceWindowInput, opts ...request.Option) (*RegisterTargetWithMaintenanceWindowOutput, error) { req, out := c.RegisterTargetWithMaintenanceWindowRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opRegisterTaskWithMaintenanceWindow = "RegisterTaskWithMaintenanceWindow" // RegisterTaskWithMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the RegisterTaskWithMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See RegisterTaskWithMaintenanceWindow for more information on using the RegisterTaskWithMaintenanceWindow // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the RegisterTaskWithMaintenanceWindowRequest method. // req, resp := client.RegisterTaskWithMaintenanceWindowRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTaskWithMaintenanceWindow func (c *SSM) RegisterTaskWithMaintenanceWindowRequest(input *RegisterTaskWithMaintenanceWindowInput) (req *request.Request, output *RegisterTaskWithMaintenanceWindowOutput) { op := &request.Operation{ Name: opRegisterTaskWithMaintenanceWindow, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &RegisterTaskWithMaintenanceWindowInput{} } output = &RegisterTaskWithMaintenanceWindowOutput{} req = c.newRequest(op, input, output) return } // RegisterTaskWithMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). // // Adds a new task to a maintenance window. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation RegisterTaskWithMaintenanceWindow for usage and error information. // // Returned Error Types: // // - IdempotentParameterMismatch // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - ResourceLimitExceededException // Error returned when the caller has exceeded the default resource quotas. // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager // service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - FeatureNotAvailableException // You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where // the corresponding service isn't available. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RegisterTaskWithMaintenanceWindow func (c *SSM) RegisterTaskWithMaintenanceWindow(input *RegisterTaskWithMaintenanceWindowInput) (*RegisterTaskWithMaintenanceWindowOutput, error) { req, out := c.RegisterTaskWithMaintenanceWindowRequest(input) return out, req.Send() } // RegisterTaskWithMaintenanceWindowWithContext is the same as RegisterTaskWithMaintenanceWindow with the addition of // the ability to pass a context and additional request options. // // See RegisterTaskWithMaintenanceWindow for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) RegisterTaskWithMaintenanceWindowWithContext(ctx aws.Context, input *RegisterTaskWithMaintenanceWindowInput, opts ...request.Option) (*RegisterTaskWithMaintenanceWindowOutput, error) { req, out := c.RegisterTaskWithMaintenanceWindowRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See RemoveTagsFromResource for more information on using the RemoveTagsFromResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the RemoveTagsFromResourceRequest method. // req, resp := client.RemoveTagsFromResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RemoveTagsFromResource func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { op := &request.Operation{ Name: opRemoveTagsFromResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &RemoveTagsFromResourceInput{} } output = &RemoveTagsFromResourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // RemoveTagsFromResource API operation for Amazon Simple Systems Manager (SSM). // // Removes tag keys from the specified 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 Simple Systems Manager (SSM)'s // API operation RemoveTagsFromResource for usage and error information. // // Returned Error Types: // // - InvalidResourceType // The resource type isn't valid. For example, if you are attempting to tag // an EC2 instance, the instance must be a registered managed node. // // - InvalidResourceId // The resource ID isn't valid. Verify that you entered the correct ID and try // again. // // - InternalServerError // An error occurred on the server side. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RemoveTagsFromResource func (c *SSM) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { req, out := c.RemoveTagsFromResourceRequest(input) return out, req.Send() } // RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of // the ability to pass a context and additional request options. // // See RemoveTagsFromResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { req, out := c.RemoveTagsFromResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opResetServiceSetting = "ResetServiceSetting" // ResetServiceSettingRequest generates a "aws/request.Request" representing the // client's request for the ResetServiceSetting operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ResetServiceSetting for more information on using the ResetServiceSetting // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ResetServiceSettingRequest method. // req, resp := client.ResetServiceSettingRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResetServiceSetting func (c *SSM) ResetServiceSettingRequest(input *ResetServiceSettingInput) (req *request.Request, output *ResetServiceSettingOutput) { op := &request.Operation{ Name: opResetServiceSetting, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ResetServiceSettingInput{} } output = &ResetServiceSettingOutput{} req = c.newRequest(op, input, output) return } // ResetServiceSetting API operation for Amazon Simple Systems Manager (SSM). // // ServiceSetting is an account-level setting for an Amazon Web Services service. // This setting defines how a user interacts with or uses a service or a feature // of a service. For example, if an Amazon Web Services service charges money // to the account based on feature or service usage, then the Amazon Web Services // service team might create a default setting of "false". This means the user // can't use this feature unless they change the setting to "true" and intentionally // opt in for a paid feature. // // Services map a SettingId object to a setting value. Amazon Web Services services // teams define the default value for a SettingId. You can't create a new SettingId, // but you can overwrite the default value if you have the ssm:UpdateServiceSetting // permission for the setting. Use the GetServiceSetting API operation to view // the current value. Use the UpdateServiceSetting API operation to change the // default setting. // // Reset the service setting for the account to the default value as provisioned // by the Amazon Web Services service team. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation ResetServiceSetting for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ServiceSettingNotFound // The specified service setting wasn't found. Either the service name or the // setting hasn't been provisioned by the Amazon Web Services service team. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResetServiceSetting func (c *SSM) ResetServiceSetting(input *ResetServiceSettingInput) (*ResetServiceSettingOutput, error) { req, out := c.ResetServiceSettingRequest(input) return out, req.Send() } // ResetServiceSettingWithContext is the same as ResetServiceSetting with the addition of // the ability to pass a context and additional request options. // // See ResetServiceSetting for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ResetServiceSettingWithContext(ctx aws.Context, input *ResetServiceSettingInput, opts ...request.Option) (*ResetServiceSettingOutput, error) { req, out := c.ResetServiceSettingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opResumeSession = "ResumeSession" // ResumeSessionRequest generates a "aws/request.Request" representing the // client's request for the ResumeSession operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ResumeSession for more information on using the ResumeSession // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ResumeSessionRequest method. // req, resp := client.ResumeSessionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResumeSession func (c *SSM) ResumeSessionRequest(input *ResumeSessionInput) (req *request.Request, output *ResumeSessionOutput) { op := &request.Operation{ Name: opResumeSession, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ResumeSessionInput{} } output = &ResumeSessionOutput{} req = c.newRequest(op, input, output) return } // ResumeSession API operation for Amazon Simple Systems Manager (SSM). // // Reconnects a session to a managed node after it has been disconnected. Connections // can be resumed for disconnected sessions, but not terminated sessions. // // This command is primarily for use by client machines to automatically reconnect // during intermittent network issues. It isn't intended for any other 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 Simple Systems Manager (SSM)'s // API operation ResumeSession for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResumeSession func (c *SSM) ResumeSession(input *ResumeSessionInput) (*ResumeSessionOutput, error) { req, out := c.ResumeSessionRequest(input) return out, req.Send() } // ResumeSessionWithContext is the same as ResumeSession with the addition of // the ability to pass a context and additional request options. // // See ResumeSession for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) ResumeSessionWithContext(ctx aws.Context, input *ResumeSessionInput, opts ...request.Option) (*ResumeSessionOutput, error) { req, out := c.ResumeSessionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opSendAutomationSignal = "SendAutomationSignal" // SendAutomationSignalRequest generates a "aws/request.Request" representing the // client's request for the SendAutomationSignal operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See SendAutomationSignal for more information on using the SendAutomationSignal // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the SendAutomationSignalRequest method. // req, resp := client.SendAutomationSignalRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendAutomationSignal func (c *SSM) SendAutomationSignalRequest(input *SendAutomationSignalInput) (req *request.Request, output *SendAutomationSignalOutput) { op := &request.Operation{ Name: opSendAutomationSignal, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &SendAutomationSignalInput{} } output = &SendAutomationSignalOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // SendAutomationSignal API operation for Amazon Simple Systems Manager (SSM). // // Sends a signal to an Automation execution to change the current behavior // or status of the 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 Amazon Simple Systems Manager (SSM)'s // API operation SendAutomationSignal for usage and error information. // // Returned Error Types: // // - AutomationExecutionNotFoundException // There is no automation execution information for the requested automation // execution ID. // // - AutomationStepNotFoundException // The specified step name and execution ID don't exist. Verify the information // and try again. // // - InvalidAutomationSignalException // The signal isn't valid for the current Automation execution. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendAutomationSignal func (c *SSM) SendAutomationSignal(input *SendAutomationSignalInput) (*SendAutomationSignalOutput, error) { req, out := c.SendAutomationSignalRequest(input) return out, req.Send() } // SendAutomationSignalWithContext is the same as SendAutomationSignal with the addition of // the ability to pass a context and additional request options. // // See SendAutomationSignal for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) SendAutomationSignalWithContext(ctx aws.Context, input *SendAutomationSignalInput, opts ...request.Option) (*SendAutomationSignalOutput, error) { req, out := c.SendAutomationSignalRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opSendCommand = "SendCommand" // SendCommandRequest generates a "aws/request.Request" representing the // client's request for the SendCommand operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See SendCommand for more information on using the SendCommand // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the SendCommandRequest method. // req, resp := client.SendCommandRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendCommand func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, output *SendCommandOutput) { op := &request.Operation{ Name: opSendCommand, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &SendCommandInput{} } output = &SendCommandOutput{} req = c.newRequest(op, input, output) return } // SendCommand API operation for Amazon Simple Systems Manager (SSM). // // Runs commands on one or more managed 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 Amazon Simple Systems Manager (SSM)'s // API operation SendCommand for usage and error information. // // Returned Error Types: // // - DuplicateInstanceId // You can't specify a managed node ID in more than one association. // // - InternalServerError // An error occurred on the server side. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // - InvalidOutputFolder // The S3 bucket doesn't exist. // // - InvalidParameters // You must specify values for all required parameters in the Amazon Web Services // Systems Manager document (SSM document). You can only supply values to parameters // defined in the SSM document. // // - UnsupportedPlatformType // The document doesn't support the platform type of the given managed node // ID(s). For example, you sent an document for a Windows managed node to a // Linux node. // // - MaxDocumentSizeExceeded // The size limit of a document is 64 KB. // // - InvalidRole // The role name can't contain invalid characters. Also verify that you specified // an IAM role for notifications that includes the required trust policy. For // information about configuring the IAM role for Run Command notifications, // see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) // in the Amazon Web Services Systems Manager User Guide. // // - InvalidNotificationConfig // One or more configuration items isn't valid. Verify that a valid Amazon Resource // Name (ARN) was provided for an Amazon Simple Notification Service topic. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/SendCommand func (c *SSM) SendCommand(input *SendCommandInput) (*SendCommandOutput, error) { req, out := c.SendCommandRequest(input) return out, req.Send() } // SendCommandWithContext is the same as SendCommand with the addition of // the ability to pass a context and additional request options. // // See SendCommand for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) SendCommandWithContext(ctx aws.Context, input *SendCommandInput, opts ...request.Option) (*SendCommandOutput, error) { req, out := c.SendCommandRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStartAssociationsOnce = "StartAssociationsOnce" // StartAssociationsOnceRequest generates a "aws/request.Request" representing the // client's request for the StartAssociationsOnce operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See StartAssociationsOnce for more information on using the StartAssociationsOnce // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the StartAssociationsOnceRequest method. // req, resp := client.StartAssociationsOnceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce func (c *SSM) StartAssociationsOnceRequest(input *StartAssociationsOnceInput) (req *request.Request, output *StartAssociationsOnceOutput) { op := &request.Operation{ Name: opStartAssociationsOnce, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StartAssociationsOnceInput{} } output = &StartAssociationsOnceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // StartAssociationsOnce API operation for Amazon Simple Systems Manager (SSM). // // Runs an association immediately and only one time. This operation can be // helpful when troubleshooting associations. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation StartAssociationsOnce for usage and error information. // // Returned Error Types: // // - InvalidAssociation // The association isn't valid or doesn't exist. // // - AssociationDoesNotExist // The specified association doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce func (c *SSM) StartAssociationsOnce(input *StartAssociationsOnceInput) (*StartAssociationsOnceOutput, error) { req, out := c.StartAssociationsOnceRequest(input) return out, req.Send() } // StartAssociationsOnceWithContext is the same as StartAssociationsOnce with the addition of // the ability to pass a context and additional request options. // // See StartAssociationsOnce for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) StartAssociationsOnceWithContext(ctx aws.Context, input *StartAssociationsOnceInput, opts ...request.Option) (*StartAssociationsOnceOutput, error) { req, out := c.StartAssociationsOnceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStartAutomationExecution = "StartAutomationExecution" // StartAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See StartAutomationExecution for more information on using the StartAutomationExecution // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the StartAutomationExecutionRequest method. // req, resp := client.StartAutomationExecutionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAutomationExecution func (c *SSM) StartAutomationExecutionRequest(input *StartAutomationExecutionInput) (req *request.Request, output *StartAutomationExecutionOutput) { op := &request.Operation{ Name: opStartAutomationExecution, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StartAutomationExecutionInput{} } output = &StartAutomationExecutionOutput{} req = c.newRequest(op, input, output) return } // StartAutomationExecution API operation for Amazon Simple Systems Manager (SSM). // // Initiates execution of an Automation runbook. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation StartAutomationExecution for usage and error information. // // Returned Error Types: // // - AutomationDefinitionNotFoundException // An Automation runbook with the specified name couldn't be found. // // - InvalidAutomationExecutionParametersException // The supplied parameters for invoking the specified Automation runbook are // incorrect. For example, they may not match the set of parameters permitted // for the specified Automation document. // // - AutomationExecutionLimitExceededException // The number of simultaneously running Automation executions exceeded the allowable // limit. // // - AutomationDefinitionVersionNotFoundException // An Automation runbook with the specified name and version couldn't be found. // // - IdempotentParameterMismatch // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. // // - InvalidTarget // The target isn't valid or doesn't exist. It might not be configured for Systems // Manager or you might not have permission to perform the operation. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAutomationExecution func (c *SSM) StartAutomationExecution(input *StartAutomationExecutionInput) (*StartAutomationExecutionOutput, error) { req, out := c.StartAutomationExecutionRequest(input) return out, req.Send() } // StartAutomationExecutionWithContext is the same as StartAutomationExecution with the addition of // the ability to pass a context and additional request options. // // See StartAutomationExecution for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) StartAutomationExecutionWithContext(ctx aws.Context, input *StartAutomationExecutionInput, opts ...request.Option) (*StartAutomationExecutionOutput, error) { req, out := c.StartAutomationExecutionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStartChangeRequestExecution = "StartChangeRequestExecution" // StartChangeRequestExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartChangeRequestExecution operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See StartChangeRequestExecution for more information on using the StartChangeRequestExecution // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the StartChangeRequestExecutionRequest method. // req, resp := client.StartChangeRequestExecutionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartChangeRequestExecution func (c *SSM) StartChangeRequestExecutionRequest(input *StartChangeRequestExecutionInput) (req *request.Request, output *StartChangeRequestExecutionOutput) { op := &request.Operation{ Name: opStartChangeRequestExecution, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StartChangeRequestExecutionInput{} } output = &StartChangeRequestExecutionOutput{} req = c.newRequest(op, input, output) return } // StartChangeRequestExecution API operation for Amazon Simple Systems Manager (SSM). // // Creates a change request for Change Manager. The Automation runbooks specified // in the change request run only after all required approvals for the change // request have been received. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation StartChangeRequestExecution for usage and error information. // // Returned Error Types: // // - AutomationDefinitionNotFoundException // An Automation runbook with the specified name couldn't be found. // // - InvalidAutomationExecutionParametersException // The supplied parameters for invoking the specified Automation runbook are // incorrect. For example, they may not match the set of parameters permitted // for the specified Automation document. // // - AutomationExecutionLimitExceededException // The number of simultaneously running Automation executions exceeded the allowable // limit. // // - AutomationDefinitionVersionNotFoundException // An Automation runbook with the specified name and version couldn't be found. // // - IdempotentParameterMismatch // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. // // - InternalServerError // An error occurred on the server side. // // - AutomationDefinitionNotApprovedException // Indicates that the Change Manager change template used in the change request // was rejected or is still in a pending state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartChangeRequestExecution func (c *SSM) StartChangeRequestExecution(input *StartChangeRequestExecutionInput) (*StartChangeRequestExecutionOutput, error) { req, out := c.StartChangeRequestExecutionRequest(input) return out, req.Send() } // StartChangeRequestExecutionWithContext is the same as StartChangeRequestExecution with the addition of // the ability to pass a context and additional request options. // // See StartChangeRequestExecution for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) StartChangeRequestExecutionWithContext(ctx aws.Context, input *StartChangeRequestExecutionInput, opts ...request.Option) (*StartChangeRequestExecutionOutput, error) { req, out := c.StartChangeRequestExecutionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStartSession = "StartSession" // StartSessionRequest generates a "aws/request.Request" representing the // client's request for the StartSession operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See StartSession for more information on using the StartSession // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the StartSessionRequest method. // req, resp := client.StartSessionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartSession func (c *SSM) StartSessionRequest(input *StartSessionInput) (req *request.Request, output *StartSessionOutput) { op := &request.Operation{ Name: opStartSession, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StartSessionInput{} } output = &StartSessionOutput{} req = c.newRequest(op, input, output) return } // StartSession API operation for Amazon Simple Systems Manager (SSM). // // Initiates a connection to a target (for example, a managed node) for a Session // Manager session. Returns a URL and token that can be used to open a WebSocket // connection for sending input and receiving outputs. // // Amazon Web Services CLI usage: start-session is an interactive command that // requires the Session Manager plugin to be installed on the client machine // making the call. For information, see Install the Session Manager plugin // for the Amazon Web Services CLI (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) // in the Amazon Web Services Systems Manager User Guide. // // Amazon Web Services Tools for PowerShell usage: Start-SSMSession isn't currently // supported by Amazon Web Services Tools for PowerShell on Windows local machines. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation StartSession for usage and error information. // // Returned Error Types: // // - InvalidDocument // The specified SSM document doesn't exist. // // - TargetNotConnected // The specified target managed node for the session isn't fully configured // for use with Session Manager. For more information, see Getting started with // Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) // in the Amazon Web Services Systems Manager User Guide. This error is also // returned if you attempt to start a session on a managed node that is located // in a different account or Region // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartSession func (c *SSM) StartSession(input *StartSessionInput) (*StartSessionOutput, error) { req, out := c.StartSessionRequest(input) return out, req.Send() } // StartSessionWithContext is the same as StartSession with the addition of // the ability to pass a context and additional request options. // // See StartSession for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) StartSessionWithContext(ctx aws.Context, input *StartSessionInput, opts ...request.Option) (*StartSessionOutput, error) { req, out := c.StartSessionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStopAutomationExecution = "StopAutomationExecution" // StopAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See StopAutomationExecution for more information on using the StopAutomationExecution // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the StopAutomationExecutionRequest method. // req, resp := client.StopAutomationExecutionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StopAutomationExecution func (c *SSM) StopAutomationExecutionRequest(input *StopAutomationExecutionInput) (req *request.Request, output *StopAutomationExecutionOutput) { op := &request.Operation{ Name: opStopAutomationExecution, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &StopAutomationExecutionInput{} } output = &StopAutomationExecutionOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // StopAutomationExecution API operation for Amazon Simple Systems Manager (SSM). // // Stop an Automation that is currently 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 Simple Systems Manager (SSM)'s // API operation StopAutomationExecution for usage and error information. // // Returned Error Types: // // - AutomationExecutionNotFoundException // There is no automation execution information for the requested automation // execution ID. // // - InvalidAutomationStatusUpdateException // The specified update status operation isn't valid. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StopAutomationExecution func (c *SSM) StopAutomationExecution(input *StopAutomationExecutionInput) (*StopAutomationExecutionOutput, error) { req, out := c.StopAutomationExecutionRequest(input) return out, req.Send() } // StopAutomationExecutionWithContext is the same as StopAutomationExecution with the addition of // the ability to pass a context and additional request options. // // See StopAutomationExecution for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) StopAutomationExecutionWithContext(ctx aws.Context, input *StopAutomationExecutionInput, opts ...request.Option) (*StopAutomationExecutionOutput, error) { req, out := c.StopAutomationExecutionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opTerminateSession = "TerminateSession" // TerminateSessionRequest generates a "aws/request.Request" representing the // client's request for the TerminateSession operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See TerminateSession for more information on using the TerminateSession // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the TerminateSessionRequest method. // req, resp := client.TerminateSessionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/TerminateSession func (c *SSM) TerminateSessionRequest(input *TerminateSessionInput) (req *request.Request, output *TerminateSessionOutput) { op := &request.Operation{ Name: opTerminateSession, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &TerminateSessionInput{} } output = &TerminateSessionOutput{} req = c.newRequest(op, input, output) return } // TerminateSession API operation for Amazon Simple Systems Manager (SSM). // // Permanently ends a session and closes the data connection between the Session // Manager client and SSM Agent on the managed node. A terminated session can't // be resumed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation TerminateSession for usage and error information. // // Returned Error Types: // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/TerminateSession func (c *SSM) TerminateSession(input *TerminateSessionInput) (*TerminateSessionOutput, error) { req, out := c.TerminateSessionRequest(input) return out, req.Send() } // TerminateSessionWithContext is the same as TerminateSession with the addition of // the ability to pass a context and additional request options. // // See TerminateSession for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) TerminateSessionWithContext(ctx aws.Context, input *TerminateSessionInput, opts ...request.Option) (*TerminateSessionOutput, error) { req, out := c.TerminateSessionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUnlabelParameterVersion = "UnlabelParameterVersion" // UnlabelParameterVersionRequest generates a "aws/request.Request" representing the // client's request for the UnlabelParameterVersion operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UnlabelParameterVersion for more information on using the UnlabelParameterVersion // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UnlabelParameterVersionRequest method. // req, resp := client.UnlabelParameterVersionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UnlabelParameterVersion func (c *SSM) UnlabelParameterVersionRequest(input *UnlabelParameterVersionInput) (req *request.Request, output *UnlabelParameterVersionOutput) { op := &request.Operation{ Name: opUnlabelParameterVersion, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UnlabelParameterVersionInput{} } output = &UnlabelParameterVersionOutput{} req = c.newRequest(op, input, output) return } // UnlabelParameterVersion API operation for Amazon Simple Systems Manager (SSM). // // Remove a label or labels from a 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 Amazon Simple Systems Manager (SSM)'s // API operation UnlabelParameterVersion for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // - ParameterNotFound // The parameter couldn't be found. Verify the name and try again. // // - ParameterVersionNotFound // The specified parameter version wasn't found. Verify the parameter name and // version, and try again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UnlabelParameterVersion func (c *SSM) UnlabelParameterVersion(input *UnlabelParameterVersionInput) (*UnlabelParameterVersionOutput, error) { req, out := c.UnlabelParameterVersionRequest(input) return out, req.Send() } // UnlabelParameterVersionWithContext is the same as UnlabelParameterVersion with the addition of // the ability to pass a context and additional request options. // // See UnlabelParameterVersion for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UnlabelParameterVersionWithContext(ctx aws.Context, input *UnlabelParameterVersionInput, opts ...request.Option) (*UnlabelParameterVersionOutput, error) { req, out := c.UnlabelParameterVersionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateAssociation = "UpdateAssociation" // UpdateAssociationRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssociation operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateAssociation for more information on using the UpdateAssociation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateAssociationRequest method. // req, resp := client.UpdateAssociationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateAssociation func (c *SSM) UpdateAssociationRequest(input *UpdateAssociationInput) (req *request.Request, output *UpdateAssociationOutput) { op := &request.Operation{ Name: opUpdateAssociation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateAssociationInput{} } output = &UpdateAssociationOutput{} req = c.newRequest(op, input, output) return } // UpdateAssociation API operation for Amazon Simple Systems Manager (SSM). // // Updates an association. You can update the association name and version, // the document version, schedule, parameters, and Amazon Simple Storage Service // (Amazon S3) output. When you call UpdateAssociation, the system removes all // optional parameters from the request and overwrites the association with // null values for those parameters. This is by design. You must specify all // optional parameters in the call, even if you are not changing the parameters. // This includes the Name parameter. Before calling this API action, we recommend // that you call the DescribeAssociation API operation and make a note of all // optional parameters required for your UpdateAssociation call. // // In order to call this API operation, a user, group, or role must be granted // permission to call the DescribeAssociation API operation. If you don't have // permission to call DescribeAssociation, then you receive the following error: // An error occurred (AccessDeniedException) when calling the UpdateAssociation // operation: User: isn't authorized to perform: ssm:DescribeAssociation // on resource: // // When you update an association, the association immediately runs against // the specified targets. You can add the ApplyOnlyAtCronInterval parameter // to run the association during the next schedule run. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateAssociation for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidSchedule // The schedule is invalid. Verify your cron or rate expression and try again. // // - InvalidParameters // You must specify values for all required parameters in the Amazon Web Services // Systems Manager document (SSM document). You can only supply values to parameters // defined in the SSM document. // // - InvalidOutputLocation // The output location isn't valid or doesn't exist. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // - AssociationDoesNotExist // The specified association doesn't exist. // // - InvalidUpdate // The update isn't valid. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidTarget // The target isn't valid or doesn't exist. It might not be configured for Systems // Manager or you might not have permission to perform the operation. // // - InvalidAssociationVersion // The version you specified isn't valid. Use ListAssociationVersions to view // all versions of an association according to the association ID. Or, use the // $LATEST parameter to view the latest version of the association. // // - AssociationVersionLimitExceeded // You have reached the maximum number versions allowed for an association. // Each association has a limit of 1,000 versions. // // - InvalidTargetMaps // TargetMap parameter isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateAssociation func (c *SSM) UpdateAssociation(input *UpdateAssociationInput) (*UpdateAssociationOutput, error) { req, out := c.UpdateAssociationRequest(input) return out, req.Send() } // UpdateAssociationWithContext is the same as UpdateAssociation with the addition of // the ability to pass a context and additional request options. // // See UpdateAssociation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateAssociationWithContext(ctx aws.Context, input *UpdateAssociationInput, opts ...request.Option) (*UpdateAssociationOutput, error) { req, out := c.UpdateAssociationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateAssociationStatus = "UpdateAssociationStatus" // UpdateAssociationStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssociationStatus operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateAssociationStatus for more information on using the UpdateAssociationStatus // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateAssociationStatusRequest method. // req, resp := client.UpdateAssociationStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateAssociationStatus func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput) (req *request.Request, output *UpdateAssociationStatusOutput) { op := &request.Operation{ Name: opUpdateAssociationStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateAssociationStatusInput{} } output = &UpdateAssociationStatusOutput{} req = c.newRequest(op, input, output) return } // UpdateAssociationStatus API operation for Amazon Simple Systems Manager (SSM). // // Updates the status of the Amazon Web Services Systems Manager document (SSM // document) associated with the specified managed node. // // UpdateAssociationStatus is primarily used by the Amazon Web Services Systems // Manager Agent (SSM Agent) to report status updates about your associations // and is only used for associations created with the InstanceId legacy 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 Amazon Simple Systems Manager (SSM)'s // API operation UpdateAssociationStatus for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InvalidDocument // The specified SSM document doesn't exist. // // - AssociationDoesNotExist // The specified association doesn't exist. // // - StatusUnchanged // The updated status is the same as the current status. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateAssociationStatus func (c *SSM) UpdateAssociationStatus(input *UpdateAssociationStatusInput) (*UpdateAssociationStatusOutput, error) { req, out := c.UpdateAssociationStatusRequest(input) return out, req.Send() } // UpdateAssociationStatusWithContext is the same as UpdateAssociationStatus with the addition of // the ability to pass a context and additional request options. // // See UpdateAssociationStatus for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateAssociationStatusWithContext(ctx aws.Context, input *UpdateAssociationStatusInput, opts ...request.Option) (*UpdateAssociationStatusOutput, error) { req, out := c.UpdateAssociationStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateDocument = "UpdateDocument" // UpdateDocumentRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocument operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateDocument for more information on using the UpdateDocument // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateDocumentRequest method. // req, resp := client.UpdateDocumentRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocument func (c *SSM) UpdateDocumentRequest(input *UpdateDocumentInput) (req *request.Request, output *UpdateDocumentOutput) { op := &request.Operation{ Name: opUpdateDocument, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateDocumentInput{} } output = &UpdateDocumentOutput{} req = c.newRequest(op, input, output) return } // UpdateDocument API operation for Amazon Simple Systems Manager (SSM). // // Updates one or more values for an SSM document. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateDocument for usage and error information. // // Returned Error Types: // // - MaxDocumentSizeExceeded // The size limit of a document is 64 KB. // // - DocumentVersionLimitExceeded // The document has too many versions. Delete one or more document versions // and try again. // // - InternalServerError // An error occurred on the server side. // // - DuplicateDocumentContent // The content of the association document matches another document. Change // the content of the document and try again. // // - DuplicateDocumentVersionName // The version name has already been used in this document. Specify a different // version name, and then try again. // // - InvalidDocumentContent // The content for the document isn't valid. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // - InvalidDocumentSchemaVersion // The version of the document schema isn't supported. // // - InvalidDocument // The specified SSM document doesn't exist. // // - 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) return out, req.Send() } // UpdateDocumentWithContext is the same as UpdateDocument with the addition of // the ability to pass a context and additional request options. // // See UpdateDocument for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateDocumentWithContext(ctx aws.Context, input *UpdateDocumentInput, opts ...request.Option) (*UpdateDocumentOutput, error) { req, out := c.UpdateDocumentRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateDocumentDefaultVersion = "UpdateDocumentDefaultVersion" // UpdateDocumentDefaultVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentDefaultVersion operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateDocumentDefaultVersion for more information on using the UpdateDocumentDefaultVersion // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateDocumentDefaultVersionRequest method. // req, resp := client.UpdateDocumentDefaultVersionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocumentDefaultVersion func (c *SSM) UpdateDocumentDefaultVersionRequest(input *UpdateDocumentDefaultVersionInput) (req *request.Request, output *UpdateDocumentDefaultVersionOutput) { op := &request.Operation{ Name: opUpdateDocumentDefaultVersion, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateDocumentDefaultVersionInput{} } output = &UpdateDocumentDefaultVersionOutput{} req = c.newRequest(op, input, output) return } // UpdateDocumentDefaultVersion API operation for Amazon Simple Systems Manager (SSM). // // Set the default version of a document. // // If you change a document version for a State Manager association, Systems // Manager immediately runs the association unless you previously specifed the // apply-only-at-cron-interval 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 Amazon Simple Systems Manager (SSM)'s // API operation UpdateDocumentDefaultVersion for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // - InvalidDocumentSchemaVersion // The version of the document schema isn't supported. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocumentDefaultVersion func (c *SSM) UpdateDocumentDefaultVersion(input *UpdateDocumentDefaultVersionInput) (*UpdateDocumentDefaultVersionOutput, error) { req, out := c.UpdateDocumentDefaultVersionRequest(input) return out, req.Send() } // UpdateDocumentDefaultVersionWithContext is the same as UpdateDocumentDefaultVersion with the addition of // the ability to pass a context and additional request options. // // See UpdateDocumentDefaultVersion for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateDocumentDefaultVersionWithContext(ctx aws.Context, input *UpdateDocumentDefaultVersionInput, opts ...request.Option) (*UpdateDocumentDefaultVersionOutput, error) { req, out := c.UpdateDocumentDefaultVersionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateDocumentMetadata = "UpdateDocumentMetadata" // UpdateDocumentMetadataRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentMetadata operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateDocumentMetadata for more information on using the UpdateDocumentMetadata // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateDocumentMetadataRequest method. // req, resp := client.UpdateDocumentMetadataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocumentMetadata func (c *SSM) UpdateDocumentMetadataRequest(input *UpdateDocumentMetadataInput) (req *request.Request, output *UpdateDocumentMetadataOutput) { op := &request.Operation{ Name: opUpdateDocumentMetadata, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateDocumentMetadataInput{} } output = &UpdateDocumentMetadataOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UpdateDocumentMetadata API operation for Amazon Simple Systems Manager (SSM). // // Updates information related to approval reviews for a specific version of // a change template in Change Manager. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateDocumentMetadata for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - InvalidDocument // The specified SSM document doesn't exist. // // - InvalidDocumentOperation // You attempted to delete a document while it is still shared. You must stop // sharing the document before you can delete it. // // - InvalidDocumentVersion // The document version isn't valid or doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocumentMetadata func (c *SSM) UpdateDocumentMetadata(input *UpdateDocumentMetadataInput) (*UpdateDocumentMetadataOutput, error) { req, out := c.UpdateDocumentMetadataRequest(input) return out, req.Send() } // UpdateDocumentMetadataWithContext is the same as UpdateDocumentMetadata with the addition of // the ability to pass a context and additional request options. // // See UpdateDocumentMetadata for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateDocumentMetadataWithContext(ctx aws.Context, input *UpdateDocumentMetadataInput, opts ...request.Option) (*UpdateDocumentMetadataOutput, error) { req, out := c.UpdateDocumentMetadataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateMaintenanceWindow = "UpdateMaintenanceWindow" // UpdateMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateMaintenanceWindow for more information on using the UpdateMaintenanceWindow // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateMaintenanceWindowRequest method. // req, resp := client.UpdateMaintenanceWindowRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindow func (c *SSM) UpdateMaintenanceWindowRequest(input *UpdateMaintenanceWindowInput) (req *request.Request, output *UpdateMaintenanceWindowOutput) { op := &request.Operation{ Name: opUpdateMaintenanceWindow, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateMaintenanceWindowInput{} } output = &UpdateMaintenanceWindowOutput{} req = c.newRequest(op, input, output) return } // UpdateMaintenanceWindow API operation for Amazon Simple Systems Manager (SSM). // // Updates an existing maintenance window. Only specified parameters are modified. // // The value you specify for Duration determines the specific end time for the // maintenance window based on the time it begins. No maintenance window tasks // are permitted to start after the resulting endtime minus the number of hours // you specify for Cutoff. For example, if the maintenance window starts at // 3 PM, the duration is three hours, and the value you specify for Cutoff is // one hour, no maintenance window tasks can start after 5 PM. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateMaintenanceWindow for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindow func (c *SSM) UpdateMaintenanceWindow(input *UpdateMaintenanceWindowInput) (*UpdateMaintenanceWindowOutput, error) { req, out := c.UpdateMaintenanceWindowRequest(input) return out, req.Send() } // UpdateMaintenanceWindowWithContext is the same as UpdateMaintenanceWindow with the addition of // the ability to pass a context and additional request options. // // See UpdateMaintenanceWindow for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateMaintenanceWindowWithContext(ctx aws.Context, input *UpdateMaintenanceWindowInput, opts ...request.Option) (*UpdateMaintenanceWindowOutput, error) { req, out := c.UpdateMaintenanceWindowRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateMaintenanceWindowTarget = "UpdateMaintenanceWindowTarget" // UpdateMaintenanceWindowTargetRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindowTarget operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateMaintenanceWindowTarget for more information on using the UpdateMaintenanceWindowTarget // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateMaintenanceWindowTargetRequest method. // req, resp := client.UpdateMaintenanceWindowTargetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTarget func (c *SSM) UpdateMaintenanceWindowTargetRequest(input *UpdateMaintenanceWindowTargetInput) (req *request.Request, output *UpdateMaintenanceWindowTargetOutput) { op := &request.Operation{ Name: opUpdateMaintenanceWindowTarget, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateMaintenanceWindowTargetInput{} } output = &UpdateMaintenanceWindowTargetOutput{} req = c.newRequest(op, input, output) return } // UpdateMaintenanceWindowTarget API operation for Amazon Simple Systems Manager (SSM). // // Modifies the target of an existing maintenance window. You can change the // following: // // - Name // // - Description // // - Owner // // - IDs for an ID target // // - Tags for a Tag target // // - From any supported tag type to another. The three supported tag types // are ID target, Tag target, and resource group. For more information, see // Target. // // If a parameter is null, then the corresponding field isn't modified. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateMaintenanceWindowTarget for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTarget func (c *SSM) UpdateMaintenanceWindowTarget(input *UpdateMaintenanceWindowTargetInput) (*UpdateMaintenanceWindowTargetOutput, error) { req, out := c.UpdateMaintenanceWindowTargetRequest(input) return out, req.Send() } // UpdateMaintenanceWindowTargetWithContext is the same as UpdateMaintenanceWindowTarget with the addition of // the ability to pass a context and additional request options. // // See UpdateMaintenanceWindowTarget for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateMaintenanceWindowTargetWithContext(ctx aws.Context, input *UpdateMaintenanceWindowTargetInput, opts ...request.Option) (*UpdateMaintenanceWindowTargetOutput, error) { req, out := c.UpdateMaintenanceWindowTargetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateMaintenanceWindowTask = "UpdateMaintenanceWindowTask" // UpdateMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindowTask operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateMaintenanceWindowTask for more information on using the UpdateMaintenanceWindowTask // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateMaintenanceWindowTaskRequest method. // req, resp := client.UpdateMaintenanceWindowTaskRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTask func (c *SSM) UpdateMaintenanceWindowTaskRequest(input *UpdateMaintenanceWindowTaskInput) (req *request.Request, output *UpdateMaintenanceWindowTaskOutput) { op := &request.Operation{ Name: opUpdateMaintenanceWindowTask, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateMaintenanceWindowTaskInput{} } output = &UpdateMaintenanceWindowTaskOutput{} req = c.newRequest(op, input, output) return } // UpdateMaintenanceWindowTask API operation for Amazon Simple Systems Manager (SSM). // // Modifies a task assigned to a maintenance window. You can't change the task // type, but you can change the following values: // // - TaskARN. For example, you can change a RUN_COMMAND task from AWS-RunPowerShellScript // to AWS-RunShellScript. // // - ServiceRoleArn // // - TaskInvocationParameters // // - Priority // // - MaxConcurrency // // - MaxErrors // // One or more targets must be specified for maintenance window Run Command-type // tasks. Depending on the task, targets are optional for other maintenance // window task types (Automation, Lambda, and Step Functions). For more information // about running tasks that don't specify targets, see Registering maintenance // window tasks without targets (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // in the Amazon Web Services Systems Manager User Guide. // // If the value for a parameter in UpdateMaintenanceWindowTask is null, then // the corresponding field isn't modified. If you set Replace to true, then // all fields required by the RegisterTaskWithMaintenanceWindow operation are // required for this request. Optional fields that aren't specified are set // to null. // // When you update a maintenance window task that has options specified in TaskInvocationParameters, // you must provide again all the TaskInvocationParameters values that you want // to retain. The values you don't specify again are removed. For example, suppose // that when you registered a Run Command task, you specified TaskInvocationParameters // values for Comment, NotificationConfig, and OutputS3BucketName. If you update // the maintenance window task and specify only a different OutputS3BucketName // value, the values for Comment and NotificationConfig are removed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateMaintenanceWindowTask for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateMaintenanceWindowTask func (c *SSM) UpdateMaintenanceWindowTask(input *UpdateMaintenanceWindowTaskInput) (*UpdateMaintenanceWindowTaskOutput, error) { req, out := c.UpdateMaintenanceWindowTaskRequest(input) return out, req.Send() } // UpdateMaintenanceWindowTaskWithContext is the same as UpdateMaintenanceWindowTask with the addition of // the ability to pass a context and additional request options. // // See UpdateMaintenanceWindowTask for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateMaintenanceWindowTaskWithContext(ctx aws.Context, input *UpdateMaintenanceWindowTaskInput, opts ...request.Option) (*UpdateMaintenanceWindowTaskOutput, error) { req, out := c.UpdateMaintenanceWindowTaskRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateManagedInstanceRole = "UpdateManagedInstanceRole" // UpdateManagedInstanceRoleRequest generates a "aws/request.Request" representing the // client's request for the UpdateManagedInstanceRole operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateManagedInstanceRole for more information on using the UpdateManagedInstanceRole // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateManagedInstanceRoleRequest method. // req, resp := client.UpdateManagedInstanceRoleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateManagedInstanceRole func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleInput) (req *request.Request, output *UpdateManagedInstanceRoleOutput) { op := &request.Operation{ Name: opUpdateManagedInstanceRole, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateManagedInstanceRoleInput{} } output = &UpdateManagedInstanceRoleOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UpdateManagedInstanceRole API operation for Amazon Simple Systems Manager (SSM). // // Changes the Identity and Access Management (IAM) role that is assigned to // the on-premises server, edge device, or virtual machines (VM). IAM roles // are first assigned to these hybrid nodes during the activation process. For // more information, see CreateActivation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateManagedInstanceRole for usage and error information. // // Returned Error Types: // // - InvalidInstanceId // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateManagedInstanceRole func (c *SSM) UpdateManagedInstanceRole(input *UpdateManagedInstanceRoleInput) (*UpdateManagedInstanceRoleOutput, error) { req, out := c.UpdateManagedInstanceRoleRequest(input) return out, req.Send() } // UpdateManagedInstanceRoleWithContext is the same as UpdateManagedInstanceRole with the addition of // the ability to pass a context and additional request options. // // See UpdateManagedInstanceRole for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateManagedInstanceRoleWithContext(ctx aws.Context, input *UpdateManagedInstanceRoleInput, opts ...request.Option) (*UpdateManagedInstanceRoleOutput, error) { req, out := c.UpdateManagedInstanceRoleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateOpsItem = "UpdateOpsItem" // UpdateOpsItemRequest generates a "aws/request.Request" representing the // client's request for the UpdateOpsItem operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateOpsItem for more information on using the UpdateOpsItem // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateOpsItemRequest method. // req, resp := client.UpdateOpsItemRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateOpsItem func (c *SSM) UpdateOpsItemRequest(input *UpdateOpsItemInput) (req *request.Request, output *UpdateOpsItemOutput) { op := &request.Operation{ Name: opUpdateOpsItem, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateOpsItemInput{} } output = &UpdateOpsItemOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UpdateOpsItem API operation for Amazon Simple Systems Manager (SSM). // // Edit or change an OpsItem. You must have permission in Identity and Access // Management (IAM) to update an OpsItem. For more information, see Set up OpsCenter // (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html) // in the Amazon Web Services Systems Manager User Guide. // // Operations engineers and IT professionals use Amazon Web Services Systems // Manager OpsCenter to view, investigate, and remediate operational issues // impacting the performance and health of their Amazon Web Services resources. // For more information, see OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the Amazon Web Services Systems Manager 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 Simple Systems Manager (SSM)'s // API operation UpdateOpsItem for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - OpsItemNotFoundException // The specified OpsItem ID doesn't exist. Verify the ID and try again. // // - OpsItemAlreadyExistsException // The OpsItem already exists. // // - OpsItemLimitExceededException // The request caused OpsItems to exceed one or more quotas. // // - OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments // and try again. // // - OpsItemAccessDeniedException // You don't have permission to view OpsItems in the specified account. Verify // that your account is configured either as a Systems Manager delegated administrator // or that you are logged into the Organizations management account. // // - OpsItemConflictException // The specified OpsItem is in the process of being deleted. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateOpsItem func (c *SSM) UpdateOpsItem(input *UpdateOpsItemInput) (*UpdateOpsItemOutput, error) { req, out := c.UpdateOpsItemRequest(input) return out, req.Send() } // UpdateOpsItemWithContext is the same as UpdateOpsItem with the addition of // the ability to pass a context and additional request options. // // See UpdateOpsItem for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateOpsItemWithContext(ctx aws.Context, input *UpdateOpsItemInput, opts ...request.Option) (*UpdateOpsItemOutput, error) { req, out := c.UpdateOpsItemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateOpsMetadata = "UpdateOpsMetadata" // UpdateOpsMetadataRequest generates a "aws/request.Request" representing the // client's request for the UpdateOpsMetadata operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateOpsMetadata for more information on using the UpdateOpsMetadata // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateOpsMetadataRequest method. // req, resp := client.UpdateOpsMetadataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateOpsMetadata func (c *SSM) UpdateOpsMetadataRequest(input *UpdateOpsMetadataInput) (req *request.Request, output *UpdateOpsMetadataOutput) { op := &request.Operation{ Name: opUpdateOpsMetadata, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateOpsMetadataInput{} } output = &UpdateOpsMetadataOutput{} req = c.newRequest(op, input, output) return } // UpdateOpsMetadata API operation for Amazon Simple Systems Manager (SSM). // // Amazon Web Services Systems Manager calls this API operation when you edit // OpsMetadata in Application Manager. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateOpsMetadata for usage and error information. // // Returned Error Types: // // - OpsMetadataNotFoundException // The OpsMetadata object doesn't exist. // // - OpsMetadataInvalidArgumentException // One of the arguments passed is invalid. // // - OpsMetadataKeyLimitExceededException // The OpsMetadata object exceeds the maximum number of OpsMetadata keys that // you can assign to an application in Application Manager. // // - OpsMetadataTooManyUpdatesException // The system is processing too many concurrent updates. Wait a few moments // and try again. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateOpsMetadata func (c *SSM) UpdateOpsMetadata(input *UpdateOpsMetadataInput) (*UpdateOpsMetadataOutput, error) { req, out := c.UpdateOpsMetadataRequest(input) return out, req.Send() } // UpdateOpsMetadataWithContext is the same as UpdateOpsMetadata with the addition of // the ability to pass a context and additional request options. // // See UpdateOpsMetadata for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateOpsMetadataWithContext(ctx aws.Context, input *UpdateOpsMetadataInput, opts ...request.Option) (*UpdateOpsMetadataOutput, error) { req, out := c.UpdateOpsMetadataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdatePatchBaseline = "UpdatePatchBaseline" // UpdatePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdatePatchBaseline for more information on using the UpdatePatchBaseline // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdatePatchBaselineRequest method. // req, resp := client.UpdatePatchBaselineRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdatePatchBaseline func (c *SSM) UpdatePatchBaselineRequest(input *UpdatePatchBaselineInput) (req *request.Request, output *UpdatePatchBaselineOutput) { op := &request.Operation{ Name: opUpdatePatchBaseline, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdatePatchBaselineInput{} } output = &UpdatePatchBaselineOutput{} req = c.newRequest(op, input, output) return } // UpdatePatchBaseline API operation for Amazon Simple Systems Manager (SSM). // // Modifies an existing patch baseline. Fields not specified in the request // are left unchanged. // // For information about valid key-value pairs in PatchFilters for each supported // operating system type, see PatchFilter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdatePatchBaseline for usage and error information. // // Returned Error Types: // // - DoesNotExistException // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdatePatchBaseline func (c *SSM) UpdatePatchBaseline(input *UpdatePatchBaselineInput) (*UpdatePatchBaselineOutput, error) { req, out := c.UpdatePatchBaselineRequest(input) return out, req.Send() } // UpdatePatchBaselineWithContext is the same as UpdatePatchBaseline with the addition of // the ability to pass a context and additional request options. // // See UpdatePatchBaseline for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdatePatchBaselineWithContext(ctx aws.Context, input *UpdatePatchBaselineInput, opts ...request.Option) (*UpdatePatchBaselineOutput, error) { req, out := c.UpdatePatchBaselineRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateResourceDataSync = "UpdateResourceDataSync" // UpdateResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the UpdateResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateResourceDataSync for more information on using the UpdateResourceDataSync // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateResourceDataSyncRequest method. // req, resp := client.UpdateResourceDataSyncRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateResourceDataSync func (c *SSM) UpdateResourceDataSyncRequest(input *UpdateResourceDataSyncInput) (req *request.Request, output *UpdateResourceDataSyncOutput) { op := &request.Operation{ Name: opUpdateResourceDataSync, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateResourceDataSyncInput{} } output = &UpdateResourceDataSyncOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UpdateResourceDataSync API operation for Amazon Simple Systems Manager (SSM). // // Update a resource data sync. After you create a resource data sync for a // Region, you can't change the account options for that sync. For example, // if you create a sync in the us-east-2 (Ohio) Region and you choose the Include // only the current account option, you can't edit that sync later and choose // the Include all accounts from my Organizations configuration option. Instead, // you must delete the first resource data sync, and create a new one. // // This API operation only supports a resource data sync that was created with // a SyncFromSource SyncType. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateResourceDataSync for usage and error information. // // Returned Error Types: // // - ResourceDataSyncNotFoundException // The specified sync name wasn't found. // // - ResourceDataSyncInvalidConfigurationException // The specified sync configuration is invalid. // // - ResourceDataSyncConflictException // Another UpdateResourceDataSync request is being processed. Wait a few minutes // and try again. // // - InternalServerError // An error occurred on the server side. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateResourceDataSync func (c *SSM) UpdateResourceDataSync(input *UpdateResourceDataSyncInput) (*UpdateResourceDataSyncOutput, error) { req, out := c.UpdateResourceDataSyncRequest(input) return out, req.Send() } // UpdateResourceDataSyncWithContext is the same as UpdateResourceDataSync with the addition of // the ability to pass a context and additional request options. // // See UpdateResourceDataSync for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateResourceDataSyncWithContext(ctx aws.Context, input *UpdateResourceDataSyncInput, opts ...request.Option) (*UpdateResourceDataSyncOutput, error) { req, out := c.UpdateResourceDataSyncRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateServiceSetting = "UpdateServiceSetting" // UpdateServiceSettingRequest generates a "aws/request.Request" representing the // client's request for the UpdateServiceSetting operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateServiceSetting for more information on using the UpdateServiceSetting // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the UpdateServiceSettingRequest method. // req, resp := client.UpdateServiceSettingRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateServiceSetting func (c *SSM) UpdateServiceSettingRequest(input *UpdateServiceSettingInput) (req *request.Request, output *UpdateServiceSettingOutput) { op := &request.Operation{ Name: opUpdateServiceSetting, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateServiceSettingInput{} } output = &UpdateServiceSettingOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UpdateServiceSetting API operation for Amazon Simple Systems Manager (SSM). // // ServiceSetting is an account-level setting for an Amazon Web Services service. // This setting defines how a user interacts with or uses a service or a feature // of a service. For example, if an Amazon Web Services service charges money // to the account based on feature or service usage, then the Amazon Web Services // service team might create a default setting of "false". This means the user // can't use this feature unless they change the setting to "true" and intentionally // opt in for a paid feature. // // Services map a SettingId object to a setting value. Amazon Web Services services // teams define the default value for a SettingId. You can't create a new SettingId, // but you can overwrite the default value if you have the ssm:UpdateServiceSetting // permission for the setting. Use the GetServiceSetting API operation to view // the current value. Or, use the ResetServiceSetting to change the value back // to the original value defined by the Amazon Web Services service team. // // Update the service setting for the account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s // API operation UpdateServiceSetting for usage and error information. // // Returned Error Types: // // - InternalServerError // An error occurred on the server side. // // - ServiceSettingNotFound // The specified service setting wasn't found. Either the service name or the // setting hasn't been provisioned by the Amazon Web Services service team. // // - TooManyUpdates // There are concurrent updates for a resource that supports one update at a // time. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateServiceSetting func (c *SSM) UpdateServiceSetting(input *UpdateServiceSettingInput) (*UpdateServiceSettingOutput, error) { req, out := c.UpdateServiceSettingRequest(input) return out, req.Send() } // UpdateServiceSettingWithContext is the same as UpdateServiceSetting with the addition of // the ability to pass a context and additional request options. // // See UpdateServiceSetting for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSM) UpdateServiceSettingWithContext(ctx aws.Context, input *UpdateServiceSettingInput, opts ...request.Option) (*UpdateServiceSettingOutput, error) { req, out := c.UpdateServiceSettingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // Information includes the Amazon Web Services account ID where the current // document is shared and the version shared with that account. type AccountSharingInfo struct { _ struct{} `type:"structure"` // The Amazon Web Services account ID where the current document is shared. AccountId *string `type:"string"` // The version of the current document shared with the account. SharedDocumentVersion *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AccountSharingInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AccountSharingInfo) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *AccountSharingInfo) SetAccountId(v string) *AccountSharingInfo { s.AccountId = &v return s } // SetSharedDocumentVersion sets the SharedDocumentVersion field's value. func (s *AccountSharingInfo) SetSharedDocumentVersion(v string) *AccountSharingInfo { s.SharedDocumentVersion = &v return s } // An activation registers one or more on-premises servers or virtual machines // (VMs) with Amazon Web Services so that you can configure those servers or // VMs using Run Command. A server or VM that has been registered with Amazon // Web Services Systems Manager is called a managed node. type Activation struct { _ struct{} `type:"structure"` // The ID created by Systems Manager when you submitted the activation. ActivationId *string `type:"string"` // The date the activation was created. CreatedDate *time.Time `type:"timestamp"` // A name for the managed node when it is created. DefaultInstanceName *string `type:"string"` // A user defined description of the activation. Description *string `type:"string"` // The date when this activation can no longer be used to register managed nodes. ExpirationDate *time.Time `type:"timestamp"` // Whether or not the activation is expired. Expired *bool `type:"boolean"` // The Identity and Access Management (IAM) role to assign to the managed node. IamRole *string `type:"string"` // The maximum number of managed nodes that can be registered using this activation. RegistrationLimit *int64 `min:"1" type:"integer"` // The number of managed nodes already registered with this activation. RegistrationsCount *int64 `min:"1" type:"integer"` // Tags assigned to the activation. Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Activation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Activation) GoString() string { return s.String() } // SetActivationId sets the ActivationId field's value. func (s *Activation) SetActivationId(v string) *Activation { s.ActivationId = &v return s } // SetCreatedDate sets the CreatedDate field's value. func (s *Activation) SetCreatedDate(v time.Time) *Activation { s.CreatedDate = &v return s } // SetDefaultInstanceName sets the DefaultInstanceName field's value. func (s *Activation) SetDefaultInstanceName(v string) *Activation { s.DefaultInstanceName = &v return s } // SetDescription sets the Description field's value. func (s *Activation) SetDescription(v string) *Activation { s.Description = &v return s } // SetExpirationDate sets the ExpirationDate field's value. func (s *Activation) SetExpirationDate(v time.Time) *Activation { s.ExpirationDate = &v return s } // SetExpired sets the Expired field's value. func (s *Activation) SetExpired(v bool) *Activation { s.Expired = &v return s } // SetIamRole sets the IamRole field's value. func (s *Activation) SetIamRole(v string) *Activation { s.IamRole = &v return s } // SetRegistrationLimit sets the RegistrationLimit field's value. func (s *Activation) SetRegistrationLimit(v int64) *Activation { s.RegistrationLimit = &v return s } // SetRegistrationsCount sets the RegistrationsCount field's value. func (s *Activation) SetRegistrationsCount(v int64) *Activation { s.RegistrationsCount = &v return s } // SetTags sets the Tags field's value. func (s *Activation) SetTags(v []*Tag) *Activation { s.Tags = v return s } type AddTagsToResourceInput struct { _ struct{} `type:"structure"` // The resource ID you want to tag. // // Use the ID of the resource. Here are some examples: // // MaintenanceWindow: mw-012345abcde // // PatchBaseline: pb-012345abcde // // Automation: example-c160-4567-8519-012345abcde // // OpsMetadata object: ResourceID for tagging is created from the Amazon Resource // Name (ARN) for the object. Specifically, ResourceID is created from the strings // that come after the word opsmetadata in the ARN. For example, an OpsMetadata // object with an ARN of arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager // has a ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager. // // For the Document and Parameter values, use the name of the resource. If you're // tagging a shared document, you must use the full ARN of the document. // // ManagedInstance: mi-012345abcde // // The ManagedInstance type for this API operation is only for on-premises managed // nodes. You must specify the name of the managed node in the following format: // mi-ID_number . For example, mi-1a2b3c4d5e6f. // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` // Specifies the type of resource you are tagging. // // The ManagedInstance type for this API operation is for on-premises managed // nodes. You must specify the name of the managed node in the following format: // mi-ID_number . For example, mi-1a2b3c4d5e6f. // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` // One or more tags. The value parameter is required. // // Don't enter personally identifiable information in this field. // // Tags is a required field Tags []*Tag `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AddTagsToResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AddTagsToResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AddTagsToResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.Tags == nil { invalidParams.Add(request.NewErrParamRequired("Tags")) } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceId sets the ResourceId field's value. func (s *AddTagsToResourceInput) SetResourceId(v string) *AddTagsToResourceInput { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *AddTagsToResourceInput) SetResourceType(v string) *AddTagsToResourceInput { s.ResourceType = &v return s } // SetTags sets the Tags field's value. func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { s.Tags = v return s } type AddTagsToResourceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AddTagsToResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AddTagsToResourceOutput) GoString() string { return s.String() } // A CloudWatch alarm you apply to an automation or command. type Alarm struct { _ struct{} `type:"structure"` // The name of your CloudWatch alarm. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Alarm) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Alarm) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Alarm) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Alarm"} 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 } // SetName sets the Name field's value. func (s *Alarm) SetName(v string) *Alarm { s.Name = &v return s } // The details for the CloudWatch alarm you want to apply to an automation or // command. type AlarmConfiguration struct { _ struct{} `type:"structure"` // The name of the CloudWatch alarm specified in the configuration. // // Alarms is a required field Alarms []*Alarm `min:"1" type:"list" required:"true"` // When this value is true, your automation or command continues to run in cases // where we can’t retrieve alarm status information from CloudWatch. In cases // where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, // the automation or command continues to run, regardless of this value. Default // is false. IgnorePollAlarmFailure *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AlarmConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AlarmConfiguration) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AlarmConfiguration) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AlarmConfiguration"} if s.Alarms == nil { invalidParams.Add(request.NewErrParamRequired("Alarms")) } if s.Alarms != nil && len(s.Alarms) < 1 { invalidParams.Add(request.NewErrParamMinLen("Alarms", 1)) } if s.Alarms != nil { for i, v := range s.Alarms { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Alarms", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAlarms sets the Alarms field's value. func (s *AlarmConfiguration) SetAlarms(v []*Alarm) *AlarmConfiguration { s.Alarms = v return s } // SetIgnorePollAlarmFailure sets the IgnorePollAlarmFailure field's value. func (s *AlarmConfiguration) SetIgnorePollAlarmFailure(v bool) *AlarmConfiguration { s.IgnorePollAlarmFailure = &v return s } // The details about the state of your CloudWatch alarm. type AlarmStateInformation struct { _ struct{} `type:"structure"` // The name of your CloudWatch alarm. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // The state of your CloudWatch alarm. // // State is a required field State *string `type:"string" required:"true" enum:"ExternalAlarmState"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AlarmStateInformation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AlarmStateInformation) GoString() string { return s.String() } // SetName sets the Name field's value. func (s *AlarmStateInformation) SetName(v string) *AlarmStateInformation { s.Name = &v return s } // SetState sets the State field's value. func (s *AlarmStateInformation) SetState(v string) *AlarmStateInformation { s.State = &v return s } // Error returned if an attempt is made to register a patch group with a patch // baseline that is already registered with a different patch baseline. type AlreadyExistsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AlreadyExistsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AlreadyExistsException) GoString() string { return s.String() } func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error { return &AlreadyExistsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AlreadyExistsException) Code() string { return "AlreadyExistsException" } // Message returns the exception's message. func (s *AlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AlreadyExistsException) OrigErr() error { return nil } func (s *AlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AlreadyExistsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AlreadyExistsException) RequestID() string { return s.RespMetadata.RequestID } type AssociateOpsItemRelatedItemInput struct { _ struct{} `type:"structure"` // The type of association that you want to create between an OpsItem and a // resource. OpsCenter supports IsParentOf and RelatesTo association types. // // AssociationType is a required field AssociationType *string `type:"string" required:"true"` // The ID of the OpsItem to which you want to associate a resource as a related // item. // // OpsItemId is a required field OpsItemId *string `type:"string" required:"true"` // The type of resource that you want to associate with an OpsItem. OpsCenter // supports the following types: // // AWS::SSMIncidents::IncidentRecord: an Incident Manager incident. // // AWS::SSM::Document: a Systems Manager (SSM) document. // // ResourceType is a required field ResourceType *string `type:"string" required:"true"` // The Amazon Resource Name (ARN) of the Amazon Web Services resource that you // want to associate with the OpsItem. // // ResourceUri is a required field ResourceUri *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociateOpsItemRelatedItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociateOpsItemRelatedItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssociateOpsItemRelatedItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssociateOpsItemRelatedItemInput"} if s.AssociationType == nil { invalidParams.Add(request.NewErrParamRequired("AssociationType")) } if s.OpsItemId == nil { invalidParams.Add(request.NewErrParamRequired("OpsItemId")) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.ResourceUri == nil { invalidParams.Add(request.NewErrParamRequired("ResourceUri")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAssociationType sets the AssociationType field's value. func (s *AssociateOpsItemRelatedItemInput) SetAssociationType(v string) *AssociateOpsItemRelatedItemInput { s.AssociationType = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *AssociateOpsItemRelatedItemInput) SetOpsItemId(v string) *AssociateOpsItemRelatedItemInput { s.OpsItemId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *AssociateOpsItemRelatedItemInput) SetResourceType(v string) *AssociateOpsItemRelatedItemInput { s.ResourceType = &v return s } // SetResourceUri sets the ResourceUri field's value. func (s *AssociateOpsItemRelatedItemInput) SetResourceUri(v string) *AssociateOpsItemRelatedItemInput { s.ResourceUri = &v return s } type AssociateOpsItemRelatedItemOutput struct { _ struct{} `type:"structure"` // The association ID. AssociationId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociateOpsItemRelatedItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociateOpsItemRelatedItemOutput) GoString() string { return s.String() } // SetAssociationId sets the AssociationId field's value. func (s *AssociateOpsItemRelatedItemOutput) SetAssociationId(v string) *AssociateOpsItemRelatedItemOutput { s.AssociationId = &v return s } // You must disassociate a document from all managed nodes before you can delete // it. type AssociatedInstances struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociatedInstances) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociatedInstances) GoString() string { return s.String() } func newErrorAssociatedInstances(v protocol.ResponseMetadata) error { return &AssociatedInstances{ RespMetadata: v, } } // Code returns the exception type name. func (s *AssociatedInstances) Code() string { return "AssociatedInstances" } // Message returns the exception's message. func (s *AssociatedInstances) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AssociatedInstances) OrigErr() error { return nil } func (s *AssociatedInstances) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AssociatedInstances) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AssociatedInstances) RequestID() string { return s.RespMetadata.RequestID } // Describes an association of a Amazon Web Services Systems Manager document // (SSM document) and a managed node. type Association struct { _ struct{} `type:"structure"` // The ID created by the system when you create an association. An association // is a binding between a document and a set of targets with a schedule. AssociationId *string `type:"string"` // The association name. AssociationName *string `type:"string"` // The association version. AssociationVersion *string `type:"string"` // The version of the document used in the association. If you change a document // version for a State Manager association, Systems Manager immediately runs // the association unless you previously specifed the apply-only-at-cron-interval // parameter. // // State Manager doesn't support running associations that use a new version // of a document if that document is shared from another account. State Manager // always runs the default version of a document if shared from another account, // even though the Systems Manager console shows that a new version was processed. // If you want to run an association using a new version of a document shared // form another account, you must set the document version to default. DocumentVersion *string `type:"string"` // The managed node ID. InstanceId *string `type:"string"` // The date on which the association was last run. LastExecutionDate *time.Time `type:"timestamp"` // The name of the SSM document. Name *string `type:"string"` // Information about the association. Overview *AssociationOverview `type:"structure"` // A cron expression that specifies a schedule when the association runs. The // schedule runs in Coordinated Universal Time (UTC). ScheduleExpression *string `min:"1" type:"string"` // Number of days to wait after the scheduled day to run an association. ScheduleOffset *int64 `min:"1" type:"integer"` // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]*string `type:"list"` // The managed nodes targeted by the request to create an association. You can // target all managed nodes in an Amazon Web Services account by specifying // the InstanceIds key with a value of *. Targets []*Target `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Association) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Association) GoString() string { return s.String() } // SetAssociationId sets the AssociationId field's value. func (s *Association) SetAssociationId(v string) *Association { s.AssociationId = &v return s } // SetAssociationName sets the AssociationName field's value. func (s *Association) SetAssociationName(v string) *Association { s.AssociationName = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *Association) SetAssociationVersion(v string) *Association { s.AssociationVersion = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *Association) SetDocumentVersion(v string) *Association { s.DocumentVersion = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *Association) SetInstanceId(v string) *Association { s.InstanceId = &v return s } // SetLastExecutionDate sets the LastExecutionDate field's value. func (s *Association) SetLastExecutionDate(v time.Time) *Association { s.LastExecutionDate = &v return s } // SetName sets the Name field's value. func (s *Association) SetName(v string) *Association { s.Name = &v return s } // SetOverview sets the Overview field's value. func (s *Association) SetOverview(v *AssociationOverview) *Association { s.Overview = v return s } // SetScheduleExpression sets the ScheduleExpression field's value. func (s *Association) SetScheduleExpression(v string) *Association { s.ScheduleExpression = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *Association) SetScheduleOffset(v int64) *Association { s.ScheduleOffset = &v return s } // SetTargetMaps sets the TargetMaps field's value. func (s *Association) SetTargetMaps(v []map[string][]*string) *Association { s.TargetMaps = v return s } // SetTargets sets the Targets field's value. func (s *Association) SetTargets(v []*Target) *Association { s.Targets = v return s } // The specified association already exists. type AssociationAlreadyExists struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationAlreadyExists) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationAlreadyExists) GoString() string { return s.String() } func newErrorAssociationAlreadyExists(v protocol.ResponseMetadata) error { return &AssociationAlreadyExists{ RespMetadata: v, } } // Code returns the exception type name. func (s *AssociationAlreadyExists) Code() string { return "AssociationAlreadyExists" } // Message returns the exception's message. func (s *AssociationAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AssociationAlreadyExists) OrigErr() error { return nil } func (s *AssociationAlreadyExists) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AssociationAlreadyExists) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AssociationAlreadyExists) RequestID() string { return s.RespMetadata.RequestID } // Describes the parameters for a document. type AssociationDescription struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm you want to apply to an automation or // command. AlarmConfiguration *AlarmConfiguration `type:"structure"` // By default, when you create a new associations, the system runs it immediately // after it is created and then according to the schedule you specified. Specify // this option if you don't want an association to run immediately after you // create it. This parameter isn't supported for rate expressions. ApplyOnlyAtCronInterval *bool `type:"boolean"` // The association ID. AssociationId *string `type:"string"` // The association name. AssociationName *string `type:"string"` // The association version. AssociationVersion *string `type:"string"` // Choose the parameter that will define how your automation will branch out. // This target is required for associations that use an Automation runbook and // target resources by using rate controls. Automation is a capability of Amazon // Web Services Systems Manager. AutomationTargetParameterName *string `min:"1" type:"string"` // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents // your associations are gated under. The associations only run when that change // calendar is open. For more information, see Amazon Web Services Systems Manager // Change Calendar (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar). CalendarNames []*string `type:"list"` // 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"` // The document version. DocumentVersion *string `type:"string"` // The managed node ID. InstanceId *string `type:"string"` // The date on which the association was last run. LastExecutionDate *time.Time `type:"timestamp"` // The last date on which the association was successfully run. LastSuccessfulExecutionDate *time.Time `type:"timestamp"` // 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 managed node starts and attempts to run an association while Systems // Manager is running MaxConcurrency associations, the association is allowed // to run. During the next association interval, the new managed node 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 managed nodes 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 SSM document. Name *string `type:"string"` // An S3 bucket where you want to store the output details of the request. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // Information about the association. Overview *AssociationOverview `type:"structure"` // A description of the parameters for a document. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by AssociationDescription's // String and GoString methods. Parameters map[string][]*string `type:"map" sensitive:"true"` // A cron expression that specifies a schedule when the association runs. ScheduleExpression *string `min:"1" type:"string"` // Number of days to wait after the scheduled day to run an association. ScheduleOffset *int64 `min:"1" type:"integer"` // The association status. Status *AssociationStatus `type:"structure"` // The mode for generating association compliance. You can specify AUTO or MANUAL. // In AUTO mode, the system uses the status of the association execution to // determine the compliance status. If the association execution runs successfully, // then the association is COMPLIANT. If the association execution doesn't run // successfully, the association is NON-COMPLIANT. // // In MANUAL mode, you must specify the AssociationId as a parameter for the // PutComplianceItems API operation. In this case, compliance data isn't managed // by State Manager, a capability of Amazon Web Services Systems Manager. It // is managed by your direct call to the PutComplianceItems API operation. // // By default, all associations use AUTO mode. SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` // The combination of Amazon Web Services Regions and Amazon Web Services accounts // where you want to run the association. TargetLocations []*TargetLocation `min:"1" type:"list"` // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]*string `type:"list"` // The managed nodes targeted by the request. Targets []*Target `type:"list"` // The CloudWatch alarm that was invoked during the association. TriggeredAlarms []*AlarmStateInformation `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationDescription) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *AssociationDescription) SetAlarmConfiguration(v *AlarmConfiguration) *AssociationDescription { s.AlarmConfiguration = v return s } // SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value. func (s *AssociationDescription) SetApplyOnlyAtCronInterval(v bool) *AssociationDescription { s.ApplyOnlyAtCronInterval = &v return s } // SetAssociationId sets the AssociationId field's value. func (s *AssociationDescription) SetAssociationId(v string) *AssociationDescription { s.AssociationId = &v return s } // SetAssociationName sets the AssociationName field's value. func (s *AssociationDescription) SetAssociationName(v string) *AssociationDescription { s.AssociationName = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *AssociationDescription) SetAssociationVersion(v string) *AssociationDescription { s.AssociationVersion = &v return s } // SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. func (s *AssociationDescription) SetAutomationTargetParameterName(v string) *AssociationDescription { s.AutomationTargetParameterName = &v return s } // SetCalendarNames sets the CalendarNames field's value. func (s *AssociationDescription) SetCalendarNames(v []*string) *AssociationDescription { s.CalendarNames = v 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 return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *AssociationDescription) SetDocumentVersion(v string) *AssociationDescription { s.DocumentVersion = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *AssociationDescription) SetInstanceId(v string) *AssociationDescription { s.InstanceId = &v return s } // SetLastExecutionDate sets the LastExecutionDate field's value. func (s *AssociationDescription) SetLastExecutionDate(v time.Time) *AssociationDescription { s.LastExecutionDate = &v return s } // SetLastSuccessfulExecutionDate sets the LastSuccessfulExecutionDate field's value. func (s *AssociationDescription) SetLastSuccessfulExecutionDate(v time.Time) *AssociationDescription { s.LastSuccessfulExecutionDate = &v return s } // SetLastUpdateAssociationDate sets the LastUpdateAssociationDate field's value. func (s *AssociationDescription) SetLastUpdateAssociationDate(v time.Time) *AssociationDescription { s.LastUpdateAssociationDate = &v 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 return s } // SetOutputLocation sets the OutputLocation field's value. func (s *AssociationDescription) SetOutputLocation(v *InstanceAssociationOutputLocation) *AssociationDescription { s.OutputLocation = v return s } // SetOverview sets the Overview field's value. func (s *AssociationDescription) SetOverview(v *AssociationOverview) *AssociationDescription { s.Overview = v return s } // SetParameters sets the Parameters field's value. func (s *AssociationDescription) SetParameters(v map[string][]*string) *AssociationDescription { s.Parameters = v return s } // SetScheduleExpression sets the ScheduleExpression field's value. func (s *AssociationDescription) SetScheduleExpression(v string) *AssociationDescription { s.ScheduleExpression = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *AssociationDescription) SetScheduleOffset(v int64) *AssociationDescription { s.ScheduleOffset = &v return s } // SetStatus sets the Status field's value. func (s *AssociationDescription) SetStatus(v *AssociationStatus) *AssociationDescription { s.Status = v return s } // SetSyncCompliance sets the SyncCompliance field's value. func (s *AssociationDescription) SetSyncCompliance(v string) *AssociationDescription { s.SyncCompliance = &v return s } // SetTargetLocations sets the TargetLocations field's value. func (s *AssociationDescription) SetTargetLocations(v []*TargetLocation) *AssociationDescription { s.TargetLocations = v return s } // SetTargetMaps sets the TargetMaps field's value. func (s *AssociationDescription) SetTargetMaps(v []map[string][]*string) *AssociationDescription { s.TargetMaps = v return s } // SetTargets sets the Targets field's value. func (s *AssociationDescription) SetTargets(v []*Target) *AssociationDescription { s.Targets = v return s } // SetTriggeredAlarms sets the TriggeredAlarms field's value. func (s *AssociationDescription) SetTriggeredAlarms(v []*AlarmStateInformation) *AssociationDescription { s.TriggeredAlarms = v return s } // The specified association doesn't exist. type AssociationDoesNotExist struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationDoesNotExist) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationDoesNotExist) GoString() string { return s.String() } func newErrorAssociationDoesNotExist(v protocol.ResponseMetadata) error { return &AssociationDoesNotExist{ RespMetadata: v, } } // Code returns the exception type name. func (s *AssociationDoesNotExist) Code() string { return "AssociationDoesNotExist" } // Message returns the exception's message. func (s *AssociationDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AssociationDoesNotExist) OrigErr() error { return nil } func (s *AssociationDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AssociationDoesNotExist) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AssociationDoesNotExist) RequestID() string { return s.RespMetadata.RequestID } // Includes information about the specified association. type AssociationExecution struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm you want to apply to an automation or // command. AlarmConfiguration *AlarmConfiguration `type:"structure"` // The association ID. AssociationId *string `type:"string"` // The association version. AssociationVersion *string `type:"string"` // The time the execution started. CreatedTime *time.Time `type:"timestamp"` // Detailed status information about the execution. DetailedStatus *string `type:"string"` // The execution ID for the association. ExecutionId *string `type:"string"` // The date of the last execution. LastExecutionDate *time.Time `type:"timestamp"` // An aggregate status of the resources in the execution based on the status // type. ResourceCountByStatus *string `type:"string"` // The status of the association execution. Status *string `type:"string"` // The CloudWatch alarms that were invoked by the association. TriggeredAlarms []*AlarmStateInformation `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecution) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecution) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *AssociationExecution) SetAlarmConfiguration(v *AlarmConfiguration) *AssociationExecution { s.AlarmConfiguration = v return s } // SetAssociationId sets the AssociationId field's value. func (s *AssociationExecution) SetAssociationId(v string) *AssociationExecution { s.AssociationId = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *AssociationExecution) SetAssociationVersion(v string) *AssociationExecution { s.AssociationVersion = &v return s } // SetCreatedTime sets the CreatedTime field's value. func (s *AssociationExecution) SetCreatedTime(v time.Time) *AssociationExecution { s.CreatedTime = &v return s } // SetDetailedStatus sets the DetailedStatus field's value. func (s *AssociationExecution) SetDetailedStatus(v string) *AssociationExecution { s.DetailedStatus = &v return s } // SetExecutionId sets the ExecutionId field's value. func (s *AssociationExecution) SetExecutionId(v string) *AssociationExecution { s.ExecutionId = &v return s } // SetLastExecutionDate sets the LastExecutionDate field's value. func (s *AssociationExecution) SetLastExecutionDate(v time.Time) *AssociationExecution { s.LastExecutionDate = &v return s } // SetResourceCountByStatus sets the ResourceCountByStatus field's value. func (s *AssociationExecution) SetResourceCountByStatus(v string) *AssociationExecution { s.ResourceCountByStatus = &v return s } // SetStatus sets the Status field's value. func (s *AssociationExecution) SetStatus(v string) *AssociationExecution { s.Status = &v return s } // SetTriggeredAlarms sets the TriggeredAlarms field's value. func (s *AssociationExecution) SetTriggeredAlarms(v []*AlarmStateInformation) *AssociationExecution { s.TriggeredAlarms = v return s } // The specified execution ID doesn't exist. Verify the ID number and try again. type AssociationExecutionDoesNotExist struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecutionDoesNotExist) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecutionDoesNotExist) GoString() string { return s.String() } func newErrorAssociationExecutionDoesNotExist(v protocol.ResponseMetadata) error { return &AssociationExecutionDoesNotExist{ RespMetadata: v, } } // Code returns the exception type name. func (s *AssociationExecutionDoesNotExist) Code() string { return "AssociationExecutionDoesNotExist" } // Message returns the exception's message. func (s *AssociationExecutionDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AssociationExecutionDoesNotExist) OrigErr() error { return nil } func (s *AssociationExecutionDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AssociationExecutionDoesNotExist) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AssociationExecutionDoesNotExist) RequestID() string { return s.RespMetadata.RequestID } // Filters used in the request. type AssociationExecutionFilter struct { _ struct{} `type:"structure"` // The key value used in the request. // // Key is a required field Key *string `type:"string" required:"true" enum:"AssociationExecutionFilterKey"` // The filter type specified in the request. // // Type is a required field Type *string `type:"string" required:"true" enum:"AssociationFilterOperatorType"` // The value specified for the key. // // Value is a required field Value *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecutionFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecutionFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssociationExecutionFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssociationExecutionFilter"} 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 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 *AssociationExecutionFilter) SetKey(v string) *AssociationExecutionFilter { s.Key = &v return s } // SetType sets the Type field's value. func (s *AssociationExecutionFilter) SetType(v string) *AssociationExecutionFilter { s.Type = &v return s } // SetValue sets the Value field's value. func (s *AssociationExecutionFilter) SetValue(v string) *AssociationExecutionFilter { s.Value = &v return s } // Includes information about the specified association execution. type AssociationExecutionTarget struct { _ struct{} `type:"structure"` // The association ID. AssociationId *string `type:"string"` // The association version. AssociationVersion *string `type:"string"` // Detailed information about the execution status. DetailedStatus *string `type:"string"` // The execution ID. ExecutionId *string `type:"string"` // The date of the last execution. LastExecutionDate *time.Time `type:"timestamp"` // The location where the association details are saved. OutputSource *OutputSource `type:"structure"` // The resource ID, for example, the managed node ID where the association ran. ResourceId *string `min:"1" type:"string"` // The resource type, for example, EC2. ResourceType *string `min:"1" type:"string"` // The association execution status. Status *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecutionTarget) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecutionTarget) GoString() string { return s.String() } // SetAssociationId sets the AssociationId field's value. func (s *AssociationExecutionTarget) SetAssociationId(v string) *AssociationExecutionTarget { s.AssociationId = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *AssociationExecutionTarget) SetAssociationVersion(v string) *AssociationExecutionTarget { s.AssociationVersion = &v return s } // SetDetailedStatus sets the DetailedStatus field's value. func (s *AssociationExecutionTarget) SetDetailedStatus(v string) *AssociationExecutionTarget { s.DetailedStatus = &v return s } // SetExecutionId sets the ExecutionId field's value. func (s *AssociationExecutionTarget) SetExecutionId(v string) *AssociationExecutionTarget { s.ExecutionId = &v return s } // SetLastExecutionDate sets the LastExecutionDate field's value. func (s *AssociationExecutionTarget) SetLastExecutionDate(v time.Time) *AssociationExecutionTarget { s.LastExecutionDate = &v return s } // SetOutputSource sets the OutputSource field's value. func (s *AssociationExecutionTarget) SetOutputSource(v *OutputSource) *AssociationExecutionTarget { s.OutputSource = v return s } // SetResourceId sets the ResourceId field's value. func (s *AssociationExecutionTarget) SetResourceId(v string) *AssociationExecutionTarget { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *AssociationExecutionTarget) SetResourceType(v string) *AssociationExecutionTarget { s.ResourceType = &v return s } // SetStatus sets the Status field's value. func (s *AssociationExecutionTarget) SetStatus(v string) *AssociationExecutionTarget { s.Status = &v return s } // Filters for the association execution. type AssociationExecutionTargetsFilter struct { _ struct{} `type:"structure"` // The key value used in the request. // // Key is a required field Key *string `type:"string" required:"true" enum:"AssociationExecutionTargetsFilterKey"` // The value specified for the key. // // Value is a required field Value *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecutionTargetsFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationExecutionTargetsFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssociationExecutionTargetsFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssociationExecutionTargetsFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if s.Value != nil && len(*s.Value) < 1 { invalidParams.Add(request.NewErrParamMinLen("Value", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *AssociationExecutionTargetsFilter) SetKey(v string) *AssociationExecutionTargetsFilter { s.Key = &v return s } // SetValue sets the Value field's value. func (s *AssociationExecutionTargetsFilter) SetValue(v string) *AssociationExecutionTargetsFilter { s.Value = &v return s } // Describes a filter. type AssociationFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // InstanceId has been deprecated. // // Key is a required field Key *string `locationName:"key" type:"string" required:"true" enum:"AssociationFilterKey"` // The filter value. // // Value is a required field Value *string `locationName:"value" min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssociationFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssociationFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if s.Value != nil && len(*s.Value) < 1 { invalidParams.Add(request.NewErrParamMinLen("Value", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *AssociationFilter) SetKey(v string) *AssociationFilter { s.Key = &v return s } // SetValue sets the Value field's value. func (s *AssociationFilter) SetValue(v string) *AssociationFilter { s.Value = &v return s } // You can have at most 2,000 active associations. type AssociationLimitExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationLimitExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationLimitExceeded) GoString() string { return s.String() } func newErrorAssociationLimitExceeded(v protocol.ResponseMetadata) error { return &AssociationLimitExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *AssociationLimitExceeded) Code() string { return "AssociationLimitExceeded" } // Message returns the exception's message. func (s *AssociationLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AssociationLimitExceeded) OrigErr() error { return nil } func (s *AssociationLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AssociationLimitExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AssociationLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } // Information about the association. type AssociationOverview struct { _ struct{} `type:"structure"` // Returns the number of targets for the association status. For example, if // you created an association with two managed nodes, and one of them was successful, // this would return the count of managed nodes by status. AssociationStatusAggregatedCount map[string]*int64 `type:"map"` // A detailed status of the association. DetailedStatus *string `type:"string"` // The status of the association. Status can be: Pending, Success, or Failed. Status *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationOverview) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationOverview) GoString() string { return s.String() } // SetAssociationStatusAggregatedCount sets the AssociationStatusAggregatedCount field's value. func (s *AssociationOverview) SetAssociationStatusAggregatedCount(v map[string]*int64) *AssociationOverview { s.AssociationStatusAggregatedCount = v return s } // SetDetailedStatus sets the DetailedStatus field's value. func (s *AssociationOverview) SetDetailedStatus(v string) *AssociationOverview { s.DetailedStatus = &v return s } // SetStatus sets the Status field's value. func (s *AssociationOverview) SetStatus(v string) *AssociationOverview { s.Status = &v return s } // Describes an association status. type AssociationStatus struct { _ struct{} `type:"structure"` // A user-defined string. AdditionalInfo *string `type:"string"` // The date when the status changed. // // Date is a required field Date *time.Time `type:"timestamp" required:"true"` // The reason for the status. // // Message is a required field Message *string `min:"1" type:"string" required:"true"` // The status. // // Name is a required field Name *string `type:"string" required:"true" enum:"AssociationStatusName"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationStatus) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssociationStatus) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssociationStatus"} if s.Date == nil { invalidParams.Add(request.NewErrParamRequired("Date")) } if s.Message == nil { invalidParams.Add(request.NewErrParamRequired("Message")) } if s.Message != nil && len(*s.Message) < 1 { invalidParams.Add(request.NewErrParamMinLen("Message", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAdditionalInfo sets the AdditionalInfo field's value. func (s *AssociationStatus) SetAdditionalInfo(v string) *AssociationStatus { s.AdditionalInfo = &v return s } // SetDate sets the Date field's value. func (s *AssociationStatus) SetDate(v time.Time) *AssociationStatus { s.Date = &v return s } // SetMessage sets the Message field's value. func (s *AssociationStatus) SetMessage(v string) *AssociationStatus { s.Message = &v return s } // SetName sets the Name field's value. func (s *AssociationStatus) SetName(v string) *AssociationStatus { s.Name = &v return s } // Information about the association version. type AssociationVersionInfo struct { _ struct{} `type:"structure"` // By default, when you create a new associations, the system runs it immediately // after it is created and then according to the schedule you specified. Specify // this option if you don't want an association to run immediately after you // create it. This parameter isn't supported for rate expressions. ApplyOnlyAtCronInterval *bool `type:"boolean"` // The ID created by the system when the association was created. AssociationId *string `type:"string"` // The name specified for the association version when the association version // was created. AssociationName *string `type:"string"` // The association version. AssociationVersion *string `type:"string"` // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents // your associations are gated under. The associations for this version only // run when that Change Calendar is open. For more information, see Amazon Web // Services Systems Manager Change Calendar (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar). CalendarNames []*string `type:"list"` // 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"` // The version of an Amazon Web Services Systems Manager document (SSM document) // used when the association version 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 managed node starts and attempts to run an association while Systems // Manager is running MaxConcurrency associations, the association is allowed // to run. During the next association interval, the new managed node 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 managed nodes 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"` // The location in Amazon S3 specified for the association when the association // version was created. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // Parameters specified when the association version was created. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by AssociationVersionInfo's // String and GoString methods. Parameters map[string][]*string `type:"map" sensitive:"true"` // The cron or rate schedule specified for the association when the association // version was created. ScheduleExpression *string `min:"1" type:"string"` // Number of days to wait after the scheduled day to run an association. ScheduleOffset *int64 `min:"1" type:"integer"` // The mode for generating association compliance. You can specify AUTO or MANUAL. // In AUTO mode, the system uses the status of the association execution to // determine the compliance status. If the association execution runs successfully, // then the association is COMPLIANT. If the association execution doesn't run // successfully, the association is NON-COMPLIANT. // // In MANUAL mode, you must specify the AssociationId as a parameter for the // PutComplianceItems API operation. In this case, compliance data isn't managed // by State Manager, a capability of Amazon Web Services Systems Manager. It // is managed by your direct call to the PutComplianceItems API operation. // // By default, all associations use AUTO mode. SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` // The combination of Amazon Web Services Regions and Amazon Web Services accounts // where you wanted to run the association when this association version was // created. TargetLocations []*TargetLocation `min:"1" type:"list"` // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]*string `type:"list"` // The targets specified for the association when the association version was // created. Targets []*Target `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationVersionInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationVersionInfo) GoString() string { return s.String() } // SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value. func (s *AssociationVersionInfo) SetApplyOnlyAtCronInterval(v bool) *AssociationVersionInfo { s.ApplyOnlyAtCronInterval = &v return s } // SetAssociationId sets the AssociationId field's value. func (s *AssociationVersionInfo) SetAssociationId(v string) *AssociationVersionInfo { s.AssociationId = &v return s } // SetAssociationName sets the AssociationName field's value. func (s *AssociationVersionInfo) SetAssociationName(v string) *AssociationVersionInfo { s.AssociationName = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *AssociationVersionInfo) SetAssociationVersion(v string) *AssociationVersionInfo { s.AssociationVersion = &v return s } // SetCalendarNames sets the CalendarNames field's value. func (s *AssociationVersionInfo) SetCalendarNames(v []*string) *AssociationVersionInfo { s.CalendarNames = v 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 return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *AssociationVersionInfo) SetDocumentVersion(v string) *AssociationVersionInfo { s.DocumentVersion = &v 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 return s } // SetOutputLocation sets the OutputLocation field's value. func (s *AssociationVersionInfo) SetOutputLocation(v *InstanceAssociationOutputLocation) *AssociationVersionInfo { s.OutputLocation = v return s } // SetParameters sets the Parameters field's value. func (s *AssociationVersionInfo) SetParameters(v map[string][]*string) *AssociationVersionInfo { s.Parameters = v return s } // SetScheduleExpression sets the ScheduleExpression field's value. func (s *AssociationVersionInfo) SetScheduleExpression(v string) *AssociationVersionInfo { s.ScheduleExpression = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *AssociationVersionInfo) SetScheduleOffset(v int64) *AssociationVersionInfo { s.ScheduleOffset = &v return s } // SetSyncCompliance sets the SyncCompliance field's value. func (s *AssociationVersionInfo) SetSyncCompliance(v string) *AssociationVersionInfo { s.SyncCompliance = &v return s } // SetTargetLocations sets the TargetLocations field's value. func (s *AssociationVersionInfo) SetTargetLocations(v []*TargetLocation) *AssociationVersionInfo { s.TargetLocations = v return s } // SetTargetMaps sets the TargetMaps field's value. func (s *AssociationVersionInfo) SetTargetMaps(v []map[string][]*string) *AssociationVersionInfo { s.TargetMaps = v return s } // SetTargets sets the Targets field's value. func (s *AssociationVersionInfo) SetTargets(v []*Target) *AssociationVersionInfo { s.Targets = v return s } // You have reached the maximum number versions allowed for an association. // Each association has a limit of 1,000 versions. type AssociationVersionLimitExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationVersionLimitExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssociationVersionLimitExceeded) GoString() string { return s.String() } func newErrorAssociationVersionLimitExceeded(v protocol.ResponseMetadata) error { return &AssociationVersionLimitExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *AssociationVersionLimitExceeded) Code() string { return "AssociationVersionLimitExceeded" } // Message returns the exception's message. func (s *AssociationVersionLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AssociationVersionLimitExceeded) OrigErr() error { return nil } func (s *AssociationVersionLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AssociationVersionLimitExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AssociationVersionLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } // 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttachmentContent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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. type AttachmentInformation struct { _ struct{} `type:"structure"` // The name of the attachment. Name *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttachmentInformation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 } // Identifying information about a document attachment, including the file name // and a key-value pair that identifies the location of an attachment to a document. type AttachmentsSource struct { _ struct{} `type:"structure"` // The key of a key-value pair that identifies the location of an attachment // to a document. Key *string `type:"string" enum:"AttachmentsSourceKey"` // The name of the document attachment file. Name *string `type:"string"` // The value of a key-value pair that identifies the location of an attachment // to a document. The format for Value depends on the type of key you specify. // // * For the key SourceUrl, the value is an S3 bucket location. For example: // "Values": [ "s3://doc-example-bucket/my-folder" ] // // * For the key S3FileUrl, the value is a file in an S3 bucket. For example: // "Values": [ "s3://doc-example-bucket/my-folder/my-file.py" ] // // * For the key AttachmentReference, the value is constructed from the name // of another SSM document in your account, a version number of that document, // and a file attached to that document version that you want to reuse. For // example: "Values": [ "MyOtherDocument/3/my-other-file.py" ] However, if // the SSM document is shared with you from another account, the full SSM // document ARN must be specified instead of the document name only. For // example: "Values": [ "arn:aws:ssm:us-east-2:111122223333:document/OtherAccountDocument/3/their-file.py" // ] Values []*string `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AttachmentsSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 } // SetName sets the Name field's value. func (s *AttachmentsSource) SetName(v string) *AttachmentsSource { s.Name = &v return s } // SetValues sets the Values field's value. func (s *AttachmentsSource) SetValues(v []*string) *AttachmentsSource { s.Values = v return s } // Indicates that the Change Manager change template used in the change request // was rejected or is still in a pending state. type AutomationDefinitionNotApprovedException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationDefinitionNotApprovedException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationDefinitionNotApprovedException) GoString() string { return s.String() } func newErrorAutomationDefinitionNotApprovedException(v protocol.ResponseMetadata) error { return &AutomationDefinitionNotApprovedException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AutomationDefinitionNotApprovedException) Code() string { return "AutomationDefinitionNotApprovedException" } // Message returns the exception's message. func (s *AutomationDefinitionNotApprovedException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AutomationDefinitionNotApprovedException) OrigErr() error { return nil } func (s *AutomationDefinitionNotApprovedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AutomationDefinitionNotApprovedException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AutomationDefinitionNotApprovedException) RequestID() string { return s.RespMetadata.RequestID } // An Automation runbook with the specified name couldn't be found. type AutomationDefinitionNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationDefinitionNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationDefinitionNotFoundException) GoString() string { return s.String() } func newErrorAutomationDefinitionNotFoundException(v protocol.ResponseMetadata) error { return &AutomationDefinitionNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AutomationDefinitionNotFoundException) Code() string { return "AutomationDefinitionNotFoundException" } // Message returns the exception's message. func (s *AutomationDefinitionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AutomationDefinitionNotFoundException) OrigErr() error { return nil } func (s *AutomationDefinitionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AutomationDefinitionNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AutomationDefinitionNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // An Automation runbook with the specified name and version couldn't be found. type AutomationDefinitionVersionNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationDefinitionVersionNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationDefinitionVersionNotFoundException) GoString() string { return s.String() } func newErrorAutomationDefinitionVersionNotFoundException(v protocol.ResponseMetadata) error { return &AutomationDefinitionVersionNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AutomationDefinitionVersionNotFoundException) Code() string { return "AutomationDefinitionVersionNotFoundException" } // Message returns the exception's message. func (s *AutomationDefinitionVersionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AutomationDefinitionVersionNotFoundException) OrigErr() error { return nil } func (s *AutomationDefinitionVersionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AutomationDefinitionVersionNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AutomationDefinitionVersionNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Detailed information about the current state of an individual Automation // execution. type AutomationExecution struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm applied to your automation. AlarmConfiguration *AlarmConfiguration `type:"structure"` // The ID of a State Manager association used in the Automation operation. AssociationId *string `type:"string"` // The execution ID. AutomationExecutionId *string `min:"36" type:"string"` // The execution status of the Automation. AutomationExecutionStatus *string `type:"string" enum:"AutomationExecutionStatus"` // The subtype of the Automation operation. Currently, the only supported value // is ChangeRequest. AutomationSubtype *string `type:"string" enum:"AutomationSubtype"` // The name of the Change Manager change request. ChangeRequestName *string `min:"1" type:"string"` // The action of the step that is currently running. CurrentAction *string `type:"string"` // The name of the step that is currently running. CurrentStepName *string `type:"string"` // The name of the Automation runbook used during the execution. DocumentName *string `type:"string"` // The version of the document to use during execution. DocumentVersion *string `type:"string"` // The Amazon Resource Name (ARN) of the user who ran the automation. ExecutedBy *string `type:"string"` // The time the execution finished. ExecutionEndTime *time.Time `type:"timestamp"` // The time the execution started. ExecutionStartTime *time.Time `type:"timestamp"` // A message describing why an execution has failed, if the status is set to // Failed. FailureMessage *string `type:"string"` // The MaxConcurrency value specified by the user when the execution started. MaxConcurrency *string `min:"1" type:"string"` // The MaxErrors value specified by the user when the execution started. MaxErrors *string `min:"1" type:"string"` // The automation execution mode. Mode *string `type:"string" enum:"ExecutionMode"` // The ID of an OpsItem that is created to represent a Change Manager change // request. OpsItemId *string `type:"string"` // The list of execution outputs as defined in the Automation runbook. Outputs map[string][]*string `min:"1" type:"map"` // The key-value map of execution parameters, which were supplied when calling // StartAutomationExecution. Parameters map[string][]*string `min:"1" type:"map"` // The AutomationExecutionId of the parent automation. ParentAutomationExecutionId *string `min:"36" type:"string"` // An aggregate of step execution statuses displayed in the Amazon Web Services // Systems Manager 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"` // Information about the Automation runbooks that are run as part of a runbook // workflow. // // The Automation runbooks specified for the runbook workflow can't run until // all required approvals for the change request have been received. Runbooks []*Runbook `min:"1" type:"list"` // The date and time the Automation operation is scheduled to start. ScheduledTime *time.Time `type:"timestamp"` // A list of details about the current state of all steps that comprise an execution. // An Automation runbook contains a list of steps that are run in order. StepExecutions []*StepExecution `type:"list"` // A boolean value that indicates if the response contains the full list of // the Automation step executions. If true, use the DescribeAutomationStepExecutions // API operation to get the full list of step executions. StepExecutionsTruncated *bool `type:"boolean"` // The target of the execution. Target *string `type:"string"` // The combination of Amazon Web Services Regions and/or Amazon Web Services // accounts where you want to run 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"` // The parameter name. TargetParameterName *string `min:"1" type:"string"` // The specified targets. Targets []*Target `type:"list"` // The CloudWatch alarm that was invoked by the automation. TriggeredAlarms []*AlarmStateInformation `min:"1" type:"list"` // Variables defined for the automation. Variables map[string][]*string `min:"1" type:"map"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecution) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecution) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *AutomationExecution) SetAlarmConfiguration(v *AlarmConfiguration) *AutomationExecution { s.AlarmConfiguration = v return s } // SetAssociationId sets the AssociationId field's value. func (s *AutomationExecution) SetAssociationId(v string) *AutomationExecution { s.AssociationId = &v return s } // SetAutomationExecutionId sets the AutomationExecutionId field's value. func (s *AutomationExecution) SetAutomationExecutionId(v string) *AutomationExecution { s.AutomationExecutionId = &v return s } // SetAutomationExecutionStatus sets the AutomationExecutionStatus field's value. func (s *AutomationExecution) SetAutomationExecutionStatus(v string) *AutomationExecution { s.AutomationExecutionStatus = &v return s } // SetAutomationSubtype sets the AutomationSubtype field's value. func (s *AutomationExecution) SetAutomationSubtype(v string) *AutomationExecution { s.AutomationSubtype = &v return s } // SetChangeRequestName sets the ChangeRequestName field's value. func (s *AutomationExecution) SetChangeRequestName(v string) *AutomationExecution { s.ChangeRequestName = &v return s } // SetCurrentAction sets the CurrentAction field's value. func (s *AutomationExecution) SetCurrentAction(v string) *AutomationExecution { s.CurrentAction = &v return s } // SetCurrentStepName sets the CurrentStepName field's value. func (s *AutomationExecution) SetCurrentStepName(v string) *AutomationExecution { s.CurrentStepName = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *AutomationExecution) SetDocumentName(v string) *AutomationExecution { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *AutomationExecution) SetDocumentVersion(v string) *AutomationExecution { s.DocumentVersion = &v return s } // SetExecutedBy sets the ExecutedBy field's value. func (s *AutomationExecution) SetExecutedBy(v string) *AutomationExecution { s.ExecutedBy = &v return s } // SetExecutionEndTime sets the ExecutionEndTime field's value. func (s *AutomationExecution) SetExecutionEndTime(v time.Time) *AutomationExecution { s.ExecutionEndTime = &v return s } // SetExecutionStartTime sets the ExecutionStartTime field's value. func (s *AutomationExecution) SetExecutionStartTime(v time.Time) *AutomationExecution { s.ExecutionStartTime = &v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *AutomationExecution) SetFailureMessage(v string) *AutomationExecution { s.FailureMessage = &v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *AutomationExecution) SetMaxConcurrency(v string) *AutomationExecution { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *AutomationExecution) SetMaxErrors(v string) *AutomationExecution { s.MaxErrors = &v return s } // SetMode sets the Mode field's value. func (s *AutomationExecution) SetMode(v string) *AutomationExecution { s.Mode = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *AutomationExecution) SetOpsItemId(v string) *AutomationExecution { s.OpsItemId = &v return s } // SetOutputs sets the Outputs field's value. func (s *AutomationExecution) SetOutputs(v map[string][]*string) *AutomationExecution { s.Outputs = v return s } // SetParameters sets the Parameters field's value. func (s *AutomationExecution) SetParameters(v map[string][]*string) *AutomationExecution { s.Parameters = v return s } // SetParentAutomationExecutionId sets the ParentAutomationExecutionId field's value. func (s *AutomationExecution) SetParentAutomationExecutionId(v string) *AutomationExecution { s.ParentAutomationExecutionId = &v 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 return s } // SetRunbooks sets the Runbooks field's value. func (s *AutomationExecution) SetRunbooks(v []*Runbook) *AutomationExecution { s.Runbooks = v return s } // SetScheduledTime sets the ScheduledTime field's value. func (s *AutomationExecution) SetScheduledTime(v time.Time) *AutomationExecution { s.ScheduledTime = &v return s } // SetStepExecutions sets the StepExecutions field's value. func (s *AutomationExecution) SetStepExecutions(v []*StepExecution) *AutomationExecution { s.StepExecutions = v return s } // SetStepExecutionsTruncated sets the StepExecutionsTruncated field's value. func (s *AutomationExecution) SetStepExecutionsTruncated(v bool) *AutomationExecution { s.StepExecutionsTruncated = &v return s } // SetTarget sets the Target field's value. func (s *AutomationExecution) SetTarget(v string) *AutomationExecution { s.Target = &v 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 return s } // SetTargetParameterName sets the TargetParameterName field's value. func (s *AutomationExecution) SetTargetParameterName(v string) *AutomationExecution { s.TargetParameterName = &v return s } // SetTargets sets the Targets field's value. func (s *AutomationExecution) SetTargets(v []*Target) *AutomationExecution { s.Targets = v return s } // SetTriggeredAlarms sets the TriggeredAlarms field's value. func (s *AutomationExecution) SetTriggeredAlarms(v []*AlarmStateInformation) *AutomationExecution { s.TriggeredAlarms = v return s } // SetVariables sets the Variables field's value. func (s *AutomationExecution) SetVariables(v map[string][]*string) *AutomationExecution { s.Variables = v return s } // A filter used to match specific automation executions. This is used to limit // the scope of Automation execution information returned. type AutomationExecutionFilter struct { _ struct{} `type:"structure"` // One or more keys to limit the results. // // Key is a required field Key *string `type:"string" required:"true" enum:"AutomationExecutionFilterKey"` // The values used to limit the execution information associated with the filter's // key. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecutionFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecutionFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AutomationExecutionFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AutomationExecutionFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *AutomationExecutionFilter) SetKey(v string) *AutomationExecutionFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *AutomationExecutionFilter) SetValues(v []*string) *AutomationExecutionFilter { s.Values = v return s } // The number of simultaneously running Automation executions exceeded the allowable // limit. type AutomationExecutionLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecutionLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecutionLimitExceededException) GoString() string { return s.String() } func newErrorAutomationExecutionLimitExceededException(v protocol.ResponseMetadata) error { return &AutomationExecutionLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AutomationExecutionLimitExceededException) Code() string { return "AutomationExecutionLimitExceededException" } // Message returns the exception's message. func (s *AutomationExecutionLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AutomationExecutionLimitExceededException) OrigErr() error { return nil } func (s *AutomationExecutionLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AutomationExecutionLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AutomationExecutionLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // Details about a specific Automation execution. type AutomationExecutionMetadata struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm applied to your automation. AlarmConfiguration *AlarmConfiguration `type:"structure"` // The ID of a State Manager association used in the Automation operation. AssociationId *string `type:"string"` // The execution ID. AutomationExecutionId *string `min:"36" type:"string"` // The status of the execution. AutomationExecutionStatus *string `type:"string" enum:"AutomationExecutionStatus"` // The subtype of the Automation operation. Currently, the only supported value // is ChangeRequest. AutomationSubtype *string `type:"string" enum:"AutomationSubtype"` // Use this filter with DescribeAutomationExecutions. Specify either Local or // CrossAccount. CrossAccount is an Automation that runs in multiple Amazon // Web Services Regions and Amazon Web Services accounts. For more information, // see Running Automation workflows in multiple Amazon Web Services Regions // and accounts (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) // in the Amazon Web Services Systems Manager User Guide. AutomationType *string `type:"string" enum:"AutomationType"` // The name of the Change Manager change request. ChangeRequestName *string `min:"1" type:"string"` // The action of the step that is currently running. CurrentAction *string `type:"string"` // The name of the step that is currently running. CurrentStepName *string `type:"string"` // The name of the Automation runbook used during execution. DocumentName *string `type:"string"` // The document version used during the execution. DocumentVersion *string `type:"string"` // The IAM role ARN of the user who ran the automation. ExecutedBy *string `type:"string"` // The time the execution finished. This isn't populated if the execution is // still in progress. ExecutionEndTime *time.Time `type:"timestamp"` // The time the execution started. ExecutionStartTime *time.Time `type:"timestamp"` // The list of execution outputs as defined in the Automation runbook. FailureMessage *string `type:"string"` // An S3 bucket where execution information is stored. LogFile *string `type:"string"` // The MaxConcurrency value specified by the user when starting the automation. MaxConcurrency *string `min:"1" type:"string"` // The MaxErrors value specified by the user when starting the automation. MaxErrors *string `min:"1" type:"string"` // The Automation execution mode. Mode *string `type:"string" enum:"ExecutionMode"` // The ID of an OpsItem that is created to represent a Change Manager change // request. OpsItemId *string `type:"string"` // The list of execution outputs as defined in the Automation runbook. Outputs map[string][]*string `min:"1" type:"map"` // The execution ID of the parent automation. ParentAutomationExecutionId *string `min:"36" type:"string"` // A list of targets that resolved during the execution. ResolvedTargets *ResolvedTargets `type:"structure"` // Information about the Automation runbooks that are run during a runbook workflow // in Change Manager. // // The Automation runbooks specified for the runbook workflow can't run until // all required approvals for the change request have been received. Runbooks []*Runbook `min:"1" type:"list"` // The date and time the Automation operation is scheduled to start. ScheduledTime *time.Time `type:"timestamp"` // The list of execution outputs as defined in the Automation runbook. Target *string `type:"string"` // The specified key-value mapping of document parameters to target resources. TargetMaps []map[string][]*string `type:"list"` // The list of execution outputs as defined in the Automation runbook. TargetParameterName *string `min:"1" type:"string"` // The targets defined by the user when starting the automation. Targets []*Target `type:"list"` // The CloudWatch alarm that was invoked by the automation. TriggeredAlarms []*AlarmStateInformation `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecutionMetadata) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecutionMetadata) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *AutomationExecutionMetadata) SetAlarmConfiguration(v *AlarmConfiguration) *AutomationExecutionMetadata { s.AlarmConfiguration = v return s } // SetAssociationId sets the AssociationId field's value. func (s *AutomationExecutionMetadata) SetAssociationId(v string) *AutomationExecutionMetadata { s.AssociationId = &v return s } // SetAutomationExecutionId sets the AutomationExecutionId field's value. func (s *AutomationExecutionMetadata) SetAutomationExecutionId(v string) *AutomationExecutionMetadata { s.AutomationExecutionId = &v return s } // SetAutomationExecutionStatus sets the AutomationExecutionStatus field's value. func (s *AutomationExecutionMetadata) SetAutomationExecutionStatus(v string) *AutomationExecutionMetadata { s.AutomationExecutionStatus = &v return s } // SetAutomationSubtype sets the AutomationSubtype field's value. func (s *AutomationExecutionMetadata) SetAutomationSubtype(v string) *AutomationExecutionMetadata { s.AutomationSubtype = &v return s } // SetAutomationType sets the AutomationType field's value. func (s *AutomationExecutionMetadata) SetAutomationType(v string) *AutomationExecutionMetadata { s.AutomationType = &v return s } // SetChangeRequestName sets the ChangeRequestName field's value. func (s *AutomationExecutionMetadata) SetChangeRequestName(v string) *AutomationExecutionMetadata { s.ChangeRequestName = &v return s } // SetCurrentAction sets the CurrentAction field's value. func (s *AutomationExecutionMetadata) SetCurrentAction(v string) *AutomationExecutionMetadata { s.CurrentAction = &v return s } // SetCurrentStepName sets the CurrentStepName field's value. func (s *AutomationExecutionMetadata) SetCurrentStepName(v string) *AutomationExecutionMetadata { s.CurrentStepName = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *AutomationExecutionMetadata) SetDocumentName(v string) *AutomationExecutionMetadata { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *AutomationExecutionMetadata) SetDocumentVersion(v string) *AutomationExecutionMetadata { s.DocumentVersion = &v return s } // SetExecutedBy sets the ExecutedBy field's value. func (s *AutomationExecutionMetadata) SetExecutedBy(v string) *AutomationExecutionMetadata { s.ExecutedBy = &v return s } // SetExecutionEndTime sets the ExecutionEndTime field's value. func (s *AutomationExecutionMetadata) SetExecutionEndTime(v time.Time) *AutomationExecutionMetadata { s.ExecutionEndTime = &v return s } // SetExecutionStartTime sets the ExecutionStartTime field's value. func (s *AutomationExecutionMetadata) SetExecutionStartTime(v time.Time) *AutomationExecutionMetadata { s.ExecutionStartTime = &v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *AutomationExecutionMetadata) SetFailureMessage(v string) *AutomationExecutionMetadata { s.FailureMessage = &v return s } // SetLogFile sets the LogFile field's value. func (s *AutomationExecutionMetadata) SetLogFile(v string) *AutomationExecutionMetadata { s.LogFile = &v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *AutomationExecutionMetadata) SetMaxConcurrency(v string) *AutomationExecutionMetadata { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *AutomationExecutionMetadata) SetMaxErrors(v string) *AutomationExecutionMetadata { s.MaxErrors = &v return s } // SetMode sets the Mode field's value. func (s *AutomationExecutionMetadata) SetMode(v string) *AutomationExecutionMetadata { s.Mode = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *AutomationExecutionMetadata) SetOpsItemId(v string) *AutomationExecutionMetadata { s.OpsItemId = &v return s } // SetOutputs sets the Outputs field's value. func (s *AutomationExecutionMetadata) SetOutputs(v map[string][]*string) *AutomationExecutionMetadata { s.Outputs = v return s } // SetParentAutomationExecutionId sets the ParentAutomationExecutionId field's value. func (s *AutomationExecutionMetadata) SetParentAutomationExecutionId(v string) *AutomationExecutionMetadata { s.ParentAutomationExecutionId = &v return s } // SetResolvedTargets sets the ResolvedTargets field's value. func (s *AutomationExecutionMetadata) SetResolvedTargets(v *ResolvedTargets) *AutomationExecutionMetadata { s.ResolvedTargets = v return s } // SetRunbooks sets the Runbooks field's value. func (s *AutomationExecutionMetadata) SetRunbooks(v []*Runbook) *AutomationExecutionMetadata { s.Runbooks = v return s } // SetScheduledTime sets the ScheduledTime field's value. func (s *AutomationExecutionMetadata) SetScheduledTime(v time.Time) *AutomationExecutionMetadata { s.ScheduledTime = &v return s } // SetTarget sets the Target field's value. func (s *AutomationExecutionMetadata) SetTarget(v string) *AutomationExecutionMetadata { s.Target = &v return s } // SetTargetMaps sets the TargetMaps field's value. func (s *AutomationExecutionMetadata) SetTargetMaps(v []map[string][]*string) *AutomationExecutionMetadata { s.TargetMaps = v return s } // SetTargetParameterName sets the TargetParameterName field's value. func (s *AutomationExecutionMetadata) SetTargetParameterName(v string) *AutomationExecutionMetadata { s.TargetParameterName = &v return s } // SetTargets sets the Targets field's value. func (s *AutomationExecutionMetadata) SetTargets(v []*Target) *AutomationExecutionMetadata { s.Targets = v return s } // SetTriggeredAlarms sets the TriggeredAlarms field's value. func (s *AutomationExecutionMetadata) SetTriggeredAlarms(v []*AlarmStateInformation) *AutomationExecutionMetadata { s.TriggeredAlarms = v return s } // There is no automation execution information for the requested automation // execution ID. type AutomationExecutionNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecutionNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationExecutionNotFoundException) GoString() string { return s.String() } func newErrorAutomationExecutionNotFoundException(v protocol.ResponseMetadata) error { return &AutomationExecutionNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AutomationExecutionNotFoundException) Code() string { return "AutomationExecutionNotFoundException" } // Message returns the exception's message. func (s *AutomationExecutionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AutomationExecutionNotFoundException) OrigErr() error { return nil } func (s *AutomationExecutionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AutomationExecutionNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AutomationExecutionNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // The specified step name and execution ID don't exist. Verify the information // and try again. type AutomationStepNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationStepNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AutomationStepNotFoundException) GoString() string { return s.String() } func newErrorAutomationStepNotFoundException(v protocol.ResponseMetadata) error { return &AutomationStepNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AutomationStepNotFoundException) Code() string { return "AutomationStepNotFoundException" } // Message returns the exception's message. func (s *AutomationStepNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AutomationStepNotFoundException) OrigErr() error { return nil } func (s *AutomationStepNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *AutomationStepNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AutomationStepNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Defines the basic information about a patch baseline override. type BaselineOverride struct { _ struct{} `type:"structure"` // A set of rules defining the approval rules for a patch baseline. ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and // rejected patches, see About package name formats for approved and rejected // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the Amazon Web Services Systems Manager User Guide. ApprovedPatches []*string `type:"list"` // Defines the compliance level for approved patches. When an approved patch // is reported as missing, this value describes the severity of the compliance // violation. ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // Indicates whether the list of approved patches includes non-security updates // that should be applied to the managed nodes. The default value is false. // Applies to Linux managed nodes only. ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` // A set of patch filters, typically used for approval rules. GlobalFilters *PatchFilterGroup `type:"structure"` // The operating system rule used by the patch baseline override. OperatingSystem *string `type:"string" enum:"OperatingSystem"` // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and // rejected patches, see About package name formats for approved and rejected // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the Amazon Web Services Systems Manager User Guide. RejectedPatches []*string `type:"list"` // The action for Patch Manager to take on patches included in the RejectedPackages // list. A patch can be allowed only if it is a dependency of another package, // or blocked entirely along with packages that include it as a dependency. RejectedPatchesAction *string `type:"string" enum:"PatchAction"` // Information about the patches to use to update the managed nodes, including // target operating systems and source repositories. Applies to Linux managed // nodes only. Sources []*PatchSource `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BaselineOverride) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s BaselineOverride) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *BaselineOverride) Validate() error { invalidParams := request.ErrInvalidParams{Context: "BaselineOverride"} if s.ApprovalRules != nil { if err := s.ApprovalRules.Validate(); err != nil { invalidParams.AddNested("ApprovalRules", err.(request.ErrInvalidParams)) } } if s.GlobalFilters != nil { if err := s.GlobalFilters.Validate(); err != nil { invalidParams.AddNested("GlobalFilters", err.(request.ErrInvalidParams)) } } if s.Sources != nil { for i, v := range s.Sources { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sources", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetApprovalRules sets the ApprovalRules field's value. func (s *BaselineOverride) SetApprovalRules(v *PatchRuleGroup) *BaselineOverride { s.ApprovalRules = v return s } // SetApprovedPatches sets the ApprovedPatches field's value. func (s *BaselineOverride) SetApprovedPatches(v []*string) *BaselineOverride { s.ApprovedPatches = v return s } // SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. func (s *BaselineOverride) SetApprovedPatchesComplianceLevel(v string) *BaselineOverride { s.ApprovedPatchesComplianceLevel = &v return s } // SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. func (s *BaselineOverride) SetApprovedPatchesEnableNonSecurity(v bool) *BaselineOverride { s.ApprovedPatchesEnableNonSecurity = &v return s } // SetGlobalFilters sets the GlobalFilters field's value. func (s *BaselineOverride) SetGlobalFilters(v *PatchFilterGroup) *BaselineOverride { s.GlobalFilters = v return s } // SetOperatingSystem sets the OperatingSystem field's value. func (s *BaselineOverride) SetOperatingSystem(v string) *BaselineOverride { s.OperatingSystem = &v return s } // SetRejectedPatches sets the RejectedPatches field's value. func (s *BaselineOverride) SetRejectedPatches(v []*string) *BaselineOverride { s.RejectedPatches = v return s } // SetRejectedPatchesAction sets the RejectedPatchesAction field's value. func (s *BaselineOverride) SetRejectedPatchesAction(v string) *BaselineOverride { s.RejectedPatchesAction = &v return s } // SetSources sets the Sources field's value. func (s *BaselineOverride) SetSources(v []*PatchSource) *BaselineOverride { s.Sources = v return s } type CancelCommandInput struct { _ struct{} `type:"structure"` // The ID of the command you want to cancel. // // CommandId is a required field CommandId *string `min:"36" type:"string" required:"true"` // (Optional) A list of managed node IDs on which you want to cancel the command. // If not provided, the command is canceled on every node on which it was requested. InstanceIds []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancelCommandInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancelCommandInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CancelCommandInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CancelCommandInput"} if s.CommandId == nil { invalidParams.Add(request.NewErrParamRequired("CommandId")) } if s.CommandId != nil && len(*s.CommandId) < 36 { invalidParams.Add(request.NewErrParamMinLen("CommandId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCommandId sets the CommandId field's value. func (s *CancelCommandInput) SetCommandId(v string) *CancelCommandInput { s.CommandId = &v return s } // SetInstanceIds sets the InstanceIds field's value. func (s *CancelCommandInput) SetInstanceIds(v []*string) *CancelCommandInput { s.InstanceIds = v return s } // Whether or not the command was successfully canceled. There is no guarantee // that a request can be canceled. type CancelCommandOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancelCommandOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancelCommandOutput) GoString() string { return s.String() } type CancelMaintenanceWindowExecutionInput struct { _ struct{} `type:"structure"` // The ID of the maintenance window execution to stop. // // WindowExecutionId is a required field WindowExecutionId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancelMaintenanceWindowExecutionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancelMaintenanceWindowExecutionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CancelMaintenanceWindowExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CancelMaintenanceWindowExecutionInput"} if s.WindowExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) } if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *CancelMaintenanceWindowExecutionInput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionInput { s.WindowExecutionId = &v return s } type CancelMaintenanceWindowExecutionOutput struct { _ struct{} `type:"structure"` // The ID of the maintenance window execution that has been stopped. WindowExecutionId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancelMaintenanceWindowExecutionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CancelMaintenanceWindowExecutionOutput) GoString() string { return s.String() } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *CancelMaintenanceWindowExecutionOutput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionOutput { s.WindowExecutionId = &v return s } // Configuration options for sending command output to Amazon CloudWatch Logs. type CloudWatchOutputConfig struct { _ struct{} `type:"structure"` // The name of the CloudWatch Logs log group where you want to send command // output. If you don't specify a group name, Amazon Web Services Systems Manager // automatically creates a log group for you. The log group uses the following // naming format: // // aws/ssm/SystemsManagerDocumentName CloudWatchLogGroupName *string `min:"1" type:"string"` // Enables Systems Manager to send command output to CloudWatch Logs. CloudWatchOutputEnabled *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CloudWatchOutputConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CloudWatchOutputConfig) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CloudWatchOutputConfig) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CloudWatchOutputConfig"} if s.CloudWatchLogGroupName != nil && len(*s.CloudWatchLogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("CloudWatchLogGroupName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCloudWatchLogGroupName sets the CloudWatchLogGroupName field's value. func (s *CloudWatchOutputConfig) SetCloudWatchLogGroupName(v string) *CloudWatchOutputConfig { s.CloudWatchLogGroupName = &v return s } // SetCloudWatchOutputEnabled sets the CloudWatchOutputEnabled field's value. func (s *CloudWatchOutputConfig) SetCloudWatchOutputEnabled(v bool) *CloudWatchOutputConfig { s.CloudWatchOutputEnabled = &v return s } // Describes a command request. type Command struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm applied to your command. AlarmConfiguration *AlarmConfiguration `type:"structure"` // Amazon CloudWatch Logs information where you want Amazon Web Services Systems // Manager to send the command output. CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` // A unique identifier for this command. CommandId *string `min:"36" type:"string"` // User-specified information about the command, such as a brief description // of what the command should do. Comment *string `type:"string"` // The number of targets for which the command invocation reached a terminal // state. Terminal states include the following: Success, Failed, Execution // Timed Out, Delivery Timed Out, Cancelled, Terminated, or Undeliverable. CompletedCount *int64 `type:"integer"` // The number of targets for which the status is Delivery Timed Out. DeliveryTimedOutCount *int64 `type:"integer"` // The name of the document requested for execution. DocumentName *string `type:"string"` // The Systems Manager document (SSM document) version. DocumentVersion *string `type:"string"` // The number of targets for which the status is Failed or Execution Timed Out. ErrorCount *int64 `type:"integer"` // If a command expires, it changes status to DeliveryTimedOut for all invocations // that have the status InProgress, Pending, or Delayed. ExpiresAfter is calculated // based on the total timeout for the overall command. For more information, // see Understanding command timeout values (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html?icmpid=docs_ec2_console#monitor-about-status-timeouts) // in the Amazon Web Services Systems Manager User Guide. ExpiresAfter *time.Time `type:"timestamp"` // The managed node IDs against which this command was requested. InstanceIds []*string `type:"list"` // The maximum number of managed nodes that are allowed to run the command at // the same time. You can specify a number of managed nodes, such as 10, or // a percentage of nodes, such as 10%. The default value is 50. For more information // about how to use MaxConcurrency, see Running commands using Systems Manager // Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) // in the Amazon Web Services Systems Manager User Guide. MaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed before the system stops sending the // command to additional targets. You can specify a number of errors, such as // 10, or a percentage or errors, such as 10%. The default value is 0. For more // information about how to use MaxErrors, see Running commands using Systems // Manager Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) // in the Amazon Web Services Systems Manager User Guide. MaxErrors *string `min:"1" type:"string"` // Configurations for sending notifications about command status changes. NotificationConfig *NotificationConfig `type:"structure"` // The S3 bucket where the responses to the command executions should be stored. // This was requested when issuing the command. OutputS3BucketName *string `min:"3" type:"string"` // The S3 directory path inside the bucket where the responses to the command // executions should be stored. This was requested when issuing the command. OutputS3KeyPrefix *string `type:"string"` // (Deprecated) You can no longer specify this parameter. The system ignores // it. Instead, Systems Manager automatically determines the Amazon Web Services // Region of the S3 bucket. OutputS3Region *string `min:"3" type:"string"` // The parameter values to be inserted in the document when running the command. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by Command's // String and GoString methods. Parameters map[string][]*string `type:"map" sensitive:"true"` // The date and time the command was requested. RequestedDateTime *time.Time `type:"timestamp"` // The Identity and Access Management (IAM) service role that Run Command, a // capability of Amazon Web Services Systems Manager, uses to act on your behalf // when sending notifications about command status changes. ServiceRole *string `type:"string"` // The status of the command. Status *string `type:"string" enum:"CommandStatus"` // A detailed status of the command execution. StatusDetails includes more information // than Status because it includes states resulting from error and concurrency // control parameters. StatusDetails can show different results than Status. // For more information about these statuses, see Understanding command statuses // (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the Amazon Web Services Systems Manager User Guide. StatusDetails can // be one of the following values: // // * Pending: The command hasn't been sent to any managed nodes. // // * In Progress: The command has been sent to at least one managed node // but hasn't reached a final state on all managed nodes. // // * Success: The command successfully ran on all invocations. This is a // terminal state. // // * Delivery Timed Out: The value of MaxErrors or more command invocations // shows a status of Delivery Timed Out. This is a terminal state. // // * Execution Timed Out: The value of MaxErrors or more command invocations // shows a status of Execution Timed Out. This is a terminal state. // // * Failed: The value of MaxErrors or more command invocations shows a status // of Failed. This is a terminal state. // // * Incomplete: The command was attempted on all managed nodes and one or // more invocations doesn't have a value of Success but not enough invocations // failed for the status to be Failed. This is a terminal state. // // * Cancelled: The command was terminated before it was completed. This // is a terminal state. // // * Rate Exceeded: The number of managed nodes targeted by the command exceeded // the account limit for pending invocations. The system has canceled the // command before running it on any managed node. This is a terminal state. // // * Delayed: The system attempted to send the command to the managed node // but wasn't successful. The system retries again. StatusDetails *string `type:"string"` // The number of targets for the command. TargetCount *int64 `type:"integer"` // An array of search criteria that targets managed nodes using a Key,Value // combination that you specify. Targets is required if you don't provide one // or more managed node IDs in the call. Targets []*Target `type:"list"` // The TimeoutSeconds value specified for a command. TimeoutSeconds *int64 `min:"30" type:"integer"` // The CloudWatch alarm that was invoked by the command. TriggeredAlarms []*AlarmStateInformation `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Command) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Command) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *Command) SetAlarmConfiguration(v *AlarmConfiguration) *Command { s.AlarmConfiguration = v return s } // SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. func (s *Command) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *Command { s.CloudWatchOutputConfig = v return s } // SetCommandId sets the CommandId field's value. func (s *Command) SetCommandId(v string) *Command { s.CommandId = &v return s } // SetComment sets the Comment field's value. func (s *Command) SetComment(v string) *Command { s.Comment = &v return s } // SetCompletedCount sets the CompletedCount field's value. func (s *Command) SetCompletedCount(v int64) *Command { s.CompletedCount = &v return s } // SetDeliveryTimedOutCount sets the DeliveryTimedOutCount field's value. func (s *Command) SetDeliveryTimedOutCount(v int64) *Command { s.DeliveryTimedOutCount = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *Command) SetDocumentName(v string) *Command { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *Command) SetDocumentVersion(v string) *Command { s.DocumentVersion = &v return s } // SetErrorCount sets the ErrorCount field's value. func (s *Command) SetErrorCount(v int64) *Command { s.ErrorCount = &v return s } // SetExpiresAfter sets the ExpiresAfter field's value. func (s *Command) SetExpiresAfter(v time.Time) *Command { s.ExpiresAfter = &v return s } // SetInstanceIds sets the InstanceIds field's value. func (s *Command) SetInstanceIds(v []*string) *Command { s.InstanceIds = v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *Command) SetMaxConcurrency(v string) *Command { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *Command) SetMaxErrors(v string) *Command { s.MaxErrors = &v return s } // SetNotificationConfig sets the NotificationConfig field's value. func (s *Command) SetNotificationConfig(v *NotificationConfig) *Command { s.NotificationConfig = v return s } // SetOutputS3BucketName sets the OutputS3BucketName field's value. func (s *Command) SetOutputS3BucketName(v string) *Command { s.OutputS3BucketName = &v return s } // SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. func (s *Command) SetOutputS3KeyPrefix(v string) *Command { s.OutputS3KeyPrefix = &v return s } // SetOutputS3Region sets the OutputS3Region field's value. func (s *Command) SetOutputS3Region(v string) *Command { s.OutputS3Region = &v return s } // SetParameters sets the Parameters field's value. func (s *Command) SetParameters(v map[string][]*string) *Command { s.Parameters = v return s } // SetRequestedDateTime sets the RequestedDateTime field's value. func (s *Command) SetRequestedDateTime(v time.Time) *Command { s.RequestedDateTime = &v return s } // SetServiceRole sets the ServiceRole field's value. func (s *Command) SetServiceRole(v string) *Command { s.ServiceRole = &v return s } // SetStatus sets the Status field's value. func (s *Command) SetStatus(v string) *Command { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *Command) SetStatusDetails(v string) *Command { s.StatusDetails = &v return s } // SetTargetCount sets the TargetCount field's value. func (s *Command) SetTargetCount(v int64) *Command { s.TargetCount = &v return s } // SetTargets sets the Targets field's value. func (s *Command) SetTargets(v []*Target) *Command { s.Targets = v return s } // SetTimeoutSeconds sets the TimeoutSeconds field's value. func (s *Command) SetTimeoutSeconds(v int64) *Command { s.TimeoutSeconds = &v return s } // SetTriggeredAlarms sets the TriggeredAlarms field's value. func (s *Command) SetTriggeredAlarms(v []*AlarmStateInformation) *Command { s.TriggeredAlarms = v return s } // Describes a command filter. // // A managed node ID can't be specified when a command status is Pending because // the command hasn't run on the node yet. type CommandFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // The ExecutionStage filter can't be used with the ListCommandInvocations operation, // only with ListCommands. // // Key is a required field Key *string `locationName:"key" type:"string" required:"true" enum:"CommandFilterKey"` // The filter value. Valid values for each filter key are as follows: // // * InvokedAfter: Specify a timestamp to limit your results. For example, // specify 2021-07-07T00:00:00Z to see a list of command executions occurring // July 7, 2021, and later. // // * InvokedBefore: Specify a timestamp to limit your results. For example, // specify 2021-07-07T00:00:00Z to see a list of command executions from // before July 7, 2021. // // * Status: Specify a valid command status to see a list of all command // executions with that status. The status choices depend on the API you // call. The status values you can specify for ListCommands are: Pending // InProgress Success Cancelled Failed TimedOut (this includes both Delivery // and Execution time outs) AccessDenied DeliveryTimedOut ExecutionTimedOut // Incomplete NoInstancesInTag LimitExceeded The status values you can specify // for ListCommandInvocations are: Pending InProgress Delayed Success Cancelled // Failed TimedOut (this includes both Delivery and Execution time outs) // AccessDenied DeliveryTimedOut ExecutionTimedOut Undeliverable InvalidPlatform // Terminated // // * DocumentName: Specify name of the Amazon Web Services Systems Manager // document (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 managed // nodes. // // * ExecutionStage: Specify one of the following values (ListCommands operations // only): Executing: Returns a list of command executions that are currently // still running. 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"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CommandFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CommandFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CommandFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CommandFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if s.Value != nil && len(*s.Value) < 1 { invalidParams.Add(request.NewErrParamMinLen("Value", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *CommandFilter) SetKey(v string) *CommandFilter { s.Key = &v return s } // SetValue sets the Value field's value. func (s *CommandFilter) SetValue(v string) *CommandFilter { s.Value = &v return s } // An invocation is a copy of a command sent to a specific managed node. A command // can apply to one or more managed nodes. A command invocation applies to one // managed node. For example, if a user runs SendCommand against three managed // nodes, then a command invocation is created for each requested managed node // ID. A command invocation returns status and detail information about a command // you ran. type CommandInvocation struct { _ struct{} `type:"structure"` // Amazon CloudWatch Logs information where you want Amazon Web Services Systems // Manager to send the command output. CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` // The command against which this invocation was requested. CommandId *string `min:"36" type:"string"` // Plugins processed by the command. CommandPlugins []*CommandPlugin `type:"list"` // User-specified information about the command, such as a brief description // of what the command should do. Comment *string `type:"string"` // The document name that was requested for execution. DocumentName *string `type:"string"` // The Systems Manager document (SSM document) version. DocumentVersion *string `type:"string"` // The managed node ID in which this invocation was requested. InstanceId *string `type:"string"` // The fully qualified host name of the managed node. InstanceName *string `type:"string"` // Configurations for sending notifications about command status changes on // a per managed node basis. NotificationConfig *NotificationConfig `type:"structure"` // The time and date the request was sent to this managed node. RequestedDateTime *time.Time `type:"timestamp"` // The Identity and Access Management (IAM) service role that Run Command, a // capability of Amazon Web Services Systems Manager, uses to act on your behalf // when sending notifications about command status changes on a per managed // node basis. ServiceRole *string `type:"string"` // The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon // S3), if the S3 bucket was defined for the parent command. For an invocation, // StandardErrorUrl is populated if there is just one plugin defined for the // command, and the S3 bucket was defined for the command. StandardErrorUrl *string `type:"string"` // The URL to the plugin's StdOut file in Amazon Simple Storage Service (Amazon // S3), if the S3 bucket was defined for the parent command. For an invocation, // StandardOutputUrl is populated if there is just one plugin defined for the // command, and the S3 bucket was defined for the command. StandardOutputUrl *string `type:"string"` // Whether or not the invocation succeeded, failed, or is pending. Status *string `type:"string" enum:"CommandInvocationStatus"` // A detailed status of the command execution for each invocation (each managed // node targeted by the command). StatusDetails includes more information than // Status because it includes states resulting from error and concurrency control // parameters. StatusDetails can show different results than Status. For more // information about these statuses, see Understanding command statuses (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the Amazon Web Services Systems Manager User Guide. StatusDetails can // be one of the following values: // // * Pending: The command hasn't been sent to the managed node. // // * In Progress: The command has been sent to the managed node but hasn't // reached a terminal state. // // * Success: The execution of the command or plugin was successfully completed. // This is a terminal state. // // * Delivery Timed Out: The command wasn't delivered to the managed node // before the delivery timeout expired. Delivery timeouts don't count against // the parent command's MaxErrors limit, but they do contribute to whether // the parent command status is Success or Incomplete. This is a terminal // state. // // * Execution Timed Out: Command execution started on the managed node, // but the execution wasn't complete before the execution timeout expired. // Execution timeouts count against the MaxErrors limit of the parent command. // This is a terminal state. // // * Failed: The command wasn't successful on the managed node. For a plugin, // this indicates that the result code wasn't zero. For a command invocation, // this indicates that the result code for one or more plugins wasn't zero. // Invocation failures count against the MaxErrors limit of the parent command. // This is a terminal state. // // * Cancelled: The command was terminated before it was completed. This // is a terminal state. // // * Undeliverable: The command can't be delivered to the managed node. The // managed node might not exist or might not be responding. Undeliverable // invocations don't count against the parent command's MaxErrors limit and // don't contribute to whether the parent command status is Success or Incomplete. // This is a terminal state. // // * Terminated: The parent command exceeded its MaxErrors limit and subsequent // command invocations were canceled by the system. This is a terminal state. // // * Delayed: The system attempted to send the command to the managed node // but wasn't successful. The system retries again. StatusDetails *string `type:"string"` // Gets the trace output sent by the agent. TraceOutput *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CommandInvocation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CommandInvocation) GoString() string { return s.String() } // SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. func (s *CommandInvocation) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *CommandInvocation { s.CloudWatchOutputConfig = v return s } // SetCommandId sets the CommandId field's value. func (s *CommandInvocation) SetCommandId(v string) *CommandInvocation { s.CommandId = &v return s } // SetCommandPlugins sets the CommandPlugins field's value. func (s *CommandInvocation) SetCommandPlugins(v []*CommandPlugin) *CommandInvocation { s.CommandPlugins = v return s } // SetComment sets the Comment field's value. func (s *CommandInvocation) SetComment(v string) *CommandInvocation { s.Comment = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *CommandInvocation) SetDocumentName(v string) *CommandInvocation { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *CommandInvocation) SetDocumentVersion(v string) *CommandInvocation { s.DocumentVersion = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *CommandInvocation) SetInstanceId(v string) *CommandInvocation { s.InstanceId = &v return s } // SetInstanceName sets the InstanceName field's value. func (s *CommandInvocation) SetInstanceName(v string) *CommandInvocation { s.InstanceName = &v return s } // SetNotificationConfig sets the NotificationConfig field's value. func (s *CommandInvocation) SetNotificationConfig(v *NotificationConfig) *CommandInvocation { s.NotificationConfig = v return s } // SetRequestedDateTime sets the RequestedDateTime field's value. func (s *CommandInvocation) SetRequestedDateTime(v time.Time) *CommandInvocation { s.RequestedDateTime = &v return s } // SetServiceRole sets the ServiceRole field's value. func (s *CommandInvocation) SetServiceRole(v string) *CommandInvocation { s.ServiceRole = &v return s } // SetStandardErrorUrl sets the StandardErrorUrl field's value. func (s *CommandInvocation) SetStandardErrorUrl(v string) *CommandInvocation { s.StandardErrorUrl = &v return s } // SetStandardOutputUrl sets the StandardOutputUrl field's value. func (s *CommandInvocation) SetStandardOutputUrl(v string) *CommandInvocation { s.StandardOutputUrl = &v return s } // SetStatus sets the Status field's value. func (s *CommandInvocation) SetStatus(v string) *CommandInvocation { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *CommandInvocation) SetStatusDetails(v string) *CommandInvocation { s.StatusDetails = &v return s } // SetTraceOutput sets the TraceOutput field's value. func (s *CommandInvocation) SetTraceOutput(v string) *CommandInvocation { s.TraceOutput = &v return s } // Describes plugin details. type CommandPlugin struct { _ struct{} `type:"structure"` // The name of the plugin. Must be one of the following: aws:updateAgent, aws:domainjoin, // aws:applications, aws:runPowerShellScript, aws:psmodule, aws:cloudWatch, // aws:runShellScript, or aws:updateSSMAgent. Name *string `min:"4" type:"string"` // Output of the plugin execution. Output *string `type:"string"` // The S3 bucket where the responses to the command executions should be stored. // This was requested when issuing the command. For example, in the following // response: // // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript // // doc-example-bucket is the name of the S3 bucket; // // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; // // i-02573cafcfEXAMPLE is the managed node ID; // // awsrunShellScript is the name of the plugin. OutputS3BucketName *string `min:"3" type:"string"` // The S3 directory path inside the bucket where the responses to the command // executions should be stored. This was requested when issuing the command. // For example, in the following response: // // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript // // doc-example-bucket is the name of the S3 bucket; // // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; // // i-02573cafcfEXAMPLE is the managed node ID; // // awsrunShellScript is the name of the plugin. OutputS3KeyPrefix *string `type:"string"` // (Deprecated) You can no longer specify this parameter. The system ignores // it. Instead, Amazon Web Services Systems Manager automatically determines // the S3 bucket region. OutputS3Region *string `min:"3" type:"string"` // A numeric response code generated after running the plugin. ResponseCode *int64 `type:"integer"` // The time the plugin stopped running. Could stop prematurely if, for example, // a cancel command was sent. ResponseFinishDateTime *time.Time `type:"timestamp"` // The time the plugin started running. ResponseStartDateTime *time.Time `type:"timestamp"` // The URL for the complete text written by the plugin to stderr. If execution // isn't yet complete, then this string is empty. StandardErrorUrl *string `type:"string"` // The URL for the complete text written by the plugin to stdout in Amazon S3. // If the S3 bucket for the command wasn't specified, then this string is empty. StandardOutputUrl *string `type:"string"` // The status of this plugin. You can run a document with multiple plugins. Status *string `type:"string" enum:"CommandPluginStatus"` // A detailed status of the plugin execution. StatusDetails includes more information // than Status because it includes states resulting from error and concurrency // control parameters. StatusDetails can show different results than Status. // For more information about these statuses, see Understanding command statuses // (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the Amazon Web Services Systems Manager User Guide. StatusDetails can // be one of the following values: // // * Pending: The command hasn't been sent to the managed node. // // * In Progress: The command has been sent to the managed node but hasn't // reached a terminal state. // // * Success: The execution of the command or plugin was successfully completed. // This is a terminal state. // // * Delivery Timed Out: The command wasn't delivered to the managed node // before the delivery timeout expired. Delivery timeouts don't count against // the parent command's MaxErrors limit, but they do contribute to whether // the parent command status is Success or Incomplete. This is a terminal // state. // // * Execution Timed Out: Command execution started on the managed node, // but the execution wasn't complete before the execution timeout expired. // Execution timeouts count against the MaxErrors limit of the parent command. // This is a terminal state. // // * Failed: The command wasn't successful on the managed node. For a plugin, // this indicates that the result code wasn't zero. For a command invocation, // this indicates that the result code for one or more plugins wasn't zero. // Invocation failures count against the MaxErrors limit of the parent command. // This is a terminal state. // // * Cancelled: The command was terminated before it was completed. This // is a terminal state. // // * Undeliverable: The command can't be delivered to the managed node. The // managed node might not exist, or it might not be responding. Undeliverable // invocations don't count against the parent command's MaxErrors limit, // and they don't contribute to whether the parent command status is Success // or Incomplete. This is a terminal state. // // * Terminated: The parent command exceeded its MaxErrors limit and subsequent // command invocations were canceled by the system. This is a terminal state. StatusDetails *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CommandPlugin) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CommandPlugin) GoString() string { return s.String() } // SetName sets the Name field's value. func (s *CommandPlugin) SetName(v string) *CommandPlugin { s.Name = &v return s } // SetOutput sets the Output field's value. func (s *CommandPlugin) SetOutput(v string) *CommandPlugin { s.Output = &v return s } // SetOutputS3BucketName sets the OutputS3BucketName field's value. func (s *CommandPlugin) SetOutputS3BucketName(v string) *CommandPlugin { s.OutputS3BucketName = &v return s } // SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. func (s *CommandPlugin) SetOutputS3KeyPrefix(v string) *CommandPlugin { s.OutputS3KeyPrefix = &v return s } // SetOutputS3Region sets the OutputS3Region field's value. func (s *CommandPlugin) SetOutputS3Region(v string) *CommandPlugin { s.OutputS3Region = &v return s } // SetResponseCode sets the ResponseCode field's value. func (s *CommandPlugin) SetResponseCode(v int64) *CommandPlugin { s.ResponseCode = &v return s } // SetResponseFinishDateTime sets the ResponseFinishDateTime field's value. func (s *CommandPlugin) SetResponseFinishDateTime(v time.Time) *CommandPlugin { s.ResponseFinishDateTime = &v return s } // SetResponseStartDateTime sets the ResponseStartDateTime field's value. func (s *CommandPlugin) SetResponseStartDateTime(v time.Time) *CommandPlugin { s.ResponseStartDateTime = &v return s } // SetStandardErrorUrl sets the StandardErrorUrl field's value. func (s *CommandPlugin) SetStandardErrorUrl(v string) *CommandPlugin { s.StandardErrorUrl = &v return s } // SetStandardOutputUrl sets the StandardOutputUrl field's value. func (s *CommandPlugin) SetStandardOutputUrl(v string) *CommandPlugin { s.StandardOutputUrl = &v return s } // SetStatus sets the Status field's value. func (s *CommandPlugin) SetStatus(v string) *CommandPlugin { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *CommandPlugin) SetStatusDetails(v string) *CommandPlugin { s.StatusDetails = &v return s } // A summary of the call execution that includes an execution ID, the type of // execution (for example, Command), and the date/time of the execution using // a datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z'. type ComplianceExecutionSummary struct { _ struct{} `type:"structure"` // An ID created by the system when PutComplianceItems was called. For example, // CommandID is a valid execution ID. You can use this ID in subsequent calls. ExecutionId *string `type:"string"` // The time the execution ran as a datetime object that is saved in the following // format: yyyy-MM-dd'T'HH:mm:ss'Z'. // // ExecutionTime is a required field ExecutionTime *time.Time `type:"timestamp" required:"true"` // The type of execution. For example, Command is a valid execution type. ExecutionType *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceExecutionSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceExecutionSummary) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ComplianceExecutionSummary) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ComplianceExecutionSummary"} if s.ExecutionTime == nil { invalidParams.Add(request.NewErrParamRequired("ExecutionTime")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetExecutionId sets the ExecutionId field's value. func (s *ComplianceExecutionSummary) SetExecutionId(v string) *ComplianceExecutionSummary { s.ExecutionId = &v return s } // SetExecutionTime sets the ExecutionTime field's value. func (s *ComplianceExecutionSummary) SetExecutionTime(v time.Time) *ComplianceExecutionSummary { s.ExecutionTime = &v return s } // SetExecutionType sets the ExecutionType field's value. func (s *ComplianceExecutionSummary) SetExecutionType(v string) *ComplianceExecutionSummary { s.ExecutionType = &v return s } // Information about the compliance as defined by the resource type. For example, // for a patch resource type, Items includes information about the PatchSeverity, // Classification, and so on. type ComplianceItem struct { _ struct{} `type:"structure"` // The compliance type. For example, Association (for a State Manager association), // Patch, or Custom:string are all valid compliance types. ComplianceType *string `min:"1" type:"string"` // A "Key": "Value" tag combination for the compliance item. Details map[string]*string `type:"map"` // A summary for the compliance item. The summary includes an execution ID, // the execution type (for example, command), and the execution time. ExecutionSummary *ComplianceExecutionSummary `type:"structure"` // An ID for the compliance item. For example, if the compliance item is a Windows // patch, the ID could be the number of the KB article; for example: KB4010320. Id *string `type:"string"` // An ID for the resource. For a managed node, this is the node ID. ResourceId *string `min:"1" type:"string"` // The type of resource. ManagedInstance is currently the only supported resource // type. ResourceType *string `min:"1" type:"string"` // The severity of the compliance status. Severity can be one of the following: // Critical, High, Medium, Low, Informational, Unspecified. Severity *string `type:"string" enum:"ComplianceSeverity"` // The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, // or an empty string (for Windows patches that aren't applicable). Status *string `type:"string" enum:"ComplianceStatus"` // A title for the compliance item. For example, if the compliance item is a // Windows patch, the title could be the title of the KB article for the patch; // for example: Security Update for Active Directory Federation Services. Title *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceItem) GoString() string { return s.String() } // SetComplianceType sets the ComplianceType field's value. func (s *ComplianceItem) SetComplianceType(v string) *ComplianceItem { s.ComplianceType = &v return s } // SetDetails sets the Details field's value. func (s *ComplianceItem) SetDetails(v map[string]*string) *ComplianceItem { s.Details = v return s } // SetExecutionSummary sets the ExecutionSummary field's value. func (s *ComplianceItem) SetExecutionSummary(v *ComplianceExecutionSummary) *ComplianceItem { s.ExecutionSummary = v return s } // SetId sets the Id field's value. func (s *ComplianceItem) SetId(v string) *ComplianceItem { s.Id = &v return s } // SetResourceId sets the ResourceId field's value. func (s *ComplianceItem) SetResourceId(v string) *ComplianceItem { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ComplianceItem) SetResourceType(v string) *ComplianceItem { s.ResourceType = &v return s } // SetSeverity sets the Severity field's value. func (s *ComplianceItem) SetSeverity(v string) *ComplianceItem { s.Severity = &v return s } // SetStatus sets the Status field's value. func (s *ComplianceItem) SetStatus(v string) *ComplianceItem { s.Status = &v return s } // SetTitle sets the Title field's value. func (s *ComplianceItem) SetTitle(v string) *ComplianceItem { s.Title = &v return s } // Information about a compliance item. type ComplianceItemEntry struct { _ struct{} `type:"structure"` // A "Key": "Value" tag combination for the compliance item. Details map[string]*string `type:"map"` // The compliance item ID. For example, if the compliance item is a Windows // patch, the ID could be the number of the KB article. Id *string `type:"string"` // The severity of the compliance status. Severity can be one of the following: // Critical, High, Medium, Low, Informational, Unspecified. // // Severity is a required field Severity *string `type:"string" required:"true" enum:"ComplianceSeverity"` // The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT. // // Status is a required field Status *string `type:"string" required:"true" enum:"ComplianceStatus"` // The title of the compliance item. For example, if the compliance item is // a Windows patch, the title could be the title of the KB article for the patch; // for example: Security Update for Active Directory Federation Services. Title *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceItemEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceItemEntry) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ComplianceItemEntry) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ComplianceItemEntry"} if s.Severity == nil { invalidParams.Add(request.NewErrParamRequired("Severity")) } if s.Status == nil { invalidParams.Add(request.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDetails sets the Details field's value. func (s *ComplianceItemEntry) SetDetails(v map[string]*string) *ComplianceItemEntry { s.Details = v return s } // SetId sets the Id field's value. func (s *ComplianceItemEntry) SetId(v string) *ComplianceItemEntry { s.Id = &v return s } // SetSeverity sets the Severity field's value. func (s *ComplianceItemEntry) SetSeverity(v string) *ComplianceItemEntry { s.Severity = &v return s } // SetStatus sets the Status field's value. func (s *ComplianceItemEntry) SetStatus(v string) *ComplianceItemEntry { s.Status = &v return s } // SetTitle sets the Title field's value. func (s *ComplianceItemEntry) SetTitle(v string) *ComplianceItemEntry { s.Title = &v return s } // One or more filters. Use a filter to return a more specific list of results. type ComplianceStringFilter struct { _ struct{} `type:"structure"` // The name of the filter. Key *string `min:"1" type:"string"` // The type of comparison that should be performed for the value: Equal, NotEqual, // BeginWith, LessThan, or GreaterThan. Type *string `type:"string" enum:"ComplianceQueryOperatorType"` // The value for which to search. Values []*string `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceStringFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceStringFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ComplianceStringFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ComplianceStringFilter"} if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } 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 *ComplianceStringFilter) SetKey(v string) *ComplianceStringFilter { s.Key = &v return s } // SetType sets the Type field's value. func (s *ComplianceStringFilter) SetType(v string) *ComplianceStringFilter { s.Type = &v return s } // SetValues sets the Values field's value. func (s *ComplianceStringFilter) SetValues(v []*string) *ComplianceStringFilter { s.Values = v return s } // A summary of compliance information by compliance type. type ComplianceSummaryItem struct { _ struct{} `type:"structure"` // The type of compliance item. For example, the compliance type can be Association, // Patch, or Custom:string. ComplianceType *string `min:"1" type:"string"` // A list of COMPLIANT items for the specified compliance type. CompliantSummary *CompliantSummary `type:"structure"` // A list of NON_COMPLIANT items for the specified compliance type. NonCompliantSummary *NonCompliantSummary `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceSummaryItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceSummaryItem) GoString() string { return s.String() } // SetComplianceType sets the ComplianceType field's value. func (s *ComplianceSummaryItem) SetComplianceType(v string) *ComplianceSummaryItem { s.ComplianceType = &v return s } // SetCompliantSummary sets the CompliantSummary field's value. func (s *ComplianceSummaryItem) SetCompliantSummary(v *CompliantSummary) *ComplianceSummaryItem { s.CompliantSummary = v return s } // SetNonCompliantSummary sets the NonCompliantSummary field's value. func (s *ComplianceSummaryItem) SetNonCompliantSummary(v *NonCompliantSummary) *ComplianceSummaryItem { s.NonCompliantSummary = v return s } // You specified too many custom compliance types. You can specify a maximum // of 10 different types. type ComplianceTypeCountLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceTypeCountLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ComplianceTypeCountLimitExceededException) GoString() string { return s.String() } func newErrorComplianceTypeCountLimitExceededException(v protocol.ResponseMetadata) error { return &ComplianceTypeCountLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ComplianceTypeCountLimitExceededException) Code() string { return "ComplianceTypeCountLimitExceededException" } // Message returns the exception's message. func (s *ComplianceTypeCountLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ComplianceTypeCountLimitExceededException) OrigErr() error { return nil } func (s *ComplianceTypeCountLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ComplianceTypeCountLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ComplianceTypeCountLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // A summary of resources that are compliant. The summary is organized according // to the resource count for each compliance type. type CompliantSummary struct { _ struct{} `type:"structure"` // The total number of resources that are compliant. CompliantCount *int64 `type:"integer"` // A summary of the compliance severity by compliance type. SeveritySummary *SeveritySummary `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CompliantSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CompliantSummary) GoString() string { return s.String() } // SetCompliantCount sets the CompliantCount field's value. func (s *CompliantSummary) SetCompliantCount(v int64) *CompliantSummary { s.CompliantCount = &v return s } // SetSeveritySummary sets the SeveritySummary field's value. func (s *CompliantSummary) SetSeveritySummary(v *SeveritySummary) *CompliantSummary { s.SeveritySummary = v return s } type CreateActivationInput struct { _ struct{} `type:"structure"` // The name of the registered, managed node as it will appear in the Amazon // Web Services Systems Manager console or when you use the Amazon Web Services // command line tools to list Systems Manager resources. // // Don't enter personally identifiable information in this field. DefaultInstanceName *string `type:"string"` // A user-defined description of the resource that you want to register with // Systems Manager. // // Don't enter personally identifiable information in this field. Description *string `type:"string"` // The date by which this activation request should expire, in timestamp format, // such as "2021-07-07T00:00:00". You can specify a date up to 30 days in advance. // If you don't provide an expiration date, the activation code expires in 24 // hours. ExpirationDate *time.Time `type:"timestamp"` // The name of the Identity and Access Management (IAM) role that you want to // assign to the managed node. This IAM role must provide AssumeRole permissions // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com. // For more information, see Create an IAM service role for a hybrid environment // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html) // in the Amazon Web Services Systems Manager User Guide. // // You can't specify an IAM service-linked role for this parameter. You must // create a unique role. // // IamRole is a required field IamRole *string `type:"string" required:"true"` // Specify the maximum number of managed nodes you want to register. The default // value is 1. RegistrationLimit *int64 `min:"1" type:"integer"` // Reserved for internal use. RegistrationMetadata []*RegistrationMetadataItem `type:"list"` // Optional metadata that you assign to a resource. Tags enable you to categorize // a resource in different ways, such as by purpose, owner, or environment. // For example, you might want to tag an activation to identify which servers // or virtual machines (VMs) in your on-premises environment you intend to activate. // In this case, you could specify the following key-value pairs: // // * Key=OS,Value=Windows // // * Key=Environment,Value=Production // // When you install SSM Agent on your on-premises servers and VMs, you specify // an activation ID and code. When you specify the activation ID and code, tags // assigned to the activation are automatically applied to the on-premises servers // or VMs. // // You can't add tags to or delete tags from an existing activation. You can // tag your on-premises servers, edge devices, and VMs after they connect to // Systems Manager for the first time and are assigned a managed node ID. This // means they are listed in the Amazon Web Services Systems Manager console // with an ID that is prefixed with "mi-". For information about how to add // tags to your managed nodes, see AddTagsToResource. For information about // how to remove tags from your managed nodes, see RemoveTagsFromResource. Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateActivationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateActivationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateActivationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateActivationInput"} if s.IamRole == nil { invalidParams.Add(request.NewErrParamRequired("IamRole")) } if s.RegistrationLimit != nil && *s.RegistrationLimit < 1 { invalidParams.Add(request.NewErrParamMinValue("RegistrationLimit", 1)) } if s.RegistrationMetadata != nil { for i, v := range s.RegistrationMetadata { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RegistrationMetadata", i), 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 } // SetDefaultInstanceName sets the DefaultInstanceName field's value. func (s *CreateActivationInput) SetDefaultInstanceName(v string) *CreateActivationInput { s.DefaultInstanceName = &v return s } // SetDescription sets the Description field's value. func (s *CreateActivationInput) SetDescription(v string) *CreateActivationInput { s.Description = &v return s } // SetExpirationDate sets the ExpirationDate field's value. func (s *CreateActivationInput) SetExpirationDate(v time.Time) *CreateActivationInput { s.ExpirationDate = &v return s } // SetIamRole sets the IamRole field's value. func (s *CreateActivationInput) SetIamRole(v string) *CreateActivationInput { s.IamRole = &v return s } // SetRegistrationLimit sets the RegistrationLimit field's value. func (s *CreateActivationInput) SetRegistrationLimit(v int64) *CreateActivationInput { s.RegistrationLimit = &v return s } // SetRegistrationMetadata sets the RegistrationMetadata field's value. func (s *CreateActivationInput) SetRegistrationMetadata(v []*RegistrationMetadataItem) *CreateActivationInput { s.RegistrationMetadata = v return s } // SetTags sets the Tags field's value. func (s *CreateActivationInput) SetTags(v []*Tag) *CreateActivationInput { s.Tags = v return s } type CreateActivationOutput struct { _ struct{} `type:"structure"` // The code the system generates when it processes the activation. The activation // code functions like a password to validate the activation ID. ActivationCode *string `min:"20" type:"string"` // The ID number generated by the system when it processed the activation. The // activation ID functions like a user name. ActivationId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateActivationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateActivationOutput) GoString() string { return s.String() } // SetActivationCode sets the ActivationCode field's value. func (s *CreateActivationOutput) SetActivationCode(v string) *CreateActivationOutput { s.ActivationCode = &v return s } // SetActivationId sets the ActivationId field's value. func (s *CreateActivationOutput) SetActivationId(v string) *CreateActivationOutput { s.ActivationId = &v return s } type CreateAssociationBatchInput struct { _ struct{} `type:"structure"` // One or more associations. // // Entries is a required field Entries []*CreateAssociationBatchRequestEntry `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationBatchInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationBatchInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateAssociationBatchInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateAssociationBatchInput"} if s.Entries == nil { invalidParams.Add(request.NewErrParamRequired("Entries")) } if s.Entries != nil && len(s.Entries) < 1 { invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) } if s.Entries != nil { for i, v := range s.Entries { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetEntries sets the Entries field's value. func (s *CreateAssociationBatchInput) SetEntries(v []*CreateAssociationBatchRequestEntry) *CreateAssociationBatchInput { s.Entries = v return s } type CreateAssociationBatchOutput struct { _ struct{} `type:"structure"` // Information about the associations that failed. Failed []*FailedCreateAssociation `type:"list"` // Information about the associations that succeeded. Successful []*AssociationDescription `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationBatchOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationBatchOutput) GoString() string { return s.String() } // SetFailed sets the Failed field's value. func (s *CreateAssociationBatchOutput) SetFailed(v []*FailedCreateAssociation) *CreateAssociationBatchOutput { s.Failed = v return s } // SetSuccessful sets the Successful field's value. func (s *CreateAssociationBatchOutput) SetSuccessful(v []*AssociationDescription) *CreateAssociationBatchOutput { s.Successful = v return s } // Describes the association of a Amazon Web Services Systems Manager document // (SSM document) and a managed node. type CreateAssociationBatchRequestEntry struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm you want to apply to an automation or // command. AlarmConfiguration *AlarmConfiguration `type:"structure"` // By default, when you create a new associations, the system runs it immediately // after it is created and then according to the schedule you specified. Specify // this option if you don't want an association to run immediately after you // create it. This parameter isn't supported for rate expressions. ApplyOnlyAtCronInterval *bool `type:"boolean"` // Specify a descriptive name for the association. AssociationName *string `type:"string"` // Specify the target for the association. This target is required for associations // that use an Automation runbook and target resources by using rate controls. // Automation is a capability of Amazon Web Services Systems Manager. AutomationTargetParameterName *string `min:"1" type:"string"` // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents // your associations are gated under. The associations only run when that Change // Calendar is open. For more information, see Amazon Web Services Systems Manager // Change Calendar (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar). CalendarNames []*string `type:"list"` // The severity level to assign to the association. ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` // The document version. DocumentVersion *string `type:"string"` // The managed node ID. // // InstanceId has been deprecated. To specify a managed node ID for an association, // use the Targets parameter. Requests that include the parameter InstanceID // with Systems Manager documents (SSM documents) that use schema version 2.0 // or later will fail. In addition, if you use the parameter InstanceId, you // can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, // OutputLocation, or ScheduleExpression. To use these parameters, you must // use the Targets parameter. 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 managed node starts and attempts to run an association while Systems // Manager is running MaxConcurrency associations, the association is allowed // to run. During the next association interval, the new managed node 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 managed nodes 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 SSM document that contains the configuration information // for the managed node. You can specify Command or Automation runbooks. // // You can specify Amazon Web Services-predefined documents, documents you created, // or a document that is shared with you from another account. // // For SSM documents that are shared with you from other Amazon Web Services // accounts, you must specify the complete SSM document ARN, in the following // format: // // arn:aws:ssm:region:account-id:document/document-name // // For example: // // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document // // For Amazon Web Services-predefined documents and SSM documents you created // in your account, you only need to specify the document name. For example, // AWS-ApplyPatchBaseline or My-Document. // // Name is a required field Name *string `type:"string" required:"true"` // An S3 bucket where you want to store the results of this request. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // A description of the parameters for a document. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateAssociationBatchRequestEntry's // String and GoString methods. Parameters map[string][]*string `type:"map" sensitive:"true"` // A cron expression that specifies a schedule when the association runs. ScheduleExpression *string `min:"1" type:"string"` // Number of days to wait after the scheduled day to run an association. ScheduleOffset *int64 `min:"1" type:"integer"` // The mode for generating association compliance. You can specify AUTO or MANUAL. // In AUTO mode, the system uses the status of the association execution to // determine the compliance status. If the association execution runs successfully, // then the association is COMPLIANT. If the association execution doesn't run // successfully, the association is NON-COMPLIANT. // // In MANUAL mode, you must specify the AssociationId as a parameter for the // PutComplianceItems API operation. In this case, compliance data isn't managed // by State Manager, a capability of Amazon Web Services Systems Manager. It // is managed by your direct call to the PutComplianceItems API operation. // // By default, all associations use AUTO mode. SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` // Use this action to create an association in multiple Regions and multiple // accounts. TargetLocations []*TargetLocation `min:"1" type:"list"` // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]*string `type:"list"` // The managed nodes targeted by the request. Targets []*Target `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationBatchRequestEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationBatchRequestEntry) GoString() string { return s.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.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) } 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")) } if s.ScheduleExpression != nil && len(*s.ScheduleExpression) < 1 { invalidParams.Add(request.NewErrParamMinLen("ScheduleExpression", 1)) } if s.ScheduleOffset != nil && *s.ScheduleOffset < 1 { invalidParams.Add(request.NewErrParamMinValue("ScheduleOffset", 1)) } if s.TargetLocations != nil && len(s.TargetLocations) < 1 { invalidParams.Add(request.NewErrParamMinLen("TargetLocations", 1)) } if s.AlarmConfiguration != nil { if err := s.AlarmConfiguration.Validate(); err != nil { invalidParams.AddNested("AlarmConfiguration", err.(request.ErrInvalidParams)) } } if s.OutputLocation != nil { if err := s.OutputLocation.Validate(); err != nil { invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams)) } } 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 { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *CreateAssociationBatchRequestEntry) SetAlarmConfiguration(v *AlarmConfiguration) *CreateAssociationBatchRequestEntry { s.AlarmConfiguration = v return s } // SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value. func (s *CreateAssociationBatchRequestEntry) SetApplyOnlyAtCronInterval(v bool) *CreateAssociationBatchRequestEntry { s.ApplyOnlyAtCronInterval = &v return s } // SetAssociationName sets the AssociationName field's value. func (s *CreateAssociationBatchRequestEntry) SetAssociationName(v string) *CreateAssociationBatchRequestEntry { s.AssociationName = &v return s } // SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. func (s *CreateAssociationBatchRequestEntry) SetAutomationTargetParameterName(v string) *CreateAssociationBatchRequestEntry { s.AutomationTargetParameterName = &v return s } // SetCalendarNames sets the CalendarNames field's value. func (s *CreateAssociationBatchRequestEntry) SetCalendarNames(v []*string) *CreateAssociationBatchRequestEntry { s.CalendarNames = v 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 return s } // SetInstanceId sets the InstanceId field's value. func (s *CreateAssociationBatchRequestEntry) SetInstanceId(v string) *CreateAssociationBatchRequestEntry { s.InstanceId = &v 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 return s } // SetOutputLocation sets the OutputLocation field's value. func (s *CreateAssociationBatchRequestEntry) SetOutputLocation(v *InstanceAssociationOutputLocation) *CreateAssociationBatchRequestEntry { s.OutputLocation = v return s } // SetParameters sets the Parameters field's value. func (s *CreateAssociationBatchRequestEntry) SetParameters(v map[string][]*string) *CreateAssociationBatchRequestEntry { s.Parameters = v return s } // SetScheduleExpression sets the ScheduleExpression field's value. func (s *CreateAssociationBatchRequestEntry) SetScheduleExpression(v string) *CreateAssociationBatchRequestEntry { s.ScheduleExpression = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *CreateAssociationBatchRequestEntry) SetScheduleOffset(v int64) *CreateAssociationBatchRequestEntry { s.ScheduleOffset = &v return s } // SetSyncCompliance sets the SyncCompliance field's value. func (s *CreateAssociationBatchRequestEntry) SetSyncCompliance(v string) *CreateAssociationBatchRequestEntry { s.SyncCompliance = &v return s } // SetTargetLocations sets the TargetLocations field's value. func (s *CreateAssociationBatchRequestEntry) SetTargetLocations(v []*TargetLocation) *CreateAssociationBatchRequestEntry { s.TargetLocations = v return s } // SetTargetMaps sets the TargetMaps field's value. func (s *CreateAssociationBatchRequestEntry) SetTargetMaps(v []map[string][]*string) *CreateAssociationBatchRequestEntry { s.TargetMaps = v return s } // SetTargets sets the Targets field's value. func (s *CreateAssociationBatchRequestEntry) SetTargets(v []*Target) *CreateAssociationBatchRequestEntry { s.Targets = v return s } type CreateAssociationInput struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm you want to apply to an automation or // command. AlarmConfiguration *AlarmConfiguration `type:"structure"` // By default, when you create a new association, the system runs it immediately // after it is created and then according to the schedule you specified. Specify // this option if you don't want an association to run immediately after you // create it. This parameter isn't supported for rate expressions. ApplyOnlyAtCronInterval *bool `type:"boolean"` // Specify a descriptive name for the association. AssociationName *string `type:"string"` // Choose the parameter that will define how your automation will branch out. // This target is required for associations that use an Automation runbook and // target resources by using rate controls. Automation is a capability of Amazon // Web Services Systems Manager. AutomationTargetParameterName *string `min:"1" type:"string"` // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents // you want to gate your associations under. The associations only run when // that change calendar is open. For more information, see Amazon Web Services // Systems Manager Change Calendar (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar). CalendarNames []*string `type:"list"` // 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. // // State Manager doesn't support running associations that use a new version // of a document if that document is shared from another account. State Manager // always runs the default version of a document if shared from another account, // even though the Systems Manager console shows that a new version was processed. // If you want to run an association using a new version of a document shared // form another account, you must set the document version to default. DocumentVersion *string `type:"string"` // The managed node ID. // // InstanceId has been deprecated. To specify a managed node ID for an association, // use the Targets parameter. Requests that include the parameter InstanceID // with Systems Manager documents (SSM documents) that use schema version 2.0 // or later will fail. In addition, if you use the parameter InstanceId, you // can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, // OutputLocation, or ScheduleExpression. To use these parameters, you must // use the Targets parameter. 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 managed node starts and attempts to run an association while Systems // Manager is running MaxConcurrency associations, the association is allowed // to run. During the next association interval, the new managed node 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 managed nodes 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 SSM Command document or Automation runbook that contains // the configuration information for the managed node. // // You can specify Amazon Web Services-predefined documents, documents you created, // or a document that is shared with you from another Amazon Web Services account. // // For Systems Manager documents (SSM documents) that are shared with you from // other Amazon Web Services accounts, you must specify the complete SSM document // ARN, in the following format: // // arn:partition:ssm:region:account-id:document/document-name // // For example: // // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document // // For Amazon Web Services-predefined documents and SSM documents you created // in your account, you only need to specify the document name. For example, // AWS-ApplyPatchBaseline or My-Document. // // Name is a required field Name *string `type:"string" required:"true"` // An Amazon Simple Storage Service (Amazon S3) bucket where you want to store // the output details of the request. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // The parameters for the runtime configuration of the document. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateAssociationInput's // String and GoString methods. Parameters map[string][]*string `type:"map" sensitive:"true"` // A cron expression when the association will be applied to the target(s). ScheduleExpression *string `min:"1" type:"string"` // Number of days to wait after the scheduled day to run an association. For // example, if you specified a cron schedule of cron(0 0 ? * THU#2 *), you could // specify an offset of 3 to run the association each Sunday after the second // Thursday of the month. For more information about cron schedules for associations, // see Reference: Cron and rate expressions for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html) // in the Amazon Web Services Systems Manager User Guide. // // To use offsets, you must specify the ApplyOnlyAtCronInterval parameter. This // option tells the system not to run an association immediately after you create // it. ScheduleOffset *int64 `min:"1" type:"integer"` // The mode for generating association compliance. You can specify AUTO or MANUAL. // In AUTO mode, the system uses the status of the association execution to // determine the compliance status. If the association execution runs successfully, // then the association is COMPLIANT. If the association execution doesn't run // successfully, the association is NON-COMPLIANT. // // In MANUAL mode, you must specify the AssociationId as a parameter for the // PutComplianceItems API operation. In this case, compliance data isn't managed // by State Manager. It is managed by your direct call to the PutComplianceItems // API operation. // // By default, all associations use AUTO mode. SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` // Adds or overwrites one or more tags for a State Manager association. Tags // are metadata that you can assign to your Amazon Web Services resources. Tags // enable you to categorize your resources in different ways, for example, by // purpose, owner, or environment. Each tag consists of a key and an optional // value, both of which you define. Tags []*Tag `type:"list"` // A location is a combination of Amazon Web Services Regions and Amazon Web // Services accounts where you want to run the association. Use this action // to create an association in multiple Regions and multiple accounts. TargetLocations []*TargetLocation `min:"1" type:"list"` // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]*string `type:"list"` // The targets for the association. You can target managed nodes by using tags, // Amazon Web Services resource groups, all managed nodes in an Amazon Web Services // account, or individual managed node IDs. You can target all managed nodes // in an Amazon Web Services account by specifying the InstanceIds key with // a value of *. For more information about choosing targets for an association, // see Using targets and rate controls with State Manager associations (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html) // in the Amazon Web Services Systems Manager User Guide. Targets []*Target `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationInput) GoString() string { return s.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.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) } 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")) } if s.ScheduleExpression != nil && len(*s.ScheduleExpression) < 1 { invalidParams.Add(request.NewErrParamMinLen("ScheduleExpression", 1)) } if s.ScheduleOffset != nil && *s.ScheduleOffset < 1 { invalidParams.Add(request.NewErrParamMinValue("ScheduleOffset", 1)) } if s.TargetLocations != nil && len(s.TargetLocations) < 1 { invalidParams.Add(request.NewErrParamMinLen("TargetLocations", 1)) } if s.AlarmConfiguration != nil { if err := s.AlarmConfiguration.Validate(); err != nil { invalidParams.AddNested("AlarmConfiguration", err.(request.ErrInvalidParams)) } } if s.OutputLocation != nil { if err := s.OutputLocation.Validate(); err != nil { invalidParams.AddNested("OutputLocation", 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 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 { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *CreateAssociationInput) SetAlarmConfiguration(v *AlarmConfiguration) *CreateAssociationInput { s.AlarmConfiguration = v return s } // SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value. func (s *CreateAssociationInput) SetApplyOnlyAtCronInterval(v bool) *CreateAssociationInput { s.ApplyOnlyAtCronInterval = &v return s } // SetAssociationName sets the AssociationName field's value. func (s *CreateAssociationInput) SetAssociationName(v string) *CreateAssociationInput { s.AssociationName = &v return s } // SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. func (s *CreateAssociationInput) SetAutomationTargetParameterName(v string) *CreateAssociationInput { s.AutomationTargetParameterName = &v return s } // SetCalendarNames sets the CalendarNames field's value. func (s *CreateAssociationInput) SetCalendarNames(v []*string) *CreateAssociationInput { s.CalendarNames = v 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 return s } // SetInstanceId sets the InstanceId field's value. func (s *CreateAssociationInput) SetInstanceId(v string) *CreateAssociationInput { s.InstanceId = &v 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 return s } // SetOutputLocation sets the OutputLocation field's value. func (s *CreateAssociationInput) SetOutputLocation(v *InstanceAssociationOutputLocation) *CreateAssociationInput { s.OutputLocation = v return s } // SetParameters sets the Parameters field's value. func (s *CreateAssociationInput) SetParameters(v map[string][]*string) *CreateAssociationInput { s.Parameters = v return s } // SetScheduleExpression sets the ScheduleExpression field's value. func (s *CreateAssociationInput) SetScheduleExpression(v string) *CreateAssociationInput { s.ScheduleExpression = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *CreateAssociationInput) SetScheduleOffset(v int64) *CreateAssociationInput { s.ScheduleOffset = &v return s } // SetSyncCompliance sets the SyncCompliance field's value. func (s *CreateAssociationInput) SetSyncCompliance(v string) *CreateAssociationInput { s.SyncCompliance = &v return s } // SetTags sets the Tags field's value. func (s *CreateAssociationInput) SetTags(v []*Tag) *CreateAssociationInput { s.Tags = v return s } // SetTargetLocations sets the TargetLocations field's value. func (s *CreateAssociationInput) SetTargetLocations(v []*TargetLocation) *CreateAssociationInput { s.TargetLocations = v return s } // SetTargetMaps sets the TargetMaps field's value. func (s *CreateAssociationInput) SetTargetMaps(v []map[string][]*string) *CreateAssociationInput { s.TargetMaps = v return s } // SetTargets sets the Targets field's value. func (s *CreateAssociationInput) SetTargets(v []*Target) *CreateAssociationInput { s.Targets = v return s } type CreateAssociationOutput struct { _ struct{} `type:"structure"` // Information about the association. AssociationDescription *AssociationDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateAssociationOutput) GoString() string { return s.String() } // SetAssociationDescription sets the AssociationDescription field's value. func (s *CreateAssociationOutput) SetAssociationDescription(v *AssociationDescription) *CreateAssociationOutput { s.AssociationDescription = v return s } type CreateDocumentInput struct { _ struct{} `type:"structure"` // A list of key-value pairs that describe attachments to a version of a document. Attachments []*AttachmentsSource `type:"list"` // The content for the new SSM document in JSON or YAML format. The content // of the document must not exceed 64KB. This quota also includes the content // specified for input parameters at runtime. We recommend storing the contents // for your new document in an external JSON or YAML file and referencing the // file in a command. // // For examples, see the following topics in the Amazon Web Services Systems // Manager User Guide. // // * Create an SSM document (Amazon Web Services API) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html) // // * Create an SSM document (Amazon Web Services CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-cli.html) // // * Create an SSM document (API) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html) // // Content is a required field Content *string `min:"1" type:"string" required:"true"` // An optional field where you can specify a friendly name for the SSM document. // This value can differ for each version of the document. You can update this // value at a later time using the UpdateDocument operation. DisplayName *string `type:"string"` // Specify the document format for the request. The document format can be JSON, // YAML, or TEXT. JSON is the default format. DocumentFormat *string `type:"string" enum:"DocumentFormat"` // The type of document to create. // // The DeploymentStrategy document type is an internal-use-only document type // reserved for AppConfig. DocumentType *string `type:"string" enum:"DocumentType"` // A name for the SSM document. // // You can't use the following strings as document name prefixes. These are // reserved by Amazon Web Services for use as document name prefixes: // // * aws // // * amazon // // * amzn // // Name is a required field Name *string `type:"string" required:"true"` // A list of SSM documents required by a document. This parameter is used exclusively // by AppConfig. When a user creates an AppConfig configuration in an SSM document, // the user must also specify a required document for validation purposes. In // this case, an ApplicationConfiguration document requires an ApplicationConfigurationSchema // document for validation purposes. For more information, see What is AppConfig? // (https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html) // in the AppConfig User Guide. Requires []*DocumentRequires `min:"1" type:"list"` // Optional metadata that you assign to a resource. Tags enable you to categorize // a resource in different ways, such as by purpose, owner, or environment. // For example, you might want to tag an SSM document to identify the types // of targets or the environment where it will run. In this case, you could // specify the following key-value pairs: // // * Key=OS,Value=Windows // // * Key=Environment,Value=Production // // To add tags to an existing SSM document, use the AddTagsToResource operation. Tags []*Tag `type:"list"` // Specify a target type to define the kinds of resources the document can run // on. For example, to run a document on EC2 instances, specify the following // value: /AWS::EC2::Instance. If you specify a value of '/' the document can // run on all types of resources. If you don't specify a value, the document // can't run on any resources. For a list of valid resource types, see Amazon // Web Services resource and property types reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the CloudFormation User Guide. TargetType *string `type:"string"` // An optional field specifying the version of the artifact you are creating // with the document. For example, Release12.1. This value is unique across // all versions of a document, and can't be changed. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateDocumentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateDocumentInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateDocumentInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateDocumentInput"} if s.Content == nil { invalidParams.Add(request.NewErrParamRequired("Content")) } if s.Content != nil && len(*s.Content) < 1 { invalidParams.Add(request.NewErrParamMinLen("Content", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Requires != nil && len(s.Requires) < 1 { invalidParams.Add(request.NewErrParamMinLen("Requires", 1)) } 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 s.Requires != nil { for i, v := range s.Requires { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Requires", i), 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 } // 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 return s } // SetDisplayName sets the DisplayName field's value. func (s *CreateDocumentInput) SetDisplayName(v string) *CreateDocumentInput { s.DisplayName = &v return s } // SetDocumentFormat sets the DocumentFormat field's value. func (s *CreateDocumentInput) SetDocumentFormat(v string) *CreateDocumentInput { s.DocumentFormat = &v return s } // SetDocumentType sets the DocumentType field's value. func (s *CreateDocumentInput) SetDocumentType(v string) *CreateDocumentInput { s.DocumentType = &v return s } // SetName sets the Name field's value. func (s *CreateDocumentInput) SetName(v string) *CreateDocumentInput { s.Name = &v return s } // SetRequires sets the Requires field's value. func (s *CreateDocumentInput) SetRequires(v []*DocumentRequires) *CreateDocumentInput { s.Requires = v return s } // SetTags sets the Tags field's value. func (s *CreateDocumentInput) SetTags(v []*Tag) *CreateDocumentInput { s.Tags = v return s } // SetTargetType sets the TargetType field's value. func (s *CreateDocumentInput) SetTargetType(v string) *CreateDocumentInput { s.TargetType = &v 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"` // Information about the SSM document. DocumentDescription *DocumentDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateDocumentOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateDocumentOutput) GoString() string { return s.String() } // SetDocumentDescription sets the DocumentDescription field's value. func (s *CreateDocumentOutput) SetDocumentDescription(v *DocumentDescription) *CreateDocumentOutput { s.DocumentDescription = v return s } type CreateMaintenanceWindowInput struct { _ struct{} `type:"structure"` // Enables a maintenance window task to run on managed nodes, even if you haven't // registered those nodes as targets. If enabled, then you must specify the // unregistered managed nodes (by node ID) when you register a task with the // maintenance window. // // If you don't enable this option, then you must specify previously-registered // targets when you register a task with the maintenance window. // // AllowUnassociatedTargets is a required field AllowUnassociatedTargets *bool `type:"boolean" required:"true"` // User-provided idempotency token. ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` // The number of hours before the end of the maintenance window that Amazon // Web Services Systems Manager stops scheduling new tasks for execution. // // Cutoff is a required field Cutoff *int64 `type:"integer" required:"true"` // An optional description for the maintenance window. We recommend specifying // a description to help you organize your maintenance windows. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateMaintenanceWindowInput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the maintenance window in hours. // // Duration is a required field Duration *int64 `min:"1" type:"integer" required:"true"` // The date and time, in ISO-8601 Extended format, for when you want the maintenance // window to become inactive. EndDate allows you to set a date and time in the // future when the maintenance window will no longer run. EndDate *string `type:"string"` // The name of the maintenance window. // // Name is a required field Name *string `min:"3" type:"string" required:"true"` // The schedule of the maintenance window in the form of a cron or rate expression. // // Schedule is a required field Schedule *string `min:"1" type:"string" required:"true"` // The number of days to wait after the date and time specified by a cron expression // before running the maintenance window. // // For example, the following cron expression schedules a maintenance window // to run on the third Tuesday of every month at 11:30 PM. // // cron(30 23 ? * TUE#3 *) // // If the schedule offset is 2, the maintenance window won't run until two days // later. ScheduleOffset *int64 `min:"1" type:"integer"` // The time zone that the scheduled maintenance window executions are based // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", // "UTC", or "Asia/Seoul". For more information, see the Time Zone Database // (https://www.iana.org/time-zones) on the IANA website. ScheduleTimezone *string `type:"string"` // The date and time, in ISO-8601 Extended format, for when you want the maintenance // window to become active. StartDate allows you to delay activation of the // maintenance window until the specified future date. StartDate *string `type:"string"` // Optional metadata that you assign to a resource. Tags enable you to categorize // a resource in different ways, such as by purpose, owner, or environment. // For example, you might want to tag a maintenance window to identify the type // of tasks it will run, the types of targets, and the environment it will run // in. In this case, you could specify the following key-value pairs: // // * Key=TaskType,Value=AgentUpdate // // * Key=OS,Value=Windows // // * Key=Environment,Value=Production // // To add tags to an existing maintenance window, use the AddTagsToResource // operation. Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateMaintenanceWindowInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateMaintenanceWindowInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateMaintenanceWindowInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateMaintenanceWindowInput"} if s.AllowUnassociatedTargets == nil { invalidParams.Add(request.NewErrParamRequired("AllowUnassociatedTargets")) } if s.ClientToken != nil && len(*s.ClientToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) } if s.Cutoff == nil { invalidParams.Add(request.NewErrParamRequired("Cutoff")) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Duration == nil { invalidParams.Add(request.NewErrParamRequired("Duration")) } if s.Duration != nil && *s.Duration < 1 { invalidParams.Add(request.NewErrParamMinValue("Duration", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } if s.Schedule == nil { invalidParams.Add(request.NewErrParamRequired("Schedule")) } if s.Schedule != nil && len(*s.Schedule) < 1 { invalidParams.Add(request.NewErrParamMinLen("Schedule", 1)) } if s.ScheduleOffset != nil && *s.ScheduleOffset < 1 { invalidParams.Add(request.NewErrParamMinValue("ScheduleOffset", 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 } // SetAllowUnassociatedTargets sets the AllowUnassociatedTargets field's value. func (s *CreateMaintenanceWindowInput) SetAllowUnassociatedTargets(v bool) *CreateMaintenanceWindowInput { s.AllowUnassociatedTargets = &v return s } // SetClientToken sets the ClientToken field's value. func (s *CreateMaintenanceWindowInput) SetClientToken(v string) *CreateMaintenanceWindowInput { s.ClientToken = &v return s } // SetCutoff sets the Cutoff field's value. func (s *CreateMaintenanceWindowInput) SetCutoff(v int64) *CreateMaintenanceWindowInput { s.Cutoff = &v return s } // SetDescription sets the Description field's value. func (s *CreateMaintenanceWindowInput) SetDescription(v string) *CreateMaintenanceWindowInput { s.Description = &v return s } // SetDuration sets the Duration field's value. func (s *CreateMaintenanceWindowInput) SetDuration(v int64) *CreateMaintenanceWindowInput { s.Duration = &v return s } // SetEndDate sets the EndDate field's value. func (s *CreateMaintenanceWindowInput) SetEndDate(v string) *CreateMaintenanceWindowInput { s.EndDate = &v return s } // SetName sets the Name field's value. func (s *CreateMaintenanceWindowInput) SetName(v string) *CreateMaintenanceWindowInput { s.Name = &v return s } // SetSchedule sets the Schedule field's value. func (s *CreateMaintenanceWindowInput) SetSchedule(v string) *CreateMaintenanceWindowInput { s.Schedule = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *CreateMaintenanceWindowInput) SetScheduleOffset(v int64) *CreateMaintenanceWindowInput { s.ScheduleOffset = &v return s } // SetScheduleTimezone sets the ScheduleTimezone field's value. func (s *CreateMaintenanceWindowInput) SetScheduleTimezone(v string) *CreateMaintenanceWindowInput { s.ScheduleTimezone = &v return s } // SetStartDate sets the StartDate field's value. func (s *CreateMaintenanceWindowInput) SetStartDate(v string) *CreateMaintenanceWindowInput { s.StartDate = &v return s } // SetTags sets the Tags field's value. func (s *CreateMaintenanceWindowInput) SetTags(v []*Tag) *CreateMaintenanceWindowInput { s.Tags = v return s } type CreateMaintenanceWindowOutput struct { _ struct{} `type:"structure"` // The ID of the created maintenance window. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateMaintenanceWindowOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateMaintenanceWindowOutput) GoString() string { return s.String() } // SetWindowId sets the WindowId field's value. func (s *CreateMaintenanceWindowOutput) SetWindowId(v string) *CreateMaintenanceWindowOutput { s.WindowId = &v return s } type CreateOpsItemInput struct { _ struct{} `type:"structure"` // The target Amazon Web Services account where you want to create an OpsItem. // To make this call, your account must be configured to work with OpsItems // across accounts. For more information, see Set up OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html) // in the Amazon Web Services Systems Manager User Guide. AccountId *string `type:"string"` // The time a runbook workflow ended. Currently reported only for the OpsItem // type /aws/changerequest. ActualEndTime *time.Time `type:"timestamp"` // The time a runbook workflow started. Currently reported only for the OpsItem // type /aws/changerequest. ActualStartTime *time.Time `type:"timestamp"` // Specify a category to assign to an OpsItem. Category *string `min:"1" type:"string"` // User-defined text that contains information about the OpsItem, in Markdown // format. // // Provide enough information so that users viewing this OpsItem for the first // time understand the issue. // // Description is a required field Description *string `min:"1" type:"string" required:"true"` // The Amazon Resource Name (ARN) of an SNS topic where notifications are sent // when this OpsItem is edited or changed. Notifications []*OpsItemNotification `type:"list"` // Operational data is custom data that provides useful reference details about // the OpsItem. For example, you can specify log files, error strings, license // keys, troubleshooting tips, or other relevant data. You enter operational // data as key-value pairs. The key has a maximum length of 128 characters. // The value has a maximum size of 20 KB. // // Operational data keys can't begin with the following: amazon, aws, amzn, // ssm, /amazon, /aws, /amzn, /ssm. // // You can choose to make the data searchable by other users in the account // or you can restrict search access. Searchable data means that all users with // access to the OpsItem Overview page (as provided by the DescribeOpsItems // API operation) can view and search on the specified data. Operational data // that isn't searchable is only viewable by users who have access to the OpsItem // (as provided by the GetOpsItem API operation). // // Use the /aws/resources key in OperationalData to specify a related resource // in the request. Use the /aws/automations key in OperationalData to associate // an Automation runbook with the OpsItem. To view Amazon Web Services CLI example // commands that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html) // in the Amazon Web Services Systems Manager User Guide. OperationalData map[string]*OpsItemDataValue `type:"map"` // The type of OpsItem to create. Systems Manager supports the following types // of OpsItems: // // * /aws/issue This type of OpsItem is used for default OpsItems created // by OpsCenter. // // * /aws/changerequest This type of OpsItem is used by Change Manager for // reviewing and approving or rejecting change requests. // // * /aws/insight This type of OpsItem is used by OpsCenter for aggregating // and reporting on duplicate OpsItems. OpsItemType *string `type:"string"` // The time specified in a change request for a runbook workflow to end. Currently // supported only for the OpsItem type /aws/changerequest. PlannedEndTime *time.Time `type:"timestamp"` // The time specified in a change request for a runbook workflow to start. Currently // supported only for the OpsItem type /aws/changerequest. PlannedStartTime *time.Time `type:"timestamp"` // The importance of this OpsItem in relation to other OpsItems in the system. Priority *int64 `min:"1" type:"integer"` // One or more OpsItems that share something in common with the current OpsItems. // For example, related OpsItems can include OpsItems with similar error messages, // impacted resources, or statuses for the impacted resource. RelatedOpsItems []*RelatedOpsItem `type:"list"` // Specify a severity to assign to an OpsItem. Severity *string `min:"1" type:"string"` // The origin of the OpsItem, such as Amazon EC2 or Systems Manager. // // The source name can't contain the following strings: aws, amazon, and amzn. // // Source is a required field Source *string `min:"1" type:"string" required:"true"` // Optional metadata that you assign to a resource. // // Tags use a key-value pair. For example: // // Key=Department,Value=Finance // // To add tags to a new OpsItem, a user must have IAM permissions for both the // ssm:CreateOpsItems operation and the ssm:AddTagsToResource operation. To // add tags to an existing OpsItem, use the AddTagsToResource operation. Tags []*Tag `type:"list"` // A short heading that describes the nature of the OpsItem and the impacted // resource. // // Title is a required field Title *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateOpsItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateOpsItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateOpsItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateOpsItemInput"} if s.Category != nil && len(*s.Category) < 1 { invalidParams.Add(request.NewErrParamMinLen("Category", 1)) } if s.Description == nil { invalidParams.Add(request.NewErrParamRequired("Description")) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Priority != nil && *s.Priority < 1 { invalidParams.Add(request.NewErrParamMinValue("Priority", 1)) } if s.Severity != nil && len(*s.Severity) < 1 { invalidParams.Add(request.NewErrParamMinLen("Severity", 1)) } if s.Source == nil { invalidParams.Add(request.NewErrParamRequired("Source")) } if s.Source != nil && len(*s.Source) < 1 { invalidParams.Add(request.NewErrParamMinLen("Source", 1)) } if s.Title == nil { invalidParams.Add(request.NewErrParamRequired("Title")) } if s.Title != nil && len(*s.Title) < 1 { invalidParams.Add(request.NewErrParamMinLen("Title", 1)) } if s.RelatedOpsItems != nil { for i, v := range s.RelatedOpsItems { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RelatedOpsItems", i), 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 } // SetAccountId sets the AccountId field's value. func (s *CreateOpsItemInput) SetAccountId(v string) *CreateOpsItemInput { s.AccountId = &v return s } // SetActualEndTime sets the ActualEndTime field's value. func (s *CreateOpsItemInput) SetActualEndTime(v time.Time) *CreateOpsItemInput { s.ActualEndTime = &v return s } // SetActualStartTime sets the ActualStartTime field's value. func (s *CreateOpsItemInput) SetActualStartTime(v time.Time) *CreateOpsItemInput { s.ActualStartTime = &v return s } // SetCategory sets the Category field's value. func (s *CreateOpsItemInput) SetCategory(v string) *CreateOpsItemInput { s.Category = &v return s } // SetDescription sets the Description field's value. func (s *CreateOpsItemInput) SetDescription(v string) *CreateOpsItemInput { s.Description = &v return s } // SetNotifications sets the Notifications field's value. func (s *CreateOpsItemInput) SetNotifications(v []*OpsItemNotification) *CreateOpsItemInput { s.Notifications = v return s } // SetOperationalData sets the OperationalData field's value. func (s *CreateOpsItemInput) SetOperationalData(v map[string]*OpsItemDataValue) *CreateOpsItemInput { s.OperationalData = v return s } // SetOpsItemType sets the OpsItemType field's value. func (s *CreateOpsItemInput) SetOpsItemType(v string) *CreateOpsItemInput { s.OpsItemType = &v return s } // SetPlannedEndTime sets the PlannedEndTime field's value. func (s *CreateOpsItemInput) SetPlannedEndTime(v time.Time) *CreateOpsItemInput { s.PlannedEndTime = &v return s } // SetPlannedStartTime sets the PlannedStartTime field's value. func (s *CreateOpsItemInput) SetPlannedStartTime(v time.Time) *CreateOpsItemInput { s.PlannedStartTime = &v return s } // SetPriority sets the Priority field's value. func (s *CreateOpsItemInput) SetPriority(v int64) *CreateOpsItemInput { s.Priority = &v return s } // SetRelatedOpsItems sets the RelatedOpsItems field's value. func (s *CreateOpsItemInput) SetRelatedOpsItems(v []*RelatedOpsItem) *CreateOpsItemInput { s.RelatedOpsItems = v return s } // SetSeverity sets the Severity field's value. func (s *CreateOpsItemInput) SetSeverity(v string) *CreateOpsItemInput { s.Severity = &v return s } // SetSource sets the Source field's value. func (s *CreateOpsItemInput) SetSource(v string) *CreateOpsItemInput { s.Source = &v return s } // SetTags sets the Tags field's value. func (s *CreateOpsItemInput) SetTags(v []*Tag) *CreateOpsItemInput { s.Tags = v return s } // SetTitle sets the Title field's value. func (s *CreateOpsItemInput) SetTitle(v string) *CreateOpsItemInput { s.Title = &v return s } type CreateOpsItemOutput struct { _ struct{} `type:"structure"` // The OpsItem Amazon Resource Name (ARN). OpsItemArn *string `min:"20" type:"string"` // The ID of the OpsItem. OpsItemId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateOpsItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateOpsItemOutput) GoString() string { return s.String() } // SetOpsItemArn sets the OpsItemArn field's value. func (s *CreateOpsItemOutput) SetOpsItemArn(v string) *CreateOpsItemOutput { s.OpsItemArn = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *CreateOpsItemOutput) SetOpsItemId(v string) *CreateOpsItemOutput { s.OpsItemId = &v return s } type CreateOpsMetadataInput struct { _ struct{} `type:"structure"` // Metadata for a new Application Manager application. Metadata map[string]*MetadataValue `min:"1" type:"map"` // A resource ID for a new Application Manager application. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // Optional metadata that you assign to a resource. You can specify a maximum // of five tags for an OpsMetadata object. Tags enable you to categorize a resource // in different ways, such as by purpose, owner, or environment. For example, // you might want to tag an OpsMetadata object to identify an environment or // target Amazon Web Services Region. In this case, you could specify the following // key-value pairs: // // * Key=Environment,Value=Production // // * Key=Region,Value=us-east-2 Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateOpsMetadataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateOpsMetadataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateOpsMetadataInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateOpsMetadataInput"} if s.Metadata != nil && len(s.Metadata) < 1 { invalidParams.Add(request.NewErrParamMinLen("Metadata", 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.Metadata != nil { for i, v := range s.Metadata { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Metadata", i), 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 } // SetMetadata sets the Metadata field's value. func (s *CreateOpsMetadataInput) SetMetadata(v map[string]*MetadataValue) *CreateOpsMetadataInput { s.Metadata = v return s } // SetResourceId sets the ResourceId field's value. func (s *CreateOpsMetadataInput) SetResourceId(v string) *CreateOpsMetadataInput { s.ResourceId = &v return s } // SetTags sets the Tags field's value. func (s *CreateOpsMetadataInput) SetTags(v []*Tag) *CreateOpsMetadataInput { s.Tags = v return s } type CreateOpsMetadataOutput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the OpsMetadata Object or blob created // by the call. OpsMetadataArn *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateOpsMetadataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateOpsMetadataOutput) GoString() string { return s.String() } // SetOpsMetadataArn sets the OpsMetadataArn field's value. func (s *CreateOpsMetadataOutput) SetOpsMetadataArn(v string) *CreateOpsMetadataOutput { s.OpsMetadataArn = &v return s } type CreatePatchBaselineInput struct { _ struct{} `type:"structure"` // A set of rules used to include patches in the baseline. ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and // rejected patches, see About package name formats for approved and rejected // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the Amazon Web Services Systems Manager User Guide. ApprovedPatches []*string `type:"list"` // Defines the compliance level for approved patches. When an approved patch // is reported as missing, this value describes the severity of the compliance // violation. The default value is UNSPECIFIED. ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // Indicates whether the list of approved patches includes non-security updates // that should be applied to the managed nodes. The default value is false. // Applies to Linux managed nodes only. ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` // User-provided idempotency token. ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` // A description of the patch baseline. Description *string `min:"1" type:"string"` // A set of global filters used to include patches in the baseline. GlobalFilters *PatchFilterGroup `type:"structure"` // The name of the patch baseline. // // Name is a required field Name *string `min:"3" type:"string" required:"true"` // Defines the operating system the patch baseline applies to. The default value // is WINDOWS. OperatingSystem *string `type:"string" enum:"OperatingSystem"` // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and // rejected patches, see About package name formats for approved and rejected // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the Amazon Web Services Systems Manager User Guide. RejectedPatches []*string `type:"list"` // The action for Patch Manager to take on patches included in the RejectedPackages // list. // // * ALLOW_AS_DEPENDENCY : A package in the Rejected patches list is installed // only if it is a dependency of another package. It is considered compliant // with the patch baseline, and its status is reported as InstalledOther. // This is the default action if no option is specified. // // * BLOCK : Packages in the RejectedPatches list, and packages that include // them as dependencies, aren't installed under any circumstances. If a package // was installed before it was added to the Rejected patches list, it is // considered non-compliant with the patch baseline, and its status is reported // as InstalledRejected. RejectedPatchesAction *string `type:"string" enum:"PatchAction"` // Information about the patches to use to update the managed nodes, including // target operating systems and source repositories. Applies to Linux managed // nodes only. Sources []*PatchSource `type:"list"` // Optional metadata that you assign to a resource. Tags enable you to categorize // a resource in different ways, such as by purpose, owner, or environment. // For example, you might want to tag a patch baseline to identify the severity // level of patches it specifies and the operating system family it applies // to. In this case, you could specify the following key-value pairs: // // * Key=PatchSeverity,Value=Critical // // * Key=OS,Value=Windows // // To add tags to an existing patch baseline, use the AddTagsToResource operation. Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreatePatchBaselineInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreatePatchBaselineInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreatePatchBaselineInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreatePatchBaselineInput"} if s.ClientToken != nil && len(*s.ClientToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } if s.ApprovalRules != nil { if err := s.ApprovalRules.Validate(); err != nil { invalidParams.AddNested("ApprovalRules", err.(request.ErrInvalidParams)) } } if s.GlobalFilters != nil { if err := s.GlobalFilters.Validate(); err != nil { invalidParams.AddNested("GlobalFilters", err.(request.ErrInvalidParams)) } } if s.Sources != nil { for i, v := range s.Sources { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sources", i), 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 } // SetApprovalRules sets the ApprovalRules field's value. func (s *CreatePatchBaselineInput) SetApprovalRules(v *PatchRuleGroup) *CreatePatchBaselineInput { s.ApprovalRules = v return s } // SetApprovedPatches sets the ApprovedPatches field's value. func (s *CreatePatchBaselineInput) SetApprovedPatches(v []*string) *CreatePatchBaselineInput { s.ApprovedPatches = v return s } // SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. func (s *CreatePatchBaselineInput) SetApprovedPatchesComplianceLevel(v string) *CreatePatchBaselineInput { s.ApprovedPatchesComplianceLevel = &v return s } // SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. func (s *CreatePatchBaselineInput) SetApprovedPatchesEnableNonSecurity(v bool) *CreatePatchBaselineInput { s.ApprovedPatchesEnableNonSecurity = &v return s } // SetClientToken sets the ClientToken field's value. func (s *CreatePatchBaselineInput) SetClientToken(v string) *CreatePatchBaselineInput { s.ClientToken = &v return s } // SetDescription sets the Description field's value. func (s *CreatePatchBaselineInput) SetDescription(v string) *CreatePatchBaselineInput { s.Description = &v return s } // SetGlobalFilters sets the GlobalFilters field's value. func (s *CreatePatchBaselineInput) SetGlobalFilters(v *PatchFilterGroup) *CreatePatchBaselineInput { s.GlobalFilters = v return s } // SetName sets the Name field's value. func (s *CreatePatchBaselineInput) SetName(v string) *CreatePatchBaselineInput { s.Name = &v return s } // SetOperatingSystem sets the OperatingSystem field's value. func (s *CreatePatchBaselineInput) SetOperatingSystem(v string) *CreatePatchBaselineInput { s.OperatingSystem = &v return s } // SetRejectedPatches sets the RejectedPatches field's value. func (s *CreatePatchBaselineInput) SetRejectedPatches(v []*string) *CreatePatchBaselineInput { s.RejectedPatches = v return s } // SetRejectedPatchesAction sets the RejectedPatchesAction field's value. func (s *CreatePatchBaselineInput) SetRejectedPatchesAction(v string) *CreatePatchBaselineInput { s.RejectedPatchesAction = &v return s } // SetSources sets the Sources field's value. func (s *CreatePatchBaselineInput) SetSources(v []*PatchSource) *CreatePatchBaselineInput { s.Sources = v return s } // SetTags sets the Tags field's value. func (s *CreatePatchBaselineInput) SetTags(v []*Tag) *CreatePatchBaselineInput { s.Tags = v return s } type CreatePatchBaselineOutput struct { _ struct{} `type:"structure"` // The ID of the created patch baseline. BaselineId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreatePatchBaselineOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreatePatchBaselineOutput) GoString() string { return s.String() } // SetBaselineId sets the BaselineId field's value. func (s *CreatePatchBaselineOutput) SetBaselineId(v string) *CreatePatchBaselineOutput { s.BaselineId = &v return s } type CreateResourceDataSyncInput struct { _ struct{} `type:"structure"` // Amazon S3 configuration details for the sync. This parameter is required // if the SyncType value is SyncToDestination. S3Destination *ResourceDataSyncS3Destination `type:"structure"` // A name for the configuration. // // SyncName is a required field SyncName *string `min:"1" type:"string" required:"true"` // Specify information about the data sources to synchronize. This parameter // is required if the SyncType value is SyncFromSource. SyncSource *ResourceDataSyncSource `type:"structure"` // Specify SyncToDestination to create a resource data sync that synchronizes // data to an S3 bucket for Inventory. If you specify SyncToDestination, you // must provide a value for S3Destination. Specify SyncFromSource to synchronize // data from a single account and multiple Regions, or multiple Amazon Web Services // accounts and Amazon Web Services Regions, as listed in Organizations for // Explorer. If you specify SyncFromSource, you must provide a value for SyncSource. // The default value is SyncToDestination. SyncType *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateResourceDataSyncInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateResourceDataSyncInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateResourceDataSyncInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateResourceDataSyncInput"} if s.SyncName == nil { invalidParams.Add(request.NewErrParamRequired("SyncName")) } if s.SyncName != nil && len(*s.SyncName) < 1 { invalidParams.Add(request.NewErrParamMinLen("SyncName", 1)) } if s.SyncType != nil && len(*s.SyncType) < 1 { invalidParams.Add(request.NewErrParamMinLen("SyncType", 1)) } if s.S3Destination != nil { if err := s.S3Destination.Validate(); err != nil { invalidParams.AddNested("S3Destination", err.(request.ErrInvalidParams)) } } if s.SyncSource != nil { if err := s.SyncSource.Validate(); err != nil { invalidParams.AddNested("SyncSource", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetS3Destination sets the S3Destination field's value. func (s *CreateResourceDataSyncInput) SetS3Destination(v *ResourceDataSyncS3Destination) *CreateResourceDataSyncInput { s.S3Destination = v return s } // SetSyncName sets the SyncName field's value. func (s *CreateResourceDataSyncInput) SetSyncName(v string) *CreateResourceDataSyncInput { s.SyncName = &v return s } // SetSyncSource sets the SyncSource field's value. func (s *CreateResourceDataSyncInput) SetSyncSource(v *ResourceDataSyncSource) *CreateResourceDataSyncInput { s.SyncSource = v return s } // SetSyncType sets the SyncType field's value. func (s *CreateResourceDataSyncInput) SetSyncType(v string) *CreateResourceDataSyncInput { s.SyncType = &v return s } type CreateResourceDataSyncOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateResourceDataSyncOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateResourceDataSyncOutput) GoString() string { return s.String() } // You have exceeded the limit for custom schemas. Delete one or more custom // schemas and try again. type CustomSchemaCountLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CustomSchemaCountLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CustomSchemaCountLimitExceededException) GoString() string { return s.String() } func newErrorCustomSchemaCountLimitExceededException(v protocol.ResponseMetadata) error { return &CustomSchemaCountLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *CustomSchemaCountLimitExceededException) Code() string { return "CustomSchemaCountLimitExceededException" } // Message returns the exception's message. func (s *CustomSchemaCountLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *CustomSchemaCountLimitExceededException) OrigErr() error { return nil } func (s *CustomSchemaCountLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *CustomSchemaCountLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *CustomSchemaCountLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } type DeleteActivationInput struct { _ struct{} `type:"structure"` // The ID of the activation that you want to delete. // // ActivationId is a required field ActivationId *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteActivationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteActivationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteActivationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteActivationInput"} if s.ActivationId == nil { invalidParams.Add(request.NewErrParamRequired("ActivationId")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetActivationId sets the ActivationId field's value. func (s *DeleteActivationInput) SetActivationId(v string) *DeleteActivationInput { s.ActivationId = &v return s } type DeleteActivationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteActivationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteActivationOutput) GoString() string { return s.String() } type DeleteAssociationInput struct { _ struct{} `type:"structure"` // The association ID that you want to delete. AssociationId *string `type:"string"` // The managed node ID. // // InstanceId has been deprecated. To specify a managed node ID for an association, // use the Targets parameter. Requests that include the parameter InstanceID // with Systems Manager documents (SSM documents) that use schema version 2.0 // or later will fail. In addition, if you use the parameter InstanceId, you // can't use the parameters AssociationName, DocumentVersion, MaxErrors, MaxConcurrency, // OutputLocation, or ScheduleExpression. To use these parameters, you must // use the Targets parameter. InstanceId *string `type:"string"` // The name of the SSM document. Name *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteAssociationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteAssociationInput) GoString() string { return s.String() } // SetAssociationId sets the AssociationId field's value. func (s *DeleteAssociationInput) SetAssociationId(v string) *DeleteAssociationInput { s.AssociationId = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *DeleteAssociationInput) SetInstanceId(v string) *DeleteAssociationInput { s.InstanceId = &v return s } // SetName sets the Name field's value. func (s *DeleteAssociationInput) SetName(v string) *DeleteAssociationInput { s.Name = &v return s } type DeleteAssociationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteAssociationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteAssociationOutput) GoString() string { return s.String() } type DeleteDocumentInput struct { _ struct{} `type:"structure"` // The version of the document that you want to delete. If not provided, all // versions of the document are deleted. DocumentVersion *string `type:"string"` // Some SSM document types require that you specify a Force flag before you // can delete the document. For example, you must specify a Force flag to delete // a document of type ApplicationConfigurationSchema. You can restrict access // to the Force flag in an Identity and Access Management (IAM) policy. Force *bool `type:"boolean"` // The name of the document. // // Name is a required field Name *string `type:"string" required:"true"` // The version name of the document that you want to delete. If not provided, // all versions of the document are deleted. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteDocumentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteDocumentInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteDocumentInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentInput"} if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDocumentVersion sets the DocumentVersion field's value. func (s *DeleteDocumentInput) SetDocumentVersion(v string) *DeleteDocumentInput { s.DocumentVersion = &v return s } // SetForce sets the Force field's value. func (s *DeleteDocumentInput) SetForce(v bool) *DeleteDocumentInput { s.Force = &v return s } // SetName sets the Name field's value. func (s *DeleteDocumentInput) SetName(v string) *DeleteDocumentInput { s.Name = &v return s } // SetVersionName sets the VersionName field's value. func (s *DeleteDocumentInput) SetVersionName(v string) *DeleteDocumentInput { s.VersionName = &v return s } type DeleteDocumentOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteDocumentOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteDocumentOutput) GoString() string { return s.String() } type DeleteInventoryInput struct { _ struct{} `type:"structure"` // User-provided idempotency token. ClientToken *string `type:"string" idempotencyToken:"true"` // Use this option to view a summary of the deletion request without deleting // any data or the data type. This option is useful when you only want to understand // what will be deleted. Once you validate that the data to be deleted is what // you intend to delete, you can run the same command without specifying the // DryRun option. DryRun *bool `type:"boolean"` // Use the SchemaDeleteOption to delete a custom inventory type (schema). If // you don't choose this option, the system only deletes existing inventory // data associated with the custom inventory type. Choose one of the following // options: // // DisableSchema: If you choose this option, the system ignores all inventory // data for the specified version, and any earlier versions. To enable this // schema again, you must call the PutInventory operation for a version greater // than the disabled version. // // DeleteSchema: This option deletes the specified custom type from the Inventory // service. You can recreate the schema later, if you want. SchemaDeleteOption *string `type:"string" enum:"InventorySchemaDeleteOption"` // The name of the custom inventory type for which you want to delete either // all previously collected data or the inventory type itself. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteInventoryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteInventoryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteInventoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteInventoryInput"} 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 } return nil } // SetClientToken sets the ClientToken field's value. func (s *DeleteInventoryInput) SetClientToken(v string) *DeleteInventoryInput { s.ClientToken = &v return s } // SetDryRun sets the DryRun field's value. func (s *DeleteInventoryInput) SetDryRun(v bool) *DeleteInventoryInput { s.DryRun = &v return s } // SetSchemaDeleteOption sets the SchemaDeleteOption field's value. func (s *DeleteInventoryInput) SetSchemaDeleteOption(v string) *DeleteInventoryInput { s.SchemaDeleteOption = &v return s } // SetTypeName sets the TypeName field's value. func (s *DeleteInventoryInput) SetTypeName(v string) *DeleteInventoryInput { s.TypeName = &v return s } type DeleteInventoryOutput struct { _ struct{} `type:"structure"` // Every DeleteInventory operation is assigned a unique ID. This option returns // a unique ID. You can use this ID to query the status of a delete operation. // This option is useful for ensuring that a delete operation has completed // before you begin other operations. DeletionId *string `type:"string"` // A summary of the delete operation. For more information about this summary, // see Deleting custom inventory (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary) // in the Amazon Web Services Systems Manager User Guide. DeletionSummary *InventoryDeletionSummary `type:"structure"` // The name of the inventory data type specified in the request. TypeName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteInventoryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteInventoryOutput) GoString() string { return s.String() } // SetDeletionId sets the DeletionId field's value. func (s *DeleteInventoryOutput) SetDeletionId(v string) *DeleteInventoryOutput { s.DeletionId = &v return s } // SetDeletionSummary sets the DeletionSummary field's value. func (s *DeleteInventoryOutput) SetDeletionSummary(v *InventoryDeletionSummary) *DeleteInventoryOutput { s.DeletionSummary = v return s } // SetTypeName sets the TypeName field's value. func (s *DeleteInventoryOutput) SetTypeName(v string) *DeleteInventoryOutput { s.TypeName = &v return s } type DeleteMaintenanceWindowInput struct { _ struct{} `type:"structure"` // The ID of the maintenance window to delete. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteMaintenanceWindowInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteMaintenanceWindowInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteMaintenanceWindowInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteMaintenanceWindowInput"} if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetWindowId sets the WindowId field's value. func (s *DeleteMaintenanceWindowInput) SetWindowId(v string) *DeleteMaintenanceWindowInput { s.WindowId = &v return s } type DeleteMaintenanceWindowOutput struct { _ struct{} `type:"structure"` // The ID of the deleted maintenance window. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteMaintenanceWindowOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteMaintenanceWindowOutput) GoString() string { return s.String() } // SetWindowId sets the WindowId field's value. func (s *DeleteMaintenanceWindowOutput) SetWindowId(v string) *DeleteMaintenanceWindowOutput { s.WindowId = &v return s } type DeleteOpsItemInput struct { _ struct{} `type:"structure"` // The ID of the OpsItem that you want to delete. // // OpsItemId is a required field OpsItemId *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteOpsItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteOpsItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteOpsItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteOpsItemInput"} if s.OpsItemId == nil { invalidParams.Add(request.NewErrParamRequired("OpsItemId")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOpsItemId sets the OpsItemId field's value. func (s *DeleteOpsItemInput) SetOpsItemId(v string) *DeleteOpsItemInput { s.OpsItemId = &v return s } type DeleteOpsItemOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteOpsItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteOpsItemOutput) GoString() string { return s.String() } type DeleteOpsMetadataInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of an OpsMetadata Object to delete. // // OpsMetadataArn is a required field OpsMetadataArn *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteOpsMetadataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteOpsMetadataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteOpsMetadataInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteOpsMetadataInput"} if s.OpsMetadataArn == nil { invalidParams.Add(request.NewErrParamRequired("OpsMetadataArn")) } if s.OpsMetadataArn != nil && len(*s.OpsMetadataArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("OpsMetadataArn", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOpsMetadataArn sets the OpsMetadataArn field's value. func (s *DeleteOpsMetadataInput) SetOpsMetadataArn(v string) *DeleteOpsMetadataInput { s.OpsMetadataArn = &v return s } type DeleteOpsMetadataOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteOpsMetadataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteOpsMetadataOutput) GoString() string { return s.String() } type DeleteParameterInput struct { _ struct{} `type:"structure"` // The name of the parameter to delete. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteParameterInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteParameterInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteParameterInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteParameterInput"} 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 } // SetName sets the Name field's value. func (s *DeleteParameterInput) SetName(v string) *DeleteParameterInput { s.Name = &v return s } type DeleteParameterOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteParameterOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteParameterOutput) GoString() string { return s.String() } type DeleteParametersInput struct { _ struct{} `type:"structure"` // The names of the parameters to delete. After deleting a parameter, wait for // at least 30 seconds to create a parameter with the same name. // // Names is a required field Names []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteParametersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteParametersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteParametersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteParametersInput"} if s.Names == nil { invalidParams.Add(request.NewErrParamRequired("Names")) } if s.Names != nil && len(s.Names) < 1 { invalidParams.Add(request.NewErrParamMinLen("Names", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetNames sets the Names field's value. func (s *DeleteParametersInput) SetNames(v []*string) *DeleteParametersInput { s.Names = v return s } type DeleteParametersOutput struct { _ struct{} `type:"structure"` // The names of the deleted parameters. DeletedParameters []*string `min:"1" type:"list"` // The names of parameters that weren't deleted because the parameters aren't // valid. InvalidParameters []*string `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteParametersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteParametersOutput) GoString() string { return s.String() } // SetDeletedParameters sets the DeletedParameters field's value. func (s *DeleteParametersOutput) SetDeletedParameters(v []*string) *DeleteParametersOutput { s.DeletedParameters = v return s } // SetInvalidParameters sets the InvalidParameters field's value. func (s *DeleteParametersOutput) SetInvalidParameters(v []*string) *DeleteParametersOutput { s.InvalidParameters = v return s } type DeletePatchBaselineInput struct { _ struct{} `type:"structure"` // The ID of the patch baseline to delete. // // BaselineId is a required field BaselineId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeletePatchBaselineInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeletePatchBaselineInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeletePatchBaselineInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeletePatchBaselineInput"} if s.BaselineId == nil { invalidParams.Add(request.NewErrParamRequired("BaselineId")) } if s.BaselineId != nil && len(*s.BaselineId) < 20 { invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBaselineId sets the BaselineId field's value. func (s *DeletePatchBaselineInput) SetBaselineId(v string) *DeletePatchBaselineInput { s.BaselineId = &v return s } type DeletePatchBaselineOutput struct { _ struct{} `type:"structure"` // The ID of the deleted patch baseline. BaselineId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeletePatchBaselineOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeletePatchBaselineOutput) GoString() string { return s.String() } // SetBaselineId sets the BaselineId field's value. func (s *DeletePatchBaselineOutput) SetBaselineId(v string) *DeletePatchBaselineOutput { s.BaselineId = &v return s } type DeleteResourceDataSyncInput struct { _ struct{} `type:"structure"` // The name of the configuration to delete. // // SyncName is a required field SyncName *string `min:"1" type:"string" required:"true"` // Specify the type of resource data sync to delete. SyncType *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteResourceDataSyncInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteResourceDataSyncInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteResourceDataSyncInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteResourceDataSyncInput"} if s.SyncName == nil { invalidParams.Add(request.NewErrParamRequired("SyncName")) } if s.SyncName != nil && len(*s.SyncName) < 1 { invalidParams.Add(request.NewErrParamMinLen("SyncName", 1)) } if s.SyncType != nil && len(*s.SyncType) < 1 { invalidParams.Add(request.NewErrParamMinLen("SyncType", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSyncName sets the SyncName field's value. func (s *DeleteResourceDataSyncInput) SetSyncName(v string) *DeleteResourceDataSyncInput { s.SyncName = &v return s } // SetSyncType sets the SyncType field's value. func (s *DeleteResourceDataSyncInput) SetSyncType(v string) *DeleteResourceDataSyncInput { s.SyncType = &v return s } type DeleteResourceDataSyncOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteResourceDataSyncOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteResourceDataSyncOutput) GoString() string { return s.String() } type DeleteResourcePolicyInput struct { _ struct{} `type:"structure"` // ID of the current policy version. The hash helps to prevent multiple calls // from attempting to overwrite a policy. // // PolicyHash is a required field PolicyHash *string `type:"string" required:"true"` // The policy ID. // // PolicyId is a required field PolicyId *string `type:"string" required:"true"` // Amazon Resource Name (ARN) of the resource to which the policies are attached. // // ResourceArn is a required field ResourceArn *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteResourcePolicyInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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.PolicyHash == nil { invalidParams.Add(request.NewErrParamRequired("PolicyHash")) } if s.PolicyId == nil { invalidParams.Add(request.NewErrParamRequired("PolicyId")) } if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetPolicyHash sets the PolicyHash field's value. func (s *DeleteResourcePolicyInput) SetPolicyHash(v string) *DeleteResourcePolicyInput { s.PolicyHash = &v return s } // SetPolicyId sets the PolicyId field's value. func (s *DeleteResourcePolicyInput) SetPolicyId(v string) *DeleteResourcePolicyInput { s.PolicyId = &v return s } // SetResourceArn sets the ResourceArn field's value. func (s *DeleteResourcePolicyInput) SetResourceArn(v string) *DeleteResourcePolicyInput { s.ResourceArn = &v return s } type DeleteResourcePolicyOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteResourcePolicyOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeleteResourcePolicyOutput) GoString() string { return s.String() } type DeregisterManagedInstanceInput struct { _ struct{} `type:"structure"` // The ID assigned to the managed node when you registered it using the activation // process. // // InstanceId is a required field InstanceId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterManagedInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterManagedInstanceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeregisterManagedInstanceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeregisterManagedInstanceInput"} if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.InstanceId != nil && len(*s.InstanceId) < 20 { invalidParams.Add(request.NewErrParamMinLen("InstanceId", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetInstanceId sets the InstanceId field's value. func (s *DeregisterManagedInstanceInput) SetInstanceId(v string) *DeregisterManagedInstanceInput { s.InstanceId = &v return s } type DeregisterManagedInstanceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterManagedInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterManagedInstanceOutput) GoString() string { return s.String() } type DeregisterPatchBaselineForPatchGroupInput struct { _ struct{} `type:"structure"` // The ID of the patch baseline to deregister the patch group from. // // BaselineId is a required field BaselineId *string `min:"20" type:"string" required:"true"` // The name of the patch group that should be deregistered from the patch baseline. // // PatchGroup is a required field PatchGroup *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterPatchBaselineForPatchGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterPatchBaselineForPatchGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeregisterPatchBaselineForPatchGroupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeregisterPatchBaselineForPatchGroupInput"} if s.BaselineId == nil { invalidParams.Add(request.NewErrParamRequired("BaselineId")) } if s.BaselineId != nil && len(*s.BaselineId) < 20 { invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) } if s.PatchGroup == nil { invalidParams.Add(request.NewErrParamRequired("PatchGroup")) } if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBaselineId sets the BaselineId field's value. func (s *DeregisterPatchBaselineForPatchGroupInput) SetBaselineId(v string) *DeregisterPatchBaselineForPatchGroupInput { s.BaselineId = &v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *DeregisterPatchBaselineForPatchGroupInput) SetPatchGroup(v string) *DeregisterPatchBaselineForPatchGroupInput { s.PatchGroup = &v return s } type DeregisterPatchBaselineForPatchGroupOutput struct { _ struct{} `type:"structure"` // The ID of the patch baseline the patch group was deregistered from. BaselineId *string `min:"20" type:"string"` // The name of the patch group deregistered from the patch baseline. PatchGroup *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterPatchBaselineForPatchGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterPatchBaselineForPatchGroupOutput) GoString() string { return s.String() } // SetBaselineId sets the BaselineId field's value. func (s *DeregisterPatchBaselineForPatchGroupOutput) SetBaselineId(v string) *DeregisterPatchBaselineForPatchGroupOutput { s.BaselineId = &v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *DeregisterPatchBaselineForPatchGroupOutput) SetPatchGroup(v string) *DeregisterPatchBaselineForPatchGroupOutput { s.PatchGroup = &v return s } type DeregisterTargetFromMaintenanceWindowInput struct { _ struct{} `type:"structure"` // The system checks if the target is being referenced by a task. If the target // is being referenced, the system returns an error and doesn't deregister the // target from the maintenance window. Safe *bool `type:"boolean"` // The ID of the maintenance window the target should be removed from. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` // The ID of the target definition to remove. // // WindowTargetId is a required field WindowTargetId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterTargetFromMaintenanceWindowInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterTargetFromMaintenanceWindowInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeregisterTargetFromMaintenanceWindowInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeregisterTargetFromMaintenanceWindowInput"} if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.WindowTargetId == nil { invalidParams.Add(request.NewErrParamRequired("WindowTargetId")) } if s.WindowTargetId != nil && len(*s.WindowTargetId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowTargetId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSafe sets the Safe field's value. func (s *DeregisterTargetFromMaintenanceWindowInput) SetSafe(v bool) *DeregisterTargetFromMaintenanceWindowInput { s.Safe = &v return s } // SetWindowId sets the WindowId field's value. func (s *DeregisterTargetFromMaintenanceWindowInput) SetWindowId(v string) *DeregisterTargetFromMaintenanceWindowInput { s.WindowId = &v return s } // SetWindowTargetId sets the WindowTargetId field's value. func (s *DeregisterTargetFromMaintenanceWindowInput) SetWindowTargetId(v string) *DeregisterTargetFromMaintenanceWindowInput { s.WindowTargetId = &v return s } type DeregisterTargetFromMaintenanceWindowOutput struct { _ struct{} `type:"structure"` // The ID of the maintenance window the target was removed from. WindowId *string `min:"20" type:"string"` // The ID of the removed target definition. WindowTargetId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterTargetFromMaintenanceWindowOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterTargetFromMaintenanceWindowOutput) GoString() string { return s.String() } // SetWindowId sets the WindowId field's value. func (s *DeregisterTargetFromMaintenanceWindowOutput) SetWindowId(v string) *DeregisterTargetFromMaintenanceWindowOutput { s.WindowId = &v return s } // SetWindowTargetId sets the WindowTargetId field's value. func (s *DeregisterTargetFromMaintenanceWindowOutput) SetWindowTargetId(v string) *DeregisterTargetFromMaintenanceWindowOutput { s.WindowTargetId = &v return s } type DeregisterTaskFromMaintenanceWindowInput struct { _ struct{} `type:"structure"` // The ID of the maintenance window the task should be removed from. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` // The ID of the task to remove from the maintenance window. // // WindowTaskId is a required field WindowTaskId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterTaskFromMaintenanceWindowInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterTaskFromMaintenanceWindowInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeregisterTaskFromMaintenanceWindowInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeregisterTaskFromMaintenanceWindowInput"} if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.WindowTaskId == nil { invalidParams.Add(request.NewErrParamRequired("WindowTaskId")) } if s.WindowTaskId != nil && len(*s.WindowTaskId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowTaskId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetWindowId sets the WindowId field's value. func (s *DeregisterTaskFromMaintenanceWindowInput) SetWindowId(v string) *DeregisterTaskFromMaintenanceWindowInput { s.WindowId = &v return s } // SetWindowTaskId sets the WindowTaskId field's value. func (s *DeregisterTaskFromMaintenanceWindowInput) SetWindowTaskId(v string) *DeregisterTaskFromMaintenanceWindowInput { s.WindowTaskId = &v return s } type DeregisterTaskFromMaintenanceWindowOutput struct { _ struct{} `type:"structure"` // The ID of the maintenance window the task was removed from. WindowId *string `min:"20" type:"string"` // The ID of the task removed from the maintenance window. WindowTaskId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterTaskFromMaintenanceWindowOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DeregisterTaskFromMaintenanceWindowOutput) GoString() string { return s.String() } // SetWindowId sets the WindowId field's value. func (s *DeregisterTaskFromMaintenanceWindowOutput) SetWindowId(v string) *DeregisterTaskFromMaintenanceWindowOutput { s.WindowId = &v return s } // SetWindowTaskId sets the WindowTaskId field's value. func (s *DeregisterTaskFromMaintenanceWindowOutput) SetWindowTaskId(v string) *DeregisterTaskFromMaintenanceWindowOutput { s.WindowTaskId = &v return s } // Filter for the DescribeActivation API. type DescribeActivationsFilter struct { _ struct{} `type:"structure"` // The name of the filter. FilterKey *string `type:"string" enum:"DescribeActivationsFilterKeys"` // The filter values. FilterValues []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeActivationsFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeActivationsFilter) GoString() string { return s.String() } // SetFilterKey sets the FilterKey field's value. func (s *DescribeActivationsFilter) SetFilterKey(v string) *DescribeActivationsFilter { s.FilterKey = &v return s } // SetFilterValues sets the FilterValues field's value. func (s *DescribeActivationsFilter) SetFilterValues(v []*string) *DescribeActivationsFilter { s.FilterValues = v return s } type DescribeActivationsInput struct { _ struct{} `type:"structure"` // A filter to view information about your activations. Filters []*DescribeActivationsFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeActivationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeActivationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeActivationsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeActivationsInput"} 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 *DescribeActivationsInput) SetFilters(v []*DescribeActivationsFilter) *DescribeActivationsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeActivationsInput) SetMaxResults(v int64) *DescribeActivationsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeActivationsInput) SetNextToken(v string) *DescribeActivationsInput { s.NextToken = &v return s } type DescribeActivationsOutput struct { _ struct{} `type:"structure"` // A list of activations for your Amazon Web Services account. ActivationList []*Activation `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeActivationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeActivationsOutput) GoString() string { return s.String() } // SetActivationList sets the ActivationList field's value. func (s *DescribeActivationsOutput) SetActivationList(v []*Activation) *DescribeActivationsOutput { s.ActivationList = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeActivationsOutput) SetNextToken(v string) *DescribeActivationsOutput { s.NextToken = &v return s } type DescribeAssociationExecutionTargetsInput struct { _ struct{} `type:"structure"` // The association ID that includes the execution for which you want to view // details. // // AssociationId is a required field AssociationId *string `type:"string" required:"true"` // The execution ID for which you want to view details. // // ExecutionId is a required field ExecutionId *string `type:"string" required:"true"` // Filters for the request. You can specify the following filters and values. // // Status (EQUAL) // // ResourceId (EQUAL) // // ResourceType (EQUAL) Filters []*AssociationExecutionTargetsFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationExecutionTargetsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationExecutionTargetsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeAssociationExecutionTargetsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationExecutionTargetsInput"} if s.AssociationId == nil { invalidParams.Add(request.NewErrParamRequired("AssociationId")) } if s.ExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("ExecutionId")) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 } // SetAssociationId sets the AssociationId field's value. func (s *DescribeAssociationExecutionTargetsInput) SetAssociationId(v string) *DescribeAssociationExecutionTargetsInput { s.AssociationId = &v return s } // SetExecutionId sets the ExecutionId field's value. func (s *DescribeAssociationExecutionTargetsInput) SetExecutionId(v string) *DescribeAssociationExecutionTargetsInput { s.ExecutionId = &v return s } // SetFilters sets the Filters field's value. func (s *DescribeAssociationExecutionTargetsInput) SetFilters(v []*AssociationExecutionTargetsFilter) *DescribeAssociationExecutionTargetsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeAssociationExecutionTargetsInput) SetMaxResults(v int64) *DescribeAssociationExecutionTargetsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAssociationExecutionTargetsInput) SetNextToken(v string) *DescribeAssociationExecutionTargetsInput { s.NextToken = &v return s } type DescribeAssociationExecutionTargetsOutput struct { _ struct{} `type:"structure"` // Information about the execution. AssociationExecutionTargets []*AssociationExecutionTarget `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationExecutionTargetsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationExecutionTargetsOutput) GoString() string { return s.String() } // SetAssociationExecutionTargets sets the AssociationExecutionTargets field's value. func (s *DescribeAssociationExecutionTargetsOutput) SetAssociationExecutionTargets(v []*AssociationExecutionTarget) *DescribeAssociationExecutionTargetsOutput { s.AssociationExecutionTargets = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAssociationExecutionTargetsOutput) SetNextToken(v string) *DescribeAssociationExecutionTargetsOutput { s.NextToken = &v return s } type DescribeAssociationExecutionsInput struct { _ struct{} `type:"structure"` // The association ID for which you want to view execution history details. // // AssociationId is a required field AssociationId *string `type:"string" required:"true"` // Filters for the request. You can specify the following filters and values. // // ExecutionId (EQUAL) // // Status (EQUAL) // // CreatedTime (EQUAL, GREATER_THAN, LESS_THAN) Filters []*AssociationExecutionFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationExecutionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationExecutionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeAssociationExecutionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationExecutionsInput"} if s.AssociationId == nil { invalidParams.Add(request.NewErrParamRequired("AssociationId")) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 } // SetAssociationId sets the AssociationId field's value. func (s *DescribeAssociationExecutionsInput) SetAssociationId(v string) *DescribeAssociationExecutionsInput { s.AssociationId = &v return s } // SetFilters sets the Filters field's value. func (s *DescribeAssociationExecutionsInput) SetFilters(v []*AssociationExecutionFilter) *DescribeAssociationExecutionsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeAssociationExecutionsInput) SetMaxResults(v int64) *DescribeAssociationExecutionsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAssociationExecutionsInput) SetNextToken(v string) *DescribeAssociationExecutionsInput { s.NextToken = &v return s } type DescribeAssociationExecutionsOutput struct { _ struct{} `type:"structure"` // A list of the executions for the specified association ID. AssociationExecutions []*AssociationExecution `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationExecutionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationExecutionsOutput) GoString() string { return s.String() } // SetAssociationExecutions sets the AssociationExecutions field's value. func (s *DescribeAssociationExecutionsOutput) SetAssociationExecutions(v []*AssociationExecution) *DescribeAssociationExecutionsOutput { s.AssociationExecutions = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAssociationExecutionsOutput) SetNextToken(v string) *DescribeAssociationExecutionsOutput { s.NextToken = &v return s } type DescribeAssociationInput struct { _ struct{} `type:"structure"` // The association ID for which you want information. AssociationId *string `type:"string"` // Specify the association version to retrieve. To view the latest version, // either specify $LATEST for this parameter, or omit this parameter. To view // a list of all associations for a managed node, use ListAssociations. To get // a list of versions for a specific association, use ListAssociationVersions. AssociationVersion *string `type:"string"` // The managed node ID. InstanceId *string `type:"string"` // The name of the SSM document. Name *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationInput) GoString() string { return s.String() } // SetAssociationId sets the AssociationId field's value. func (s *DescribeAssociationInput) SetAssociationId(v string) *DescribeAssociationInput { s.AssociationId = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *DescribeAssociationInput) SetAssociationVersion(v string) *DescribeAssociationInput { s.AssociationVersion = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *DescribeAssociationInput) SetInstanceId(v string) *DescribeAssociationInput { s.InstanceId = &v return s } // SetName sets the Name field's value. func (s *DescribeAssociationInput) SetName(v string) *DescribeAssociationInput { s.Name = &v return s } type DescribeAssociationOutput struct { _ struct{} `type:"structure"` // Information about the association. AssociationDescription *AssociationDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAssociationOutput) GoString() string { return s.String() } // SetAssociationDescription sets the AssociationDescription field's value. func (s *DescribeAssociationOutput) SetAssociationDescription(v *AssociationDescription) *DescribeAssociationOutput { s.AssociationDescription = v return s } type DescribeAutomationExecutionsInput struct { _ struct{} `type:"structure"` // Filters used to limit the scope of executions that are requested. Filters []*AutomationExecutionFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAutomationExecutionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAutomationExecutionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeAutomationExecutionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeAutomationExecutionsInput"} if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *DescribeAutomationExecutionsInput) SetFilters(v []*AutomationExecutionFilter) *DescribeAutomationExecutionsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeAutomationExecutionsInput) SetMaxResults(v int64) *DescribeAutomationExecutionsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAutomationExecutionsInput) SetNextToken(v string) *DescribeAutomationExecutionsInput { s.NextToken = &v return s } type DescribeAutomationExecutionsOutput struct { _ struct{} `type:"structure"` // The list of details about each automation execution which has occurred which // matches the filter specification, if any. AutomationExecutionMetadataList []*AutomationExecutionMetadata `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAutomationExecutionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAutomationExecutionsOutput) GoString() string { return s.String() } // SetAutomationExecutionMetadataList sets the AutomationExecutionMetadataList field's value. func (s *DescribeAutomationExecutionsOutput) SetAutomationExecutionMetadataList(v []*AutomationExecutionMetadata) *DescribeAutomationExecutionsOutput { s.AutomationExecutionMetadataList = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAutomationExecutionsOutput) SetNextToken(v string) *DescribeAutomationExecutionsOutput { s.NextToken = &v return s } type DescribeAutomationStepExecutionsInput struct { _ struct{} `type:"structure"` // The Automation execution ID for which you want step execution descriptions. // // AutomationExecutionId is a required field AutomationExecutionId *string `min:"36" type:"string" required:"true"` // One or more filters to limit the number of step executions returned by the // request. Filters []*StepExecutionFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // Indicates whether to list step executions in reverse order by start time. // The default value is 'false'. ReverseOrder *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAutomationStepExecutionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAutomationStepExecutionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeAutomationStepExecutionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeAutomationStepExecutionsInput"} if s.AutomationExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("AutomationExecutionId")) } if s.AutomationExecutionId != nil && len(*s.AutomationExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("AutomationExecutionId", 36)) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 } // SetAutomationExecutionId sets the AutomationExecutionId field's value. func (s *DescribeAutomationStepExecutionsInput) SetAutomationExecutionId(v string) *DescribeAutomationStepExecutionsInput { s.AutomationExecutionId = &v return s } // SetFilters sets the Filters field's value. func (s *DescribeAutomationStepExecutionsInput) SetFilters(v []*StepExecutionFilter) *DescribeAutomationStepExecutionsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeAutomationStepExecutionsInput) SetMaxResults(v int64) *DescribeAutomationStepExecutionsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAutomationStepExecutionsInput) SetNextToken(v string) *DescribeAutomationStepExecutionsInput { s.NextToken = &v return s } // SetReverseOrder sets the ReverseOrder field's value. func (s *DescribeAutomationStepExecutionsInput) SetReverseOrder(v bool) *DescribeAutomationStepExecutionsInput { s.ReverseOrder = &v return s } type DescribeAutomationStepExecutionsOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // A list of details about the current state of all steps that make up an execution. StepExecutions []*StepExecution `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAutomationStepExecutionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAutomationStepExecutionsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeAutomationStepExecutionsOutput) SetNextToken(v string) *DescribeAutomationStepExecutionsOutput { s.NextToken = &v return s } // SetStepExecutions sets the StepExecutions field's value. func (s *DescribeAutomationStepExecutionsOutput) SetStepExecutions(v []*StepExecution) *DescribeAutomationStepExecutionsOutput { s.StepExecutions = v return s } type DescribeAvailablePatchesInput struct { _ struct{} `type:"structure"` // Each element in the array is a structure containing a key-value pair. // // Windows Server // // Supported keys for Windows Server managed node patches include the following: // // * PATCH_SET Sample values: OS | APPLICATION // // * PRODUCT Sample values: WindowsServer2012 | Office 2010 | MicrosoftDefenderAntivirus // // * PRODUCT_FAMILY Sample values: Windows | Office // // * MSRC_SEVERITY Sample values: ServicePacks | Important | Moderate // // * CLASSIFICATION Sample values: ServicePacks | SecurityUpdates | DefinitionUpdates // // * PATCH_ID Sample values: KB123456 | KB4516046 // // Linux // // When specifying filters for Linux patches, you must specify a key-pair for // PRODUCT. For example, using the Command Line Interface (CLI), the following // command fails: // // aws ssm describe-available-patches --filters Key=CVE_ID,Values=CVE-2018-3615 // // However, the following command succeeds: // // aws ssm describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03 // Key=CVE_ID,Values=CVE-2018-3615 // // Supported keys for Linux managed node patches include the following: // // * PRODUCT Sample values: AmazonLinux2018.03 | AmazonLinux2.0 // // * NAME Sample values: kernel-headers | samba-python | php // // * SEVERITY Sample values: Critical | Important | Medium | Low // // * EPOCH Sample values: 0 | 1 // // * VERSION Sample values: 78.6.1 | 4.10.16 // // * RELEASE Sample values: 9.56.amzn1 | 1.amzn2 // // * ARCH Sample values: i686 | x86_64 // // * REPOSITORY Sample values: Core | Updates // // * ADVISORY_ID Sample values: ALAS-2018-1058 | ALAS2-2021-1594 // // * CVE_ID Sample values: CVE-2018-3615 | CVE-2020-1472 // // * BUGZILLA_ID Sample values: 1463241 Filters []*PatchOrchestratorFilter `type:"list"` // The maximum number of patches to return (per page). MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAvailablePatchesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAvailablePatchesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeAvailablePatchesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeAvailablePatchesInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *DescribeAvailablePatchesInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeAvailablePatchesInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeAvailablePatchesInput) SetMaxResults(v int64) *DescribeAvailablePatchesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeAvailablePatchesInput) SetNextToken(v string) *DescribeAvailablePatchesInput { s.NextToken = &v return s } type DescribeAvailablePatchesOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // An array of patches. Each entry in the array is a patch structure. Patches []*Patch `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAvailablePatchesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeAvailablePatchesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeAvailablePatchesOutput) SetNextToken(v string) *DescribeAvailablePatchesOutput { s.NextToken = &v return s } // SetPatches sets the Patches field's value. func (s *DescribeAvailablePatchesOutput) SetPatches(v []*Patch) *DescribeAvailablePatchesOutput { s.Patches = v return s } type DescribeDocumentInput struct { _ struct{} `type:"structure"` // The document version for which you want information. Can be a specific version // or the default version. DocumentVersion *string `type:"string"` // The name of the SSM document. // // 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 can't be changed. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeDocumentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeDocumentInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeDocumentInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentInput"} if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDocumentVersion sets the DocumentVersion field's value. func (s *DescribeDocumentInput) SetDocumentVersion(v string) *DescribeDocumentInput { s.DocumentVersion = &v return s } // SetName sets the Name field's value. func (s *DescribeDocumentInput) SetName(v string) *DescribeDocumentInput { s.Name = &v 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"` // Information about the SSM document. Document *DocumentDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeDocumentOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeDocumentOutput) GoString() string { return s.String() } // SetDocument sets the Document field's value. func (s *DescribeDocumentOutput) SetDocument(v *DocumentDescription) *DescribeDocumentOutput { s.Document = v return s } type DescribeDocumentPermissionInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The name of the document for which you are the owner. // // Name is a required field Name *string `type:"string" required:"true"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The permission type for the document. The permission type can be Share. // // PermissionType is a required field PermissionType *string `type:"string" required:"true" enum:"DocumentPermissionType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeDocumentPermissionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeDocumentPermissionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeDocumentPermissionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentPermissionInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.PermissionType == nil { invalidParams.Add(request.NewErrParamRequired("PermissionType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *DescribeDocumentPermissionInput) SetMaxResults(v int64) *DescribeDocumentPermissionInput { s.MaxResults = &v return s } // SetName sets the Name field's value. func (s *DescribeDocumentPermissionInput) SetName(v string) *DescribeDocumentPermissionInput { s.Name = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeDocumentPermissionInput) SetNextToken(v string) *DescribeDocumentPermissionInput { s.NextToken = &v return s } // SetPermissionType sets the PermissionType field's value. func (s *DescribeDocumentPermissionInput) SetPermissionType(v string) *DescribeDocumentPermissionInput { s.PermissionType = &v return s } type DescribeDocumentPermissionOutput struct { _ struct{} `type:"structure"` // The account IDs that have permission to use this document. The ID can be // either an Amazon Web Services account or All. AccountIds []*string `type:"list"` // A list of Amazon Web Services accounts where the current document is shared // and the version shared with each account. AccountSharingInfoList []*AccountSharingInfo `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeDocumentPermissionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeDocumentPermissionOutput) GoString() string { return s.String() } // SetAccountIds sets the AccountIds field's value. func (s *DescribeDocumentPermissionOutput) SetAccountIds(v []*string) *DescribeDocumentPermissionOutput { s.AccountIds = v return s } // SetAccountSharingInfoList sets the AccountSharingInfoList field's value. func (s *DescribeDocumentPermissionOutput) SetAccountSharingInfoList(v []*AccountSharingInfo) *DescribeDocumentPermissionOutput { s.AccountSharingInfoList = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeDocumentPermissionOutput) SetNextToken(v string) *DescribeDocumentPermissionOutput { s.NextToken = &v return s } type DescribeEffectiveInstanceAssociationsInput struct { _ struct{} `type:"structure"` // The managed node ID for which you want to view all associations. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEffectiveInstanceAssociationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEffectiveInstanceAssociationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeEffectiveInstanceAssociationsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeEffectiveInstanceAssociationsInput"} if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetInstanceId sets the InstanceId field's value. func (s *DescribeEffectiveInstanceAssociationsInput) SetInstanceId(v string) *DescribeEffectiveInstanceAssociationsInput { s.InstanceId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeEffectiveInstanceAssociationsInput) SetMaxResults(v int64) *DescribeEffectiveInstanceAssociationsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeEffectiveInstanceAssociationsInput) SetNextToken(v string) *DescribeEffectiveInstanceAssociationsInput { s.NextToken = &v return s } type DescribeEffectiveInstanceAssociationsOutput struct { _ struct{} `type:"structure"` // The associations for the requested managed node. Associations []*InstanceAssociation `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEffectiveInstanceAssociationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEffectiveInstanceAssociationsOutput) GoString() string { return s.String() } // SetAssociations sets the Associations field's value. func (s *DescribeEffectiveInstanceAssociationsOutput) SetAssociations(v []*InstanceAssociation) *DescribeEffectiveInstanceAssociationsOutput { s.Associations = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeEffectiveInstanceAssociationsOutput) SetNextToken(v string) *DescribeEffectiveInstanceAssociationsOutput { s.NextToken = &v return s } type DescribeEffectivePatchesForPatchBaselineInput struct { _ struct{} `type:"structure"` // The ID of the patch baseline to retrieve the effective patches for. // // BaselineId is a required field BaselineId *string `min:"20" type:"string" required:"true"` // The maximum number of patches to return (per page). MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEffectivePatchesForPatchBaselineInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEffectivePatchesForPatchBaselineInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeEffectivePatchesForPatchBaselineInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeEffectivePatchesForPatchBaselineInput"} if s.BaselineId == nil { invalidParams.Add(request.NewErrParamRequired("BaselineId")) } if s.BaselineId != nil && len(*s.BaselineId) < 20 { invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBaselineId sets the BaselineId field's value. func (s *DescribeEffectivePatchesForPatchBaselineInput) SetBaselineId(v string) *DescribeEffectivePatchesForPatchBaselineInput { s.BaselineId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeEffectivePatchesForPatchBaselineInput) SetMaxResults(v int64) *DescribeEffectivePatchesForPatchBaselineInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeEffectivePatchesForPatchBaselineInput) SetNextToken(v string) *DescribeEffectivePatchesForPatchBaselineInput { s.NextToken = &v return s } type DescribeEffectivePatchesForPatchBaselineOutput struct { _ struct{} `type:"structure"` // An array of patches and patch status. EffectivePatches []*EffectivePatch `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEffectivePatchesForPatchBaselineOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeEffectivePatchesForPatchBaselineOutput) GoString() string { return s.String() } // SetEffectivePatches sets the EffectivePatches field's value. func (s *DescribeEffectivePatchesForPatchBaselineOutput) SetEffectivePatches(v []*EffectivePatch) *DescribeEffectivePatchesForPatchBaselineOutput { s.EffectivePatches = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeEffectivePatchesForPatchBaselineOutput) SetNextToken(v string) *DescribeEffectivePatchesForPatchBaselineOutput { s.NextToken = &v return s } type DescribeInstanceAssociationsStatusInput struct { _ struct{} `type:"structure"` // The managed node IDs for which you want association status information. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstanceAssociationsStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstanceAssociationsStatusInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeInstanceAssociationsStatusInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceAssociationsStatusInput"} if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetInstanceId sets the InstanceId field's value. func (s *DescribeInstanceAssociationsStatusInput) SetInstanceId(v string) *DescribeInstanceAssociationsStatusInput { s.InstanceId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeInstanceAssociationsStatusInput) SetMaxResults(v int64) *DescribeInstanceAssociationsStatusInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstanceAssociationsStatusInput) SetNextToken(v string) *DescribeInstanceAssociationsStatusInput { s.NextToken = &v return s } type DescribeInstanceAssociationsStatusOutput struct { _ struct{} `type:"structure"` // Status information about the association. InstanceAssociationStatusInfos []*InstanceAssociationStatusInfo `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstanceAssociationsStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstanceAssociationsStatusOutput) GoString() string { return s.String() } // SetInstanceAssociationStatusInfos sets the InstanceAssociationStatusInfos field's value. func (s *DescribeInstanceAssociationsStatusOutput) SetInstanceAssociationStatusInfos(v []*InstanceAssociationStatusInfo) *DescribeInstanceAssociationsStatusOutput { s.InstanceAssociationStatusInfos = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstanceAssociationsStatusOutput) SetNextToken(v string) *DescribeInstanceAssociationsStatusOutput { s.NextToken = &v return s } type DescribeInstanceInformationInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of managed // nodes. You can filter based on tags applied to your managed nodes. Tag filters // can't be combined with other filter types. Use this Filters data type instead // of InstanceInformationFilterList, which is deprecated. Filters []*InstanceInformationStringFilter `type:"list"` // This is a legacy method. We recommend that you don't use this method. Instead, // use the Filters data type. Filters enables you to return node information // by filtering based on tags applied to managed nodes. // // Attempting to use InstanceInformationFilterList and Filters leads to an exception // error. InstanceInformationFilterList []*InstanceInformationFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. The default value is 10 items. MaxResults *int64 `min:"5" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstanceInformationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstanceInformationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeInstanceInformationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceInformationInput"} if s.MaxResults != nil && *s.MaxResults < 5 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } if s.Filters != nil { for i, v := range s.Filters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) } } } if s.InstanceInformationFilterList != nil { for i, v := range s.InstanceInformationFilterList { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceInformationFilterList", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFilters sets the Filters field's value. func (s *DescribeInstanceInformationInput) SetFilters(v []*InstanceInformationStringFilter) *DescribeInstanceInformationInput { s.Filters = v return s } // SetInstanceInformationFilterList sets the InstanceInformationFilterList field's value. func (s *DescribeInstanceInformationInput) SetInstanceInformationFilterList(v []*InstanceInformationFilter) *DescribeInstanceInformationInput { s.InstanceInformationFilterList = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeInstanceInformationInput) SetMaxResults(v int64) *DescribeInstanceInformationInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstanceInformationInput) SetNextToken(v string) *DescribeInstanceInformationInput { s.NextToken = &v return s } type DescribeInstanceInformationOutput struct { _ struct{} `type:"structure"` // The managed node information list. InstanceInformationList []*InstanceInformation `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstanceInformationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstanceInformationOutput) GoString() string { return s.String() } // SetInstanceInformationList sets the InstanceInformationList field's value. func (s *DescribeInstanceInformationOutput) SetInstanceInformationList(v []*InstanceInformation) *DescribeInstanceInformationOutput { s.InstanceInformationList = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstanceInformationOutput) SetNextToken(v string) *DescribeInstanceInformationOutput { s.NextToken = &v return s } type DescribeInstancePatchStatesForPatchGroupInput struct { _ struct{} `type:"structure"` // Each entry in the array is a structure containing: // // * Key (string between 1 and 200 characters) // // * Values (array containing a single string) // // * Type (string "Equal", "NotEqual", "LessThan", "GreaterThan") Filters []*InstancePatchStateFilter `type:"list"` // The maximum number of patches to return (per page). MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The name of the patch group for which the patch state information should // be retrieved. // // PatchGroup is a required field PatchGroup *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchStatesForPatchGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchStatesForPatchGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeInstancePatchStatesForPatchGroupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeInstancePatchStatesForPatchGroupInput"} if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } if s.PatchGroup == nil { invalidParams.Add(request.NewErrParamRequired("PatchGroup")) } if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) } 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 *DescribeInstancePatchStatesForPatchGroupInput) SetFilters(v []*InstancePatchStateFilter) *DescribeInstancePatchStatesForPatchGroupInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeInstancePatchStatesForPatchGroupInput) SetMaxResults(v int64) *DescribeInstancePatchStatesForPatchGroupInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstancePatchStatesForPatchGroupInput) SetNextToken(v string) *DescribeInstancePatchStatesForPatchGroupInput { s.NextToken = &v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *DescribeInstancePatchStatesForPatchGroupInput) SetPatchGroup(v string) *DescribeInstancePatchStatesForPatchGroupInput { s.PatchGroup = &v return s } type DescribeInstancePatchStatesForPatchGroupOutput struct { _ struct{} `type:"structure"` // The high-level patch state for the requested managed nodes. InstancePatchStates []*InstancePatchState `min:"1" type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchStatesForPatchGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchStatesForPatchGroupOutput) GoString() string { return s.String() } // SetInstancePatchStates sets the InstancePatchStates field's value. func (s *DescribeInstancePatchStatesForPatchGroupOutput) SetInstancePatchStates(v []*InstancePatchState) *DescribeInstancePatchStatesForPatchGroupOutput { s.InstancePatchStates = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstancePatchStatesForPatchGroupOutput) SetNextToken(v string) *DescribeInstancePatchStatesForPatchGroupOutput { s.NextToken = &v return s } type DescribeInstancePatchStatesInput struct { _ struct{} `type:"structure"` // The ID of the managed node for which patch state information should be retrieved. // // InstanceIds is a required field InstanceIds []*string `type:"list" required:"true"` // The maximum number of managed nodes to return (per page). MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchStatesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchStatesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeInstancePatchStatesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeInstancePatchStatesInput"} if s.InstanceIds == nil { invalidParams.Add(request.NewErrParamRequired("InstanceIds")) } if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetInstanceIds sets the InstanceIds field's value. func (s *DescribeInstancePatchStatesInput) SetInstanceIds(v []*string) *DescribeInstancePatchStatesInput { s.InstanceIds = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeInstancePatchStatesInput) SetMaxResults(v int64) *DescribeInstancePatchStatesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstancePatchStatesInput) SetNextToken(v string) *DescribeInstancePatchStatesInput { s.NextToken = &v return s } type DescribeInstancePatchStatesOutput struct { _ struct{} `type:"structure"` // The high-level patch state for the requested managed nodes. InstancePatchStates []*InstancePatchState `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchStatesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchStatesOutput) GoString() string { return s.String() } // SetInstancePatchStates sets the InstancePatchStates field's value. func (s *DescribeInstancePatchStatesOutput) SetInstancePatchStates(v []*InstancePatchState) *DescribeInstancePatchStatesOutput { s.InstancePatchStates = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstancePatchStatesOutput) SetNextToken(v string) *DescribeInstancePatchStatesOutput { s.NextToken = &v return s } type DescribeInstancePatchesInput struct { _ struct{} `type:"structure"` // Each element in the array is a structure containing a key-value pair. // // Supported keys for DescribeInstancePatchesinclude the following: // // * Classification Sample values: Security | SecurityUpdates // // * KBId Sample values: KB4480056 | java-1.7.0-openjdk.x86_64 // // * Severity Sample values: Important | Medium | Low // // * State Sample values: Installed | InstalledOther | InstalledPendingReboot // For lists of all State values, see Understanding patch compliance state // values (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html) // in the Amazon Web Services Systems Manager User Guide. Filters []*PatchOrchestratorFilter `type:"list"` // The ID of the managed node whose patch state information should be retrieved. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The maximum number of patches to return (per page). MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeInstancePatchesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeInstancePatchesInput"} if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } 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 *DescribeInstancePatchesInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeInstancePatchesInput { s.Filters = v return s } // SetInstanceId sets the InstanceId field's value. func (s *DescribeInstancePatchesInput) SetInstanceId(v string) *DescribeInstancePatchesInput { s.InstanceId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeInstancePatchesInput) SetMaxResults(v int64) *DescribeInstancePatchesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInstancePatchesInput) SetNextToken(v string) *DescribeInstancePatchesInput { s.NextToken = &v return s } type DescribeInstancePatchesOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // Each entry in the array is a structure containing: // // * Title (string) // // * KBId (string) // // * Classification (string) // // * Severity (string) // // * State (string, such as "INSTALLED" or "FAILED") // // * InstalledTime (DateTime) // // * InstalledBy (string) Patches []*PatchComplianceData `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInstancePatchesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeInstancePatchesOutput) SetNextToken(v string) *DescribeInstancePatchesOutput { s.NextToken = &v return s } // SetPatches sets the Patches field's value. func (s *DescribeInstancePatchesOutput) SetPatches(v []*PatchComplianceData) *DescribeInstancePatchesOutput { s.Patches = v return s } type DescribeInventoryDeletionsInput struct { _ struct{} `type:"structure"` // Specify the delete inventory ID for which you want information. This ID was // returned by the DeleteInventory operation. DeletionId *string `type:"string"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInventoryDeletionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInventoryDeletionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeInventoryDeletionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeInventoryDeletionsInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDeletionId sets the DeletionId field's value. func (s *DescribeInventoryDeletionsInput) SetDeletionId(v string) *DescribeInventoryDeletionsInput { s.DeletionId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeInventoryDeletionsInput) SetMaxResults(v int64) *DescribeInventoryDeletionsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInventoryDeletionsInput) SetNextToken(v string) *DescribeInventoryDeletionsInput { s.NextToken = &v return s } type DescribeInventoryDeletionsOutput struct { _ struct{} `type:"structure"` // A list of status items for deleted inventory. InventoryDeletions []*InventoryDeletionStatusItem `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInventoryDeletionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeInventoryDeletionsOutput) GoString() string { return s.String() } // SetInventoryDeletions sets the InventoryDeletions field's value. func (s *DescribeInventoryDeletionsOutput) SetInventoryDeletions(v []*InventoryDeletionStatusItem) *DescribeInventoryDeletionsOutput { s.InventoryDeletions = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeInventoryDeletionsOutput) SetNextToken(v string) *DescribeInventoryDeletionsOutput { s.NextToken = &v return s } type DescribeMaintenanceWindowExecutionTaskInvocationsInput struct { _ struct{} `type:"structure"` // Optional filters used to scope down the returned task invocations. The supported // filter key is STATUS with the corresponding values PENDING, IN_PROGRESS, // SUCCESS, FAILED, TIMED_OUT, CANCELLING, and CANCELLED. Filters []*MaintenanceWindowFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The ID of the specific task in the maintenance window task that should be // retrieved. // // TaskId is a required field TaskId *string `min:"36" type:"string" required:"true"` // The ID of the maintenance window execution the task is part of. // // WindowExecutionId is a required field WindowExecutionId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionTaskInvocationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionTaskInvocationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowExecutionTaskInvocationsInput"} if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } if s.TaskId == nil { invalidParams.Add(request.NewErrParamRequired("TaskId")) } if s.TaskId != nil && len(*s.TaskId) < 36 { invalidParams.Add(request.NewErrParamMinLen("TaskId", 36)) } if s.WindowExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) } if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) } 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 *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetMaxResults(v int64) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { s.NextToken = &v return s } // SetTaskId sets the TaskId field's value. func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetTaskId(v string) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { s.TaskId = &v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *DescribeMaintenanceWindowExecutionTaskInvocationsInput) SetWindowExecutionId(v string) *DescribeMaintenanceWindowExecutionTaskInvocationsInput { s.WindowExecutionId = &v return s } type DescribeMaintenanceWindowExecutionTaskInvocationsOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // Information about the task invocation results per invocation. WindowExecutionTaskInvocationIdentities []*MaintenanceWindowExecutionTaskInvocationIdentity `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionTaskInvocationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionTaskInvocationsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowExecutionTaskInvocationsOutput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionTaskInvocationsOutput { s.NextToken = &v return s } // SetWindowExecutionTaskInvocationIdentities sets the WindowExecutionTaskInvocationIdentities field's value. func (s *DescribeMaintenanceWindowExecutionTaskInvocationsOutput) SetWindowExecutionTaskInvocationIdentities(v []*MaintenanceWindowExecutionTaskInvocationIdentity) *DescribeMaintenanceWindowExecutionTaskInvocationsOutput { s.WindowExecutionTaskInvocationIdentities = v return s } type DescribeMaintenanceWindowExecutionTasksInput struct { _ struct{} `type:"structure"` // Optional filters used to scope down the returned tasks. The supported filter // key is STATUS with the corresponding values PENDING, IN_PROGRESS, SUCCESS, // FAILED, TIMED_OUT, CANCELLING, and CANCELLED. Filters []*MaintenanceWindowFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The ID of the maintenance window execution whose task executions should be // retrieved. // // WindowExecutionId is a required field WindowExecutionId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionTasksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionTasksInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeMaintenanceWindowExecutionTasksInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowExecutionTasksInput"} if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } if s.WindowExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) } if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) } 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 *DescribeMaintenanceWindowExecutionTasksInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowExecutionTasksInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeMaintenanceWindowExecutionTasksInput) SetMaxResults(v int64) *DescribeMaintenanceWindowExecutionTasksInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowExecutionTasksInput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionTasksInput { s.NextToken = &v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *DescribeMaintenanceWindowExecutionTasksInput) SetWindowExecutionId(v string) *DescribeMaintenanceWindowExecutionTasksInput { s.WindowExecutionId = &v return s } type DescribeMaintenanceWindowExecutionTasksOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // Information about the task executions. WindowExecutionTaskIdentities []*MaintenanceWindowExecutionTaskIdentity `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionTasksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionTasksOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowExecutionTasksOutput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionTasksOutput { s.NextToken = &v return s } // SetWindowExecutionTaskIdentities sets the WindowExecutionTaskIdentities field's value. func (s *DescribeMaintenanceWindowExecutionTasksOutput) SetWindowExecutionTaskIdentities(v []*MaintenanceWindowExecutionTaskIdentity) *DescribeMaintenanceWindowExecutionTasksOutput { s.WindowExecutionTaskIdentities = v return s } type DescribeMaintenanceWindowExecutionsInput struct { _ struct{} `type:"structure"` // Each entry in the array is a structure containing: // // * Key. A string between 1 and 128 characters. Supported keys include ExecutedBefore // and ExecutedAfter. // // * Values. An array of strings, each between 1 and 256 characters. Supported // values are date/time strings in a valid ISO 8601 date/time format, such // as 2021-11-04T05:00:00Z. Filters []*MaintenanceWindowFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The ID of the maintenance window whose executions should be retrieved. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeMaintenanceWindowExecutionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowExecutionsInput"} if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.Filters != nil { for i, v := range s.Filters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFilters sets the Filters field's value. func (s *DescribeMaintenanceWindowExecutionsInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowExecutionsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeMaintenanceWindowExecutionsInput) SetMaxResults(v int64) *DescribeMaintenanceWindowExecutionsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowExecutionsInput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionsInput { s.NextToken = &v return s } // SetWindowId sets the WindowId field's value. func (s *DescribeMaintenanceWindowExecutionsInput) SetWindowId(v string) *DescribeMaintenanceWindowExecutionsInput { s.WindowId = &v return s } type DescribeMaintenanceWindowExecutionsOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // Information about the maintenance window executions. WindowExecutions []*MaintenanceWindowExecution `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowExecutionsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowExecutionsOutput) SetNextToken(v string) *DescribeMaintenanceWindowExecutionsOutput { s.NextToken = &v return s } // SetWindowExecutions sets the WindowExecutions field's value. func (s *DescribeMaintenanceWindowExecutionsOutput) SetWindowExecutions(v []*MaintenanceWindowExecution) *DescribeMaintenanceWindowExecutionsOutput { s.WindowExecutions = v return s } type DescribeMaintenanceWindowScheduleInput struct { _ struct{} `type:"structure"` // Filters used to limit the range of results. For example, you can limit maintenance // window executions to only those scheduled before or after a certain date // and time. Filters []*PatchOrchestratorFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The type of resource you want to retrieve information about. For example, // INSTANCE. ResourceType *string `type:"string" enum:"MaintenanceWindowResourceType"` // The managed node ID or key-value pair to retrieve information about. Targets []*Target `type:"list"` // The ID of the maintenance window to retrieve information about. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowScheduleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowScheduleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeMaintenanceWindowScheduleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowScheduleInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.Filters != nil { for i, v := range s.Filters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) } } } if s.Targets != nil { for i, v := range s.Targets { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFilters sets the Filters field's value. func (s *DescribeMaintenanceWindowScheduleInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeMaintenanceWindowScheduleInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeMaintenanceWindowScheduleInput) SetMaxResults(v int64) *DescribeMaintenanceWindowScheduleInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowScheduleInput) SetNextToken(v string) *DescribeMaintenanceWindowScheduleInput { s.NextToken = &v return s } // SetResourceType sets the ResourceType field's value. func (s *DescribeMaintenanceWindowScheduleInput) SetResourceType(v string) *DescribeMaintenanceWindowScheduleInput { s.ResourceType = &v return s } // SetTargets sets the Targets field's value. func (s *DescribeMaintenanceWindowScheduleInput) SetTargets(v []*Target) *DescribeMaintenanceWindowScheduleInput { s.Targets = v return s } // SetWindowId sets the WindowId field's value. func (s *DescribeMaintenanceWindowScheduleInput) SetWindowId(v string) *DescribeMaintenanceWindowScheduleInput { s.WindowId = &v return s } type DescribeMaintenanceWindowScheduleOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. (You use this token in the // next call.) NextToken *string `type:"string"` // Information about maintenance window executions scheduled for the specified // time range. ScheduledWindowExecutions []*ScheduledWindowExecution `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowScheduleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowScheduleOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowScheduleOutput) SetNextToken(v string) *DescribeMaintenanceWindowScheduleOutput { s.NextToken = &v return s } // SetScheduledWindowExecutions sets the ScheduledWindowExecutions field's value. func (s *DescribeMaintenanceWindowScheduleOutput) SetScheduledWindowExecutions(v []*ScheduledWindowExecution) *DescribeMaintenanceWindowScheduleOutput { s.ScheduledWindowExecutions = v return s } type DescribeMaintenanceWindowTargetsInput struct { _ struct{} `type:"structure"` // Optional filters that can be used to narrow down the scope of the returned // window targets. The supported filter keys are Type, WindowTargetId, and OwnerInformation. Filters []*MaintenanceWindowFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The ID of the maintenance window whose targets should be retrieved. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowTargetsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowTargetsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeMaintenanceWindowTargetsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowTargetsInput"} if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.Filters != nil { for i, v := range s.Filters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFilters sets the Filters field's value. func (s *DescribeMaintenanceWindowTargetsInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowTargetsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeMaintenanceWindowTargetsInput) SetMaxResults(v int64) *DescribeMaintenanceWindowTargetsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowTargetsInput) SetNextToken(v string) *DescribeMaintenanceWindowTargetsInput { s.NextToken = &v return s } // SetWindowId sets the WindowId field's value. func (s *DescribeMaintenanceWindowTargetsInput) SetWindowId(v string) *DescribeMaintenanceWindowTargetsInput { s.WindowId = &v return s } type DescribeMaintenanceWindowTargetsOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // Information about the targets in the maintenance window. Targets []*MaintenanceWindowTarget `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowTargetsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowTargetsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowTargetsOutput) SetNextToken(v string) *DescribeMaintenanceWindowTargetsOutput { s.NextToken = &v return s } // SetTargets sets the Targets field's value. func (s *DescribeMaintenanceWindowTargetsOutput) SetTargets(v []*MaintenanceWindowTarget) *DescribeMaintenanceWindowTargetsOutput { s.Targets = v return s } type DescribeMaintenanceWindowTasksInput struct { _ struct{} `type:"structure"` // Optional filters used to narrow down the scope of the returned tasks. The // supported filter keys are WindowTaskId, TaskArn, Priority, and TaskType. Filters []*MaintenanceWindowFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The ID of the maintenance window whose tasks should be retrieved. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowTasksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowTasksInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeMaintenanceWindowTasksInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowTasksInput"} if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.Filters != nil { for i, v := range s.Filters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFilters sets the Filters field's value. func (s *DescribeMaintenanceWindowTasksInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowTasksInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeMaintenanceWindowTasksInput) SetMaxResults(v int64) *DescribeMaintenanceWindowTasksInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowTasksInput) SetNextToken(v string) *DescribeMaintenanceWindowTasksInput { s.NextToken = &v return s } // SetWindowId sets the WindowId field's value. func (s *DescribeMaintenanceWindowTasksInput) SetWindowId(v string) *DescribeMaintenanceWindowTasksInput { s.WindowId = &v return s } type DescribeMaintenanceWindowTasksOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // Information about the tasks in the maintenance window. Tasks []*MaintenanceWindowTask `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowTasksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowTasksOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowTasksOutput) SetNextToken(v string) *DescribeMaintenanceWindowTasksOutput { s.NextToken = &v return s } // SetTasks sets the Tasks field's value. func (s *DescribeMaintenanceWindowTasksOutput) SetTasks(v []*MaintenanceWindowTask) *DescribeMaintenanceWindowTasksOutput { s.Tasks = v return s } type DescribeMaintenanceWindowsForTargetInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The type of resource you want to retrieve information about. For example, // INSTANCE. // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"MaintenanceWindowResourceType"` // The managed node ID or key-value pair to retrieve information about. // // Targets is a required field Targets []*Target `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowsForTargetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowsForTargetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeMaintenanceWindowsForTargetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowsForTargetInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.Targets == nil { invalidParams.Add(request.NewErrParamRequired("Targets")) } if s.Targets != nil { for i, v := range s.Targets { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *DescribeMaintenanceWindowsForTargetInput) SetMaxResults(v int64) *DescribeMaintenanceWindowsForTargetInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowsForTargetInput) SetNextToken(v string) *DescribeMaintenanceWindowsForTargetInput { s.NextToken = &v return s } // SetResourceType sets the ResourceType field's value. func (s *DescribeMaintenanceWindowsForTargetInput) SetResourceType(v string) *DescribeMaintenanceWindowsForTargetInput { s.ResourceType = &v return s } // SetTargets sets the Targets field's value. func (s *DescribeMaintenanceWindowsForTargetInput) SetTargets(v []*Target) *DescribeMaintenanceWindowsForTargetInput { s.Targets = v return s } type DescribeMaintenanceWindowsForTargetOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. (You use this token in the // next call.) NextToken *string `type:"string"` // Information about the maintenance window targets and tasks a managed node // is associated with. WindowIdentities []*MaintenanceWindowIdentityForTarget `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowsForTargetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowsForTargetOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowsForTargetOutput) SetNextToken(v string) *DescribeMaintenanceWindowsForTargetOutput { s.NextToken = &v return s } // SetWindowIdentities sets the WindowIdentities field's value. func (s *DescribeMaintenanceWindowsForTargetOutput) SetWindowIdentities(v []*MaintenanceWindowIdentityForTarget) *DescribeMaintenanceWindowsForTargetOutput { s.WindowIdentities = v return s } type DescribeMaintenanceWindowsInput struct { _ struct{} `type:"structure"` // Optional filters used to narrow down the scope of the returned maintenance // windows. Supported filter keys are Name and Enabled. For example, Name=MyMaintenanceWindow // and Enabled=True. Filters []*MaintenanceWindowFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"10" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeMaintenanceWindowsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowsInput"} if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } 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 *DescribeMaintenanceWindowsInput) SetFilters(v []*MaintenanceWindowFilter) *DescribeMaintenanceWindowsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeMaintenanceWindowsInput) SetMaxResults(v int64) *DescribeMaintenanceWindowsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowsInput) SetNextToken(v string) *DescribeMaintenanceWindowsInput { s.NextToken = &v return s } type DescribeMaintenanceWindowsOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // Information about the maintenance windows. WindowIdentities []*MaintenanceWindowIdentity `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeMaintenanceWindowsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeMaintenanceWindowsOutput) SetNextToken(v string) *DescribeMaintenanceWindowsOutput { s.NextToken = &v return s } // SetWindowIdentities sets the WindowIdentities field's value. func (s *DescribeMaintenanceWindowsOutput) SetWindowIdentities(v []*MaintenanceWindowIdentity) *DescribeMaintenanceWindowsOutput { s.WindowIdentities = v return s } type DescribeOpsItemsInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` // One or more filters to limit the response. // // * Key: CreatedTime Operations: GreaterThan, LessThan // // * Key: LastModifiedBy Operations: Contains, Equals // // * Key: LastModifiedTime Operations: GreaterThan, LessThan // // * Key: Priority Operations: Equals // // * Key: Source Operations: Contains, Equals // // * Key: Status Operations: Equals // // * Key: Title* Operations: Equals,Contains // // * Key: OperationalData** Operations: Equals // // * Key: OperationalDataKey Operations: Equals // // * Key: OperationalDataValue Operations: Equals, Contains // // * Key: OpsItemId Operations: Equals // // * Key: ResourceId Operations: Contains // // * Key: AutomationId Operations: Equals // // * Key: AccountId Operations: Equals // // *The Equals operator for Title matches the first 100 characters. If you specify // more than 100 characters, they system returns an error that the filter value // exceeds the length limit. // // **If you filter the response by using the OperationalData operator, specify // a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"} OpsItemFilters []*OpsItemFilter `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeOpsItemsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeOpsItemsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeOpsItemsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeOpsItemsInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.OpsItemFilters != nil { for i, v := range s.OpsItemFilters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OpsItemFilters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *DescribeOpsItemsInput) SetMaxResults(v int64) *DescribeOpsItemsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeOpsItemsInput) SetNextToken(v string) *DescribeOpsItemsInput { s.NextToken = &v return s } // SetOpsItemFilters sets the OpsItemFilters field's value. func (s *DescribeOpsItemsInput) SetOpsItemFilters(v []*OpsItemFilter) *DescribeOpsItemsInput { s.OpsItemFilters = v return s } type DescribeOpsItemsOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // A list of OpsItems. OpsItemSummaries []*OpsItemSummary `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeOpsItemsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeOpsItemsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeOpsItemsOutput) SetNextToken(v string) *DescribeOpsItemsOutput { s.NextToken = &v return s } // SetOpsItemSummaries sets the OpsItemSummaries field's value. func (s *DescribeOpsItemsOutput) SetOpsItemSummaries(v []*OpsItemSummary) *DescribeOpsItemsOutput { s.OpsItemSummaries = v return s } type DescribeParametersInput struct { _ struct{} `type:"structure"` // This data type is deprecated. Instead, use ParameterFilters. Filters []*ParametersFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // Filters to limit the request results. ParameterFilters []*ParameterStringFilter `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeParametersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeParametersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeParametersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeParametersInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.Filters != nil { for i, v := range s.Filters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) } } } if s.ParameterFilters != nil { for i, v := range s.ParameterFilters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterFilters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFilters sets the Filters field's value. func (s *DescribeParametersInput) SetFilters(v []*ParametersFilter) *DescribeParametersInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeParametersInput) SetMaxResults(v int64) *DescribeParametersInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeParametersInput) SetNextToken(v string) *DescribeParametersInput { s.NextToken = &v return s } // SetParameterFilters sets the ParameterFilters field's value. func (s *DescribeParametersInput) SetParameterFilters(v []*ParameterStringFilter) *DescribeParametersInput { s.ParameterFilters = v return s } type DescribeParametersOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. NextToken *string `type:"string"` // Parameters returned by the request. Parameters []*ParameterMetadata `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeParametersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeParametersOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeParametersOutput) SetNextToken(v string) *DescribeParametersOutput { s.NextToken = &v return s } // SetParameters sets the Parameters field's value. func (s *DescribeParametersOutput) SetParameters(v []*ParameterMetadata) *DescribeParametersOutput { s.Parameters = v return s } type DescribePatchBaselinesInput struct { _ struct{} `type:"structure"` // Each element in the array is a structure containing a key-value pair. // // Supported keys for DescribePatchBaselines include the following: // // * NAME_PREFIX Sample values: AWS- | My- // // * OWNER Sample values: AWS | Self // // * OPERATING_SYSTEM Sample values: AMAZON_LINUX | SUSE | WINDOWS Filters []*PatchOrchestratorFilter `type:"list"` // The maximum number of patch baselines to return (per page). MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchBaselinesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchBaselinesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribePatchBaselinesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribePatchBaselinesInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *DescribePatchBaselinesInput) SetFilters(v []*PatchOrchestratorFilter) *DescribePatchBaselinesInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribePatchBaselinesInput) SetMaxResults(v int64) *DescribePatchBaselinesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribePatchBaselinesInput) SetNextToken(v string) *DescribePatchBaselinesInput { s.NextToken = &v return s } type DescribePatchBaselinesOutput struct { _ struct{} `type:"structure"` // An array of PatchBaselineIdentity elements. BaselineIdentities []*PatchBaselineIdentity `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchBaselinesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchBaselinesOutput) GoString() string { return s.String() } // SetBaselineIdentities sets the BaselineIdentities field's value. func (s *DescribePatchBaselinesOutput) SetBaselineIdentities(v []*PatchBaselineIdentity) *DescribePatchBaselinesOutput { s.BaselineIdentities = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribePatchBaselinesOutput) SetNextToken(v string) *DescribePatchBaselinesOutput { s.NextToken = &v return s } type DescribePatchGroupStateInput struct { _ struct{} `type:"structure"` // The name of the patch group whose patch snapshot should be retrieved. // // PatchGroup is a required field PatchGroup *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchGroupStateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchGroupStateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribePatchGroupStateInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribePatchGroupStateInput"} if s.PatchGroup == nil { invalidParams.Add(request.NewErrParamRequired("PatchGroup")) } if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetPatchGroup sets the PatchGroup field's value. func (s *DescribePatchGroupStateInput) SetPatchGroup(v string) *DescribePatchGroupStateInput { s.PatchGroup = &v return s } type DescribePatchGroupStateOutput struct { _ struct{} `type:"structure"` // The number of managed nodes in the patch group. Instances *int64 `type:"integer"` // The number of managed nodes where patches that are specified as Critical // for compliance reporting in the patch baseline aren't installed. These patches // might be missing, have failed installation, were rejected, or were installed // but awaiting a required managed node reboot. The status of these managed // nodes is NON_COMPLIANT. InstancesWithCriticalNonCompliantPatches *int64 `type:"integer"` // The number of managed nodes with patches from the patch baseline that failed // to install. InstancesWithFailedPatches *int64 `type:"integer"` // The number of managed nodes with patches installed that aren't defined in // the patch baseline. InstancesWithInstalledOtherPatches *int64 `type:"integer"` // The number of managed nodes with installed patches. InstancesWithInstalledPatches *int64 `type:"integer"` // The number of managed nodes with patches installed by Patch Manager that // haven't been rebooted after the patch installation. The status of these managed // nodes is NON_COMPLIANT. InstancesWithInstalledPendingRebootPatches *int64 `type:"integer"` // The number of managed nodes with patches installed that are specified in // a RejectedPatches list. Patches with a status of INSTALLED_REJECTED were // typically installed before they were added to a RejectedPatches list. // // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, // the value of InstancesWithInstalledRejectedPatches will always be 0 (zero). InstancesWithInstalledRejectedPatches *int64 `type:"integer"` // The number of managed nodes with missing patches from the patch baseline. InstancesWithMissingPatches *int64 `type:"integer"` // The number of managed nodes with patches that aren't applicable. InstancesWithNotApplicablePatches *int64 `type:"integer"` // The number of managed nodes with patches installed that are specified as // other than Critical or Security but aren't compliant with the patch baseline. // The status of these managed nodes is NON_COMPLIANT. InstancesWithOtherNonCompliantPatches *int64 `type:"integer"` // The number of managed nodes where patches that are specified as Security // in a patch advisory aren't installed. These patches might be missing, have // failed installation, were rejected, or were installed but awaiting a required // managed node reboot. The status of these managed nodes is NON_COMPLIANT. InstancesWithSecurityNonCompliantPatches *int64 `type:"integer"` // The number of managed nodes with NotApplicable patches beyond the supported // limit, which aren't reported by name to Inventory. Inventory is a capability // of Amazon Web Services Systems Manager. InstancesWithUnreportedNotApplicablePatches *int64 `type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchGroupStateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchGroupStateOutput) GoString() string { return s.String() } // SetInstances sets the Instances field's value. func (s *DescribePatchGroupStateOutput) SetInstances(v int64) *DescribePatchGroupStateOutput { s.Instances = &v return s } // SetInstancesWithCriticalNonCompliantPatches sets the InstancesWithCriticalNonCompliantPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithCriticalNonCompliantPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithCriticalNonCompliantPatches = &v return s } // SetInstancesWithFailedPatches sets the InstancesWithFailedPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithFailedPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithFailedPatches = &v return s } // SetInstancesWithInstalledOtherPatches sets the InstancesWithInstalledOtherPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledOtherPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithInstalledOtherPatches = &v return s } // SetInstancesWithInstalledPatches sets the InstancesWithInstalledPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithInstalledPatches = &v return s } // SetInstancesWithInstalledPendingRebootPatches sets the InstancesWithInstalledPendingRebootPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledPendingRebootPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithInstalledPendingRebootPatches = &v return s } // SetInstancesWithInstalledRejectedPatches sets the InstancesWithInstalledRejectedPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledRejectedPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithInstalledRejectedPatches = &v return s } // SetInstancesWithMissingPatches sets the InstancesWithMissingPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithMissingPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithMissingPatches = &v return s } // SetInstancesWithNotApplicablePatches sets the InstancesWithNotApplicablePatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithNotApplicablePatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithNotApplicablePatches = &v return s } // SetInstancesWithOtherNonCompliantPatches sets the InstancesWithOtherNonCompliantPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithOtherNonCompliantPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithOtherNonCompliantPatches = &v return s } // SetInstancesWithSecurityNonCompliantPatches sets the InstancesWithSecurityNonCompliantPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithSecurityNonCompliantPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithSecurityNonCompliantPatches = &v return s } // SetInstancesWithUnreportedNotApplicablePatches sets the InstancesWithUnreportedNotApplicablePatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithUnreportedNotApplicablePatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithUnreportedNotApplicablePatches = &v return s } type DescribePatchGroupsInput struct { _ struct{} `type:"structure"` // Each element in the array is a structure containing a key-value pair. // // Supported keys for DescribePatchGroups include the following: // // * NAME_PREFIX Sample values: AWS- | My-. // // * OPERATING_SYSTEM Sample values: AMAZON_LINUX | SUSE | WINDOWS Filters []*PatchOrchestratorFilter `type:"list"` // The maximum number of patch groups to return (per page). MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchGroupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchGroupsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribePatchGroupsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribePatchGroupsInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *DescribePatchGroupsInput) SetFilters(v []*PatchOrchestratorFilter) *DescribePatchGroupsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribePatchGroupsInput) SetMaxResults(v int64) *DescribePatchGroupsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribePatchGroupsInput) SetNextToken(v string) *DescribePatchGroupsInput { s.NextToken = &v return s } type DescribePatchGroupsOutput struct { _ struct{} `type:"structure"` // Each entry in the array contains: // // * PatchGroup: string (between 1 and 256 characters. Regex: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$) // // * PatchBaselineIdentity: A PatchBaselineIdentity element. Mappings []*PatchGroupPatchBaselineMapping `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchGroupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchGroupsOutput) GoString() string { return s.String() } // SetMappings sets the Mappings field's value. func (s *DescribePatchGroupsOutput) SetMappings(v []*PatchGroupPatchBaselineMapping) *DescribePatchGroupsOutput { s.Mappings = v return s } // SetNextToken sets the NextToken field's value. func (s *DescribePatchGroupsOutput) SetNextToken(v string) *DescribePatchGroupsOutput { s.NextToken = &v return s } type DescribePatchPropertiesInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The operating system type for which to list patches. // // OperatingSystem is a required field OperatingSystem *string `type:"string" required:"true" enum:"OperatingSystem"` // Indicates whether to list patches for the Windows operating system or for // applications released by Microsoft. Not applicable for the Linux or macOS // operating systems. PatchSet *string `type:"string" enum:"PatchSet"` // The patch property for which you want to view patch details. // // Property is a required field Property *string `type:"string" required:"true" enum:"PatchProperty"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchPropertiesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchPropertiesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribePatchPropertiesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribePatchPropertiesInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.OperatingSystem == nil { invalidParams.Add(request.NewErrParamRequired("OperatingSystem")) } if s.Property == nil { invalidParams.Add(request.NewErrParamRequired("Property")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *DescribePatchPropertiesInput) SetMaxResults(v int64) *DescribePatchPropertiesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribePatchPropertiesInput) SetNextToken(v string) *DescribePatchPropertiesInput { s.NextToken = &v return s } // SetOperatingSystem sets the OperatingSystem field's value. func (s *DescribePatchPropertiesInput) SetOperatingSystem(v string) *DescribePatchPropertiesInput { s.OperatingSystem = &v return s } // SetPatchSet sets the PatchSet field's value. func (s *DescribePatchPropertiesInput) SetPatchSet(v string) *DescribePatchPropertiesInput { s.PatchSet = &v return s } // SetProperty sets the Property field's value. func (s *DescribePatchPropertiesInput) SetProperty(v string) *DescribePatchPropertiesInput { s.Property = &v return s } type DescribePatchPropertiesOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. (You use this token in the // next call.) NextToken *string `type:"string"` // A list of the properties for patches matching the filter request parameters. Properties []map[string]*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchPropertiesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribePatchPropertiesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribePatchPropertiesOutput) SetNextToken(v string) *DescribePatchPropertiesOutput { s.NextToken = &v return s } // SetProperties sets the Properties field's value. func (s *DescribePatchPropertiesOutput) SetProperties(v []map[string]*string) *DescribePatchPropertiesOutput { s.Properties = v return s } type DescribeSessionsInput struct { _ struct{} `type:"structure"` // One or more filters to limit the type of sessions returned by the request. Filters []*SessionFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The session status to retrieve a list of sessions for. For example, "Active". // // State is a required field State *string `type:"string" required:"true" enum:"SessionState"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeSessionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeSessionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeSessionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeSessionsInput"} if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.State == nil { invalidParams.Add(request.NewErrParamRequired("State")) } 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 *DescribeSessionsInput) SetFilters(v []*SessionFilter) *DescribeSessionsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *DescribeSessionsInput) SetMaxResults(v int64) *DescribeSessionsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *DescribeSessionsInput) SetNextToken(v string) *DescribeSessionsInput { s.NextToken = &v return s } // SetState sets the State field's value. func (s *DescribeSessionsInput) SetState(v string) *DescribeSessionsInput { s.State = &v return s } type DescribeSessionsOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // A list of sessions meeting the request parameters. Sessions []*Session `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeSessionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DescribeSessionsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *DescribeSessionsOutput) SetNextToken(v string) *DescribeSessionsOutput { s.NextToken = &v return s } // SetSessions sets the Sessions field's value. func (s *DescribeSessionsOutput) SetSessions(v []*Session) *DescribeSessionsOutput { s.Sessions = v return s } type DisassociateOpsItemRelatedItemInput struct { _ struct{} `type:"structure"` // The ID of the association for which you want to delete an association between // the OpsItem and a related item. // // AssociationId is a required field AssociationId *string `type:"string" required:"true"` // The ID of the OpsItem for which you want to delete an association between // the OpsItem and a related item. // // OpsItemId is a required field OpsItemId *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DisassociateOpsItemRelatedItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DisassociateOpsItemRelatedItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DisassociateOpsItemRelatedItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DisassociateOpsItemRelatedItemInput"} if s.AssociationId == nil { invalidParams.Add(request.NewErrParamRequired("AssociationId")) } if s.OpsItemId == nil { invalidParams.Add(request.NewErrParamRequired("OpsItemId")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAssociationId sets the AssociationId field's value. func (s *DisassociateOpsItemRelatedItemInput) SetAssociationId(v string) *DisassociateOpsItemRelatedItemInput { s.AssociationId = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *DisassociateOpsItemRelatedItemInput) SetOpsItemId(v string) *DisassociateOpsItemRelatedItemInput { s.OpsItemId = &v return s } type DisassociateOpsItemRelatedItemOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DisassociateOpsItemRelatedItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DisassociateOpsItemRelatedItemOutput) GoString() string { return s.String() } // The specified document already exists. type DocumentAlreadyExists struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentAlreadyExists) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentAlreadyExists) GoString() string { return s.String() } func newErrorDocumentAlreadyExists(v protocol.ResponseMetadata) error { return &DocumentAlreadyExists{ RespMetadata: v, } } // Code returns the exception type name. func (s *DocumentAlreadyExists) Code() string { return "DocumentAlreadyExists" } // Message returns the exception's message. func (s *DocumentAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DocumentAlreadyExists) OrigErr() error { return nil } func (s *DocumentAlreadyExists) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DocumentAlreadyExists) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DocumentAlreadyExists) RequestID() string { return s.RespMetadata.RequestID } // A default version of a document. type DocumentDefaultVersionDescription struct { _ struct{} `type:"structure"` // 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"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentDefaultVersionDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentDefaultVersionDescription) GoString() string { return s.String() } // SetDefaultVersion sets the DefaultVersion field's value. func (s *DocumentDefaultVersionDescription) SetDefaultVersion(v string) *DocumentDefaultVersionDescription { s.DefaultVersion = &v 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 return s } // Describes an Amazon Web Services Systems Manager document (SSM document). type DocumentDescription struct { _ struct{} `type:"structure"` // The version of the document currently approved for use in the organization. ApprovedVersion *string `type:"string"` // Details about the document attachments, including names, locations, sizes, // and so on. AttachmentsInformation []*AttachmentInformation `type:"list"` // The user in your organization who created the document. Author *string `type:"string"` // The classification of a document to help you identify and categorize its // use. Category []*string `type:"list"` // The value that identifies a document's category. CategoryEnum []*string `type:"list"` // The date when the document was created. CreatedDate *time.Time `type:"timestamp"` // The default version. DefaultVersion *string `type:"string"` // A description of the document. Description *string `type:"string"` // The friendly name of the SSM document. This value can differ for each version // of the document. If you want to update this value, see UpdateDocument. DisplayName *string `type:"string"` // The document format, either JSON or YAML. DocumentFormat *string `type:"string" enum:"DocumentFormat"` // The type of document. DocumentType *string `type:"string" enum:"DocumentType"` // The document version. DocumentVersion *string `type:"string"` // The Sha256 or Sha1 hash created by the system when the document was created. // // Sha1 hashes have been deprecated. Hash *string `type:"string"` // The hash type of the document. Valid values include Sha256 or Sha1. // // Sha1 hashes have been deprecated. HashType *string `type:"string" enum:"DocumentHashType"` // The latest version of the document. LatestVersion *string `type:"string"` // The name of the SSM document. Name *string `type:"string"` // The Amazon Web Services user that created the document. Owner *string `type:"string"` // A description of the parameters for a document. Parameters []*DocumentParameter `type:"list"` // The version of the document that is currently under review. PendingReviewVersion *string `type:"string"` // The list of operating system (OS) platforms compatible with this SSM document. PlatformTypes []*string `type:"list" enum:"PlatformType"` // A list of SSM documents required by a document. For example, an ApplicationConfiguration // document requires an ApplicationConfigurationSchema document. Requires []*DocumentRequires `min:"1" type:"list"` // Details about the review of a document. ReviewInformation []*ReviewInformation `min:"1" type:"list"` // The current status of the review. ReviewStatus *string `type:"string" enum:"ReviewStatus"` // The schema version. SchemaVersion *string `type:"string"` // The SHA1 hash of the document, which you can use for verification. Sha1 *string `type:"string"` // The status of the SSM document. Status *string `type:"string" enum:"DocumentStatus"` // A message returned by Amazon Web Services Systems Manager that explains the // Status value. For example, a Failed status might be explained by the StatusInformation // message, "The specified S3 bucket doesn't 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"` // The target type which defines the kinds of resources the document can run // on. For example, /AWS::EC2::Instance. For a list of valid resource types, // see Amazon Web Services resource and property types reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the 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. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentDescription) GoString() string { return s.String() } // SetApprovedVersion sets the ApprovedVersion field's value. func (s *DocumentDescription) SetApprovedVersion(v string) *DocumentDescription { s.ApprovedVersion = &v return s } // SetAttachmentsInformation sets the AttachmentsInformation field's value. func (s *DocumentDescription) SetAttachmentsInformation(v []*AttachmentInformation) *DocumentDescription { s.AttachmentsInformation = v return s } // SetAuthor sets the Author field's value. func (s *DocumentDescription) SetAuthor(v string) *DocumentDescription { s.Author = &v return s } // SetCategory sets the Category field's value. func (s *DocumentDescription) SetCategory(v []*string) *DocumentDescription { s.Category = v return s } // SetCategoryEnum sets the CategoryEnum field's value. func (s *DocumentDescription) SetCategoryEnum(v []*string) *DocumentDescription { s.CategoryEnum = v return s } // SetCreatedDate sets the CreatedDate field's value. func (s *DocumentDescription) SetCreatedDate(v time.Time) *DocumentDescription { s.CreatedDate = &v return s } // SetDefaultVersion sets the DefaultVersion field's value. func (s *DocumentDescription) SetDefaultVersion(v string) *DocumentDescription { s.DefaultVersion = &v return s } // SetDescription sets the Description field's value. func (s *DocumentDescription) SetDescription(v string) *DocumentDescription { s.Description = &v return s } // SetDisplayName sets the DisplayName field's value. func (s *DocumentDescription) SetDisplayName(v string) *DocumentDescription { s.DisplayName = &v return s } // SetDocumentFormat sets the DocumentFormat field's value. func (s *DocumentDescription) SetDocumentFormat(v string) *DocumentDescription { s.DocumentFormat = &v return s } // SetDocumentType sets the DocumentType field's value. func (s *DocumentDescription) SetDocumentType(v string) *DocumentDescription { s.DocumentType = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *DocumentDescription) SetDocumentVersion(v string) *DocumentDescription { s.DocumentVersion = &v return s } // SetHash sets the Hash field's value. func (s *DocumentDescription) SetHash(v string) *DocumentDescription { s.Hash = &v return s } // SetHashType sets the HashType field's value. func (s *DocumentDescription) SetHashType(v string) *DocumentDescription { s.HashType = &v return s } // SetLatestVersion sets the LatestVersion field's value. func (s *DocumentDescription) SetLatestVersion(v string) *DocumentDescription { s.LatestVersion = &v return s } // SetName sets the Name field's value. func (s *DocumentDescription) SetName(v string) *DocumentDescription { s.Name = &v return s } // SetOwner sets the Owner field's value. func (s *DocumentDescription) SetOwner(v string) *DocumentDescription { s.Owner = &v return s } // SetParameters sets the Parameters field's value. func (s *DocumentDescription) SetParameters(v []*DocumentParameter) *DocumentDescription { s.Parameters = v return s } // SetPendingReviewVersion sets the PendingReviewVersion field's value. func (s *DocumentDescription) SetPendingReviewVersion(v string) *DocumentDescription { s.PendingReviewVersion = &v return s } // SetPlatformTypes sets the PlatformTypes field's value. func (s *DocumentDescription) SetPlatformTypes(v []*string) *DocumentDescription { s.PlatformTypes = v return s } // SetRequires sets the Requires field's value. func (s *DocumentDescription) SetRequires(v []*DocumentRequires) *DocumentDescription { s.Requires = v return s } // SetReviewInformation sets the ReviewInformation field's value. func (s *DocumentDescription) SetReviewInformation(v []*ReviewInformation) *DocumentDescription { s.ReviewInformation = v return s } // SetReviewStatus sets the ReviewStatus field's value. func (s *DocumentDescription) SetReviewStatus(v string) *DocumentDescription { s.ReviewStatus = &v return s } // SetSchemaVersion sets the SchemaVersion field's value. func (s *DocumentDescription) SetSchemaVersion(v string) *DocumentDescription { s.SchemaVersion = &v return s } // SetSha1 sets the Sha1 field's value. func (s *DocumentDescription) SetSha1(v string) *DocumentDescription { s.Sha1 = &v return s } // SetStatus sets the Status field's value. func (s *DocumentDescription) SetStatus(v string) *DocumentDescription { s.Status = &v 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 return s } // SetTargetType sets the TargetType field's value. func (s *DocumentDescription) SetTargetType(v string) *DocumentDescription { s.TargetType = &v return s } // SetVersionName sets the VersionName field's value. func (s *DocumentDescription) SetVersionName(v string) *DocumentDescription { s.VersionName = &v return s } // This data type is deprecated. Instead, use DocumentKeyValuesFilter. type DocumentFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // Key is a required field Key *string `locationName:"key" type:"string" required:"true" enum:"DocumentFilterKey"` // The value of the filter. // // Value is a required field Value *string `locationName:"value" min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DocumentFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DocumentFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if s.Value != nil && len(*s.Value) < 1 { invalidParams.Add(request.NewErrParamMinLen("Value", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *DocumentFilter) SetKey(v string) *DocumentFilter { s.Key = &v return s } // SetValue sets the Value field's value. func (s *DocumentFilter) SetValue(v string) *DocumentFilter { s.Value = &v return s } // Describes the name of a SSM document. type DocumentIdentifier struct { _ struct{} `type:"structure"` // The user in your organization who created the document. Author *string `type:"string"` // The date the SSM document was created. CreatedDate *time.Time `type:"timestamp"` // An optional field where you can specify a friendly name for the SSM document. // This value can differ for each version of the document. If you want to update // this value, see UpdateDocument. DisplayName *string `type:"string"` // The document format, either JSON or YAML. DocumentFormat *string `type:"string" enum:"DocumentFormat"` // The document type. DocumentType *string `type:"string" enum:"DocumentType"` // The document version. DocumentVersion *string `type:"string"` // The name of the SSM document. Name *string `type:"string"` // The Amazon Web Services user that created the document. Owner *string `type:"string"` // The operating system platform. PlatformTypes []*string `type:"list" enum:"PlatformType"` // A list of SSM documents required by a document. For example, an ApplicationConfiguration // document requires an ApplicationConfigurationSchema document. Requires []*DocumentRequires `min:"1" type:"list"` // The current status of a document review. ReviewStatus *string `type:"string" enum:"ReviewStatus"` // The schema version. SchemaVersion *string `type:"string"` // The tags, or metadata, that have been applied to the document. Tags []*Tag `type:"list"` // The target type which defines the kinds of resources the document can run // on. For example, /AWS::EC2::Instance. For a list of valid resource types, // see Amazon Web Services resource and property types reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the 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 can't be changed. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentIdentifier) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentIdentifier) GoString() string { return s.String() } // SetAuthor sets the Author field's value. func (s *DocumentIdentifier) SetAuthor(v string) *DocumentIdentifier { s.Author = &v return s } // SetCreatedDate sets the CreatedDate field's value. func (s *DocumentIdentifier) SetCreatedDate(v time.Time) *DocumentIdentifier { s.CreatedDate = &v return s } // SetDisplayName sets the DisplayName field's value. func (s *DocumentIdentifier) SetDisplayName(v string) *DocumentIdentifier { s.DisplayName = &v return s } // SetDocumentFormat sets the DocumentFormat field's value. func (s *DocumentIdentifier) SetDocumentFormat(v string) *DocumentIdentifier { s.DocumentFormat = &v return s } // SetDocumentType sets the DocumentType field's value. func (s *DocumentIdentifier) SetDocumentType(v string) *DocumentIdentifier { s.DocumentType = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *DocumentIdentifier) SetDocumentVersion(v string) *DocumentIdentifier { s.DocumentVersion = &v return s } // SetName sets the Name field's value. func (s *DocumentIdentifier) SetName(v string) *DocumentIdentifier { s.Name = &v return s } // SetOwner sets the Owner field's value. func (s *DocumentIdentifier) SetOwner(v string) *DocumentIdentifier { s.Owner = &v return s } // SetPlatformTypes sets the PlatformTypes field's value. func (s *DocumentIdentifier) SetPlatformTypes(v []*string) *DocumentIdentifier { s.PlatformTypes = v return s } // SetRequires sets the Requires field's value. func (s *DocumentIdentifier) SetRequires(v []*DocumentRequires) *DocumentIdentifier { s.Requires = v return s } // SetReviewStatus sets the ReviewStatus field's value. func (s *DocumentIdentifier) SetReviewStatus(v string) *DocumentIdentifier { s.ReviewStatus = &v return s } // SetSchemaVersion sets the SchemaVersion field's value. func (s *DocumentIdentifier) SetSchemaVersion(v string) *DocumentIdentifier { s.SchemaVersion = &v return s } // SetTags sets the Tags field's value. func (s *DocumentIdentifier) SetTags(v []*Tag) *DocumentIdentifier { s.Tags = v return s } // SetTargetType sets the TargetType field's value. func (s *DocumentIdentifier) SetTargetType(v string) *DocumentIdentifier { s.TargetType = &v 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. // // You can also use Amazon Web Services-provided keys, some of which have specific // allowed values. These keys and their associated values are as follows: // // DocumentType // // - ApplicationConfiguration // // - ApplicationConfigurationSchema // // - Automation // // - ChangeCalendar // // - Command // // - Package // // - Policy // // - Session // // # Owner // // Note that only one Owner can be specified in a request. For example: Key=Owner,Values=Self. // // - Amazon // // - Private // // - Public // // - Self // // - ThirdParty // // PlatformTypes // // - Linux // // - Windows // // Name is another Amazon Web Services-provided key. If you use Name as a key, // you can use a name prefix to return a list of documents. For example, in // the Amazon Web Services CLI, to return a list of all documents that begin // with Te, run the following command: // // aws ssm list-documents --filters Key=Name,Values=Te // // You can also use the TargetType Amazon Web Services-provided key. For a list // of valid resource type values that can be used with this key, see Amazon // Web Services resource and property types reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the CloudFormation User Guide. // // If you specify more than two keys, only documents that are identified by // all the tags are returned in the results. If you specify more than two values // for a key, documents that are identified by any of the values are returned // in the results. // // To specify a custom key-value pair, use the format Key=tag:tagName,Values=valueName. // // For example, if you created a key called region and are using the Amazon // Web Services CLI to call the list-documents command: // // aws ssm list-documents --filters Key=tag:region,Values=east,west Key=Owner,Values=Self type DocumentKeyValuesFilter struct { _ struct{} `type:"structure"` // The name of the filter key. Key *string `min:"1" type:"string"` // The value for the filter key. Values []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentKeyValuesFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentKeyValuesFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DocumentKeyValuesFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DocumentKeyValuesFilter"} 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 *DocumentKeyValuesFilter) SetKey(v string) *DocumentKeyValuesFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *DocumentKeyValuesFilter) SetValues(v []*string) *DocumentKeyValuesFilter { s.Values = v return s } // You can have at most 500 active SSM documents. type DocumentLimitExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentLimitExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentLimitExceeded) GoString() string { return s.String() } func newErrorDocumentLimitExceeded(v protocol.ResponseMetadata) error { return &DocumentLimitExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *DocumentLimitExceeded) Code() string { return "DocumentLimitExceeded" } // Message returns the exception's message. func (s *DocumentLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DocumentLimitExceeded) OrigErr() error { return nil } func (s *DocumentLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DocumentLimitExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DocumentLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } // Details about the response to a document review request. type DocumentMetadataResponseInfo struct { _ struct{} `type:"structure"` // Details about a reviewer's response to a document review request. ReviewerResponse []*DocumentReviewerResponseSource `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentMetadataResponseInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentMetadataResponseInfo) GoString() string { return s.String() } // SetReviewerResponse sets the ReviewerResponse field's value. func (s *DocumentMetadataResponseInfo) SetReviewerResponse(v []*DocumentReviewerResponseSource) *DocumentMetadataResponseInfo { s.ReviewerResponse = v return s } // Parameters specified in a Systems Manager document that run on the server // when the command is run. type DocumentParameter struct { _ struct{} `type:"structure"` // If specified, the default values for the parameters. Parameters without a // default value are required. Parameters with a default value are optional. DefaultValue *string `type:"string"` // A description of what the parameter does, how to use it, the default value, // and whether or not the parameter is optional. Description *string `type:"string"` // The name of the parameter. Name *string `type:"string"` // The type of parameter. The type can be either String or StringList. Type *string `type:"string" enum:"DocumentParameterType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentParameter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentParameter) GoString() string { return s.String() } // SetDefaultValue sets the DefaultValue field's value. func (s *DocumentParameter) SetDefaultValue(v string) *DocumentParameter { s.DefaultValue = &v return s } // SetDescription sets the Description field's value. func (s *DocumentParameter) SetDescription(v string) *DocumentParameter { s.Description = &v return s } // SetName sets the Name field's value. func (s *DocumentParameter) SetName(v string) *DocumentParameter { s.Name = &v return s } // SetType sets the Type field's value. func (s *DocumentParameter) SetType(v string) *DocumentParameter { s.Type = &v return s } // The document can't be shared with more Amazon Web Services accounts. You // can specify a maximum of 20 accounts per API operation to share a private // document. // // By default, you can share a private document with a maximum of 1,000 accounts // and publicly share up to five documents. // // If you need to increase the quota for privately or publicly shared Systems // Manager documents, contact Amazon Web Services Support. type DocumentPermissionLimit struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentPermissionLimit) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentPermissionLimit) GoString() string { return s.String() } func newErrorDocumentPermissionLimit(v protocol.ResponseMetadata) error { return &DocumentPermissionLimit{ RespMetadata: v, } } // Code returns the exception type name. func (s *DocumentPermissionLimit) Code() string { return "DocumentPermissionLimit" } // Message returns the exception's message. func (s *DocumentPermissionLimit) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DocumentPermissionLimit) OrigErr() error { return nil } func (s *DocumentPermissionLimit) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DocumentPermissionLimit) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DocumentPermissionLimit) RequestID() string { return s.RespMetadata.RequestID } // An SSM document required by the current document. type DocumentRequires struct { _ struct{} `type:"structure"` // The name of the required SSM document. The name can be an Amazon Resource // Name (ARN). // // Name is a required field Name *string `type:"string" required:"true"` // The document type of the required SSM document. RequireType *string `type:"string"` // The document version required by the current document. Version *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 can't be changed. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentRequires) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentRequires) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DocumentRequires) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DocumentRequires"} 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 *DocumentRequires) SetName(v string) *DocumentRequires { s.Name = &v return s } // SetRequireType sets the RequireType field's value. func (s *DocumentRequires) SetRequireType(v string) *DocumentRequires { s.RequireType = &v return s } // SetVersion sets the Version field's value. func (s *DocumentRequires) SetVersion(v string) *DocumentRequires { s.Version = &v return s } // SetVersionName sets the VersionName field's value. func (s *DocumentRequires) SetVersionName(v string) *DocumentRequires { s.VersionName = &v return s } // Information about comments added to a document review request. type DocumentReviewCommentSource struct { _ struct{} `type:"structure"` // The content of a comment entered by a user who requests a review of a new // document version, or who reviews the new version. Content *string `min:"1" type:"string"` // The type of information added to a review request. Currently, only the value // Comment is supported. Type *string `type:"string" enum:"DocumentReviewCommentType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentReviewCommentSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentReviewCommentSource) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DocumentReviewCommentSource) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DocumentReviewCommentSource"} if s.Content != nil && len(*s.Content) < 1 { invalidParams.Add(request.NewErrParamMinLen("Content", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetContent sets the Content field's value. func (s *DocumentReviewCommentSource) SetContent(v string) *DocumentReviewCommentSource { s.Content = &v return s } // SetType sets the Type field's value. func (s *DocumentReviewCommentSource) SetType(v string) *DocumentReviewCommentSource { s.Type = &v return s } // Information about a reviewer's response to a document review request. type DocumentReviewerResponseSource struct { _ struct{} `type:"structure"` // The comment entered by a reviewer as part of their document review response. Comment []*DocumentReviewCommentSource `type:"list"` // The date and time that a reviewer entered a response to a document review // request. CreateTime *time.Time `type:"timestamp"` // The current review status of a new custom SSM document created by a member // of your organization, or of the latest version of an existing SSM document. // // Only one version of a document can be in the APPROVED state at a time. When // a new version is approved, the status of the previous version changes to // REJECTED. // // Only one version of a document can be in review, or PENDING, at a time. ReviewStatus *string `type:"string" enum:"ReviewStatus"` // The user in your organization assigned to review a document request. Reviewer *string `type:"string"` // The date and time that a reviewer last updated a response to a document review // request. UpdatedTime *time.Time `type:"timestamp"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentReviewerResponseSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentReviewerResponseSource) GoString() string { return s.String() } // SetComment sets the Comment field's value. func (s *DocumentReviewerResponseSource) SetComment(v []*DocumentReviewCommentSource) *DocumentReviewerResponseSource { s.Comment = v return s } // SetCreateTime sets the CreateTime field's value. func (s *DocumentReviewerResponseSource) SetCreateTime(v time.Time) *DocumentReviewerResponseSource { s.CreateTime = &v return s } // SetReviewStatus sets the ReviewStatus field's value. func (s *DocumentReviewerResponseSource) SetReviewStatus(v string) *DocumentReviewerResponseSource { s.ReviewStatus = &v return s } // SetReviewer sets the Reviewer field's value. func (s *DocumentReviewerResponseSource) SetReviewer(v string) *DocumentReviewerResponseSource { s.Reviewer = &v return s } // SetUpdatedTime sets the UpdatedTime field's value. func (s *DocumentReviewerResponseSource) SetUpdatedTime(v time.Time) *DocumentReviewerResponseSource { s.UpdatedTime = &v return s } // Information about a document approval review. type DocumentReviews struct { _ struct{} `type:"structure"` // The action to take on a document approval review request. // // Action is a required field Action *string `type:"string" required:"true" enum:"DocumentReviewAction"` // A comment entered by a user in your organization about the document review // request. Comment []*DocumentReviewCommentSource `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentReviews) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentReviews) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DocumentReviews) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DocumentReviews"} if s.Action == nil { invalidParams.Add(request.NewErrParamRequired("Action")) } if s.Comment != nil { for i, v := range s.Comment { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Comment", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAction sets the Action field's value. func (s *DocumentReviews) SetAction(v string) *DocumentReviews { s.Action = &v return s } // SetComment sets the Comment field's value. func (s *DocumentReviews) SetComment(v []*DocumentReviewCommentSource) *DocumentReviews { s.Comment = v return s } // Version information about the document. type DocumentVersionInfo struct { _ struct{} `type:"structure"` // The date the document was created. CreatedDate *time.Time `type:"timestamp"` // The friendly name of the SSM document. This value can differ for each version // of the document. If you want to update this value, see UpdateDocument. DisplayName *string `type:"string"` // The document format, either JSON or YAML. DocumentFormat *string `type:"string" enum:"DocumentFormat"` // The document version. DocumentVersion *string `type:"string"` // An identifier for the default version of the document. IsDefaultVersion *bool `type:"boolean"` // The document name. Name *string `type:"string"` // The current status of the approval review for the latest version of the document. ReviewStatus *string `type:"string" enum:"ReviewStatus"` // The status of the SSM document, such as Creating, Active, Failed, and Deleting. Status *string `type:"string" enum:"DocumentStatus"` // A message returned by Amazon Web Services Systems Manager that explains the // Status value. For example, a Failed status might be explained by the StatusInformation // message, "The specified S3 bucket doesn't 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 // can't be changed. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentVersionInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentVersionInfo) GoString() string { return s.String() } // SetCreatedDate sets the CreatedDate field's value. func (s *DocumentVersionInfo) SetCreatedDate(v time.Time) *DocumentVersionInfo { s.CreatedDate = &v return s } // SetDisplayName sets the DisplayName field's value. func (s *DocumentVersionInfo) SetDisplayName(v string) *DocumentVersionInfo { s.DisplayName = &v return s } // SetDocumentFormat sets the DocumentFormat field's value. func (s *DocumentVersionInfo) SetDocumentFormat(v string) *DocumentVersionInfo { s.DocumentFormat = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *DocumentVersionInfo) SetDocumentVersion(v string) *DocumentVersionInfo { s.DocumentVersion = &v return s } // SetIsDefaultVersion sets the IsDefaultVersion field's value. func (s *DocumentVersionInfo) SetIsDefaultVersion(v bool) *DocumentVersionInfo { s.IsDefaultVersion = &v return s } // SetName sets the Name field's value. func (s *DocumentVersionInfo) SetName(v string) *DocumentVersionInfo { s.Name = &v return s } // SetReviewStatus sets the ReviewStatus field's value. func (s *DocumentVersionInfo) SetReviewStatus(v string) *DocumentVersionInfo { s.ReviewStatus = &v 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 document has too many versions. Delete one or more document versions // and try again. type DocumentVersionLimitExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentVersionLimitExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DocumentVersionLimitExceeded) GoString() string { return s.String() } func newErrorDocumentVersionLimitExceeded(v protocol.ResponseMetadata) error { return &DocumentVersionLimitExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *DocumentVersionLimitExceeded) Code() string { return "DocumentVersionLimitExceeded" } // Message returns the exception's message. func (s *DocumentVersionLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DocumentVersionLimitExceeded) OrigErr() error { return nil } func (s *DocumentVersionLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DocumentVersionLimitExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DocumentVersionLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. type DoesNotExistException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DoesNotExistException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DoesNotExistException) GoString() string { return s.String() } func newErrorDoesNotExistException(v protocol.ResponseMetadata) error { return &DoesNotExistException{ RespMetadata: v, } } // Code returns the exception type name. func (s *DoesNotExistException) Code() string { return "DoesNotExistException" } // Message returns the exception's message. func (s *DoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DoesNotExistException) OrigErr() error { return nil } func (s *DoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DoesNotExistException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DoesNotExistException) RequestID() string { return s.RespMetadata.RequestID } // The content of the association document matches another document. Change // the content of the document and try again. type DuplicateDocumentContent struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DuplicateDocumentContent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DuplicateDocumentContent) GoString() string { return s.String() } func newErrorDuplicateDocumentContent(v protocol.ResponseMetadata) error { return &DuplicateDocumentContent{ RespMetadata: v, } } // Code returns the exception type name. func (s *DuplicateDocumentContent) Code() string { return "DuplicateDocumentContent" } // Message returns the exception's message. func (s *DuplicateDocumentContent) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DuplicateDocumentContent) OrigErr() error { return nil } func (s *DuplicateDocumentContent) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DuplicateDocumentContent) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DuplicateDocumentContent) RequestID() string { return s.RespMetadata.RequestID } // The version name has already been used in this document. Specify a different // version name, and then try again. type DuplicateDocumentVersionName struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DuplicateDocumentVersionName) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DuplicateDocumentVersionName) GoString() string { return s.String() } func newErrorDuplicateDocumentVersionName(v protocol.ResponseMetadata) error { return &DuplicateDocumentVersionName{ RespMetadata: v, } } // Code returns the exception type name. func (s *DuplicateDocumentVersionName) Code() string { return "DuplicateDocumentVersionName" } // Message returns the exception's message. func (s *DuplicateDocumentVersionName) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DuplicateDocumentVersionName) OrigErr() error { return nil } func (s *DuplicateDocumentVersionName) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DuplicateDocumentVersionName) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DuplicateDocumentVersionName) RequestID() string { return s.RespMetadata.RequestID } // You can't specify a managed node ID in more than one association. type DuplicateInstanceId struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DuplicateInstanceId) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DuplicateInstanceId) GoString() string { return s.String() } func newErrorDuplicateInstanceId(v protocol.ResponseMetadata) error { return &DuplicateInstanceId{ RespMetadata: v, } } // Code returns the exception type name. func (s *DuplicateInstanceId) Code() string { return "DuplicateInstanceId" } // Message returns the exception's message. func (s *DuplicateInstanceId) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *DuplicateInstanceId) OrigErr() error { return nil } func (s *DuplicateInstanceId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *DuplicateInstanceId) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *DuplicateInstanceId) RequestID() string { return s.RespMetadata.RequestID } // 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, // due to be approved by a rule, explicitly approved, or explicitly rejected // and the date the patch was or will be approved. type EffectivePatch struct { _ struct{} `type:"structure"` // Provides metadata for a patch, including information such as the KB ID, severity, // classification and a URL for where more information can be obtained about // the patch. Patch *Patch `type:"structure"` // The status of the patch in a patch baseline. This includes information about // whether the patch is currently approved, due to be approved by a rule, explicitly // approved, or explicitly rejected and the date the patch was or will be approved. PatchStatus *PatchStatus `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s EffectivePatch) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s EffectivePatch) GoString() string { return s.String() } // SetPatch sets the Patch field's value. func (s *EffectivePatch) SetPatch(v *Patch) *EffectivePatch { s.Patch = v return s } // SetPatchStatus sets the PatchStatus field's value. func (s *EffectivePatch) SetPatchStatus(v *PatchStatus) *EffectivePatch { s.PatchStatus = v return s } // Describes a failed association. type FailedCreateAssociation struct { _ struct{} `type:"structure"` // The association. Entry *CreateAssociationBatchRequestEntry `type:"structure"` // The source of the failure. Fault *string `type:"string" enum:"Fault"` // A description of the failure. Message *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FailedCreateAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FailedCreateAssociation) GoString() string { return s.String() } // SetEntry sets the Entry field's value. func (s *FailedCreateAssociation) SetEntry(v *CreateAssociationBatchRequestEntry) *FailedCreateAssociation { s.Entry = v return s } // SetFault sets the Fault field's value. func (s *FailedCreateAssociation) SetFault(v string) *FailedCreateAssociation { s.Fault = &v return s } // SetMessage sets the Message field's value. func (s *FailedCreateAssociation) SetMessage(v string) *FailedCreateAssociation { s.Message = &v return s } // Information about an Automation failure. type FailureDetails struct { _ struct{} `type:"structure"` // Detailed information about the Automation step failure. Details map[string][]*string `min:"1" type:"map"` // The stage of the Automation execution when the failure occurred. The stages // include the following: InputValidation, PreVerification, Invocation, PostVerification. FailureStage *string `type:"string"` // The type of Automation failure. Failure types include the following: Action, // Permission, Throttling, Verification, Internal. FailureType *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FailureDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FailureDetails) GoString() string { return s.String() } // SetDetails sets the Details field's value. func (s *FailureDetails) SetDetails(v map[string][]*string) *FailureDetails { s.Details = v return s } // SetFailureStage sets the FailureStage field's value. func (s *FailureDetails) SetFailureStage(v string) *FailureDetails { s.FailureStage = &v return s } // SetFailureType sets the FailureType field's value. func (s *FailureDetails) SetFailureType(v string) *FailureDetails { s.FailureType = &v return s } // You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where // the corresponding service isn't available. type FeatureNotAvailableException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FeatureNotAvailableException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FeatureNotAvailableException) GoString() string { return s.String() } func newErrorFeatureNotAvailableException(v protocol.ResponseMetadata) error { return &FeatureNotAvailableException{ RespMetadata: v, } } // Code returns the exception type name. func (s *FeatureNotAvailableException) Code() string { return "FeatureNotAvailableException" } // Message returns the exception's message. func (s *FeatureNotAvailableException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *FeatureNotAvailableException) OrigErr() error { return nil } func (s *FeatureNotAvailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *FeatureNotAvailableException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *FeatureNotAvailableException) RequestID() string { return s.RespMetadata.RequestID } type GetAutomationExecutionInput struct { _ struct{} `type:"structure"` // The unique identifier for an existing automation execution to examine. The // execution ID is returned by StartAutomationExecution when the execution of // an Automation runbook is initiated. // // AutomationExecutionId is a required field AutomationExecutionId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetAutomationExecutionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetAutomationExecutionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetAutomationExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetAutomationExecutionInput"} if s.AutomationExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("AutomationExecutionId")) } if s.AutomationExecutionId != nil && len(*s.AutomationExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("AutomationExecutionId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAutomationExecutionId sets the AutomationExecutionId field's value. func (s *GetAutomationExecutionInput) SetAutomationExecutionId(v string) *GetAutomationExecutionInput { s.AutomationExecutionId = &v return s } type GetAutomationExecutionOutput struct { _ struct{} `type:"structure"` // Detailed information about the current state of an automation execution. AutomationExecution *AutomationExecution `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetAutomationExecutionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetAutomationExecutionOutput) GoString() string { return s.String() } // SetAutomationExecution sets the AutomationExecution field's value. func (s *GetAutomationExecutionOutput) SetAutomationExecution(v *AutomationExecution) *GetAutomationExecutionOutput { s.AutomationExecution = v return s } type GetCalendarStateInput struct { _ struct{} `type:"structure"` // (Optional) The specific time for which you want to get calendar state information, // in ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) format. If you don't // specify a value or AtTime, the current time is used. AtTime *string `type:"string"` // The names or Amazon Resource Names (ARNs) of the Systems Manager documents // (SSM documents) that represent the calendar entries for which you want to // get the state. // // CalendarNames is a required field CalendarNames []*string `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCalendarStateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCalendarStateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetCalendarStateInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetCalendarStateInput"} if s.CalendarNames == nil { invalidParams.Add(request.NewErrParamRequired("CalendarNames")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAtTime sets the AtTime field's value. func (s *GetCalendarStateInput) SetAtTime(v string) *GetCalendarStateInput { s.AtTime = &v return s } // SetCalendarNames sets the CalendarNames field's value. func (s *GetCalendarStateInput) SetCalendarNames(v []*string) *GetCalendarStateInput { s.CalendarNames = v return s } type GetCalendarStateOutput struct { _ struct{} `type:"structure"` // The time, as an ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) string, // that you specified in your command. If you don't specify a time, GetCalendarState // uses the current time. AtTime *string `type:"string"` // The time, as an ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) string, // that the calendar state will change. If the current calendar state is OPEN, // NextTransitionTime indicates when the calendar state changes to CLOSED, and // vice-versa. NextTransitionTime *string `type:"string"` // The state of the calendar. An OPEN calendar indicates that actions are allowed // to proceed, and a CLOSED calendar indicates that actions aren't allowed to // proceed. State *string `type:"string" enum:"CalendarState"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCalendarStateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCalendarStateOutput) GoString() string { return s.String() } // SetAtTime sets the AtTime field's value. func (s *GetCalendarStateOutput) SetAtTime(v string) *GetCalendarStateOutput { s.AtTime = &v return s } // SetNextTransitionTime sets the NextTransitionTime field's value. func (s *GetCalendarStateOutput) SetNextTransitionTime(v string) *GetCalendarStateOutput { s.NextTransitionTime = &v return s } // SetState sets the State field's value. func (s *GetCalendarStateOutput) SetState(v string) *GetCalendarStateOutput { s.State = &v return s } type GetCommandInvocationInput struct { _ struct{} `type:"structure"` // (Required) The parent command ID of the invocation plugin. // // CommandId is a required field CommandId *string `min:"36" type:"string" required:"true"` // (Required) The ID of the managed node targeted by the command. A managed // node can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, // and on-premises server or VM in your hybrid environment that is configured // for Amazon Web Services Systems Manager. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The name of the step for which you want detailed results. If the document // contains only one step, you can omit the name and details for that step. // If the document contains more than one step, you must specify the name of // the step for which you want to view details. Be sure to specify the name // of the step, not the name of a plugin like aws:RunShellScript. // // To find the PluginName, check the document content and find the name of the // step you want details for. Alternatively, use ListCommandInvocations with // the CommandId and Details parameters. The PluginName is the Name attribute // of the CommandPlugin object in the CommandPlugins list. PluginName *string `min:"4" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCommandInvocationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCommandInvocationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetCommandInvocationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetCommandInvocationInput"} if s.CommandId == nil { invalidParams.Add(request.NewErrParamRequired("CommandId")) } if s.CommandId != nil && len(*s.CommandId) < 36 { invalidParams.Add(request.NewErrParamMinLen("CommandId", 36)) } if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.PluginName != nil && len(*s.PluginName) < 4 { invalidParams.Add(request.NewErrParamMinLen("PluginName", 4)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCommandId sets the CommandId field's value. func (s *GetCommandInvocationInput) SetCommandId(v string) *GetCommandInvocationInput { s.CommandId = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *GetCommandInvocationInput) SetInstanceId(v string) *GetCommandInvocationInput { s.InstanceId = &v return s } // SetPluginName sets the PluginName field's value. func (s *GetCommandInvocationInput) SetPluginName(v string) *GetCommandInvocationInput { s.PluginName = &v return s } type GetCommandInvocationOutput struct { _ struct{} `type:"structure"` // Amazon CloudWatch Logs information where Systems Manager sent the command // output. CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` // The parent command ID of the invocation plugin. CommandId *string `min:"36" type:"string"` // The comment text for the command. Comment *string `type:"string"` // The name of the document that was run. For example, AWS-RunShellScript. DocumentName *string `type:"string"` // The Systems Manager document (SSM document) version used in the request. DocumentVersion *string `type:"string"` // Duration since ExecutionStartDateTime. ExecutionElapsedTime *string `type:"string"` // The date and time the plugin finished running. Date and time are written // in ISO 8601 format. For example, June 7, 2017 is represented as 2017-06-7. // The following sample Amazon Web Services CLI command uses the InvokedAfter // filter. // // aws ssm list-commands --filters key=InvokedAfter,value=2017-06-07T00:00:00Z // // If the plugin hasn't started to run, the string is empty. ExecutionEndDateTime *string `type:"string"` // The date and time the plugin started running. Date and time are written in // ISO 8601 format. For example, June 7, 2017 is represented as 2017-06-7. The // following sample Amazon Web Services CLI command uses the InvokedBefore filter. // // aws ssm list-commands --filters key=InvokedBefore,value=2017-06-07T00:00:00Z // // If the plugin hasn't started to run, the string is empty. ExecutionStartDateTime *string `type:"string"` // The ID of the managed node targeted by the command. A managed node can be // an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, or on-premises // server or VM in your hybrid environment that is configured for Amazon Web // Services Systems Manager. InstanceId *string `type:"string"` // The name of the plugin, or step name, for which details are reported. For // example, aws:RunShellScript is a plugin. PluginName *string `min:"4" type:"string"` // The error level response code for the plugin script. If the response code // is -1, then the command hasn't started running on the managed node, or it // wasn't received by the node. ResponseCode *int64 `type:"integer"` // The first 8,000 characters written by the plugin to stderr. If the command // hasn't finished running, then this string is empty. StandardErrorContent *string `type:"string"` // The URL for the complete text written by the plugin to stderr. If the command // hasn't finished running, then this string is empty. StandardErrorUrl *string `type:"string"` // The first 24,000 characters written by the plugin to stdout. If the command // hasn't finished running, if ExecutionStatus is neither Succeeded nor Failed, // then this string is empty. StandardOutputContent *string `type:"string"` // The URL for the complete text written by the plugin to stdout in Amazon Simple // Storage Service (Amazon S3). If an S3 bucket wasn't specified, then this // string is empty. StandardOutputUrl *string `type:"string"` // The status of this invocation plugin. This status can be different than StatusDetails. Status *string `type:"string" enum:"CommandInvocationStatus"` // A detailed status of the command execution for an invocation. StatusDetails // includes more information than Status because it includes states resulting // from error and concurrency control parameters. StatusDetails can show different // results than Status. For more information about these statuses, see Understanding // command statuses (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the Amazon Web Services Systems Manager User Guide. StatusDetails can // be one of the following values: // // * Pending: The command hasn't been sent to the managed node. // // * In Progress: The command has been sent to the managed node but hasn't // reached a terminal state. // // * Delayed: The system attempted to send the command to the target, but // the target wasn't available. The managed node might not be available because // of network issues, because the node was stopped, or for similar reasons. // The system will try to send the command again. // // * Success: The command or plugin ran successfully. This is a terminal // state. // // * Delivery Timed Out: The command wasn't delivered to the managed node // before the delivery timeout expired. Delivery timeouts don't count against // the parent command's MaxErrors limit, but they do contribute to whether // the parent command status is Success or Incomplete. This is a terminal // state. // // * Execution Timed Out: The command started to run on the managed node, // but the execution wasn't complete before the timeout expired. Execution // timeouts count against the MaxErrors limit of the parent command. This // is a terminal state. // // * Failed: The command wasn't run successfully on the managed node. For // a plugin, this indicates that the result code wasn't zero. For a command // invocation, this indicates that the result code for one or more plugins // wasn't zero. Invocation failures count against the MaxErrors limit of // the parent command. This is a terminal state. // // * Cancelled: The command was terminated before it was completed. This // is a terminal state. // // * Undeliverable: The command can't be delivered to the managed node. The // node might not exist or might not be responding. Undeliverable invocations // don't count against the parent command's MaxErrors limit and don't contribute // to whether the parent command status is Success or Incomplete. This is // a terminal state. // // * Terminated: The parent command exceeded its MaxErrors limit and subsequent // command invocations were canceled by the system. This is a terminal state. StatusDetails *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCommandInvocationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCommandInvocationOutput) GoString() string { return s.String() } // SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. func (s *GetCommandInvocationOutput) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *GetCommandInvocationOutput { s.CloudWatchOutputConfig = v return s } // SetCommandId sets the CommandId field's value. func (s *GetCommandInvocationOutput) SetCommandId(v string) *GetCommandInvocationOutput { s.CommandId = &v return s } // SetComment sets the Comment field's value. func (s *GetCommandInvocationOutput) SetComment(v string) *GetCommandInvocationOutput { s.Comment = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *GetCommandInvocationOutput) SetDocumentName(v string) *GetCommandInvocationOutput { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *GetCommandInvocationOutput) SetDocumentVersion(v string) *GetCommandInvocationOutput { s.DocumentVersion = &v return s } // SetExecutionElapsedTime sets the ExecutionElapsedTime field's value. func (s *GetCommandInvocationOutput) SetExecutionElapsedTime(v string) *GetCommandInvocationOutput { s.ExecutionElapsedTime = &v return s } // SetExecutionEndDateTime sets the ExecutionEndDateTime field's value. func (s *GetCommandInvocationOutput) SetExecutionEndDateTime(v string) *GetCommandInvocationOutput { s.ExecutionEndDateTime = &v return s } // SetExecutionStartDateTime sets the ExecutionStartDateTime field's value. func (s *GetCommandInvocationOutput) SetExecutionStartDateTime(v string) *GetCommandInvocationOutput { s.ExecutionStartDateTime = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *GetCommandInvocationOutput) SetInstanceId(v string) *GetCommandInvocationOutput { s.InstanceId = &v return s } // SetPluginName sets the PluginName field's value. func (s *GetCommandInvocationOutput) SetPluginName(v string) *GetCommandInvocationOutput { s.PluginName = &v return s } // SetResponseCode sets the ResponseCode field's value. func (s *GetCommandInvocationOutput) SetResponseCode(v int64) *GetCommandInvocationOutput { s.ResponseCode = &v return s } // SetStandardErrorContent sets the StandardErrorContent field's value. func (s *GetCommandInvocationOutput) SetStandardErrorContent(v string) *GetCommandInvocationOutput { s.StandardErrorContent = &v return s } // SetStandardErrorUrl sets the StandardErrorUrl field's value. func (s *GetCommandInvocationOutput) SetStandardErrorUrl(v string) *GetCommandInvocationOutput { s.StandardErrorUrl = &v return s } // SetStandardOutputContent sets the StandardOutputContent field's value. func (s *GetCommandInvocationOutput) SetStandardOutputContent(v string) *GetCommandInvocationOutput { s.StandardOutputContent = &v return s } // SetStandardOutputUrl sets the StandardOutputUrl field's value. func (s *GetCommandInvocationOutput) SetStandardOutputUrl(v string) *GetCommandInvocationOutput { s.StandardOutputUrl = &v return s } // SetStatus sets the Status field's value. func (s *GetCommandInvocationOutput) SetStatus(v string) *GetCommandInvocationOutput { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *GetCommandInvocationOutput) SetStatusDetails(v string) *GetCommandInvocationOutput { s.StatusDetails = &v return s } type GetConnectionStatusInput struct { _ struct{} `type:"structure"` // The managed node ID. // // Target is a required field Target *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetConnectionStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetConnectionStatusInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetConnectionStatusInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetConnectionStatusInput"} 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 } return nil } // SetTarget sets the Target field's value. func (s *GetConnectionStatusInput) SetTarget(v string) *GetConnectionStatusInput { s.Target = &v return s } type GetConnectionStatusOutput struct { _ struct{} `type:"structure"` // The status of the connection to the managed node. For example, 'Connected' // or 'Not Connected'. Status *string `type:"string" enum:"ConnectionStatus"` // The ID of the managed node to check connection status. Target *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetConnectionStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetConnectionStatusOutput) GoString() string { return s.String() } // SetStatus sets the Status field's value. func (s *GetConnectionStatusOutput) SetStatus(v string) *GetConnectionStatusOutput { s.Status = &v return s } // SetTarget sets the Target field's value. func (s *GetConnectionStatusOutput) SetTarget(v string) *GetConnectionStatusOutput { s.Target = &v return s } type GetDefaultPatchBaselineInput struct { _ struct{} `type:"structure"` // Returns the default patch baseline for the specified operating system. OperatingSystem *string `type:"string" enum:"OperatingSystem"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDefaultPatchBaselineInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDefaultPatchBaselineInput) GoString() string { return s.String() } // SetOperatingSystem sets the OperatingSystem field's value. func (s *GetDefaultPatchBaselineInput) SetOperatingSystem(v string) *GetDefaultPatchBaselineInput { s.OperatingSystem = &v return s } type GetDefaultPatchBaselineOutput struct { _ struct{} `type:"structure"` // The ID of the default patch baseline. BaselineId *string `min:"20" type:"string"` // The operating system for the returned patch baseline. OperatingSystem *string `type:"string" enum:"OperatingSystem"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDefaultPatchBaselineOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDefaultPatchBaselineOutput) GoString() string { return s.String() } // SetBaselineId sets the BaselineId field's value. func (s *GetDefaultPatchBaselineOutput) SetBaselineId(v string) *GetDefaultPatchBaselineOutput { s.BaselineId = &v return s } // SetOperatingSystem sets the OperatingSystem field's value. func (s *GetDefaultPatchBaselineOutput) SetOperatingSystem(v string) *GetDefaultPatchBaselineOutput { s.OperatingSystem = &v return s } type GetDeployablePatchSnapshotForInstanceInput struct { _ struct{} `type:"structure"` // Defines the basic information about a patch baseline override. BaselineOverride *BaselineOverride `type:"structure"` // The ID of the managed node for which the appropriate patch snapshot should // be retrieved. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The snapshot ID provided by the user when running AWS-RunPatchBaseline. // // SnapshotId is a required field SnapshotId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDeployablePatchSnapshotForInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDeployablePatchSnapshotForInstanceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetDeployablePatchSnapshotForInstanceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetDeployablePatchSnapshotForInstanceInput"} if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.SnapshotId == nil { invalidParams.Add(request.NewErrParamRequired("SnapshotId")) } if s.SnapshotId != nil && len(*s.SnapshotId) < 36 { invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 36)) } if s.BaselineOverride != nil { if err := s.BaselineOverride.Validate(); err != nil { invalidParams.AddNested("BaselineOverride", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBaselineOverride sets the BaselineOverride field's value. func (s *GetDeployablePatchSnapshotForInstanceInput) SetBaselineOverride(v *BaselineOverride) *GetDeployablePatchSnapshotForInstanceInput { s.BaselineOverride = v return s } // SetInstanceId sets the InstanceId field's value. func (s *GetDeployablePatchSnapshotForInstanceInput) SetInstanceId(v string) *GetDeployablePatchSnapshotForInstanceInput { s.InstanceId = &v return s } // SetSnapshotId sets the SnapshotId field's value. func (s *GetDeployablePatchSnapshotForInstanceInput) SetSnapshotId(v string) *GetDeployablePatchSnapshotForInstanceInput { s.SnapshotId = &v return s } type GetDeployablePatchSnapshotForInstanceOutput struct { _ struct{} `type:"structure"` // The managed node ID. InstanceId *string `type:"string"` // Returns the specific operating system (for example Windows Server 2012 or // Amazon Linux 2015.09) on the managed node for the specified patch snapshot. Product *string `type:"string"` // A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used // to download the patch snapshot. SnapshotDownloadUrl *string `type:"string"` // The user-defined snapshot ID. SnapshotId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDeployablePatchSnapshotForInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDeployablePatchSnapshotForInstanceOutput) GoString() string { return s.String() } // SetInstanceId sets the InstanceId field's value. func (s *GetDeployablePatchSnapshotForInstanceOutput) SetInstanceId(v string) *GetDeployablePatchSnapshotForInstanceOutput { s.InstanceId = &v return s } // SetProduct sets the Product field's value. func (s *GetDeployablePatchSnapshotForInstanceOutput) SetProduct(v string) *GetDeployablePatchSnapshotForInstanceOutput { s.Product = &v return s } // SetSnapshotDownloadUrl sets the SnapshotDownloadUrl field's value. func (s *GetDeployablePatchSnapshotForInstanceOutput) SetSnapshotDownloadUrl(v string) *GetDeployablePatchSnapshotForInstanceOutput { s.SnapshotDownloadUrl = &v return s } // SetSnapshotId sets the SnapshotId field's value. func (s *GetDeployablePatchSnapshotForInstanceOutput) SetSnapshotId(v string) *GetDeployablePatchSnapshotForInstanceOutput { s.SnapshotId = &v return s } type GetDocumentInput struct { _ struct{} `type:"structure"` // Returns the document in the specified format. The document format can be // either JSON or YAML. JSON is the default format. DocumentFormat *string `type:"string" enum:"DocumentFormat"` // The document version for which you want information. DocumentVersion *string `type:"string"` // The name of the SSM document. // // 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 can't be changed. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDocumentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDocumentInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetDocumentInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetDocumentInput"} if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDocumentFormat sets the DocumentFormat field's value. func (s *GetDocumentInput) SetDocumentFormat(v string) *GetDocumentInput { s.DocumentFormat = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *GetDocumentInput) SetDocumentVersion(v string) *GetDocumentInput { s.DocumentVersion = &v return s } // SetName sets the Name field's value. func (s *GetDocumentInput) SetName(v string) *GetDocumentInput { s.Name = &v 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, // and so on. AttachmentsContent []*AttachmentContent `type:"list"` // The contents of the SSM document. Content *string `min:"1" type:"string"` // The date the SSM document was created. CreatedDate *time.Time `type:"timestamp"` // The friendly name of the SSM document. This value can differ for each version // of the document. If you want to update this value, see UpdateDocument. DisplayName *string `type:"string"` // The document format, either JSON or YAML. DocumentFormat *string `type:"string" enum:"DocumentFormat"` // The document type. DocumentType *string `type:"string" enum:"DocumentType"` // The document version. DocumentVersion *string `type:"string"` // The name of the SSM document. Name *string `type:"string"` // A list of SSM documents required by a document. For example, an ApplicationConfiguration // document requires an ApplicationConfigurationSchema document. Requires []*DocumentRequires `min:"1" type:"list"` // The current review status of a new custom Systems Manager document (SSM document) // created by a member of your organization, or of the latest version of an // existing SSM document. // // Only one version of an SSM document can be in the APPROVED state at a time. // When a new version is approved, the status of the previous version changes // to REJECTED. // // Only one version of an SSM document can be in review, or PENDING, at a time. ReviewStatus *string `type:"string" enum:"ReviewStatus"` // The status of the SSM document, such as Creating, Active, Updating, Failed, // and Deleting. Status *string `type:"string" enum:"DocumentStatus"` // A message returned by Amazon Web Services Systems Manager that explains the // Status value. For example, a Failed status might be explained by the StatusInformation // message, "The specified S3 bucket doesn't 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 // can't be changed. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetDocumentOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 return s } // SetCreatedDate sets the CreatedDate field's value. func (s *GetDocumentOutput) SetCreatedDate(v time.Time) *GetDocumentOutput { s.CreatedDate = &v return s } // SetDisplayName sets the DisplayName field's value. func (s *GetDocumentOutput) SetDisplayName(v string) *GetDocumentOutput { s.DisplayName = &v return s } // SetDocumentFormat sets the DocumentFormat field's value. func (s *GetDocumentOutput) SetDocumentFormat(v string) *GetDocumentOutput { s.DocumentFormat = &v return s } // SetDocumentType sets the DocumentType field's value. func (s *GetDocumentOutput) SetDocumentType(v string) *GetDocumentOutput { s.DocumentType = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *GetDocumentOutput) SetDocumentVersion(v string) *GetDocumentOutput { s.DocumentVersion = &v return s } // SetName sets the Name field's value. func (s *GetDocumentOutput) SetName(v string) *GetDocumentOutput { s.Name = &v return s } // SetRequires sets the Requires field's value. func (s *GetDocumentOutput) SetRequires(v []*DocumentRequires) *GetDocumentOutput { s.Requires = v return s } // SetReviewStatus sets the ReviewStatus field's value. func (s *GetDocumentOutput) SetReviewStatus(v string) *GetDocumentOutput { s.ReviewStatus = &v 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"` // Returns counts of inventory types based on one or more expressions. For example, // if you aggregate by using an expression that uses the AWS:InstanceInformation.PlatformType // type, you can see a count of how many Windows and Linux managed nodes exist // in your inventoried fleet. Aggregators []*InventoryAggregator `min:"1" type:"list"` // One or more filters. Use a filter to return a more specific list of results. Filters []*InventoryFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The list of inventory item types to return. ResultAttributes []*ResultAttribute `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetInventoryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetInventoryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetInventoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetInventoryInput"} if s.Aggregators != nil && len(s.Aggregators) < 1 { invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.ResultAttributes != nil && len(s.ResultAttributes) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResultAttributes", 1)) } if s.Aggregators != nil { for i, v := range s.Aggregators { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) } } } if s.Filters != nil { for i, v := range s.Filters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) } } } if s.ResultAttributes != nil { for i, v := range s.ResultAttributes { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResultAttributes", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAggregators sets the Aggregators field's value. func (s *GetInventoryInput) SetAggregators(v []*InventoryAggregator) *GetInventoryInput { s.Aggregators = v return s } // SetFilters sets the Filters field's value. func (s *GetInventoryInput) SetFilters(v []*InventoryFilter) *GetInventoryInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *GetInventoryInput) SetMaxResults(v int64) *GetInventoryInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetInventoryInput) SetNextToken(v string) *GetInventoryInput { s.NextToken = &v return s } // SetResultAttributes sets the ResultAttributes field's value. func (s *GetInventoryInput) SetResultAttributes(v []*ResultAttribute) *GetInventoryInput { s.ResultAttributes = v return s } type GetInventoryOutput struct { _ struct{} `type:"structure"` // Collection of inventory entities such as a collection of managed node inventory. Entities []*InventoryResultEntity `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetInventoryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetInventoryOutput) GoString() string { return s.String() } // SetEntities sets the Entities field's value. func (s *GetInventoryOutput) SetEntities(v []*InventoryResultEntity) *GetInventoryOutput { s.Entities = v return s } // SetNextToken sets the NextToken field's value. func (s *GetInventoryOutput) SetNextToken(v string) *GetInventoryOutput { s.NextToken = &v return s } type GetInventorySchemaInput struct { _ struct{} `type:"structure"` // Returns inventory schemas that support aggregation. For example, this call // returns the AWS:InstanceInformation type, because it supports aggregation // based on the PlatformName, PlatformType, and PlatformVersion attributes. Aggregator *bool `type:"boolean"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"50" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // Returns the sub-type schema for a specified inventory type. SubType *bool `type:"boolean"` // The type of inventory item to return. TypeName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetInventorySchemaInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetInventorySchemaInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetInventorySchemaInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetInventorySchemaInput"} if s.MaxResults != nil && *s.MaxResults < 50 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 50)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAggregator sets the Aggregator field's value. func (s *GetInventorySchemaInput) SetAggregator(v bool) *GetInventorySchemaInput { s.Aggregator = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *GetInventorySchemaInput) SetMaxResults(v int64) *GetInventorySchemaInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetInventorySchemaInput) SetNextToken(v string) *GetInventorySchemaInput { s.NextToken = &v return s } // SetSubType sets the SubType field's value. func (s *GetInventorySchemaInput) SetSubType(v bool) *GetInventorySchemaInput { s.SubType = &v return s } // SetTypeName sets the TypeName field's value. func (s *GetInventorySchemaInput) SetTypeName(v string) *GetInventorySchemaInput { s.TypeName = &v return s } type GetInventorySchemaOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // Inventory schemas returned by the request. Schemas []*InventoryItemSchema `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetInventorySchemaOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetInventorySchemaOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *GetInventorySchemaOutput) SetNextToken(v string) *GetInventorySchemaOutput { s.NextToken = &v return s } // SetSchemas sets the Schemas field's value. func (s *GetInventorySchemaOutput) SetSchemas(v []*InventoryItemSchema) *GetInventorySchemaOutput { s.Schemas = v return s } type GetMaintenanceWindowExecutionInput struct { _ struct{} `type:"structure"` // The ID of the maintenance window execution that includes the task. // // WindowExecutionId is a required field WindowExecutionId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetMaintenanceWindowExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowExecutionInput"} if s.WindowExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) } if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *GetMaintenanceWindowExecutionInput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionInput { s.WindowExecutionId = &v return s } type GetMaintenanceWindowExecutionOutput struct { _ struct{} `type:"structure"` // The time the maintenance window finished running. EndTime *time.Time `type:"timestamp"` // The time the maintenance window started running. StartTime *time.Time `type:"timestamp"` // The status of the maintenance window execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` // The details explaining the status. Not available for all status values. StatusDetails *string `type:"string"` // The ID of the task executions from the maintenance window execution. TaskIds []*string `type:"list"` // The ID of the maintenance window execution. WindowExecutionId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionOutput) GoString() string { return s.String() } // SetEndTime sets the EndTime field's value. func (s *GetMaintenanceWindowExecutionOutput) SetEndTime(v time.Time) *GetMaintenanceWindowExecutionOutput { s.EndTime = &v return s } // SetStartTime sets the StartTime field's value. func (s *GetMaintenanceWindowExecutionOutput) SetStartTime(v time.Time) *GetMaintenanceWindowExecutionOutput { s.StartTime = &v return s } // SetStatus sets the Status field's value. func (s *GetMaintenanceWindowExecutionOutput) SetStatus(v string) *GetMaintenanceWindowExecutionOutput { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *GetMaintenanceWindowExecutionOutput) SetStatusDetails(v string) *GetMaintenanceWindowExecutionOutput { s.StatusDetails = &v return s } // SetTaskIds sets the TaskIds field's value. func (s *GetMaintenanceWindowExecutionOutput) SetTaskIds(v []*string) *GetMaintenanceWindowExecutionOutput { s.TaskIds = v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *GetMaintenanceWindowExecutionOutput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionOutput { s.WindowExecutionId = &v return s } type GetMaintenanceWindowExecutionTaskInput struct { _ struct{} `type:"structure"` // The ID of the specific task execution in the maintenance window task that // should be retrieved. // // TaskId is a required field TaskId *string `min:"36" type:"string" required:"true"` // The ID of the maintenance window execution that includes the task. // // WindowExecutionId is a required field WindowExecutionId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionTaskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionTaskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetMaintenanceWindowExecutionTaskInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowExecutionTaskInput"} if s.TaskId == nil { invalidParams.Add(request.NewErrParamRequired("TaskId")) } if s.TaskId != nil && len(*s.TaskId) < 36 { invalidParams.Add(request.NewErrParamMinLen("TaskId", 36)) } if s.WindowExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) } if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetTaskId sets the TaskId field's value. func (s *GetMaintenanceWindowExecutionTaskInput) SetTaskId(v string) *GetMaintenanceWindowExecutionTaskInput { s.TaskId = &v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *GetMaintenanceWindowExecutionTaskInput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskInput { s.WindowExecutionId = &v return s } type GetMaintenanceWindowExecutionTaskInvocationInput struct { _ struct{} `type:"structure"` // The invocation ID to retrieve. // // InvocationId is a required field InvocationId *string `min:"36" type:"string" required:"true"` // The ID of the specific task in the maintenance window task that should be // retrieved. // // TaskId is a required field TaskId *string `min:"36" type:"string" required:"true"` // The ID of the maintenance window execution for which the task is a part. // // WindowExecutionId is a required field WindowExecutionId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionTaskInvocationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionTaskInvocationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetMaintenanceWindowExecutionTaskInvocationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowExecutionTaskInvocationInput"} if s.InvocationId == nil { invalidParams.Add(request.NewErrParamRequired("InvocationId")) } if s.InvocationId != nil && len(*s.InvocationId) < 36 { invalidParams.Add(request.NewErrParamMinLen("InvocationId", 36)) } if s.TaskId == nil { invalidParams.Add(request.NewErrParamRequired("TaskId")) } if s.TaskId != nil && len(*s.TaskId) < 36 { invalidParams.Add(request.NewErrParamMinLen("TaskId", 36)) } if s.WindowExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) } if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetInvocationId sets the InvocationId field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationInput) SetInvocationId(v string) *GetMaintenanceWindowExecutionTaskInvocationInput { s.InvocationId = &v return s } // SetTaskId sets the TaskId field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationInput) SetTaskId(v string) *GetMaintenanceWindowExecutionTaskInvocationInput { s.TaskId = &v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationInput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskInvocationInput { s.WindowExecutionId = &v return s } type GetMaintenanceWindowExecutionTaskInvocationOutput struct { _ struct{} `type:"structure"` // The time that the task finished running on the target. EndTime *time.Time `type:"timestamp"` // The execution ID. ExecutionId *string `type:"string"` // The invocation ID. InvocationId *string `min:"36" type:"string"` // User-provided value to be included in any Amazon CloudWatch Events or Amazon // EventBridge events raised while running tasks for these targets in this maintenance // window. // // OwnerInformation is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by GetMaintenanceWindowExecutionTaskInvocationOutput's // String and GoString methods. OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The parameters used at the time that the task ran. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by GetMaintenanceWindowExecutionTaskInvocationOutput's // String and GoString methods. Parameters *string `type:"string" sensitive:"true"` // The time that the task started running on the target. StartTime *time.Time `type:"timestamp"` // The task status for an invocation. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` // The details explaining the status. Details are only available for certain // status values. StatusDetails *string `type:"string"` // The task execution ID. TaskExecutionId *string `min:"36" type:"string"` // Retrieves the task type for a maintenance window. TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` // The maintenance window execution ID. WindowExecutionId *string `min:"36" type:"string"` // The maintenance window target ID. WindowTargetId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionTaskInvocationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionTaskInvocationOutput) GoString() string { return s.String() } // SetEndTime sets the EndTime field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetEndTime(v time.Time) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.EndTime = &v return s } // SetExecutionId sets the ExecutionId field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetExecutionId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.ExecutionId = &v return s } // SetInvocationId sets the InvocationId field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetInvocationId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.InvocationId = &v return s } // SetOwnerInformation sets the OwnerInformation field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetOwnerInformation(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.OwnerInformation = &v return s } // SetParameters sets the Parameters field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetParameters(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.Parameters = &v return s } // SetStartTime sets the StartTime field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetStartTime(v time.Time) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.StartTime = &v return s } // SetStatus sets the Status field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetStatus(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetStatusDetails(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.StatusDetails = &v return s } // SetTaskExecutionId sets the TaskExecutionId field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetTaskExecutionId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.TaskExecutionId = &v return s } // SetTaskType sets the TaskType field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetTaskType(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.TaskType = &v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.WindowExecutionId = &v return s } // SetWindowTargetId sets the WindowTargetId field's value. func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetWindowTargetId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput { s.WindowTargetId = &v return s } type GetMaintenanceWindowExecutionTaskOutput struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm you applied to your maintenance window // task. AlarmConfiguration *AlarmConfiguration `type:"structure"` // The time the task execution completed. EndTime *time.Time `type:"timestamp"` // The defined maximum number of task executions that could be run in parallel. MaxConcurrency *string `min:"1" type:"string"` // The defined maximum number of task execution errors allowed before scheduling // of the task execution would have been stopped. MaxErrors *string `min:"1" type:"string"` // The priority of the task. Priority *int64 `type:"integer"` // The role that was assumed when running the task. ServiceRole *string `type:"string"` // The time the task execution started. StartTime *time.Time `type:"timestamp"` // The status of the task. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` // The details explaining the status. Not available for all status values. StatusDetails *string `type:"string"` // The Amazon Resource Name (ARN) of the task that ran. TaskArn *string `min:"1" type:"string"` // The ID of the specific task execution in the maintenance window task that // was retrieved. TaskExecutionId *string `min:"36" type:"string"` // The parameters passed to the task when it was run. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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. // // The map has the following format: // // * Key: string, between 1 and 255 characters // // * Value: an array of strings, each between 1 and 255 characters // // TaskParameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by GetMaintenanceWindowExecutionTaskOutput's // String and GoString methods. TaskParameters []map[string]*MaintenanceWindowTaskParameterValueExpression `type:"list" sensitive:"true"` // The CloudWatch alarms that were invoked by the maintenance window task. TriggeredAlarms []*AlarmStateInformation `min:"1" type:"list"` // The type of task that was run. Type *string `type:"string" enum:"MaintenanceWindowTaskType"` // The ID of the maintenance window execution that includes the task. WindowExecutionId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionTaskOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowExecutionTaskOutput) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetAlarmConfiguration(v *AlarmConfiguration) *GetMaintenanceWindowExecutionTaskOutput { s.AlarmConfiguration = v return s } // SetEndTime sets the EndTime field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetEndTime(v time.Time) *GetMaintenanceWindowExecutionTaskOutput { s.EndTime = &v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetMaxConcurrency(v string) *GetMaintenanceWindowExecutionTaskOutput { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetMaxErrors(v string) *GetMaintenanceWindowExecutionTaskOutput { s.MaxErrors = &v return s } // SetPriority sets the Priority field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetPriority(v int64) *GetMaintenanceWindowExecutionTaskOutput { s.Priority = &v return s } // SetServiceRole sets the ServiceRole field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetServiceRole(v string) *GetMaintenanceWindowExecutionTaskOutput { s.ServiceRole = &v return s } // SetStartTime sets the StartTime field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetStartTime(v time.Time) *GetMaintenanceWindowExecutionTaskOutput { s.StartTime = &v return s } // SetStatus sets the Status field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetStatus(v string) *GetMaintenanceWindowExecutionTaskOutput { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetStatusDetails(v string) *GetMaintenanceWindowExecutionTaskOutput { s.StatusDetails = &v return s } // SetTaskArn sets the TaskArn field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetTaskArn(v string) *GetMaintenanceWindowExecutionTaskOutput { s.TaskArn = &v return s } // SetTaskExecutionId sets the TaskExecutionId field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetTaskExecutionId(v string) *GetMaintenanceWindowExecutionTaskOutput { s.TaskExecutionId = &v return s } // SetTaskParameters sets the TaskParameters field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetTaskParameters(v []map[string]*MaintenanceWindowTaskParameterValueExpression) *GetMaintenanceWindowExecutionTaskOutput { s.TaskParameters = v return s } // SetTriggeredAlarms sets the TriggeredAlarms field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetTriggeredAlarms(v []*AlarmStateInformation) *GetMaintenanceWindowExecutionTaskOutput { s.TriggeredAlarms = v return s } // SetType sets the Type field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetType(v string) *GetMaintenanceWindowExecutionTaskOutput { s.Type = &v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *GetMaintenanceWindowExecutionTaskOutput) SetWindowExecutionId(v string) *GetMaintenanceWindowExecutionTaskOutput { s.WindowExecutionId = &v return s } type GetMaintenanceWindowInput struct { _ struct{} `type:"structure"` // The ID of the maintenance window for which you want to retrieve information. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetMaintenanceWindowInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowInput"} if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetWindowId sets the WindowId field's value. func (s *GetMaintenanceWindowInput) SetWindowId(v string) *GetMaintenanceWindowInput { s.WindowId = &v return s } type GetMaintenanceWindowOutput struct { _ struct{} `type:"structure"` // Whether targets must be registered with the maintenance window before tasks // can be defined for those targets. AllowUnassociatedTargets *bool `type:"boolean"` // The date the maintenance window was created. CreatedDate *time.Time `type:"timestamp"` // The number of hours before the end of the maintenance window that Amazon // Web Services Systems Manager stops scheduling new tasks for execution. Cutoff *int64 `type:"integer"` // The description of the maintenance window. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by GetMaintenanceWindowOutput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the maintenance window in hours. Duration *int64 `min:"1" type:"integer"` // Indicates whether the maintenance window is enabled. Enabled *bool `type:"boolean"` // The date and time, in ISO-8601 Extended format, for when the maintenance // window is scheduled to become inactive. The maintenance window won't run // after this specified time. EndDate *string `type:"string"` // The date the maintenance window was last modified. ModifiedDate *time.Time `type:"timestamp"` // The name of the maintenance window. Name *string `min:"3" type:"string"` // The next time the maintenance window will actually run, taking into account // any specified times for the maintenance window to become active or inactive. NextExecutionTime *string `type:"string"` // The schedule of the maintenance window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` // The number of days to wait to run a maintenance window after the scheduled // cron expression date and time. ScheduleOffset *int64 `min:"1" type:"integer"` // The time zone that the scheduled maintenance window executions are based // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", // "UTC", or "Asia/Seoul". For more information, see the Time Zone Database // (https://www.iana.org/time-zones) on the IANA website. ScheduleTimezone *string `type:"string"` // The date and time, in ISO-8601 Extended format, for when the maintenance // window is scheduled to become active. The maintenance window won't run before // this specified time. StartDate *string `type:"string"` // The ID of the created maintenance window. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowOutput) GoString() string { return s.String() } // SetAllowUnassociatedTargets sets the AllowUnassociatedTargets field's value. func (s *GetMaintenanceWindowOutput) SetAllowUnassociatedTargets(v bool) *GetMaintenanceWindowOutput { s.AllowUnassociatedTargets = &v return s } // SetCreatedDate sets the CreatedDate field's value. func (s *GetMaintenanceWindowOutput) SetCreatedDate(v time.Time) *GetMaintenanceWindowOutput { s.CreatedDate = &v return s } // SetCutoff sets the Cutoff field's value. func (s *GetMaintenanceWindowOutput) SetCutoff(v int64) *GetMaintenanceWindowOutput { s.Cutoff = &v return s } // SetDescription sets the Description field's value. func (s *GetMaintenanceWindowOutput) SetDescription(v string) *GetMaintenanceWindowOutput { s.Description = &v return s } // SetDuration sets the Duration field's value. func (s *GetMaintenanceWindowOutput) SetDuration(v int64) *GetMaintenanceWindowOutput { s.Duration = &v return s } // SetEnabled sets the Enabled field's value. func (s *GetMaintenanceWindowOutput) SetEnabled(v bool) *GetMaintenanceWindowOutput { s.Enabled = &v return s } // SetEndDate sets the EndDate field's value. func (s *GetMaintenanceWindowOutput) SetEndDate(v string) *GetMaintenanceWindowOutput { s.EndDate = &v return s } // SetModifiedDate sets the ModifiedDate field's value. func (s *GetMaintenanceWindowOutput) SetModifiedDate(v time.Time) *GetMaintenanceWindowOutput { s.ModifiedDate = &v return s } // SetName sets the Name field's value. func (s *GetMaintenanceWindowOutput) SetName(v string) *GetMaintenanceWindowOutput { s.Name = &v return s } // SetNextExecutionTime sets the NextExecutionTime field's value. func (s *GetMaintenanceWindowOutput) SetNextExecutionTime(v string) *GetMaintenanceWindowOutput { s.NextExecutionTime = &v return s } // SetSchedule sets the Schedule field's value. func (s *GetMaintenanceWindowOutput) SetSchedule(v string) *GetMaintenanceWindowOutput { s.Schedule = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *GetMaintenanceWindowOutput) SetScheduleOffset(v int64) *GetMaintenanceWindowOutput { s.ScheduleOffset = &v return s } // SetScheduleTimezone sets the ScheduleTimezone field's value. func (s *GetMaintenanceWindowOutput) SetScheduleTimezone(v string) *GetMaintenanceWindowOutput { s.ScheduleTimezone = &v return s } // SetStartDate sets the StartDate field's value. func (s *GetMaintenanceWindowOutput) SetStartDate(v string) *GetMaintenanceWindowOutput { s.StartDate = &v return s } // SetWindowId sets the WindowId field's value. func (s *GetMaintenanceWindowOutput) SetWindowId(v string) *GetMaintenanceWindowOutput { s.WindowId = &v return s } type GetMaintenanceWindowTaskInput struct { _ struct{} `type:"structure"` // The maintenance window ID that includes the task to retrieve. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` // The maintenance window task ID to retrieve. // // WindowTaskId is a required field WindowTaskId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowTaskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowTaskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetMaintenanceWindowTaskInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetMaintenanceWindowTaskInput"} if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.WindowTaskId == nil { invalidParams.Add(request.NewErrParamRequired("WindowTaskId")) } if s.WindowTaskId != nil && len(*s.WindowTaskId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowTaskId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetWindowId sets the WindowId field's value. func (s *GetMaintenanceWindowTaskInput) SetWindowId(v string) *GetMaintenanceWindowTaskInput { s.WindowId = &v return s } // SetWindowTaskId sets the WindowTaskId field's value. func (s *GetMaintenanceWindowTaskInput) SetWindowTaskId(v string) *GetMaintenanceWindowTaskInput { s.WindowTaskId = &v return s } type GetMaintenanceWindowTaskOutput struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm you applied to your maintenance window // task. AlarmConfiguration *AlarmConfiguration `type:"structure"` // The action to take on tasks when the maintenance window cutoff time is reached. // CONTINUE_TASK means that tasks continue to run. For Automation, Lambda, Step // Functions tasks, CANCEL_TASK means that currently running task invocations // continue, but no new task invocations are started. For Run Command tasks, // CANCEL_TASK means the system attempts to stop the task by sending a CancelCommand // operation. CutoffBehavior *string `type:"string" enum:"MaintenanceWindowTaskCutoffBehavior"` // The retrieved task description. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by GetMaintenanceWindowTaskOutput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The location in Amazon Simple Storage Service (Amazon S3) where the task // results are logged. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets allowed to run this task in parallel. // // For maintenance window tasks without a target specified, you can't supply // a value for this option. Instead, the system inserts a placeholder value // of 1, which may be reported in the response to this command. This value doesn't // affect the running of your task and can be ignored. MaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed before the task stops being scheduled. // // For maintenance window tasks without a target specified, you can't supply // a value for this option. Instead, the system inserts a placeholder value // of 1, which may be reported in the response to this command. This value doesn't // affect the running of your task and can be ignored. MaxErrors *string `min:"1" type:"string"` // The retrieved task name. Name *string `min:"3" type:"string"` // The priority of the task when it runs. The lower the number, the higher the // priority. Tasks that have the same priority are scheduled in parallel. Priority *int64 `type:"integer"` // The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) // service role to use to publish Amazon Simple Notification Service (Amazon // SNS) notifications for maintenance window Run Command tasks. ServiceRoleArn *string `type:"string"` // The targets where the task should run. Targets []*Target `type:"list"` // The resource that the task used during execution. For RUN_COMMAND and AUTOMATION // task types, the value of TaskArn is the SSM document name/ARN. For LAMBDA // tasks, the value is the function name/ARN. For STEP_FUNCTIONS tasks, the // value is the state machine ARN. TaskArn *string `min:"1" type:"string"` // The parameters to pass to the task when it runs. TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The parameters to pass to the task when it runs. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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 is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by GetMaintenanceWindowTaskOutput's // String and GoString methods. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The type of task to run. TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` // The retrieved maintenance window ID. WindowId *string `min:"20" type:"string"` // The retrieved maintenance window task ID. WindowTaskId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowTaskOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetMaintenanceWindowTaskOutput) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *GetMaintenanceWindowTaskOutput) SetAlarmConfiguration(v *AlarmConfiguration) *GetMaintenanceWindowTaskOutput { s.AlarmConfiguration = v return s } // SetCutoffBehavior sets the CutoffBehavior field's value. func (s *GetMaintenanceWindowTaskOutput) SetCutoffBehavior(v string) *GetMaintenanceWindowTaskOutput { s.CutoffBehavior = &v return s } // SetDescription sets the Description field's value. func (s *GetMaintenanceWindowTaskOutput) SetDescription(v string) *GetMaintenanceWindowTaskOutput { s.Description = &v return s } // SetLoggingInfo sets the LoggingInfo field's value. func (s *GetMaintenanceWindowTaskOutput) SetLoggingInfo(v *LoggingInfo) *GetMaintenanceWindowTaskOutput { s.LoggingInfo = v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *GetMaintenanceWindowTaskOutput) SetMaxConcurrency(v string) *GetMaintenanceWindowTaskOutput { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *GetMaintenanceWindowTaskOutput) SetMaxErrors(v string) *GetMaintenanceWindowTaskOutput { s.MaxErrors = &v return s } // SetName sets the Name field's value. func (s *GetMaintenanceWindowTaskOutput) SetName(v string) *GetMaintenanceWindowTaskOutput { s.Name = &v return s } // SetPriority sets the Priority field's value. func (s *GetMaintenanceWindowTaskOutput) SetPriority(v int64) *GetMaintenanceWindowTaskOutput { s.Priority = &v return s } // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *GetMaintenanceWindowTaskOutput) SetServiceRoleArn(v string) *GetMaintenanceWindowTaskOutput { s.ServiceRoleArn = &v return s } // SetTargets sets the Targets field's value. func (s *GetMaintenanceWindowTaskOutput) SetTargets(v []*Target) *GetMaintenanceWindowTaskOutput { s.Targets = v return s } // SetTaskArn sets the TaskArn field's value. func (s *GetMaintenanceWindowTaskOutput) SetTaskArn(v string) *GetMaintenanceWindowTaskOutput { s.TaskArn = &v return s } // SetTaskInvocationParameters sets the TaskInvocationParameters field's value. func (s *GetMaintenanceWindowTaskOutput) SetTaskInvocationParameters(v *MaintenanceWindowTaskInvocationParameters) *GetMaintenanceWindowTaskOutput { s.TaskInvocationParameters = v return s } // SetTaskParameters sets the TaskParameters field's value. func (s *GetMaintenanceWindowTaskOutput) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *GetMaintenanceWindowTaskOutput { s.TaskParameters = v return s } // SetTaskType sets the TaskType field's value. func (s *GetMaintenanceWindowTaskOutput) SetTaskType(v string) *GetMaintenanceWindowTaskOutput { s.TaskType = &v return s } // SetWindowId sets the WindowId field's value. func (s *GetMaintenanceWindowTaskOutput) SetWindowId(v string) *GetMaintenanceWindowTaskOutput { s.WindowId = &v return s } // SetWindowTaskId sets the WindowTaskId field's value. func (s *GetMaintenanceWindowTaskOutput) SetWindowTaskId(v string) *GetMaintenanceWindowTaskOutput { s.WindowTaskId = &v return s } type GetOpsItemInput struct { _ struct{} `type:"structure"` // The OpsItem Amazon Resource Name (ARN). OpsItemArn *string `min:"20" type:"string"` // The ID of the OpsItem that you want to get. // // OpsItemId is a required field OpsItemId *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetOpsItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetOpsItemInput"} if s.OpsItemArn != nil && len(*s.OpsItemArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("OpsItemArn", 20)) } if s.OpsItemId == nil { invalidParams.Add(request.NewErrParamRequired("OpsItemId")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOpsItemArn sets the OpsItemArn field's value. func (s *GetOpsItemInput) SetOpsItemArn(v string) *GetOpsItemInput { s.OpsItemArn = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *GetOpsItemInput) SetOpsItemId(v string) *GetOpsItemInput { s.OpsItemId = &v return s } type GetOpsItemOutput struct { _ struct{} `type:"structure"` // The OpsItem. OpsItem *OpsItem `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsItemOutput) GoString() string { return s.String() } // SetOpsItem sets the OpsItem field's value. func (s *GetOpsItemOutput) SetOpsItem(v *OpsItem) *GetOpsItemOutput { s.OpsItem = v return s } type GetOpsMetadataInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` // The Amazon Resource Name (ARN) of an OpsMetadata Object to view. // // OpsMetadataArn is a required field OpsMetadataArn *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsMetadataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsMetadataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetOpsMetadataInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetOpsMetadataInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.OpsMetadataArn == nil { invalidParams.Add(request.NewErrParamRequired("OpsMetadataArn")) } if s.OpsMetadataArn != nil && len(*s.OpsMetadataArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("OpsMetadataArn", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *GetOpsMetadataInput) SetMaxResults(v int64) *GetOpsMetadataInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetOpsMetadataInput) SetNextToken(v string) *GetOpsMetadataInput { s.NextToken = &v return s } // SetOpsMetadataArn sets the OpsMetadataArn field's value. func (s *GetOpsMetadataInput) SetOpsMetadataArn(v string) *GetOpsMetadataInput { s.OpsMetadataArn = &v return s } type GetOpsMetadataOutput struct { _ struct{} `type:"structure"` // OpsMetadata for an Application Manager application. Metadata map[string]*MetadataValue `min:"1" type:"map"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // The resource ID of the Application Manager application. ResourceId *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsMetadataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsMetadataOutput) GoString() string { return s.String() } // SetMetadata sets the Metadata field's value. func (s *GetOpsMetadataOutput) SetMetadata(v map[string]*MetadataValue) *GetOpsMetadataOutput { s.Metadata = v return s } // SetNextToken sets the NextToken field's value. func (s *GetOpsMetadataOutput) SetNextToken(v string) *GetOpsMetadataOutput { s.NextToken = &v return s } // SetResourceId sets the ResourceId field's value. func (s *GetOpsMetadataOutput) SetResourceId(v string) *GetOpsMetadataOutput { s.ResourceId = &v return s } type GetOpsSummaryInput struct { _ struct{} `type:"structure"` // Optional aggregators that return counts of OpsData based on one or more expressions. Aggregators []*OpsAggregator `min:"1" type:"list"` // Optional filters used to scope down the returned OpsData. Filters []*OpsFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` // The OpsData data type to return. ResultAttributes []*OpsResultAttribute `min:"1" type:"list"` // Specify the name of a resource data sync to get. SyncName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsSummaryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsSummaryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetOpsSummaryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetOpsSummaryInput"} if s.Aggregators != nil && len(s.Aggregators) < 1 { invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.ResultAttributes != nil && len(s.ResultAttributes) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResultAttributes", 1)) } if s.SyncName != nil && len(*s.SyncName) < 1 { invalidParams.Add(request.NewErrParamMinLen("SyncName", 1)) } if s.Aggregators != nil { for i, v := range s.Aggregators { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) } } } if s.Filters != nil { for i, v := range s.Filters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) } } } if s.ResultAttributes != nil { for i, v := range s.ResultAttributes { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResultAttributes", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAggregators sets the Aggregators field's value. func (s *GetOpsSummaryInput) SetAggregators(v []*OpsAggregator) *GetOpsSummaryInput { s.Aggregators = v return s } // SetFilters sets the Filters field's value. func (s *GetOpsSummaryInput) SetFilters(v []*OpsFilter) *GetOpsSummaryInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *GetOpsSummaryInput) SetMaxResults(v int64) *GetOpsSummaryInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetOpsSummaryInput) SetNextToken(v string) *GetOpsSummaryInput { s.NextToken = &v return s } // SetResultAttributes sets the ResultAttributes field's value. func (s *GetOpsSummaryInput) SetResultAttributes(v []*OpsResultAttribute) *GetOpsSummaryInput { s.ResultAttributes = v return s } // SetSyncName sets the SyncName field's value. func (s *GetOpsSummaryInput) SetSyncName(v string) *GetOpsSummaryInput { s.SyncName = &v return s } type GetOpsSummaryOutput struct { _ struct{} `type:"structure"` // The list of aggregated details and filtered OpsData. Entities []*OpsEntity `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsSummaryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetOpsSummaryOutput) GoString() string { return s.String() } // SetEntities sets the Entities field's value. func (s *GetOpsSummaryOutput) SetEntities(v []*OpsEntity) *GetOpsSummaryOutput { s.Entities = v return s } // SetNextToken sets the NextToken field's value. func (s *GetOpsSummaryOutput) SetNextToken(v string) *GetOpsSummaryOutput { s.NextToken = &v return s } type GetParameterHistoryInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The name of the parameter for which you want to review history. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // Return decrypted values for secure string parameters. This flag is ignored // for String and StringList parameter types. WithDecryption *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParameterHistoryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParameterHistoryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetParameterHistoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetParameterHistoryInput"} 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 *GetParameterHistoryInput) SetMaxResults(v int64) *GetParameterHistoryInput { s.MaxResults = &v return s } // SetName sets the Name field's value. func (s *GetParameterHistoryInput) SetName(v string) *GetParameterHistoryInput { s.Name = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetParameterHistoryInput) SetNextToken(v string) *GetParameterHistoryInput { s.NextToken = &v return s } // SetWithDecryption sets the WithDecryption field's value. func (s *GetParameterHistoryInput) SetWithDecryption(v bool) *GetParameterHistoryInput { s.WithDecryption = &v return s } type GetParameterHistoryOutput struct { _ struct{} `type:"structure"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // A list of parameters returned by the request. Parameters []*ParameterHistory `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParameterHistoryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParameterHistoryOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *GetParameterHistoryOutput) SetNextToken(v string) *GetParameterHistoryOutput { s.NextToken = &v return s } // SetParameters sets the Parameters field's value. func (s *GetParameterHistoryOutput) SetParameters(v []*ParameterHistory) *GetParameterHistoryOutput { s.Parameters = v return s } type GetParameterInput struct { _ struct{} `type:"structure"` // The name of the parameter you want to query. // // To query by parameter label, use "Name": "name:label". To query by parameter // version, use "Name": "name:version". // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Return decrypted values for secure string parameters. This flag is ignored // for String and StringList parameter types. WithDecryption *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParameterInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParameterInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetParameterInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetParameterInput"} 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 } // SetName sets the Name field's value. func (s *GetParameterInput) SetName(v string) *GetParameterInput { s.Name = &v return s } // SetWithDecryption sets the WithDecryption field's value. func (s *GetParameterInput) SetWithDecryption(v bool) *GetParameterInput { s.WithDecryption = &v return s } type GetParameterOutput struct { _ struct{} `type:"structure"` // Information about a parameter. Parameter *Parameter `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParameterOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParameterOutput) GoString() string { return s.String() } // SetParameter sets the Parameter field's value. func (s *GetParameterOutput) SetParameter(v *Parameter) *GetParameterOutput { s.Parameter = v return s } type GetParametersByPathInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` // Filters to limit the request results. // // The following Key values are supported for GetParametersByPath: Type, KeyId, // and Label. // // The following Key values aren't supported for GetParametersByPath: tag, DataType, // Name, Path, and Tier. ParameterFilters []*ParameterStringFilter `type:"list"` // The hierarchy for the parameter. Hierarchies start with a forward slash (/). // The hierarchy is the parameter name except the last part of the parameter. // For the API call to succeed, the last part of the parameter name can't be // in the path. A parameter name hierarchy can have a maximum of 15 levels. // Here is an example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33 // // Path is a required field Path *string `min:"1" type:"string" required:"true"` // Retrieve all parameters within a hierarchy. // // If a user has access to a path, then the user can access all levels of that // path. For example, if a user has permission to access path /a, then the user // can also access /a/b. Even if a user has explicitly been denied access in // IAM for parameter /a/b, they can still call the GetParametersByPath API operation // recursively for /a and view /a/b. Recursive *bool `type:"boolean"` // Retrieve all parameters in a hierarchy with their value decrypted. WithDecryption *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParametersByPathInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParametersByPathInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetParametersByPathInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetParametersByPathInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.Path == nil { invalidParams.Add(request.NewErrParamRequired("Path")) } if s.Path != nil && len(*s.Path) < 1 { invalidParams.Add(request.NewErrParamMinLen("Path", 1)) } if s.ParameterFilters != nil { for i, v := range s.ParameterFilters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterFilters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *GetParametersByPathInput) SetMaxResults(v int64) *GetParametersByPathInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetParametersByPathInput) SetNextToken(v string) *GetParametersByPathInput { s.NextToken = &v return s } // SetParameterFilters sets the ParameterFilters field's value. func (s *GetParametersByPathInput) SetParameterFilters(v []*ParameterStringFilter) *GetParametersByPathInput { s.ParameterFilters = v return s } // SetPath sets the Path field's value. func (s *GetParametersByPathInput) SetPath(v string) *GetParametersByPathInput { s.Path = &v return s } // SetRecursive sets the Recursive field's value. func (s *GetParametersByPathInput) SetRecursive(v bool) *GetParametersByPathInput { s.Recursive = &v return s } // SetWithDecryption sets the WithDecryption field's value. func (s *GetParametersByPathInput) SetWithDecryption(v bool) *GetParametersByPathInput { s.WithDecryption = &v return s } type GetParametersByPathOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // A list of parameters found in the specified hierarchy. Parameters []*Parameter `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParametersByPathOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParametersByPathOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *GetParametersByPathOutput) SetNextToken(v string) *GetParametersByPathOutput { s.NextToken = &v return s } // SetParameters sets the Parameters field's value. func (s *GetParametersByPathOutput) SetParameters(v []*Parameter) *GetParametersByPathOutput { s.Parameters = v return s } type GetParametersInput struct { _ struct{} `type:"structure"` // Names of the parameters for which you want to query information. // // To query by parameter label, use "Name": "name:label". To query by parameter // version, use "Name": "name:version". // // Names is a required field Names []*string `min:"1" type:"list" required:"true"` // Return decrypted secure string value. Return decrypted values for secure // string parameters. This flag is ignored for String and StringList parameter // types. WithDecryption *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParametersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParametersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetParametersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetParametersInput"} if s.Names == nil { invalidParams.Add(request.NewErrParamRequired("Names")) } if s.Names != nil && len(s.Names) < 1 { invalidParams.Add(request.NewErrParamMinLen("Names", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetNames sets the Names field's value. func (s *GetParametersInput) SetNames(v []*string) *GetParametersInput { s.Names = v return s } // SetWithDecryption sets the WithDecryption field's value. func (s *GetParametersInput) SetWithDecryption(v bool) *GetParametersInput { s.WithDecryption = &v return s } type GetParametersOutput struct { _ struct{} `type:"structure"` // A list of parameters that aren't formatted correctly or don't run during // an execution. InvalidParameters []*string `min:"1" type:"list"` // A list of details for a parameter. Parameters []*Parameter `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParametersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetParametersOutput) GoString() string { return s.String() } // SetInvalidParameters sets the InvalidParameters field's value. func (s *GetParametersOutput) SetInvalidParameters(v []*string) *GetParametersOutput { s.InvalidParameters = v return s } // SetParameters sets the Parameters field's value. func (s *GetParametersOutput) SetParameters(v []*Parameter) *GetParametersOutput { s.Parameters = v return s } type GetPatchBaselineForPatchGroupInput struct { _ struct{} `type:"structure"` // Returns the operating system rule specified for patch groups using the patch // baseline. OperatingSystem *string `type:"string" enum:"OperatingSystem"` // The name of the patch group whose patch baseline should be retrieved. // // PatchGroup is a required field PatchGroup *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetPatchBaselineForPatchGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetPatchBaselineForPatchGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetPatchBaselineForPatchGroupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetPatchBaselineForPatchGroupInput"} if s.PatchGroup == nil { invalidParams.Add(request.NewErrParamRequired("PatchGroup")) } if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOperatingSystem sets the OperatingSystem field's value. func (s *GetPatchBaselineForPatchGroupInput) SetOperatingSystem(v string) *GetPatchBaselineForPatchGroupInput { s.OperatingSystem = &v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *GetPatchBaselineForPatchGroupInput) SetPatchGroup(v string) *GetPatchBaselineForPatchGroupInput { s.PatchGroup = &v return s } type GetPatchBaselineForPatchGroupOutput struct { _ struct{} `type:"structure"` // The ID of the patch baseline that should be used for the patch group. BaselineId *string `min:"20" type:"string"` // The operating system rule specified for patch groups using the patch baseline. OperatingSystem *string `type:"string" enum:"OperatingSystem"` // The name of the patch group. PatchGroup *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetPatchBaselineForPatchGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetPatchBaselineForPatchGroupOutput) GoString() string { return s.String() } // SetBaselineId sets the BaselineId field's value. func (s *GetPatchBaselineForPatchGroupOutput) SetBaselineId(v string) *GetPatchBaselineForPatchGroupOutput { s.BaselineId = &v return s } // SetOperatingSystem sets the OperatingSystem field's value. func (s *GetPatchBaselineForPatchGroupOutput) SetOperatingSystem(v string) *GetPatchBaselineForPatchGroupOutput { s.OperatingSystem = &v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *GetPatchBaselineForPatchGroupOutput) SetPatchGroup(v string) *GetPatchBaselineForPatchGroupOutput { s.PatchGroup = &v return s } type GetPatchBaselineInput struct { _ struct{} `type:"structure"` // The ID of the patch baseline to retrieve. // // To retrieve information about an Amazon Web Services managed patch baseline, // specify the full Amazon Resource Name (ARN) of the baseline. For example, // for the baseline AWS-AmazonLinuxDefaultPatchBaseline, specify arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0e392de35e7c563b7 // instead of pb-0e392de35e7c563b7. // // BaselineId is a required field BaselineId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetPatchBaselineInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetPatchBaselineInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetPatchBaselineInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetPatchBaselineInput"} if s.BaselineId == nil { invalidParams.Add(request.NewErrParamRequired("BaselineId")) } if s.BaselineId != nil && len(*s.BaselineId) < 20 { invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBaselineId sets the BaselineId field's value. func (s *GetPatchBaselineInput) SetBaselineId(v string) *GetPatchBaselineInput { s.BaselineId = &v return s } type GetPatchBaselineOutput struct { _ struct{} `type:"structure"` // A set of rules used to include patches in the baseline. ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. ApprovedPatches []*string `type:"list"` // Returns the specified compliance severity level for approved patches in the // patch baseline. ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // Indicates whether the list of approved patches includes non-security updates // that should be applied to the managed nodes. The default value is false. // Applies to Linux managed nodes only. ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` // The ID of the retrieved patch baseline. BaselineId *string `min:"20" type:"string"` // The date the patch baseline was created. CreatedDate *time.Time `type:"timestamp"` // A description of the patch baseline. Description *string `min:"1" type:"string"` // A set of global filters used to exclude patches from the baseline. GlobalFilters *PatchFilterGroup `type:"structure"` // The date the patch baseline was last modified. ModifiedDate *time.Time `type:"timestamp"` // The name of the patch baseline. Name *string `min:"3" type:"string"` // Returns the operating system specified for the patch baseline. OperatingSystem *string `type:"string" enum:"OperatingSystem"` // Patch groups included in the patch baseline. PatchGroups []*string `type:"list"` // A list of explicitly rejected patches for the baseline. RejectedPatches []*string `type:"list"` // The action specified to take on patches included in the RejectedPatches list. // A patch can be allowed only if it is a dependency of another package, or // blocked entirely along with packages that include it as a dependency. RejectedPatchesAction *string `type:"string" enum:"PatchAction"` // Information about the patches to use to update the managed nodes, including // target operating systems and source repositories. Applies to Linux managed // nodes only. Sources []*PatchSource `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetPatchBaselineOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetPatchBaselineOutput) GoString() string { return s.String() } // SetApprovalRules sets the ApprovalRules field's value. func (s *GetPatchBaselineOutput) SetApprovalRules(v *PatchRuleGroup) *GetPatchBaselineOutput { s.ApprovalRules = v return s } // SetApprovedPatches sets the ApprovedPatches field's value. func (s *GetPatchBaselineOutput) SetApprovedPatches(v []*string) *GetPatchBaselineOutput { s.ApprovedPatches = v return s } // SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. func (s *GetPatchBaselineOutput) SetApprovedPatchesComplianceLevel(v string) *GetPatchBaselineOutput { s.ApprovedPatchesComplianceLevel = &v return s } // SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. func (s *GetPatchBaselineOutput) SetApprovedPatchesEnableNonSecurity(v bool) *GetPatchBaselineOutput { s.ApprovedPatchesEnableNonSecurity = &v return s } // SetBaselineId sets the BaselineId field's value. func (s *GetPatchBaselineOutput) SetBaselineId(v string) *GetPatchBaselineOutput { s.BaselineId = &v return s } // SetCreatedDate sets the CreatedDate field's value. func (s *GetPatchBaselineOutput) SetCreatedDate(v time.Time) *GetPatchBaselineOutput { s.CreatedDate = &v return s } // SetDescription sets the Description field's value. func (s *GetPatchBaselineOutput) SetDescription(v string) *GetPatchBaselineOutput { s.Description = &v return s } // SetGlobalFilters sets the GlobalFilters field's value. func (s *GetPatchBaselineOutput) SetGlobalFilters(v *PatchFilterGroup) *GetPatchBaselineOutput { s.GlobalFilters = v return s } // SetModifiedDate sets the ModifiedDate field's value. func (s *GetPatchBaselineOutput) SetModifiedDate(v time.Time) *GetPatchBaselineOutput { s.ModifiedDate = &v return s } // SetName sets the Name field's value. func (s *GetPatchBaselineOutput) SetName(v string) *GetPatchBaselineOutput { s.Name = &v return s } // SetOperatingSystem sets the OperatingSystem field's value. func (s *GetPatchBaselineOutput) SetOperatingSystem(v string) *GetPatchBaselineOutput { s.OperatingSystem = &v return s } // SetPatchGroups sets the PatchGroups field's value. func (s *GetPatchBaselineOutput) SetPatchGroups(v []*string) *GetPatchBaselineOutput { s.PatchGroups = v return s } // SetRejectedPatches sets the RejectedPatches field's value. func (s *GetPatchBaselineOutput) SetRejectedPatches(v []*string) *GetPatchBaselineOutput { s.RejectedPatches = v return s } // SetRejectedPatchesAction sets the RejectedPatchesAction field's value. func (s *GetPatchBaselineOutput) SetRejectedPatchesAction(v string) *GetPatchBaselineOutput { s.RejectedPatchesAction = &v return s } // SetSources sets the Sources field's value. func (s *GetPatchBaselineOutput) SetSources(v []*PatchSource) *GetPatchBaselineOutput { s.Sources = v return s } type GetResourcePoliciesInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` // Amazon Resource Name (ARN) of the resource to which the policies are attached. // // ResourceArn is a required field ResourceArn *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetResourcePoliciesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetResourcePoliciesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetResourcePoliciesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetResourcePoliciesInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *GetResourcePoliciesInput) SetMaxResults(v int64) *GetResourcePoliciesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *GetResourcePoliciesInput) SetNextToken(v string) *GetResourcePoliciesInput { s.NextToken = &v return s } // SetResourceArn sets the ResourceArn field's value. func (s *GetResourcePoliciesInput) SetResourceArn(v string) *GetResourcePoliciesInput { s.ResourceArn = &v return s } type GetResourcePoliciesOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // An array of the Policy object. Policies []*GetResourcePoliciesResponseEntry `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetResourcePoliciesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetResourcePoliciesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *GetResourcePoliciesOutput) SetNextToken(v string) *GetResourcePoliciesOutput { s.NextToken = &v return s } // SetPolicies sets the Policies field's value. func (s *GetResourcePoliciesOutput) SetPolicies(v []*GetResourcePoliciesResponseEntry) *GetResourcePoliciesOutput { s.Policies = v return s } // A resource policy helps you to define the IAM entity (for example, an Amazon // Web Services account) that can manage your Systems Manager resources. Currently, // OpsItemGroup is the only resource that supports Systems Manager resource // policies. The resource policy for OpsItemGroup enables Amazon Web Services // accounts to view and interact with OpsCenter operational work items (OpsItems). type GetResourcePoliciesResponseEntry struct { _ struct{} `type:"structure"` // A resource policy helps you to define the IAM entity (for example, an Amazon // Web Services account) that can manage your Systems Manager resources. Currently, // OpsItemGroup is the only resource that supports Systems Manager resource // policies. The resource policy for OpsItemGroup enables Amazon Web Services // accounts to view and interact with OpsCenter operational work items (OpsItems). Policy *string `type:"string"` // ID of the current policy version. The hash helps to prevent a situation where // multiple users attempt to overwrite a policy. You must provide this hash // when updating or deleting a policy. PolicyHash *string `type:"string"` // A policy ID. PolicyId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetResourcePoliciesResponseEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetResourcePoliciesResponseEntry) GoString() string { return s.String() } // SetPolicy sets the Policy field's value. func (s *GetResourcePoliciesResponseEntry) SetPolicy(v string) *GetResourcePoliciesResponseEntry { s.Policy = &v return s } // SetPolicyHash sets the PolicyHash field's value. func (s *GetResourcePoliciesResponseEntry) SetPolicyHash(v string) *GetResourcePoliciesResponseEntry { s.PolicyHash = &v return s } // SetPolicyId sets the PolicyId field's value. func (s *GetResourcePoliciesResponseEntry) SetPolicyId(v string) *GetResourcePoliciesResponseEntry { s.PolicyId = &v return s } // The request body of the GetServiceSetting API operation. type GetServiceSettingInput struct { _ struct{} `type:"structure"` // The ID of the service setting to get. The setting ID can be one of the following. // // * /ssm/managed-instance/default-ec2-instance-management-role // // * /ssm/automation/customer-script-log-destination // // * /ssm/automation/customer-script-log-group-name // // * /ssm/documents/console/public-sharing-permission // // * /ssm/managed-instance/activation-tier // // * /ssm/opsinsights/opscenter // // * /ssm/parameter-store/default-parameter-tier // // * /ssm/parameter-store/high-throughput-enabled // // SettingId is a required field SettingId *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetServiceSettingInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetServiceSettingInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetServiceSettingInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetServiceSettingInput"} if s.SettingId == nil { invalidParams.Add(request.NewErrParamRequired("SettingId")) } if s.SettingId != nil && len(*s.SettingId) < 1 { invalidParams.Add(request.NewErrParamMinLen("SettingId", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSettingId sets the SettingId field's value. func (s *GetServiceSettingInput) SetSettingId(v string) *GetServiceSettingInput { s.SettingId = &v return s } // The query result body of the GetServiceSetting API operation. type GetServiceSettingOutput struct { _ struct{} `type:"structure"` // The query result of the current service setting. ServiceSetting *ServiceSetting `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetServiceSettingOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetServiceSettingOutput) GoString() string { return s.String() } // SetServiceSetting sets the ServiceSetting field's value. func (s *GetServiceSettingOutput) SetServiceSetting(v *ServiceSetting) *GetServiceSettingOutput { s.ServiceSetting = v return s } // A hierarchy can have a maximum of 15 levels. For more information, see Requirements // and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the Amazon Web Services Systems Manager User Guide. type HierarchyLevelLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A hierarchy can have a maximum of 15 levels. For more information, see Requirements // and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the Amazon Web Services Systems Manager User Guide. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s HierarchyLevelLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s HierarchyLevelLimitExceededException) GoString() string { return s.String() } func newErrorHierarchyLevelLimitExceededException(v protocol.ResponseMetadata) error { return &HierarchyLevelLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *HierarchyLevelLimitExceededException) Code() string { return "HierarchyLevelLimitExceededException" } // Message returns the exception's message. func (s *HierarchyLevelLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *HierarchyLevelLimitExceededException) OrigErr() error { return nil } func (s *HierarchyLevelLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *HierarchyLevelLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *HierarchyLevelLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // Parameter Store doesn't support changing a parameter type in a hierarchy. // For example, you can't change a parameter from a String type to a SecureString // type. You must create a new, unique parameter. type HierarchyTypeMismatchException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Parameter Store doesn't support changing a parameter type in a hierarchy. // For example, you can't change a parameter from a String type to a SecureString // type. You must create a new, unique parameter. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s HierarchyTypeMismatchException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s HierarchyTypeMismatchException) GoString() string { return s.String() } func newErrorHierarchyTypeMismatchException(v protocol.ResponseMetadata) error { return &HierarchyTypeMismatchException{ RespMetadata: v, } } // Code returns the exception type name. func (s *HierarchyTypeMismatchException) Code() string { return "HierarchyTypeMismatchException" } // Message returns the exception's message. func (s *HierarchyTypeMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *HierarchyTypeMismatchException) OrigErr() error { return nil } func (s *HierarchyTypeMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *HierarchyTypeMismatchException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *HierarchyTypeMismatchException) RequestID() string { return s.RespMetadata.RequestID } // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. type IdempotentParameterMismatch struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IdempotentParameterMismatch) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IdempotentParameterMismatch) GoString() string { return s.String() } func newErrorIdempotentParameterMismatch(v protocol.ResponseMetadata) error { return &IdempotentParameterMismatch{ RespMetadata: v, } } // Code returns the exception type name. func (s *IdempotentParameterMismatch) Code() string { return "IdempotentParameterMismatch" } // Message returns the exception's message. func (s *IdempotentParameterMismatch) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *IdempotentParameterMismatch) OrigErr() error { return nil } func (s *IdempotentParameterMismatch) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *IdempotentParameterMismatch) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *IdempotentParameterMismatch) RequestID() string { return s.RespMetadata.RequestID } // There is a conflict in the policies specified for this parameter. You can't, // for example, specify two Expiration policies for a parameter. Review your // policies, and try again. type IncompatiblePolicyException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IncompatiblePolicyException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s IncompatiblePolicyException) GoString() string { return s.String() } func newErrorIncompatiblePolicyException(v protocol.ResponseMetadata) error { return &IncompatiblePolicyException{ RespMetadata: v, } } // Code returns the exception type name. func (s *IncompatiblePolicyException) Code() string { return "IncompatiblePolicyException" } // Message returns the exception's message. func (s *IncompatiblePolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *IncompatiblePolicyException) OrigErr() error { return nil } func (s *IncompatiblePolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *IncompatiblePolicyException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *IncompatiblePolicyException) RequestID() string { return s.RespMetadata.RequestID } // Status information about the aggregated associations. type InstanceAggregatedAssociationOverview struct { _ struct{} `type:"structure"` // Detailed status information about the aggregated associations. DetailedStatus *string `type:"string"` // The number of associations for the managed node(s). InstanceAssociationStatusAggregatedCount map[string]*int64 `type:"map"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAggregatedAssociationOverview) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAggregatedAssociationOverview) GoString() string { return s.String() } // SetDetailedStatus sets the DetailedStatus field's value. func (s *InstanceAggregatedAssociationOverview) SetDetailedStatus(v string) *InstanceAggregatedAssociationOverview { s.DetailedStatus = &v return s } // SetInstanceAssociationStatusAggregatedCount sets the InstanceAssociationStatusAggregatedCount field's value. func (s *InstanceAggregatedAssociationOverview) SetInstanceAssociationStatusAggregatedCount(v map[string]*int64) *InstanceAggregatedAssociationOverview { s.InstanceAssociationStatusAggregatedCount = v return s } // One or more association documents on the managed node. type InstanceAssociation struct { _ struct{} `type:"structure"` // The association ID. AssociationId *string `type:"string"` // Version information for the association on the managed node. AssociationVersion *string `type:"string"` // The content of the association document for the managed node(s). Content *string `min:"1" type:"string"` // The managed node ID. InstanceId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAssociation) GoString() string { return s.String() } // SetAssociationId sets the AssociationId field's value. func (s *InstanceAssociation) SetAssociationId(v string) *InstanceAssociation { s.AssociationId = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *InstanceAssociation) SetAssociationVersion(v string) *InstanceAssociation { s.AssociationVersion = &v return s } // SetContent sets the Content field's value. func (s *InstanceAssociation) SetContent(v string) *InstanceAssociation { s.Content = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *InstanceAssociation) SetInstanceId(v string) *InstanceAssociation { s.InstanceId = &v return s } // An S3 bucket where you want to store the results of this request. // // For the minimal permissions required to enable Amazon S3 output for an association, // see Creating associations (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-state-assoc.html) // in the Systems Manager User Guide. type InstanceAssociationOutputLocation struct { _ struct{} `type:"structure"` // An S3 bucket where you want to store the results of this request. S3Location *S3OutputLocation `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAssociationOutputLocation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAssociationOutputLocation) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InstanceAssociationOutputLocation) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InstanceAssociationOutputLocation"} if s.S3Location != nil { if err := s.S3Location.Validate(); err != nil { invalidParams.AddNested("S3Location", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetS3Location sets the S3Location field's value. func (s *InstanceAssociationOutputLocation) SetS3Location(v *S3OutputLocation) *InstanceAssociationOutputLocation { s.S3Location = v return s } // The URL of S3 bucket where you want to store the results of this request. type InstanceAssociationOutputUrl struct { _ struct{} `type:"structure"` // The URL of S3 bucket where you want to store the results of this request. S3OutputUrl *S3OutputUrl `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAssociationOutputUrl) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAssociationOutputUrl) GoString() string { return s.String() } // SetS3OutputUrl sets the S3OutputUrl field's value. func (s *InstanceAssociationOutputUrl) SetS3OutputUrl(v *S3OutputUrl) *InstanceAssociationOutputUrl { s.S3OutputUrl = v return s } // Status information about the association. type InstanceAssociationStatusInfo struct { _ struct{} `type:"structure"` // The association ID. AssociationId *string `type:"string"` // The name of the association applied to the managed node. AssociationName *string `type:"string"` // The version of the association applied to the managed node. AssociationVersion *string `type:"string"` // Detailed status information about the association. DetailedStatus *string `type:"string"` // The association document versions. DocumentVersion *string `type:"string"` // An error code returned by the request to create the association. ErrorCode *string `type:"string"` // The date the association ran. ExecutionDate *time.Time `type:"timestamp"` // Summary information about association execution. ExecutionSummary *string `min:"1" type:"string"` // The managed node ID where the association was created. InstanceId *string `type:"string"` // The name of the association. Name *string `type:"string"` // A URL for an S3 bucket where you want to store the results of this request. OutputUrl *InstanceAssociationOutputUrl `type:"structure"` // Status information about the association. Status *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAssociationStatusInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceAssociationStatusInfo) GoString() string { return s.String() } // SetAssociationId sets the AssociationId field's value. func (s *InstanceAssociationStatusInfo) SetAssociationId(v string) *InstanceAssociationStatusInfo { s.AssociationId = &v return s } // SetAssociationName sets the AssociationName field's value. func (s *InstanceAssociationStatusInfo) SetAssociationName(v string) *InstanceAssociationStatusInfo { s.AssociationName = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *InstanceAssociationStatusInfo) SetAssociationVersion(v string) *InstanceAssociationStatusInfo { s.AssociationVersion = &v return s } // SetDetailedStatus sets the DetailedStatus field's value. func (s *InstanceAssociationStatusInfo) SetDetailedStatus(v string) *InstanceAssociationStatusInfo { s.DetailedStatus = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *InstanceAssociationStatusInfo) SetDocumentVersion(v string) *InstanceAssociationStatusInfo { s.DocumentVersion = &v return s } // SetErrorCode sets the ErrorCode field's value. func (s *InstanceAssociationStatusInfo) SetErrorCode(v string) *InstanceAssociationStatusInfo { s.ErrorCode = &v return s } // SetExecutionDate sets the ExecutionDate field's value. func (s *InstanceAssociationStatusInfo) SetExecutionDate(v time.Time) *InstanceAssociationStatusInfo { s.ExecutionDate = &v return s } // SetExecutionSummary sets the ExecutionSummary field's value. func (s *InstanceAssociationStatusInfo) SetExecutionSummary(v string) *InstanceAssociationStatusInfo { s.ExecutionSummary = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *InstanceAssociationStatusInfo) SetInstanceId(v string) *InstanceAssociationStatusInfo { s.InstanceId = &v return s } // SetName sets the Name field's value. func (s *InstanceAssociationStatusInfo) SetName(v string) *InstanceAssociationStatusInfo { s.Name = &v return s } // SetOutputUrl sets the OutputUrl field's value. func (s *InstanceAssociationStatusInfo) SetOutputUrl(v *InstanceAssociationOutputUrl) *InstanceAssociationStatusInfo { s.OutputUrl = v return s } // SetStatus sets the Status field's value. func (s *InstanceAssociationStatusInfo) SetStatus(v string) *InstanceAssociationStatusInfo { s.Status = &v return s } // Describes a filter for a specific list of managed nodes. type InstanceInformation struct { _ struct{} `type:"structure"` // The activation ID created by Amazon Web Services Systems Manager when the // server or virtual machine (VM) was registered. ActivationId *string `type:"string"` // The version of SSM Agent running on your Linux managed node. AgentVersion *string `type:"string"` // Information about the association. AssociationOverview *InstanceAggregatedAssociationOverview `type:"structure"` // The status of the association. AssociationStatus *string `type:"string"` // The fully qualified host name of the managed node. ComputerName *string `min:"1" type:"string"` // The IP address of the managed node. IPAddress *string `min:"1" type:"string"` // The Identity and Access Management (IAM) role assigned to the on-premises // Systems Manager managed node. This call doesn't return the IAM role for Amazon // Elastic Compute Cloud (Amazon EC2) instances. To retrieve the IAM role for // an EC2 instance, use the Amazon EC2 DescribeInstances operation. For information, // see DescribeInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) // in the Amazon EC2 API Reference or describe-instances (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html) // in the Amazon Web Services CLI Command Reference. IamRole *string `type:"string"` // The managed node ID. InstanceId *string `type:"string"` // Indicates whether the latest version of SSM Agent is running on your Linux // managed node. This field doesn't indicate whether or not the latest version // is installed on Windows managed nodes, because some older versions of Windows // Server use the EC2Config service to process Systems Manager requests. IsLatestVersion *bool `type:"boolean"` // The date the association was last run. LastAssociationExecutionDate *time.Time `type:"timestamp"` // The date and time when the agent last pinged the Systems Manager service. LastPingDateTime *time.Time `type:"timestamp"` // The last date the association was successfully run. LastSuccessfulAssociationExecutionDate *time.Time `type:"timestamp"` // The name assigned to an on-premises server, edge device, or virtual machine // (VM) when it is activated as a Systems Manager managed node. The name is // specified as the DefaultInstanceName property using the CreateActivation // command. It is applied to the managed node by specifying the Activation Code // and Activation ID when you install SSM Agent on the node, as explained in // Install SSM Agent for a hybrid environment (Linux) (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html) // and Install SSM Agent for a hybrid environment (Windows) (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-win.html). // To retrieve the Name tag of an EC2 instance, use the Amazon EC2 DescribeInstances // operation. For information, see DescribeInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) // in the Amazon EC2 API Reference or describe-instances (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html) // in the Amazon Web Services CLI Command Reference. Name *string `type:"string"` // Connection status of SSM Agent. // // The status Inactive has been deprecated and is no longer in use. PingStatus *string `type:"string" enum:"PingStatus"` // The name of the operating system platform running on your managed node. PlatformName *string `type:"string"` // The operating system platform type. PlatformType *string `type:"string" enum:"PlatformType"` // The version of the OS platform running on your managed node. PlatformVersion *string `type:"string"` // The date the server or VM was registered with Amazon Web Services as a managed // node. RegistrationDate *time.Time `type:"timestamp"` // The type of instance. Instances are either EC2 instances or managed instances. ResourceType *string `type:"string" enum:"ResourceType"` // The ID of the source resource. For IoT Greengrass devices, SourceId is the // Thing name. SourceId *string `type:"string"` // The type of the source resource. For IoT Greengrass devices, SourceType is // AWS::IoT::Thing. SourceType *string `type:"string" enum:"SourceType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceInformation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceInformation) GoString() string { return s.String() } // SetActivationId sets the ActivationId field's value. func (s *InstanceInformation) SetActivationId(v string) *InstanceInformation { s.ActivationId = &v return s } // SetAgentVersion sets the AgentVersion field's value. func (s *InstanceInformation) SetAgentVersion(v string) *InstanceInformation { s.AgentVersion = &v return s } // SetAssociationOverview sets the AssociationOverview field's value. func (s *InstanceInformation) SetAssociationOverview(v *InstanceAggregatedAssociationOverview) *InstanceInformation { s.AssociationOverview = v return s } // SetAssociationStatus sets the AssociationStatus field's value. func (s *InstanceInformation) SetAssociationStatus(v string) *InstanceInformation { s.AssociationStatus = &v return s } // SetComputerName sets the ComputerName field's value. func (s *InstanceInformation) SetComputerName(v string) *InstanceInformation { s.ComputerName = &v return s } // SetIPAddress sets the IPAddress field's value. func (s *InstanceInformation) SetIPAddress(v string) *InstanceInformation { s.IPAddress = &v return s } // SetIamRole sets the IamRole field's value. func (s *InstanceInformation) SetIamRole(v string) *InstanceInformation { s.IamRole = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *InstanceInformation) SetInstanceId(v string) *InstanceInformation { s.InstanceId = &v return s } // SetIsLatestVersion sets the IsLatestVersion field's value. func (s *InstanceInformation) SetIsLatestVersion(v bool) *InstanceInformation { s.IsLatestVersion = &v return s } // SetLastAssociationExecutionDate sets the LastAssociationExecutionDate field's value. func (s *InstanceInformation) SetLastAssociationExecutionDate(v time.Time) *InstanceInformation { s.LastAssociationExecutionDate = &v return s } // SetLastPingDateTime sets the LastPingDateTime field's value. func (s *InstanceInformation) SetLastPingDateTime(v time.Time) *InstanceInformation { s.LastPingDateTime = &v return s } // SetLastSuccessfulAssociationExecutionDate sets the LastSuccessfulAssociationExecutionDate field's value. func (s *InstanceInformation) SetLastSuccessfulAssociationExecutionDate(v time.Time) *InstanceInformation { s.LastSuccessfulAssociationExecutionDate = &v return s } // SetName sets the Name field's value. func (s *InstanceInformation) SetName(v string) *InstanceInformation { s.Name = &v return s } // SetPingStatus sets the PingStatus field's value. func (s *InstanceInformation) SetPingStatus(v string) *InstanceInformation { s.PingStatus = &v return s } // SetPlatformName sets the PlatformName field's value. func (s *InstanceInformation) SetPlatformName(v string) *InstanceInformation { s.PlatformName = &v return s } // SetPlatformType sets the PlatformType field's value. func (s *InstanceInformation) SetPlatformType(v string) *InstanceInformation { s.PlatformType = &v return s } // SetPlatformVersion sets the PlatformVersion field's value. func (s *InstanceInformation) SetPlatformVersion(v string) *InstanceInformation { s.PlatformVersion = &v return s } // SetRegistrationDate sets the RegistrationDate field's value. func (s *InstanceInformation) SetRegistrationDate(v time.Time) *InstanceInformation { s.RegistrationDate = &v return s } // SetResourceType sets the ResourceType field's value. func (s *InstanceInformation) SetResourceType(v string) *InstanceInformation { s.ResourceType = &v return s } // SetSourceId sets the SourceId field's value. func (s *InstanceInformation) SetSourceId(v string) *InstanceInformation { s.SourceId = &v return s } // SetSourceType sets the SourceType field's value. func (s *InstanceInformation) SetSourceType(v string) *InstanceInformation { s.SourceType = &v return s } // Describes a filter for a specific list of managed nodes. You can filter node // information by using tags. You specify tags by using a key-value mapping. // // Use this operation instead of the DescribeInstanceInformationRequest$InstanceInformationFilterList // method. The InstanceInformationFilterList method is a legacy method and doesn't // support tags. type InstanceInformationFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // Key is a required field Key *string `locationName:"key" type:"string" required:"true" enum:"InstanceInformationFilterKey"` // The filter values. // // ValueSet is a required field ValueSet []*string `locationName:"valueSet" min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceInformationFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceInformationFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InstanceInformationFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InstanceInformationFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.ValueSet == nil { invalidParams.Add(request.NewErrParamRequired("ValueSet")) } if s.ValueSet != nil && len(s.ValueSet) < 1 { invalidParams.Add(request.NewErrParamMinLen("ValueSet", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *InstanceInformationFilter) SetKey(v string) *InstanceInformationFilter { s.Key = &v return s } // SetValueSet sets the ValueSet field's value. func (s *InstanceInformationFilter) SetValueSet(v []*string) *InstanceInformationFilter { s.ValueSet = v return s } // The filters to describe or get information about your managed nodes. type InstanceInformationStringFilter struct { _ struct{} `type:"structure"` // The filter key name to describe your managed nodes. // // Valid filter key values: ActivationIds | AgentVersion | AssociationStatus // | IamRole | InstanceIds | PingStatus | PlatformTypes | ResourceType | SourceIds // | SourceTypes | "tag-key" | "tag:{keyname} // // * Valid values for the AssociationStatus filter key: Success | Pending // | Failed // // * Valid values for the PingStatus filter key: Online | ConnectionLost // | Inactive (deprecated) // // * Valid values for the PlatformType filter key: Windows | Linux | MacOS // // * Valid values for the ResourceType filter key: EC2Instance | ManagedInstance // // * Valid values for the SourceType filter key: AWS::EC2::Instance | AWS::SSM::ManagedInstance // | AWS::IoT::Thing // // * Valid tag examples: Key=tag-key,Values=Purpose | Key=tag:Purpose,Values=Test. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // The filter values. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceInformationStringFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstanceInformationStringFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InstanceInformationStringFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InstanceInformationStringFilter"} 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.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *InstanceInformationStringFilter) SetKey(v string) *InstanceInformationStringFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *InstanceInformationStringFilter) SetValues(v []*string) *InstanceInformationStringFilter { s.Values = v return s } // Defines the high-level patch compliance state for a managed node, providing // information about the number of installed, missing, not applicable, and failed // patches along with metadata about the operation when this information was // gathered for the managed node. type InstancePatchState struct { _ struct{} `type:"structure"` // The ID of the patch baseline used to patch the managed node. // // BaselineId is a required field BaselineId *string `min:"20" type:"string" required:"true"` // The number of patches per node that are specified as Critical for compliance // reporting in the patch baseline aren't installed. These patches might be // missing, have failed installation, were rejected, or were installed but awaiting // a required managed node reboot. The status of these managed nodes is NON_COMPLIANT. CriticalNonCompliantCount *int64 `type:"integer"` // The number of patches from the patch baseline that were attempted to be installed // during the last patching operation, but failed to install. FailedCount *int64 `type:"integer"` // An https URL or an Amazon Simple Storage Service (Amazon S3) path-style URL // to a list of patches to be installed. This patch installation list, which // you maintain in an S3 bucket in YAML format and specify in the SSM document // AWS-RunPatchBaseline, overrides the patches specified by the default patch // baseline. // // For more information about the InstallOverrideList parameter, see About the // AWS-RunPatchBaseline (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html) // SSM document in the Amazon Web Services Systems Manager User Guide. InstallOverrideList *string `min:"1" type:"string"` // The number of patches from the patch baseline that are installed on the managed // node. InstalledCount *int64 `type:"integer"` // The number of patches not specified in the patch baseline that are installed // on the managed node. InstalledOtherCount *int64 `type:"integer"` // The number of patches installed by Patch Manager since the last time the // managed node was rebooted. InstalledPendingRebootCount *int64 `type:"integer"` // The number of patches installed on a managed node that are specified in a // RejectedPatches list. Patches with a status of InstalledRejected were typically // installed before they were added to a RejectedPatches list. // // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, // the value of InstalledRejectedCount will always be 0 (zero). InstalledRejectedCount *int64 `type:"integer"` // The ID of the managed node the high-level patch compliance information was // collected for. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The time of the last attempt to patch the managed node with NoReboot specified // as the reboot option. LastNoRebootInstallOperationTime *time.Time `type:"timestamp"` // The number of patches from the patch baseline that are applicable for the // managed node but aren't currently installed. MissingCount *int64 `type:"integer"` // The number of patches from the patch baseline that aren't applicable for // the managed node and therefore aren't installed on the node. This number // may be truncated if the list of patch names is very large. The number of // patches beyond this limit are reported in UnreportedNotApplicableCount. NotApplicableCount *int64 `type:"integer"` // The type of patching operation that was performed: or // // * SCAN assesses the patch compliance state. // // * INSTALL installs missing patches. // // Operation is a required field Operation *string `type:"string" required:"true" enum:"PatchOperationType"` // The time the most recent patching operation completed on the managed node. // // OperationEndTime is a required field OperationEndTime *time.Time `type:"timestamp" required:"true"` // The time the most recent patching operation was started on the managed node. // // OperationStartTime is a required field OperationStartTime *time.Time `type:"timestamp" required:"true"` // The number of patches per node that are specified as other than Critical // or Security but aren't compliant with the patch baseline. The status of these // managed nodes is NON_COMPLIANT. OtherNonCompliantCount *int64 `type:"integer"` // Placeholder information. This field will always be empty in the current release // of the service. // // OwnerInformation is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by InstancePatchState's // String and GoString methods. OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The name of the patch group the managed node belongs to. // // PatchGroup is a required field PatchGroup *string `min:"1" type:"string" required:"true"` // Indicates the reboot option specified in the patch baseline. // // Reboot options apply to Install operations only. Reboots aren't attempted // for Patch Manager Scan operations. // // * RebootIfNeeded: Patch Manager tries to reboot the managed node if it // installed any patches, or if any patches are detected with a status of // InstalledPendingReboot. // // * NoReboot: Patch Manager attempts to install missing packages without // trying to reboot the system. Patches installed with this option are assigned // a status of InstalledPendingReboot. These patches might not be in effect // until a reboot is performed. RebootOption *string `type:"string" enum:"RebootOption"` // The number of patches per node that are specified as Security in a patch // advisory aren't installed. These patches might be missing, have failed installation, // were rejected, or were installed but awaiting a required managed node reboot. // The status of these managed nodes is NON_COMPLIANT. SecurityNonCompliantCount *int64 `type:"integer"` // The ID of the patch baseline snapshot used during the patching operation // when this compliance data was collected. SnapshotId *string `min:"36" type:"string"` // The number of patches beyond the supported limit of NotApplicableCount that // aren't reported by name to Inventory. Inventory is a capability of Amazon // Web Services Systems Manager. UnreportedNotApplicableCount *int64 `type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstancePatchState) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstancePatchState) GoString() string { return s.String() } // SetBaselineId sets the BaselineId field's value. func (s *InstancePatchState) SetBaselineId(v string) *InstancePatchState { s.BaselineId = &v return s } // SetCriticalNonCompliantCount sets the CriticalNonCompliantCount field's value. func (s *InstancePatchState) SetCriticalNonCompliantCount(v int64) *InstancePatchState { s.CriticalNonCompliantCount = &v return s } // SetFailedCount sets the FailedCount field's value. func (s *InstancePatchState) SetFailedCount(v int64) *InstancePatchState { s.FailedCount = &v return s } // SetInstallOverrideList sets the InstallOverrideList field's value. func (s *InstancePatchState) SetInstallOverrideList(v string) *InstancePatchState { s.InstallOverrideList = &v return s } // SetInstalledCount sets the InstalledCount field's value. func (s *InstancePatchState) SetInstalledCount(v int64) *InstancePatchState { s.InstalledCount = &v return s } // SetInstalledOtherCount sets the InstalledOtherCount field's value. func (s *InstancePatchState) SetInstalledOtherCount(v int64) *InstancePatchState { s.InstalledOtherCount = &v return s } // SetInstalledPendingRebootCount sets the InstalledPendingRebootCount field's value. func (s *InstancePatchState) SetInstalledPendingRebootCount(v int64) *InstancePatchState { s.InstalledPendingRebootCount = &v return s } // SetInstalledRejectedCount sets the InstalledRejectedCount field's value. func (s *InstancePatchState) SetInstalledRejectedCount(v int64) *InstancePatchState { s.InstalledRejectedCount = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *InstancePatchState) SetInstanceId(v string) *InstancePatchState { s.InstanceId = &v return s } // SetLastNoRebootInstallOperationTime sets the LastNoRebootInstallOperationTime field's value. func (s *InstancePatchState) SetLastNoRebootInstallOperationTime(v time.Time) *InstancePatchState { s.LastNoRebootInstallOperationTime = &v return s } // SetMissingCount sets the MissingCount field's value. func (s *InstancePatchState) SetMissingCount(v int64) *InstancePatchState { s.MissingCount = &v return s } // SetNotApplicableCount sets the NotApplicableCount field's value. func (s *InstancePatchState) SetNotApplicableCount(v int64) *InstancePatchState { s.NotApplicableCount = &v return s } // SetOperation sets the Operation field's value. func (s *InstancePatchState) SetOperation(v string) *InstancePatchState { s.Operation = &v return s } // SetOperationEndTime sets the OperationEndTime field's value. func (s *InstancePatchState) SetOperationEndTime(v time.Time) *InstancePatchState { s.OperationEndTime = &v return s } // SetOperationStartTime sets the OperationStartTime field's value. func (s *InstancePatchState) SetOperationStartTime(v time.Time) *InstancePatchState { s.OperationStartTime = &v return s } // SetOtherNonCompliantCount sets the OtherNonCompliantCount field's value. func (s *InstancePatchState) SetOtherNonCompliantCount(v int64) *InstancePatchState { s.OtherNonCompliantCount = &v return s } // SetOwnerInformation sets the OwnerInformation field's value. func (s *InstancePatchState) SetOwnerInformation(v string) *InstancePatchState { s.OwnerInformation = &v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *InstancePatchState) SetPatchGroup(v string) *InstancePatchState { s.PatchGroup = &v return s } // SetRebootOption sets the RebootOption field's value. func (s *InstancePatchState) SetRebootOption(v string) *InstancePatchState { s.RebootOption = &v return s } // SetSecurityNonCompliantCount sets the SecurityNonCompliantCount field's value. func (s *InstancePatchState) SetSecurityNonCompliantCount(v int64) *InstancePatchState { s.SecurityNonCompliantCount = &v return s } // SetSnapshotId sets the SnapshotId field's value. func (s *InstancePatchState) SetSnapshotId(v string) *InstancePatchState { s.SnapshotId = &v return s } // SetUnreportedNotApplicableCount sets the UnreportedNotApplicableCount field's value. func (s *InstancePatchState) SetUnreportedNotApplicableCount(v int64) *InstancePatchState { s.UnreportedNotApplicableCount = &v return s } // Defines a filter used in DescribeInstancePatchStatesForPatchGroup to scope // down the information returned by the API. // // Example: To filter for all managed nodes in a patch group having more than // three patches with a FailedCount status, use the following for the filter: // // - Value for Key: FailedCount // // - Value for Type: GreaterThan // // - Value for Values: 3 type InstancePatchStateFilter struct { _ struct{} `type:"structure"` // The key for the filter. Supported values include the following: // // * InstalledCount // // * InstalledOtherCount // // * InstalledPendingRebootCount // // * InstalledRejectedCount // // * MissingCount // // * FailedCount // // * UnreportedNotApplicableCount // // * NotApplicableCount // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // The type of comparison that should be performed for the value. // // Type is a required field Type *string `type:"string" required:"true" enum:"InstancePatchStateOperatorType"` // The value for the filter. Must be an integer greater than or equal to 0. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstancePatchStateFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InstancePatchStateFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InstancePatchStateFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InstancePatchStateFilter"} 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.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *InstancePatchStateFilter) SetKey(v string) *InstancePatchStateFilter { s.Key = &v return s } // SetType sets the Type field's value. func (s *InstancePatchStateFilter) SetType(v string) *InstancePatchStateFilter { s.Type = &v return s } // SetValues sets the Values field's value. func (s *InstancePatchStateFilter) SetValues(v []*string) *InstancePatchStateFilter { s.Values = v return s } // An error occurred on the server side. type InternalServerError struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InternalServerError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InternalServerError) GoString() string { return s.String() } func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ RespMetadata: v, } } // Code returns the exception type name. func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InternalServerError) OrigErr() error { return nil } func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InternalServerError) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InternalServerError) RequestID() string { return s.RespMetadata.RequestID } // The activation isn't valid. The activation might have been deleted, or the // ActivationId and the ActivationCode don't match. type InvalidActivation struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidActivation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidActivation) GoString() string { return s.String() } func newErrorInvalidActivation(v protocol.ResponseMetadata) error { return &InvalidActivation{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidActivation) Code() string { return "InvalidActivation" } // Message returns the exception's message. func (s *InvalidActivation) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidActivation) OrigErr() error { return nil } func (s *InvalidActivation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidActivation) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidActivation) RequestID() string { return s.RespMetadata.RequestID } // The activation ID isn't valid. Verify the you entered the correct ActivationId // or ActivationCode and try again. type InvalidActivationId struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidActivationId) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidActivationId) GoString() string { return s.String() } func newErrorInvalidActivationId(v protocol.ResponseMetadata) error { return &InvalidActivationId{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidActivationId) Code() string { return "InvalidActivationId" } // Message returns the exception's message. func (s *InvalidActivationId) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidActivationId) OrigErr() error { return nil } func (s *InvalidActivationId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidActivationId) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidActivationId) RequestID() string { return s.RespMetadata.RequestID } // The specified aggregator isn't valid for inventory groups. Verify that the // aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. type InvalidAggregatorException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAggregatorException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAggregatorException) GoString() string { return s.String() } func newErrorInvalidAggregatorException(v protocol.ResponseMetadata) error { return &InvalidAggregatorException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidAggregatorException) Code() string { return "InvalidAggregatorException" } // Message returns the exception's message. func (s *InvalidAggregatorException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidAggregatorException) OrigErr() error { return nil } func (s *InvalidAggregatorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidAggregatorException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidAggregatorException) RequestID() string { return s.RespMetadata.RequestID } // The request doesn't meet the regular expression requirement. type InvalidAllowedPatternException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The request doesn't meet the regular expression requirement. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAllowedPatternException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAllowedPatternException) GoString() string { return s.String() } func newErrorInvalidAllowedPatternException(v protocol.ResponseMetadata) error { return &InvalidAllowedPatternException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidAllowedPatternException) Code() string { return "InvalidAllowedPatternException" } // Message returns the exception's message. func (s *InvalidAllowedPatternException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidAllowedPatternException) OrigErr() error { return nil } func (s *InvalidAllowedPatternException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidAllowedPatternException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidAllowedPatternException) RequestID() string { return s.RespMetadata.RequestID } // The association isn't valid or doesn't exist. type InvalidAssociation struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAssociation) GoString() string { return s.String() } func newErrorInvalidAssociation(v protocol.ResponseMetadata) error { return &InvalidAssociation{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidAssociation) Code() string { return "InvalidAssociation" } // Message returns the exception's message. func (s *InvalidAssociation) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidAssociation) OrigErr() error { return nil } func (s *InvalidAssociation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidAssociation) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidAssociation) RequestID() string { return s.RespMetadata.RequestID } // The version you specified isn't valid. Use ListAssociationVersions to view // all versions of an association according to the association ID. Or, use the // $LATEST parameter to view the latest version of the association. type InvalidAssociationVersion struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAssociationVersion) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAssociationVersion) GoString() string { return s.String() } func newErrorInvalidAssociationVersion(v protocol.ResponseMetadata) error { return &InvalidAssociationVersion{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidAssociationVersion) Code() string { return "InvalidAssociationVersion" } // Message returns the exception's message. func (s *InvalidAssociationVersion) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidAssociationVersion) OrigErr() error { return nil } func (s *InvalidAssociationVersion) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidAssociationVersion) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidAssociationVersion) RequestID() string { return s.RespMetadata.RequestID } // The supplied parameters for invoking the specified Automation runbook are // incorrect. For example, they may not match the set of parameters permitted // for the specified Automation document. type InvalidAutomationExecutionParametersException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAutomationExecutionParametersException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAutomationExecutionParametersException) GoString() string { return s.String() } func newErrorInvalidAutomationExecutionParametersException(v protocol.ResponseMetadata) error { return &InvalidAutomationExecutionParametersException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidAutomationExecutionParametersException) Code() string { return "InvalidAutomationExecutionParametersException" } // Message returns the exception's message. func (s *InvalidAutomationExecutionParametersException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidAutomationExecutionParametersException) OrigErr() error { return nil } func (s *InvalidAutomationExecutionParametersException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidAutomationExecutionParametersException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidAutomationExecutionParametersException) RequestID() string { return s.RespMetadata.RequestID } // The signal isn't valid for the current Automation execution. type InvalidAutomationSignalException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAutomationSignalException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAutomationSignalException) GoString() string { return s.String() } func newErrorInvalidAutomationSignalException(v protocol.ResponseMetadata) error { return &InvalidAutomationSignalException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidAutomationSignalException) Code() string { return "InvalidAutomationSignalException" } // Message returns the exception's message. func (s *InvalidAutomationSignalException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidAutomationSignalException) OrigErr() error { return nil } func (s *InvalidAutomationSignalException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidAutomationSignalException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidAutomationSignalException) RequestID() string { return s.RespMetadata.RequestID } // The specified update status operation isn't valid. type InvalidAutomationStatusUpdateException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAutomationStatusUpdateException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidAutomationStatusUpdateException) GoString() string { return s.String() } func newErrorInvalidAutomationStatusUpdateException(v protocol.ResponseMetadata) error { return &InvalidAutomationStatusUpdateException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidAutomationStatusUpdateException) Code() string { return "InvalidAutomationStatusUpdateException" } // Message returns the exception's message. func (s *InvalidAutomationStatusUpdateException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidAutomationStatusUpdateException) OrigErr() error { return nil } func (s *InvalidAutomationStatusUpdateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidAutomationStatusUpdateException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidAutomationStatusUpdateException) RequestID() string { return s.RespMetadata.RequestID } // The specified command ID isn't valid. Verify the ID and try again. type InvalidCommandId struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidCommandId) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidCommandId) GoString() string { return s.String() } func newErrorInvalidCommandId(v protocol.ResponseMetadata) error { return &InvalidCommandId{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidCommandId) Code() string { return "InvalidCommandId" } // Message returns the exception's message. func (s *InvalidCommandId) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidCommandId) OrigErr() error { return nil } func (s *InvalidCommandId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidCommandId) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidCommandId) RequestID() string { return s.RespMetadata.RequestID } // One or more of the parameters specified for the delete operation isn't valid. // Verify all parameters and try again. type InvalidDeleteInventoryParametersException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDeleteInventoryParametersException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDeleteInventoryParametersException) GoString() string { return s.String() } func newErrorInvalidDeleteInventoryParametersException(v protocol.ResponseMetadata) error { return &InvalidDeleteInventoryParametersException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDeleteInventoryParametersException) Code() string { return "InvalidDeleteInventoryParametersException" } // Message returns the exception's message. func (s *InvalidDeleteInventoryParametersException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDeleteInventoryParametersException) OrigErr() error { return nil } func (s *InvalidDeleteInventoryParametersException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDeleteInventoryParametersException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDeleteInventoryParametersException) RequestID() string { return s.RespMetadata.RequestID } // The ID specified for the delete operation doesn't exist or isn't valid. Verify // the ID and try again. type InvalidDeletionIdException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDeletionIdException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDeletionIdException) GoString() string { return s.String() } func newErrorInvalidDeletionIdException(v protocol.ResponseMetadata) error { return &InvalidDeletionIdException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDeletionIdException) Code() string { return "InvalidDeletionIdException" } // Message returns the exception's message. func (s *InvalidDeletionIdException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDeletionIdException) OrigErr() error { return nil } func (s *InvalidDeletionIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDeletionIdException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDeletionIdException) RequestID() string { return s.RespMetadata.RequestID } // The specified SSM document doesn't exist. type InvalidDocument struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The SSM document doesn't exist or the document isn't available to the user. // This exception can be issued by various API operations. Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocument) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocument) GoString() string { return s.String() } func newErrorInvalidDocument(v protocol.ResponseMetadata) error { return &InvalidDocument{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDocument) Code() string { return "InvalidDocument" } // Message returns the exception's message. func (s *InvalidDocument) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDocument) OrigErr() error { return nil } func (s *InvalidDocument) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDocument) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDocument) RequestID() string { return s.RespMetadata.RequestID } // The content for the document isn't valid. type InvalidDocumentContent struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description of the validation error. Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentContent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentContent) GoString() string { return s.String() } func newErrorInvalidDocumentContent(v protocol.ResponseMetadata) error { return &InvalidDocumentContent{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDocumentContent) Code() string { return "InvalidDocumentContent" } // Message returns the exception's message. func (s *InvalidDocumentContent) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDocumentContent) OrigErr() error { return nil } func (s *InvalidDocumentContent) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDocumentContent) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDocumentContent) RequestID() string { return s.RespMetadata.RequestID } // You attempted to delete a document while it is still shared. You must stop // sharing the document before you can delete it. type InvalidDocumentOperation struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentOperation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentOperation) GoString() string { return s.String() } func newErrorInvalidDocumentOperation(v protocol.ResponseMetadata) error { return &InvalidDocumentOperation{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDocumentOperation) Code() string { return "InvalidDocumentOperation" } // Message returns the exception's message. func (s *InvalidDocumentOperation) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDocumentOperation) OrigErr() error { return nil } func (s *InvalidDocumentOperation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDocumentOperation) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDocumentOperation) RequestID() string { return s.RespMetadata.RequestID } // The version of the document schema isn't supported. type InvalidDocumentSchemaVersion struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentSchemaVersion) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentSchemaVersion) GoString() string { return s.String() } func newErrorInvalidDocumentSchemaVersion(v protocol.ResponseMetadata) error { return &InvalidDocumentSchemaVersion{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDocumentSchemaVersion) Code() string { return "InvalidDocumentSchemaVersion" } // Message returns the exception's message. func (s *InvalidDocumentSchemaVersion) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDocumentSchemaVersion) OrigErr() error { return nil } func (s *InvalidDocumentSchemaVersion) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDocumentSchemaVersion) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDocumentSchemaVersion) RequestID() string { return s.RespMetadata.RequestID } // The SSM document type isn't valid. Valid document types are described in // the DocumentType property. type InvalidDocumentType struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentType) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentType) GoString() string { return s.String() } func newErrorInvalidDocumentType(v protocol.ResponseMetadata) error { return &InvalidDocumentType{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDocumentType) Code() string { return "InvalidDocumentType" } // Message returns the exception's message. func (s *InvalidDocumentType) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDocumentType) OrigErr() error { return nil } func (s *InvalidDocumentType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDocumentType) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDocumentType) RequestID() string { return s.RespMetadata.RequestID } // The document version isn't valid or doesn't exist. type InvalidDocumentVersion struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentVersion) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidDocumentVersion) GoString() string { return s.String() } func newErrorInvalidDocumentVersion(v protocol.ResponseMetadata) error { return &InvalidDocumentVersion{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidDocumentVersion) Code() string { return "InvalidDocumentVersion" } // Message returns the exception's message. func (s *InvalidDocumentVersion) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidDocumentVersion) OrigErr() error { return nil } func (s *InvalidDocumentVersion) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidDocumentVersion) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidDocumentVersion) RequestID() string { return s.RespMetadata.RequestID } // The filter name isn't valid. Verify the you entered the correct name and // try again. type InvalidFilter struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidFilter) GoString() string { return s.String() } func newErrorInvalidFilter(v protocol.ResponseMetadata) error { return &InvalidFilter{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidFilter) Code() string { return "InvalidFilter" } // Message returns the exception's message. func (s *InvalidFilter) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidFilter) OrigErr() error { return nil } func (s *InvalidFilter) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidFilter) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidFilter) RequestID() string { return s.RespMetadata.RequestID } // The specified key isn't valid. type InvalidFilterKey struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidFilterKey) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidFilterKey) GoString() string { return s.String() } func newErrorInvalidFilterKey(v protocol.ResponseMetadata) error { return &InvalidFilterKey{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidFilterKey) Code() string { return "InvalidFilterKey" } // Message returns the exception's message. func (s *InvalidFilterKey) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidFilterKey) OrigErr() error { return nil } func (s *InvalidFilterKey) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidFilterKey) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidFilterKey) RequestID() string { return s.RespMetadata.RequestID } // The specified filter option isn't valid. Valid options are Equals and BeginsWith. // For Path filter, valid options are Recursive and OneLevel. type InvalidFilterOption struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The specified filter option isn't valid. Valid options are Equals and BeginsWith. // For Path filter, valid options are Recursive and OneLevel. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidFilterOption) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidFilterOption) GoString() string { return s.String() } func newErrorInvalidFilterOption(v protocol.ResponseMetadata) error { return &InvalidFilterOption{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidFilterOption) Code() string { return "InvalidFilterOption" } // Message returns the exception's message. func (s *InvalidFilterOption) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidFilterOption) OrigErr() error { return nil } func (s *InvalidFilterOption) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidFilterOption) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidFilterOption) RequestID() string { return s.RespMetadata.RequestID } // The filter value isn't valid. Verify the value and try again. type InvalidFilterValue struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidFilterValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidFilterValue) GoString() string { return s.String() } func newErrorInvalidFilterValue(v protocol.ResponseMetadata) error { return &InvalidFilterValue{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidFilterValue) Code() string { return "InvalidFilterValue" } // Message returns the exception's message. func (s *InvalidFilterValue) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidFilterValue) OrigErr() error { return nil } func (s *InvalidFilterValue) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidFilterValue) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidFilterValue) RequestID() string { return s.RespMetadata.RequestID } // The following problems can cause this exception: // // - You don't have permission to access the managed node. // // - Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // - The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. type InvalidInstanceId struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInstanceId) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInstanceId) GoString() string { return s.String() } func newErrorInvalidInstanceId(v protocol.ResponseMetadata) error { return &InvalidInstanceId{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidInstanceId) Code() string { return "InvalidInstanceId" } // Message returns the exception's message. func (s *InvalidInstanceId) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidInstanceId) OrigErr() error { return nil } func (s *InvalidInstanceId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidInstanceId) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidInstanceId) RequestID() string { return s.RespMetadata.RequestID } // The specified filter value isn't valid. type InvalidInstanceInformationFilterValue struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInstanceInformationFilterValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInstanceInformationFilterValue) GoString() string { return s.String() } func newErrorInvalidInstanceInformationFilterValue(v protocol.ResponseMetadata) error { return &InvalidInstanceInformationFilterValue{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidInstanceInformationFilterValue) Code() string { return "InvalidInstanceInformationFilterValue" } // Message returns the exception's message. func (s *InvalidInstanceInformationFilterValue) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidInstanceInformationFilterValue) OrigErr() error { return nil } func (s *InvalidInstanceInformationFilterValue) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidInstanceInformationFilterValue) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidInstanceInformationFilterValue) RequestID() string { return s.RespMetadata.RequestID } // The specified inventory group isn't valid. type InvalidInventoryGroupException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInventoryGroupException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInventoryGroupException) GoString() string { return s.String() } func newErrorInvalidInventoryGroupException(v protocol.ResponseMetadata) error { return &InvalidInventoryGroupException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidInventoryGroupException) Code() string { return "InvalidInventoryGroupException" } // Message returns the exception's message. func (s *InvalidInventoryGroupException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidInventoryGroupException) OrigErr() error { return nil } func (s *InvalidInventoryGroupException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidInventoryGroupException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidInventoryGroupException) RequestID() string { return s.RespMetadata.RequestID } // You specified invalid keys or values in the Context attribute for InventoryItem. // Verify the keys and values, and try again. type InvalidInventoryItemContextException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInventoryItemContextException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInventoryItemContextException) GoString() string { return s.String() } func newErrorInvalidInventoryItemContextException(v protocol.ResponseMetadata) error { return &InvalidInventoryItemContextException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidInventoryItemContextException) Code() string { return "InvalidInventoryItemContextException" } // Message returns the exception's message. func (s *InvalidInventoryItemContextException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidInventoryItemContextException) OrigErr() error { return nil } func (s *InvalidInventoryItemContextException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidInventoryItemContextException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidInventoryItemContextException) RequestID() string { return s.RespMetadata.RequestID } // The request isn't valid. type InvalidInventoryRequestException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInventoryRequestException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidInventoryRequestException) GoString() string { return s.String() } func newErrorInvalidInventoryRequestException(v protocol.ResponseMetadata) error { return &InvalidInventoryRequestException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidInventoryRequestException) Code() string { return "InvalidInventoryRequestException" } // Message returns the exception's message. func (s *InvalidInventoryRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidInventoryRequestException) OrigErr() error { return nil } func (s *InvalidInventoryRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidInventoryRequestException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidInventoryRequestException) RequestID() string { return s.RespMetadata.RequestID } // One or more content items isn't valid. type InvalidItemContentException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` TypeName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidItemContentException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidItemContentException) GoString() string { return s.String() } func newErrorInvalidItemContentException(v protocol.ResponseMetadata) error { return &InvalidItemContentException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidItemContentException) Code() string { return "InvalidItemContentException" } // Message returns the exception's message. func (s *InvalidItemContentException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidItemContentException) OrigErr() error { return nil } func (s *InvalidItemContentException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidItemContentException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidItemContentException) RequestID() string { return s.RespMetadata.RequestID } // The query key ID isn't valid. type InvalidKeyId struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidKeyId) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidKeyId) GoString() string { return s.String() } func newErrorInvalidKeyId(v protocol.ResponseMetadata) error { return &InvalidKeyId{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidKeyId) Code() string { return "InvalidKeyId" } // Message returns the exception's message. func (s *InvalidKeyId) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidKeyId) OrigErr() error { return nil } func (s *InvalidKeyId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidKeyId) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidKeyId) RequestID() string { return s.RespMetadata.RequestID } // The specified token isn't valid. type InvalidNextToken struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidNextToken) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidNextToken) GoString() string { return s.String() } func newErrorInvalidNextToken(v protocol.ResponseMetadata) error { return &InvalidNextToken{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidNextToken) Code() string { return "InvalidNextToken" } // Message returns the exception's message. func (s *InvalidNextToken) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidNextToken) OrigErr() error { return nil } func (s *InvalidNextToken) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidNextToken) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidNextToken) RequestID() string { return s.RespMetadata.RequestID } // One or more configuration items isn't valid. Verify that a valid Amazon Resource // Name (ARN) was provided for an Amazon Simple Notification Service topic. type InvalidNotificationConfig struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidNotificationConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidNotificationConfig) GoString() string { return s.String() } func newErrorInvalidNotificationConfig(v protocol.ResponseMetadata) error { return &InvalidNotificationConfig{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidNotificationConfig) Code() string { return "InvalidNotificationConfig" } // Message returns the exception's message. func (s *InvalidNotificationConfig) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidNotificationConfig) OrigErr() error { return nil } func (s *InvalidNotificationConfig) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidNotificationConfig) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidNotificationConfig) RequestID() string { return s.RespMetadata.RequestID } // The delete inventory option specified isn't valid. Verify the option and // try again. type InvalidOptionException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidOptionException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidOptionException) GoString() string { return s.String() } func newErrorInvalidOptionException(v protocol.ResponseMetadata) error { return &InvalidOptionException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidOptionException) Code() string { return "InvalidOptionException" } // Message returns the exception's message. func (s *InvalidOptionException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidOptionException) OrigErr() error { return nil } func (s *InvalidOptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidOptionException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidOptionException) RequestID() string { return s.RespMetadata.RequestID } // The S3 bucket doesn't exist. type InvalidOutputFolder struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidOutputFolder) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidOutputFolder) GoString() string { return s.String() } func newErrorInvalidOutputFolder(v protocol.ResponseMetadata) error { return &InvalidOutputFolder{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidOutputFolder) Code() string { return "InvalidOutputFolder" } // Message returns the exception's message. func (s *InvalidOutputFolder) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidOutputFolder) OrigErr() error { return nil } func (s *InvalidOutputFolder) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidOutputFolder) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidOutputFolder) RequestID() string { return s.RespMetadata.RequestID } // The output location isn't valid or doesn't exist. type InvalidOutputLocation struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidOutputLocation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidOutputLocation) GoString() string { return s.String() } func newErrorInvalidOutputLocation(v protocol.ResponseMetadata) error { return &InvalidOutputLocation{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidOutputLocation) Code() string { return "InvalidOutputLocation" } // Message returns the exception's message. func (s *InvalidOutputLocation) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidOutputLocation) OrigErr() error { return nil } func (s *InvalidOutputLocation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidOutputLocation) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidOutputLocation) RequestID() string { return s.RespMetadata.RequestID } // You must specify values for all required parameters in the Amazon Web Services // Systems Manager document (SSM document). You can only supply values to parameters // defined in the SSM document. type InvalidParameters struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidParameters) GoString() string { return s.String() } func newErrorInvalidParameters(v protocol.ResponseMetadata) error { return &InvalidParameters{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidParameters) Code() string { return "InvalidParameters" } // Message returns the exception's message. func (s *InvalidParameters) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidParameters) OrigErr() error { return nil } func (s *InvalidParameters) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidParameters) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidParameters) RequestID() string { return s.RespMetadata.RequestID } // The permission type isn't supported. Share is the only supported permission // type. type InvalidPermissionType struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidPermissionType) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidPermissionType) GoString() string { return s.String() } func newErrorInvalidPermissionType(v protocol.ResponseMetadata) error { return &InvalidPermissionType{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidPermissionType) Code() string { return "InvalidPermissionType" } // Message returns the exception's message. func (s *InvalidPermissionType) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidPermissionType) OrigErr() error { return nil } func (s *InvalidPermissionType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidPermissionType) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidPermissionType) RequestID() string { return s.RespMetadata.RequestID } // The plugin name isn't valid. type InvalidPluginName struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidPluginName) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidPluginName) GoString() string { return s.String() } func newErrorInvalidPluginName(v protocol.ResponseMetadata) error { return &InvalidPluginName{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidPluginName) Code() string { return "InvalidPluginName" } // Message returns the exception's message. func (s *InvalidPluginName) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidPluginName) OrigErr() error { return nil } func (s *InvalidPluginName) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidPluginName) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidPluginName) RequestID() string { return s.RespMetadata.RequestID } // A policy attribute or its value is invalid. type InvalidPolicyAttributeException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidPolicyAttributeException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidPolicyAttributeException) GoString() string { return s.String() } func newErrorInvalidPolicyAttributeException(v protocol.ResponseMetadata) error { return &InvalidPolicyAttributeException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidPolicyAttributeException) Code() string { return "InvalidPolicyAttributeException" } // Message returns the exception's message. func (s *InvalidPolicyAttributeException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidPolicyAttributeException) OrigErr() error { return nil } func (s *InvalidPolicyAttributeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidPolicyAttributeException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidPolicyAttributeException) RequestID() string { return s.RespMetadata.RequestID } // The policy type isn't supported. Parameter Store supports the following policy // types: Expiration, ExpirationNotification, and NoChangeNotification. type InvalidPolicyTypeException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidPolicyTypeException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidPolicyTypeException) GoString() string { return s.String() } func newErrorInvalidPolicyTypeException(v protocol.ResponseMetadata) error { return &InvalidPolicyTypeException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidPolicyTypeException) Code() string { return "InvalidPolicyTypeException" } // Message returns the exception's message. func (s *InvalidPolicyTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidPolicyTypeException) OrigErr() error { return nil } func (s *InvalidPolicyTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidPolicyTypeException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidPolicyTypeException) RequestID() string { return s.RespMetadata.RequestID } // The resource ID isn't valid. Verify that you entered the correct ID and try // again. type InvalidResourceId struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidResourceId) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidResourceId) GoString() string { return s.String() } func newErrorInvalidResourceId(v protocol.ResponseMetadata) error { return &InvalidResourceId{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidResourceId) Code() string { return "InvalidResourceId" } // Message returns the exception's message. func (s *InvalidResourceId) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidResourceId) OrigErr() error { return nil } func (s *InvalidResourceId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidResourceId) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidResourceId) RequestID() string { return s.RespMetadata.RequestID } // The resource type isn't valid. For example, if you are attempting to tag // an EC2 instance, the instance must be a registered managed node. type InvalidResourceType struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidResourceType) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidResourceType) GoString() string { return s.String() } func newErrorInvalidResourceType(v protocol.ResponseMetadata) error { return &InvalidResourceType{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidResourceType) Code() string { return "InvalidResourceType" } // Message returns the exception's message. func (s *InvalidResourceType) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidResourceType) OrigErr() error { return nil } func (s *InvalidResourceType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidResourceType) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidResourceType) RequestID() string { return s.RespMetadata.RequestID } // The specified inventory item result attribute isn't valid. type InvalidResultAttributeException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidResultAttributeException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidResultAttributeException) GoString() string { return s.String() } func newErrorInvalidResultAttributeException(v protocol.ResponseMetadata) error { return &InvalidResultAttributeException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidResultAttributeException) Code() string { return "InvalidResultAttributeException" } // Message returns the exception's message. func (s *InvalidResultAttributeException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidResultAttributeException) OrigErr() error { return nil } func (s *InvalidResultAttributeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidResultAttributeException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidResultAttributeException) RequestID() string { return s.RespMetadata.RequestID } // The role name can't contain invalid characters. Also verify that you specified // an IAM role for notifications that includes the required trust policy. For // information about configuring the IAM role for Run Command notifications, // see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) // in the Amazon Web Services Systems Manager User Guide. type InvalidRole struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRole) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRole) GoString() string { return s.String() } func newErrorInvalidRole(v protocol.ResponseMetadata) error { return &InvalidRole{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidRole) Code() string { return "InvalidRole" } // Message returns the exception's message. func (s *InvalidRole) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidRole) OrigErr() error { return nil } func (s *InvalidRole) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidRole) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidRole) RequestID() string { return s.RespMetadata.RequestID } // The schedule is invalid. Verify your cron or rate expression and try again. type InvalidSchedule struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidSchedule) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidSchedule) GoString() string { return s.String() } func newErrorInvalidSchedule(v protocol.ResponseMetadata) error { return &InvalidSchedule{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidSchedule) Code() string { return "InvalidSchedule" } // Message returns the exception's message. func (s *InvalidSchedule) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidSchedule) OrigErr() error { return nil } func (s *InvalidSchedule) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidSchedule) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidSchedule) RequestID() string { return s.RespMetadata.RequestID } // The specified tag key or value isn't valid. type InvalidTag struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidTag) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidTag) GoString() string { return s.String() } func newErrorInvalidTag(v protocol.ResponseMetadata) error { return &InvalidTag{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidTag) Code() string { return "InvalidTag" } // Message returns the exception's message. func (s *InvalidTag) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidTag) OrigErr() error { return nil } func (s *InvalidTag) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidTag) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidTag) RequestID() string { return s.RespMetadata.RequestID } // The target isn't valid or doesn't exist. It might not be configured for Systems // Manager or you might not have permission to perform the operation. type InvalidTarget struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidTarget) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidTarget) GoString() string { return s.String() } func newErrorInvalidTarget(v protocol.ResponseMetadata) error { return &InvalidTarget{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidTarget) Code() string { return "InvalidTarget" } // Message returns the exception's message. func (s *InvalidTarget) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidTarget) OrigErr() error { return nil } func (s *InvalidTarget) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidTarget) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidTarget) RequestID() string { return s.RespMetadata.RequestID } // TargetMap parameter isn't valid. type InvalidTargetMaps struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidTargetMaps) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidTargetMaps) GoString() string { return s.String() } func newErrorInvalidTargetMaps(v protocol.ResponseMetadata) error { return &InvalidTargetMaps{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidTargetMaps) Code() string { return "InvalidTargetMaps" } // Message returns the exception's message. func (s *InvalidTargetMaps) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidTargetMaps) OrigErr() error { return nil } func (s *InvalidTargetMaps) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidTargetMaps) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidTargetMaps) RequestID() string { return s.RespMetadata.RequestID } // The parameter type name isn't valid. type InvalidTypeNameException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidTypeNameException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidTypeNameException) GoString() string { return s.String() } func newErrorInvalidTypeNameException(v protocol.ResponseMetadata) error { return &InvalidTypeNameException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidTypeNameException) Code() string { return "InvalidTypeNameException" } // Message returns the exception's message. func (s *InvalidTypeNameException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidTypeNameException) OrigErr() error { return nil } func (s *InvalidTypeNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidTypeNameException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidTypeNameException) RequestID() string { return s.RespMetadata.RequestID } // The update isn't valid. type InvalidUpdate struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidUpdate) GoString() string { return s.String() } func newErrorInvalidUpdate(v protocol.ResponseMetadata) error { return &InvalidUpdate{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidUpdate) Code() string { return "InvalidUpdate" } // Message returns the exception's message. func (s *InvalidUpdate) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidUpdate) OrigErr() error { return nil } func (s *InvalidUpdate) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidUpdate) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidUpdate) RequestID() string { return s.RespMetadata.RequestID } // Specifies the inventory type and attribute for the aggregation execution. type InventoryAggregator struct { _ struct{} `type:"structure"` // Nested aggregators to further refine aggregation for an inventory type. Aggregators []*InventoryAggregator `min:"1" type:"list"` // The inventory type and attribute name for aggregation. Expression *string `min:"1" type:"string"` // A user-defined set of one or more filters on which to aggregate inventory // data. Groups return a count of resources that match and don't match the specified // criteria. Groups []*InventoryGroup `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryAggregator) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryAggregator) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InventoryAggregator) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InventoryAggregator"} if s.Aggregators != nil && len(s.Aggregators) < 1 { invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) } if s.Expression != nil && len(*s.Expression) < 1 { invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) } if s.Groups != nil && len(s.Groups) < 1 { invalidParams.Add(request.NewErrParamMinLen("Groups", 1)) } if s.Aggregators != nil { for i, v := range s.Aggregators { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) } } } if s.Groups != nil { for i, v := range s.Groups { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Groups", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAggregators sets the Aggregators field's value. func (s *InventoryAggregator) SetAggregators(v []*InventoryAggregator) *InventoryAggregator { s.Aggregators = v return s } // SetExpression sets the Expression field's value. func (s *InventoryAggregator) SetExpression(v string) *InventoryAggregator { s.Expression = &v return s } // SetGroups sets the Groups field's value. func (s *InventoryAggregator) SetGroups(v []*InventoryGroup) *InventoryAggregator { s.Groups = v return s } // Status information returned by the DeleteInventory operation. type InventoryDeletionStatusItem struct { _ struct{} `type:"structure"` // The deletion ID returned by the DeleteInventory operation. DeletionId *string `type:"string"` // The UTC timestamp when the delete operation started. DeletionStartTime *time.Time `type:"timestamp"` // Information about the delete operation. For more information about this summary, // see Understanding the delete inventory summary (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete) // in the Amazon Web Services Systems Manager User Guide. DeletionSummary *InventoryDeletionSummary `type:"structure"` // The status of the operation. Possible values are InProgress and Complete. LastStatus *string `type:"string" enum:"InventoryDeletionStatus"` // Information about the status. LastStatusMessage *string `type:"string"` // The UTC timestamp of when the last status report. LastStatusUpdateTime *time.Time `type:"timestamp"` // The name of the inventory data type. TypeName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryDeletionStatusItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryDeletionStatusItem) GoString() string { return s.String() } // SetDeletionId sets the DeletionId field's value. func (s *InventoryDeletionStatusItem) SetDeletionId(v string) *InventoryDeletionStatusItem { s.DeletionId = &v return s } // SetDeletionStartTime sets the DeletionStartTime field's value. func (s *InventoryDeletionStatusItem) SetDeletionStartTime(v time.Time) *InventoryDeletionStatusItem { s.DeletionStartTime = &v return s } // SetDeletionSummary sets the DeletionSummary field's value. func (s *InventoryDeletionStatusItem) SetDeletionSummary(v *InventoryDeletionSummary) *InventoryDeletionStatusItem { s.DeletionSummary = v return s } // SetLastStatus sets the LastStatus field's value. func (s *InventoryDeletionStatusItem) SetLastStatus(v string) *InventoryDeletionStatusItem { s.LastStatus = &v return s } // SetLastStatusMessage sets the LastStatusMessage field's value. func (s *InventoryDeletionStatusItem) SetLastStatusMessage(v string) *InventoryDeletionStatusItem { s.LastStatusMessage = &v return s } // SetLastStatusUpdateTime sets the LastStatusUpdateTime field's value. func (s *InventoryDeletionStatusItem) SetLastStatusUpdateTime(v time.Time) *InventoryDeletionStatusItem { s.LastStatusUpdateTime = &v return s } // SetTypeName sets the TypeName field's value. func (s *InventoryDeletionStatusItem) SetTypeName(v string) *InventoryDeletionStatusItem { s.TypeName = &v return s } // Information about the delete operation. type InventoryDeletionSummary struct { _ struct{} `type:"structure"` // Remaining number of items to delete. RemainingCount *int64 `type:"integer"` // A list of counts and versions for deleted items. SummaryItems []*InventoryDeletionSummaryItem `type:"list"` // The total number of items to delete. This count doesn't change during the // delete operation. TotalCount *int64 `type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryDeletionSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryDeletionSummary) GoString() string { return s.String() } // SetRemainingCount sets the RemainingCount field's value. func (s *InventoryDeletionSummary) SetRemainingCount(v int64) *InventoryDeletionSummary { s.RemainingCount = &v return s } // SetSummaryItems sets the SummaryItems field's value. func (s *InventoryDeletionSummary) SetSummaryItems(v []*InventoryDeletionSummaryItem) *InventoryDeletionSummary { s.SummaryItems = v return s } // SetTotalCount sets the TotalCount field's value. func (s *InventoryDeletionSummary) SetTotalCount(v int64) *InventoryDeletionSummary { s.TotalCount = &v return s } // Either a count, remaining count, or a version number in a delete inventory // summary. type InventoryDeletionSummaryItem struct { _ struct{} `type:"structure"` // A count of the number of deleted items. Count *int64 `type:"integer"` // The remaining number of items to delete. RemainingCount *int64 `type:"integer"` // The inventory type version. Version *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryDeletionSummaryItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryDeletionSummaryItem) GoString() string { return s.String() } // SetCount sets the Count field's value. func (s *InventoryDeletionSummaryItem) SetCount(v int64) *InventoryDeletionSummaryItem { s.Count = &v return s } // SetRemainingCount sets the RemainingCount field's value. func (s *InventoryDeletionSummaryItem) SetRemainingCount(v int64) *InventoryDeletionSummaryItem { s.RemainingCount = &v return s } // SetVersion sets the Version field's value. func (s *InventoryDeletionSummaryItem) SetVersion(v string) *InventoryDeletionSummaryItem { s.Version = &v return s } // One or more filters. Use a filter to return a more specific list of results. type InventoryFilter struct { _ struct{} `type:"structure"` // The name of the filter key. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // The type of filter. // // The Exists filter must be used with aggregators. For more information, see // Aggregating inventory data (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-aggregate.html) // in the Amazon Web Services Systems Manager User Guide. Type *string `type:"string" enum:"InventoryQueryOperatorType"` // Inventory filter values. Example: inventory filter where managed node IDs // are specified as values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g, // i-1a2b3c4d5e6,Type=Equal. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InventoryFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"} 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.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *InventoryFilter) SetKey(v string) *InventoryFilter { s.Key = &v return s } // SetType sets the Type field's value. func (s *InventoryFilter) SetType(v string) *InventoryFilter { s.Type = &v return s } // SetValues sets the Values field's value. func (s *InventoryFilter) SetValues(v []*string) *InventoryFilter { s.Values = v return s } // A user-defined set of one or more filters on which to aggregate inventory // data. Groups return a count of resources that match and don't match the specified // criteria. type InventoryGroup struct { _ struct{} `type:"structure"` // Filters define the criteria for the group. The matchingCount field displays // the number of resources that match the criteria. The notMatchingCount field // displays the number of resources that don't match the criteria. // // Filters is a required field Filters []*InventoryFilter `min:"1" type:"list" required:"true"` // The name of the group. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryGroup) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InventoryGroup) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InventoryGroup"} if s.Filters == nil { invalidParams.Add(request.NewErrParamRequired("Filters")) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 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.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 *InventoryGroup) SetFilters(v []*InventoryFilter) *InventoryGroup { s.Filters = v return s } // SetName sets the Name field's value. func (s *InventoryGroup) SetName(v string) *InventoryGroup { s.Name = &v return s } // Information collected from managed nodes based on your inventory policy document type InventoryItem struct { _ struct{} `type:"structure"` // The time the inventory information was collected. // // CaptureTime is a required field CaptureTime *string `type:"string" required:"true"` // The inventory data of the inventory type. Content []map[string]*string `type:"list"` // MD5 hash of the inventory item type contents. The content hash is used to // determine whether to update inventory information. The PutInventory API doesn't // update the inventory item type contents if the MD5 hash hasn't changed since // last update. ContentHash *string `type:"string"` // A map of associated properties for a specified inventory type. For example, // with this attribute, you can specify the ExecutionId, ExecutionType, ComplianceType // properties of the AWS:ComplianceItem type. Context map[string]*string `type:"map"` // The schema version for the inventory item. // // SchemaVersion is a required field SchemaVersion *string `type:"string" required:"true"` // The name of the inventory type. Default inventory item type names start with // AWS. Custom inventory type names will start with Custom. Default inventory // item types include the following: AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, // AWS:Network, and AWS:WindowsUpdate. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryItem) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *InventoryItem) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InventoryItem"} if s.CaptureTime == nil { invalidParams.Add(request.NewErrParamRequired("CaptureTime")) } if s.SchemaVersion == nil { invalidParams.Add(request.NewErrParamRequired("SchemaVersion")) } 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 } return nil } // SetCaptureTime sets the CaptureTime field's value. func (s *InventoryItem) SetCaptureTime(v string) *InventoryItem { s.CaptureTime = &v return s } // SetContent sets the Content field's value. func (s *InventoryItem) SetContent(v []map[string]*string) *InventoryItem { s.Content = v return s } // SetContentHash sets the ContentHash field's value. func (s *InventoryItem) SetContentHash(v string) *InventoryItem { s.ContentHash = &v return s } // SetContext sets the Context field's value. func (s *InventoryItem) SetContext(v map[string]*string) *InventoryItem { s.Context = v return s } // SetSchemaVersion sets the SchemaVersion field's value. func (s *InventoryItem) SetSchemaVersion(v string) *InventoryItem { s.SchemaVersion = &v return s } // SetTypeName sets the TypeName field's value. func (s *InventoryItem) SetTypeName(v string) *InventoryItem { s.TypeName = &v return s } // Attributes are the entries within the inventory item content. It contains // name and value. type InventoryItemAttribute struct { _ struct{} `type:"structure"` // The data type of the inventory item attribute. // // DataType is a required field DataType *string `type:"string" required:"true" enum:"InventoryAttributeDataType"` // Name of the inventory item attribute. // // Name is a required field Name *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryItemAttribute) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryItemAttribute) GoString() string { return s.String() } // SetDataType sets the DataType field's value. func (s *InventoryItemAttribute) SetDataType(v string) *InventoryItemAttribute { s.DataType = &v return s } // SetName sets the Name field's value. func (s *InventoryItemAttribute) SetName(v string) *InventoryItemAttribute { s.Name = &v return s } // The inventory item schema definition. Users can use this to compose inventory // query filters. type InventoryItemSchema struct { _ struct{} `type:"structure"` // The schema attributes for inventory. This contains data type and attribute // name. // // Attributes is a required field Attributes []*InventoryItemAttribute `min:"1" type:"list" required:"true"` // The alias name of the inventory type. The alias name is used for display // purposes. DisplayName *string `type:"string"` // The name of the inventory type. Default inventory item type names start with // Amazon Web Services. Custom inventory type names will start with Custom. // Default inventory item types include the following: AWS:AWSComponent, AWS:Application, // AWS:InstanceInformation, AWS:Network, and AWS:WindowsUpdate. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` // The schema version for the inventory item. Version *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryItemSchema) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryItemSchema) GoString() string { return s.String() } // SetAttributes sets the Attributes field's value. func (s *InventoryItemSchema) SetAttributes(v []*InventoryItemAttribute) *InventoryItemSchema { s.Attributes = v return s } // SetDisplayName sets the DisplayName field's value. func (s *InventoryItemSchema) SetDisplayName(v string) *InventoryItemSchema { s.DisplayName = &v return s } // SetTypeName sets the TypeName field's value. func (s *InventoryItemSchema) SetTypeName(v string) *InventoryItemSchema { s.TypeName = &v return s } // SetVersion sets the Version field's value. func (s *InventoryItemSchema) SetVersion(v string) *InventoryItemSchema { s.Version = &v return s } // Inventory query results. type InventoryResultEntity struct { _ struct{} `type:"structure"` // The data section in the inventory result entity JSON. Data map[string]*InventoryResultItem `type:"map"` // ID of the inventory result entity. For example, for managed node inventory // the result will be the managed node ID. For EC2 instance inventory, the result // will be the instance ID. Id *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryResultEntity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryResultEntity) GoString() string { return s.String() } // SetData sets the Data field's value. func (s *InventoryResultEntity) SetData(v map[string]*InventoryResultItem) *InventoryResultEntity { s.Data = v return s } // SetId sets the Id field's value. func (s *InventoryResultEntity) SetId(v string) *InventoryResultEntity { s.Id = &v return s } // The inventory result item. type InventoryResultItem struct { _ struct{} `type:"structure"` // The time inventory item data was captured. CaptureTime *string `type:"string"` // Contains all the inventory data of the item type. Results include attribute // names and values. // // Content is a required field Content []map[string]*string `type:"list" required:"true"` // MD5 hash of the inventory item type contents. The content hash is used to // determine whether to update inventory information. The PutInventory API doesn't // update the inventory item type contents if the MD5 hash hasn't changed since // last update. ContentHash *string `type:"string"` // The schema version for the inventory result item/ // // SchemaVersion is a required field SchemaVersion *string `type:"string" required:"true"` // The name of the inventory result item type. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryResultItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InventoryResultItem) GoString() string { return s.String() } // SetCaptureTime sets the CaptureTime field's value. func (s *InventoryResultItem) SetCaptureTime(v string) *InventoryResultItem { s.CaptureTime = &v return s } // SetContent sets the Content field's value. func (s *InventoryResultItem) SetContent(v []map[string]*string) *InventoryResultItem { s.Content = v return s } // SetContentHash sets the ContentHash field's value. func (s *InventoryResultItem) SetContentHash(v string) *InventoryResultItem { s.ContentHash = &v return s } // SetSchemaVersion sets the SchemaVersion field's value. func (s *InventoryResultItem) SetSchemaVersion(v string) *InventoryResultItem { s.SchemaVersion = &v return s } // SetTypeName sets the TypeName field's value. func (s *InventoryResultItem) SetTypeName(v string) *InventoryResultItem { s.TypeName = &v return s } // The command ID and managed node ID you specified didn't match any invocations. // Verify the command ID and the managed node ID and try again. type InvocationDoesNotExist struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvocationDoesNotExist) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvocationDoesNotExist) GoString() string { return s.String() } func newErrorInvocationDoesNotExist(v protocol.ResponseMetadata) error { return &InvocationDoesNotExist{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvocationDoesNotExist) Code() string { return "InvocationDoesNotExist" } // Message returns the exception's message. func (s *InvocationDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvocationDoesNotExist) OrigErr() error { return nil } func (s *InvocationDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvocationDoesNotExist) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvocationDoesNotExist) RequestID() string { return s.RespMetadata.RequestID } // The inventory item has invalid content. type ItemContentMismatchException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` TypeName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemContentMismatchException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemContentMismatchException) GoString() string { return s.String() } func newErrorItemContentMismatchException(v protocol.ResponseMetadata) error { return &ItemContentMismatchException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ItemContentMismatchException) Code() string { return "ItemContentMismatchException" } // Message returns the exception's message. func (s *ItemContentMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ItemContentMismatchException) OrigErr() error { return nil } func (s *ItemContentMismatchException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *ItemContentMismatchException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ItemContentMismatchException) RequestID() string { return s.RespMetadata.RequestID } // The inventory item size has exceeded the size limit. type ItemSizeLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` TypeName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemSizeLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ItemSizeLimitExceededException) GoString() string { return s.String() } func newErrorItemSizeLimitExceededException(v protocol.ResponseMetadata) error { return &ItemSizeLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ItemSizeLimitExceededException) Code() string { return "ItemSizeLimitExceededException" } // Message returns the exception's message. func (s *ItemSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ItemSizeLimitExceededException) OrigErr() error { return nil } func (s *ItemSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *ItemSizeLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ItemSizeLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } type LabelParameterVersionInput struct { _ struct{} `type:"structure"` // One or more labels to attach to the specified parameter version. // // Labels is a required field Labels []*string `min:"1" type:"list" required:"true"` // The parameter name on which you want to attach one or more labels. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // The specific version of the parameter on which you want to attach one or // more labels. If no version is specified, the system attaches the label to // the latest version. ParameterVersion *int64 `type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LabelParameterVersionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LabelParameterVersionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *LabelParameterVersionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "LabelParameterVersionInput"} if s.Labels == nil { invalidParams.Add(request.NewErrParamRequired("Labels")) } if s.Labels != nil && len(s.Labels) < 1 { invalidParams.Add(request.NewErrParamMinLen("Labels", 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 } // SetLabels sets the Labels field's value. func (s *LabelParameterVersionInput) SetLabels(v []*string) *LabelParameterVersionInput { s.Labels = v return s } // SetName sets the Name field's value. func (s *LabelParameterVersionInput) SetName(v string) *LabelParameterVersionInput { s.Name = &v return s } // SetParameterVersion sets the ParameterVersion field's value. func (s *LabelParameterVersionInput) SetParameterVersion(v int64) *LabelParameterVersionInput { s.ParameterVersion = &v return s } type LabelParameterVersionOutput struct { _ struct{} `type:"structure"` // The label doesn't meet the requirements. For information about parameter // label requirements, see Labeling parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html) // in the Amazon Web Services Systems Manager User Guide. InvalidLabels []*string `min:"1" type:"list"` // The version of the parameter that has been labeled. ParameterVersion *int64 `type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LabelParameterVersionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LabelParameterVersionOutput) GoString() string { return s.String() } // SetInvalidLabels sets the InvalidLabels field's value. func (s *LabelParameterVersionOutput) SetInvalidLabels(v []*string) *LabelParameterVersionOutput { s.InvalidLabels = v return s } // SetParameterVersion sets the ParameterVersion field's value. func (s *LabelParameterVersionOutput) SetParameterVersion(v int64) *LabelParameterVersionOutput { s.ParameterVersion = &v return s } type ListAssociationVersionsInput struct { _ struct{} `type:"structure"` // The association ID for which you want to view all versions. // // AssociationId is a required field AssociationId *string `type:"string" required:"true"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAssociationVersionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAssociationVersionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListAssociationVersionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListAssociationVersionsInput"} if s.AssociationId == nil { invalidParams.Add(request.NewErrParamRequired("AssociationId")) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAssociationId sets the AssociationId field's value. func (s *ListAssociationVersionsInput) SetAssociationId(v string) *ListAssociationVersionsInput { s.AssociationId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListAssociationVersionsInput) SetMaxResults(v int64) *ListAssociationVersionsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListAssociationVersionsInput) SetNextToken(v string) *ListAssociationVersionsInput { s.NextToken = &v return s } type ListAssociationVersionsOutput struct { _ struct{} `type:"structure"` // Information about all versions of the association for the specified association // ID. AssociationVersions []*AssociationVersionInfo `min:"1" type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAssociationVersionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAssociationVersionsOutput) GoString() string { return s.String() } // SetAssociationVersions sets the AssociationVersions field's value. func (s *ListAssociationVersionsOutput) SetAssociationVersions(v []*AssociationVersionInfo) *ListAssociationVersionsOutput { s.AssociationVersions = v return s } // SetNextToken sets the NextToken field's value. func (s *ListAssociationVersionsOutput) SetNextToken(v string) *ListAssociationVersionsOutput { s.NextToken = &v return s } type ListAssociationsInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of results. // // Filtering associations using the InstanceID attribute only returns legacy // associations created using the InstanceID attribute. Associations targeting // the managed node that are part of the Target Attributes ResourceGroup or // Tags aren't returned. AssociationFilterList []*AssociationFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAssociationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAssociationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListAssociationsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListAssociationsInput"} if s.AssociationFilterList != nil && len(s.AssociationFilterList) < 1 { invalidParams.Add(request.NewErrParamMinLen("AssociationFilterList", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.AssociationFilterList != nil { for i, v := range s.AssociationFilterList { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociationFilterList", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAssociationFilterList sets the AssociationFilterList field's value. func (s *ListAssociationsInput) SetAssociationFilterList(v []*AssociationFilter) *ListAssociationsInput { s.AssociationFilterList = v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListAssociationsInput) SetMaxResults(v int64) *ListAssociationsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListAssociationsInput) SetNextToken(v string) *ListAssociationsInput { s.NextToken = &v return s } type ListAssociationsOutput struct { _ struct{} `type:"structure"` // The associations. Associations []*Association `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAssociationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAssociationsOutput) GoString() string { return s.String() } // SetAssociations sets the Associations field's value. func (s *ListAssociationsOutput) SetAssociations(v []*Association) *ListAssociationsOutput { s.Associations = v return s } // SetNextToken sets the NextToken field's value. func (s *ListAssociationsOutput) SetNextToken(v string) *ListAssociationsOutput { s.NextToken = &v return s } type ListCommandInvocationsInput struct { _ struct{} `type:"structure"` // (Optional) The invocations for a specific command ID. CommandId *string `min:"36" type:"string"` // (Optional) If set this returns the response of the command executions and // any command output. The default value is false. Details *bool `type:"boolean"` // (Optional) One or more filters. Use a filter to return a more specific list // of results. Filters []*CommandFilter `min:"1" type:"list"` // (Optional) The command execution details for a specific managed node ID. InstanceId *string `type:"string"` // (Optional) The maximum number of items to return for this call. The call // also returns a token that you can specify in a subsequent call to get the // next set of results. MaxResults *int64 `min:"1" type:"integer"` // (Optional) The token for the next set of items to return. (You received this // token from a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListCommandInvocationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListCommandInvocationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListCommandInvocationsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListCommandInvocationsInput"} if s.CommandId != nil && len(*s.CommandId) < 36 { invalidParams.Add(request.NewErrParamMinLen("CommandId", 36)) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 } // SetCommandId sets the CommandId field's value. func (s *ListCommandInvocationsInput) SetCommandId(v string) *ListCommandInvocationsInput { s.CommandId = &v return s } // SetDetails sets the Details field's value. func (s *ListCommandInvocationsInput) SetDetails(v bool) *ListCommandInvocationsInput { s.Details = &v return s } // SetFilters sets the Filters field's value. func (s *ListCommandInvocationsInput) SetFilters(v []*CommandFilter) *ListCommandInvocationsInput { s.Filters = v return s } // SetInstanceId sets the InstanceId field's value. func (s *ListCommandInvocationsInput) SetInstanceId(v string) *ListCommandInvocationsInput { s.InstanceId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListCommandInvocationsInput) SetMaxResults(v int64) *ListCommandInvocationsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListCommandInvocationsInput) SetNextToken(v string) *ListCommandInvocationsInput { s.NextToken = &v return s } type ListCommandInvocationsOutput struct { _ struct{} `type:"structure"` // (Optional) A list of all invocations. CommandInvocations []*CommandInvocation `type:"list"` // (Optional) The token for the next set of items to return. (You received this // token from a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListCommandInvocationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListCommandInvocationsOutput) GoString() string { return s.String() } // SetCommandInvocations sets the CommandInvocations field's value. func (s *ListCommandInvocationsOutput) SetCommandInvocations(v []*CommandInvocation) *ListCommandInvocationsOutput { s.CommandInvocations = v return s } // SetNextToken sets the NextToken field's value. func (s *ListCommandInvocationsOutput) SetNextToken(v string) *ListCommandInvocationsOutput { s.NextToken = &v return s } type ListCommandsInput struct { _ struct{} `type:"structure"` // (Optional) If provided, lists only the specified command. CommandId *string `min:"36" type:"string"` // (Optional) One or more filters. Use a filter to return a more specific list // of results. Filters []*CommandFilter `min:"1" type:"list"` // (Optional) Lists commands issued against this managed node ID. // // You can't specify a managed node ID in the same command that you specify // Status = Pending. This is because the command hasn't reached the managed // node yet. InstanceId *string `type:"string"` // (Optional) The maximum number of items to return for this call. The call // also returns a token that you can specify in a subsequent call to get the // next set of results. MaxResults *int64 `min:"1" type:"integer"` // (Optional) The token for the next set of items to return. (You received this // token from a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListCommandsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListCommandsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListCommandsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListCommandsInput"} if s.CommandId != nil && len(*s.CommandId) < 36 { invalidParams.Add(request.NewErrParamMinLen("CommandId", 36)) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 } // SetCommandId sets the CommandId field's value. func (s *ListCommandsInput) SetCommandId(v string) *ListCommandsInput { s.CommandId = &v return s } // SetFilters sets the Filters field's value. func (s *ListCommandsInput) SetFilters(v []*CommandFilter) *ListCommandsInput { s.Filters = v return s } // SetInstanceId sets the InstanceId field's value. func (s *ListCommandsInput) SetInstanceId(v string) *ListCommandsInput { s.InstanceId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListCommandsInput) SetMaxResults(v int64) *ListCommandsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListCommandsInput) SetNextToken(v string) *ListCommandsInput { s.NextToken = &v return s } type ListCommandsOutput struct { _ struct{} `type:"structure"` // (Optional) The list of commands requested by the user. Commands []*Command `type:"list"` // (Optional) The token for the next set of items to return. (You received this // token from a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListCommandsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListCommandsOutput) GoString() string { return s.String() } // SetCommands sets the Commands field's value. func (s *ListCommandsOutput) SetCommands(v []*Command) *ListCommandsOutput { s.Commands = v return s } // SetNextToken sets the NextToken field's value. func (s *ListCommandsOutput) SetNextToken(v string) *ListCommandsOutput { s.NextToken = &v return s } type ListComplianceItemsInput struct { _ struct{} `type:"structure"` // One or more compliance filters. Use a filter to return a more specific list // of results. Filters []*ComplianceStringFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` // The ID for the resources from which to get compliance information. Currently, // you can only specify one resource ID. ResourceIds []*string `min:"1" type:"list"` // The type of resource from which to get compliance information. Currently, // the only supported resource type is ManagedInstance. ResourceTypes []*string `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListComplianceItemsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListComplianceItemsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListComplianceItemsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListComplianceItemsInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.ResourceIds != nil && len(s.ResourceIds) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceIds", 1)) } if s.ResourceTypes != nil && len(s.ResourceTypes) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceTypes", 1)) } 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 *ListComplianceItemsInput) SetFilters(v []*ComplianceStringFilter) *ListComplianceItemsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListComplianceItemsInput) SetMaxResults(v int64) *ListComplianceItemsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListComplianceItemsInput) SetNextToken(v string) *ListComplianceItemsInput { s.NextToken = &v return s } // SetResourceIds sets the ResourceIds field's value. func (s *ListComplianceItemsInput) SetResourceIds(v []*string) *ListComplianceItemsInput { s.ResourceIds = v return s } // SetResourceTypes sets the ResourceTypes field's value. func (s *ListComplianceItemsInput) SetResourceTypes(v []*string) *ListComplianceItemsInput { s.ResourceTypes = v return s } type ListComplianceItemsOutput struct { _ struct{} `type:"structure"` // A list of compliance information for the specified resource ID. ComplianceItems []*ComplianceItem `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListComplianceItemsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListComplianceItemsOutput) GoString() string { return s.String() } // SetComplianceItems sets the ComplianceItems field's value. func (s *ListComplianceItemsOutput) SetComplianceItems(v []*ComplianceItem) *ListComplianceItemsOutput { s.ComplianceItems = v return s } // SetNextToken sets the NextToken field's value. func (s *ListComplianceItemsOutput) SetNextToken(v string) *ListComplianceItemsOutput { s.NextToken = &v return s } type ListComplianceSummariesInput struct { _ struct{} `type:"structure"` // One or more compliance or inventory filters. Use a filter to return a more // specific list of results. Filters []*ComplianceStringFilter `type:"list"` // The maximum number of items to return for this call. Currently, you can specify // null or 50. The call also returns a token that you can specify in a subsequent // call to get the next set of results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListComplianceSummariesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListComplianceSummariesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListComplianceSummariesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListComplianceSummariesInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *ListComplianceSummariesInput) SetFilters(v []*ComplianceStringFilter) *ListComplianceSummariesInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListComplianceSummariesInput) SetMaxResults(v int64) *ListComplianceSummariesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListComplianceSummariesInput) SetNextToken(v string) *ListComplianceSummariesInput { s.NextToken = &v return s } type ListComplianceSummariesOutput struct { _ struct{} `type:"structure"` // A list of compliant and non-compliant summary counts based on compliance // types. For example, this call returns State Manager associations, patches, // or custom compliance types according to the filter criteria that you specified. ComplianceSummaryItems []*ComplianceSummaryItem `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListComplianceSummariesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListComplianceSummariesOutput) GoString() string { return s.String() } // SetComplianceSummaryItems sets the ComplianceSummaryItems field's value. func (s *ListComplianceSummariesOutput) SetComplianceSummaryItems(v []*ComplianceSummaryItem) *ListComplianceSummariesOutput { s.ComplianceSummaryItems = v return s } // SetNextToken sets the NextToken field's value. func (s *ListComplianceSummariesOutput) SetNextToken(v string) *ListComplianceSummariesOutput { s.NextToken = &v return s } type ListDocumentMetadataHistoryInput struct { _ struct{} `type:"structure"` // The version of the change template. DocumentVersion *string `type:"string"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The type of data for which details are being requested. Currently, the only // supported value is DocumentReviews. // // Metadata is a required field Metadata *string `type:"string" required:"true" enum:"DocumentMetadataEnum"` // The name of the change template. // // Name is a required field Name *string `type:"string" required:"true"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentMetadataHistoryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentMetadataHistoryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListDocumentMetadataHistoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListDocumentMetadataHistoryInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.Metadata == nil { invalidParams.Add(request.NewErrParamRequired("Metadata")) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDocumentVersion sets the DocumentVersion field's value. func (s *ListDocumentMetadataHistoryInput) SetDocumentVersion(v string) *ListDocumentMetadataHistoryInput { s.DocumentVersion = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListDocumentMetadataHistoryInput) SetMaxResults(v int64) *ListDocumentMetadataHistoryInput { s.MaxResults = &v return s } // SetMetadata sets the Metadata field's value. func (s *ListDocumentMetadataHistoryInput) SetMetadata(v string) *ListDocumentMetadataHistoryInput { s.Metadata = &v return s } // SetName sets the Name field's value. func (s *ListDocumentMetadataHistoryInput) SetName(v string) *ListDocumentMetadataHistoryInput { s.Name = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListDocumentMetadataHistoryInput) SetNextToken(v string) *ListDocumentMetadataHistoryInput { s.NextToken = &v return s } type ListDocumentMetadataHistoryOutput struct { _ struct{} `type:"structure"` // The user ID of the person in the organization who requested the review of // the change template. Author *string `type:"string"` // The version of the change template. DocumentVersion *string `type:"string"` // Information about the response to the change template approval request. Metadata *DocumentMetadataResponseInfo `type:"structure"` // The name of the change template. Name *string `type:"string"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentMetadataHistoryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentMetadataHistoryOutput) GoString() string { return s.String() } // SetAuthor sets the Author field's value. func (s *ListDocumentMetadataHistoryOutput) SetAuthor(v string) *ListDocumentMetadataHistoryOutput { s.Author = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *ListDocumentMetadataHistoryOutput) SetDocumentVersion(v string) *ListDocumentMetadataHistoryOutput { s.DocumentVersion = &v return s } // SetMetadata sets the Metadata field's value. func (s *ListDocumentMetadataHistoryOutput) SetMetadata(v *DocumentMetadataResponseInfo) *ListDocumentMetadataHistoryOutput { s.Metadata = v return s } // SetName sets the Name field's value. func (s *ListDocumentMetadataHistoryOutput) SetName(v string) *ListDocumentMetadataHistoryOutput { s.Name = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListDocumentMetadataHistoryOutput) SetNextToken(v string) *ListDocumentMetadataHistoryOutput { s.NextToken = &v return s } type ListDocumentVersionsInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The name of the document. You can specify an Amazon Resource Name (ARN). // // Name is a required field Name *string `type:"string" required:"true"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentVersionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentVersionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListDocumentVersionsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListDocumentVersionsInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *ListDocumentVersionsInput) SetMaxResults(v int64) *ListDocumentVersionsInput { s.MaxResults = &v return s } // SetName sets the Name field's value. func (s *ListDocumentVersionsInput) SetName(v string) *ListDocumentVersionsInput { s.Name = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListDocumentVersionsInput) SetNextToken(v string) *ListDocumentVersionsInput { s.NextToken = &v return s } type ListDocumentVersionsOutput struct { _ struct{} `type:"structure"` // The document versions. DocumentVersions []*DocumentVersionInfo `min:"1" type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentVersionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentVersionsOutput) GoString() string { return s.String() } // SetDocumentVersions sets the DocumentVersions field's value. func (s *ListDocumentVersionsOutput) SetDocumentVersions(v []*DocumentVersionInfo) *ListDocumentVersionsOutput { s.DocumentVersions = v return s } // SetNextToken sets the NextToken field's value. func (s *ListDocumentVersionsOutput) SetNextToken(v string) *ListDocumentVersionsOutput { s.NextToken = &v return s } type ListDocumentsInput struct { _ struct{} `type:"structure"` // This data type is deprecated. Instead, use Filters. DocumentFilterList []*DocumentFilter `min:"1" type:"list"` // One or more DocumentKeyValuesFilter objects. Use a filter to return a more // specific list of results. For keys, you can specify one or more key-value // pair tags that have been applied to a document. Other valid keys include // Owner, Name, PlatformTypes, DocumentType, and TargetType. For example, to // return documents you own use Key=Owner,Values=Self. To specify a custom key-value // pair, use the format Key=tag:tagName,Values=valueName. // // This API operation only supports filtering documents by using a single tag // key and one or more tag values. For example: Key=tag:tagName,Values=valueName1,valueName2 Filters []*DocumentKeyValuesFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListDocumentsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListDocumentsInput"} if s.DocumentFilterList != nil && len(s.DocumentFilterList) < 1 { invalidParams.Add(request.NewErrParamMinLen("DocumentFilterList", 1)) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.DocumentFilterList != nil { for i, v := range s.DocumentFilterList { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DocumentFilterList", i), err.(request.ErrInvalidParams)) } } } 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 } // SetDocumentFilterList sets the DocumentFilterList field's value. func (s *ListDocumentsInput) SetDocumentFilterList(v []*DocumentFilter) *ListDocumentsInput { s.DocumentFilterList = v return s } // SetFilters sets the Filters field's value. func (s *ListDocumentsInput) SetFilters(v []*DocumentKeyValuesFilter) *ListDocumentsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListDocumentsInput) SetMaxResults(v int64) *ListDocumentsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListDocumentsInput) SetNextToken(v string) *ListDocumentsInput { s.NextToken = &v return s } type ListDocumentsOutput struct { _ struct{} `type:"structure"` // The names of the SSM documents. DocumentIdentifiers []*DocumentIdentifier `type:"list"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListDocumentsOutput) GoString() string { return s.String() } // SetDocumentIdentifiers sets the DocumentIdentifiers field's value. func (s *ListDocumentsOutput) SetDocumentIdentifiers(v []*DocumentIdentifier) *ListDocumentsOutput { s.DocumentIdentifiers = v return s } // SetNextToken sets the NextToken field's value. func (s *ListDocumentsOutput) SetNextToken(v string) *ListDocumentsOutput { s.NextToken = &v return s } type ListInventoryEntriesInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of results. Filters []*InventoryFilter `min:"1" type:"list"` // The managed node ID for which you want inventory information. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The type of inventory item for which you want information. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListInventoryEntriesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListInventoryEntriesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListInventoryEntriesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListInventoryEntriesInput"} if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 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 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 *ListInventoryEntriesInput) SetFilters(v []*InventoryFilter) *ListInventoryEntriesInput { s.Filters = v return s } // SetInstanceId sets the InstanceId field's value. func (s *ListInventoryEntriesInput) SetInstanceId(v string) *ListInventoryEntriesInput { s.InstanceId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListInventoryEntriesInput) SetMaxResults(v int64) *ListInventoryEntriesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListInventoryEntriesInput) SetNextToken(v string) *ListInventoryEntriesInput { s.NextToken = &v return s } // SetTypeName sets the TypeName field's value. func (s *ListInventoryEntriesInput) SetTypeName(v string) *ListInventoryEntriesInput { s.TypeName = &v return s } type ListInventoryEntriesOutput struct { _ struct{} `type:"structure"` // The time that inventory information was collected for the managed node(s). CaptureTime *string `type:"string"` // A list of inventory items on the managed node(s). Entries []map[string]*string `type:"list"` // The managed node ID targeted by the request to query inventory information. InstanceId *string `type:"string"` // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. NextToken *string `type:"string"` // The inventory schema version used by the managed node(s). SchemaVersion *string `type:"string"` // The type of inventory item returned by the request. TypeName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListInventoryEntriesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListInventoryEntriesOutput) GoString() string { return s.String() } // SetCaptureTime sets the CaptureTime field's value. func (s *ListInventoryEntriesOutput) SetCaptureTime(v string) *ListInventoryEntriesOutput { s.CaptureTime = &v return s } // SetEntries sets the Entries field's value. func (s *ListInventoryEntriesOutput) SetEntries(v []map[string]*string) *ListInventoryEntriesOutput { s.Entries = v return s } // SetInstanceId sets the InstanceId field's value. func (s *ListInventoryEntriesOutput) SetInstanceId(v string) *ListInventoryEntriesOutput { s.InstanceId = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListInventoryEntriesOutput) SetNextToken(v string) *ListInventoryEntriesOutput { s.NextToken = &v return s } // SetSchemaVersion sets the SchemaVersion field's value. func (s *ListInventoryEntriesOutput) SetSchemaVersion(v string) *ListInventoryEntriesOutput { s.SchemaVersion = &v return s } // SetTypeName sets the TypeName field's value. func (s *ListInventoryEntriesOutput) SetTypeName(v string) *ListInventoryEntriesOutput { s.TypeName = &v return s } type ListOpsItemEventsInput struct { _ struct{} `type:"structure"` // One or more OpsItem filters. Use a filter to return a more specific list // of results. Filters []*OpsItemEventFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsItemEventsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsItemEventsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListOpsItemEventsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListOpsItemEventsInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *ListOpsItemEventsInput) SetFilters(v []*OpsItemEventFilter) *ListOpsItemEventsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListOpsItemEventsInput) SetMaxResults(v int64) *ListOpsItemEventsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListOpsItemEventsInput) SetNextToken(v string) *ListOpsItemEventsInput { s.NextToken = &v return s } type ListOpsItemEventsOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // A list of event information for the specified OpsItems. Summaries []*OpsItemEventSummary `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsItemEventsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsItemEventsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListOpsItemEventsOutput) SetNextToken(v string) *ListOpsItemEventsOutput { s.NextToken = &v return s } // SetSummaries sets the Summaries field's value. func (s *ListOpsItemEventsOutput) SetSummaries(v []*OpsItemEventSummary) *ListOpsItemEventsOutput { s.Summaries = v return s } type ListOpsItemRelatedItemsInput struct { _ struct{} `type:"structure"` // One or more OpsItem filters. Use a filter to return a more specific list // of results. Filters []*OpsItemRelatedItemsFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `type:"string"` // The ID of the OpsItem for which you want to list all related-item resources. OpsItemId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsItemRelatedItemsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsItemRelatedItemsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListOpsItemRelatedItemsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListOpsItemRelatedItemsInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *ListOpsItemRelatedItemsInput) SetFilters(v []*OpsItemRelatedItemsFilter) *ListOpsItemRelatedItemsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListOpsItemRelatedItemsInput) SetMaxResults(v int64) *ListOpsItemRelatedItemsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListOpsItemRelatedItemsInput) SetNextToken(v string) *ListOpsItemRelatedItemsInput { s.NextToken = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *ListOpsItemRelatedItemsInput) SetOpsItemId(v string) *ListOpsItemRelatedItemsInput { s.OpsItemId = &v return s } type ListOpsItemRelatedItemsOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // A list of related-item resources for the specified OpsItem. Summaries []*OpsItemRelatedItemSummary `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsItemRelatedItemsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsItemRelatedItemsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListOpsItemRelatedItemsOutput) SetNextToken(v string) *ListOpsItemRelatedItemsOutput { s.NextToken = &v return s } // SetSummaries sets the Summaries field's value. func (s *ListOpsItemRelatedItemsOutput) SetSummaries(v []*OpsItemRelatedItemSummary) *ListOpsItemRelatedItemsOutput { s.Summaries = v return s } type ListOpsMetadataInput struct { _ struct{} `type:"structure"` // One or more filters to limit the number of OpsMetadata objects returned by // the call. Filters []*OpsMetadataFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsMetadataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsMetadataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListOpsMetadataInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListOpsMetadataInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *ListOpsMetadataInput) SetFilters(v []*OpsMetadataFilter) *ListOpsMetadataInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListOpsMetadataInput) SetMaxResults(v int64) *ListOpsMetadataInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListOpsMetadataInput) SetNextToken(v string) *ListOpsMetadataInput { s.NextToken = &v return s } type ListOpsMetadataOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // Returns a list of OpsMetadata objects. OpsMetadataList []*OpsMetadata `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsMetadataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListOpsMetadataOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListOpsMetadataOutput) SetNextToken(v string) *ListOpsMetadataOutput { s.NextToken = &v return s } // SetOpsMetadataList sets the OpsMetadataList field's value. func (s *ListOpsMetadataOutput) SetOpsMetadataList(v []*OpsMetadata) *ListOpsMetadataOutput { s.OpsMetadataList = v return s } type ListResourceComplianceSummariesInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of results. Filters []*ComplianceStringFilter `type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListResourceComplianceSummariesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListResourceComplianceSummariesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListResourceComplianceSummariesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListResourceComplianceSummariesInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } 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 *ListResourceComplianceSummariesInput) SetFilters(v []*ComplianceStringFilter) *ListResourceComplianceSummariesInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListResourceComplianceSummariesInput) SetMaxResults(v int64) *ListResourceComplianceSummariesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListResourceComplianceSummariesInput) SetNextToken(v string) *ListResourceComplianceSummariesInput { s.NextToken = &v return s } type ListResourceComplianceSummariesOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // A summary count for specified or targeted managed nodes. Summary count includes // information about compliant and non-compliant State Manager associations, // patch status, or custom items according to the filter criteria that you specify. ResourceComplianceSummaryItems []*ResourceComplianceSummaryItem `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListResourceComplianceSummariesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListResourceComplianceSummariesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListResourceComplianceSummariesOutput) SetNextToken(v string) *ListResourceComplianceSummariesOutput { s.NextToken = &v return s } // SetResourceComplianceSummaryItems sets the ResourceComplianceSummaryItems field's value. func (s *ListResourceComplianceSummariesOutput) SetResourceComplianceSummaryItems(v []*ResourceComplianceSummaryItem) *ListResourceComplianceSummariesOutput { s.ResourceComplianceSummaryItems = v return s } type ListResourceDataSyncInput struct { _ struct{} `type:"structure"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. MaxResults *int64 `min:"1" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` // View a list of resource data syncs according to the sync type. Specify SyncToDestination // to view resource data syncs that synchronize data to an Amazon S3 bucket. // Specify SyncFromSource to view resource data syncs from Organizations or // from multiple Amazon Web Services Regions. SyncType *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListResourceDataSyncInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListResourceDataSyncInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListResourceDataSyncInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListResourceDataSyncInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.SyncType != nil && len(*s.SyncType) < 1 { invalidParams.Add(request.NewErrParamMinLen("SyncType", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetMaxResults sets the MaxResults field's value. func (s *ListResourceDataSyncInput) SetMaxResults(v int64) *ListResourceDataSyncInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListResourceDataSyncInput) SetNextToken(v string) *ListResourceDataSyncInput { s.NextToken = &v return s } // SetSyncType sets the SyncType field's value. func (s *ListResourceDataSyncInput) SetSyncType(v string) *ListResourceDataSyncInput { s.SyncType = &v return s } type ListResourceDataSyncOutput struct { _ struct{} `type:"structure"` // The token for the next set of items to return. Use this token to get the // next set of results. NextToken *string `type:"string"` // A list of your current resource data sync configurations and their statuses. ResourceDataSyncItems []*ResourceDataSyncItem `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListResourceDataSyncOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListResourceDataSyncOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListResourceDataSyncOutput) SetNextToken(v string) *ListResourceDataSyncOutput { s.NextToken = &v return s } // SetResourceDataSyncItems sets the ResourceDataSyncItems field's value. func (s *ListResourceDataSyncOutput) SetResourceDataSyncItems(v []*ResourceDataSyncItem) *ListResourceDataSyncOutput { s.ResourceDataSyncItems = v return s } type ListTagsForResourceInput struct { _ struct{} `type:"structure"` // The resource ID for which you want to see a list of tags. // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` // Returns a list of tags for a specific resource type. // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTagsForResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceId sets the ResourceId field's value. func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceInput { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ListTagsForResourceInput) SetResourceType(v string) *ListTagsForResourceInput { s.ResourceType = &v return s } type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` // A list of tags. TagList []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTagsForResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListTagsForResourceOutput) GoString() string { return s.String() } // SetTagList sets the TagList field's value. func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { s.TagList = v return s } // Information about an Amazon Simple Storage Service (Amazon S3) bucket to // write managed node-level logs to. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. type LoggingInfo struct { _ struct{} `type:"structure"` // The name of an S3 bucket where execution logs are stored. // // S3BucketName is a required field S3BucketName *string `min:"3" type:"string" required:"true"` // (Optional) The S3 bucket subfolder. S3KeyPrefix *string `type:"string"` // The Amazon Web Services Region where the S3 bucket is located. // // S3Region is a required field S3Region *string `min:"3" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LoggingInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LoggingInfo) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *LoggingInfo) Validate() error { invalidParams := request.ErrInvalidParams{Context: "LoggingInfo"} if s.S3BucketName == nil { invalidParams.Add(request.NewErrParamRequired("S3BucketName")) } if s.S3BucketName != nil && len(*s.S3BucketName) < 3 { invalidParams.Add(request.NewErrParamMinLen("S3BucketName", 3)) } if s.S3Region == nil { invalidParams.Add(request.NewErrParamRequired("S3Region")) } if s.S3Region != nil && len(*s.S3Region) < 3 { invalidParams.Add(request.NewErrParamMinLen("S3Region", 3)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetS3BucketName sets the S3BucketName field's value. func (s *LoggingInfo) SetS3BucketName(v string) *LoggingInfo { s.S3BucketName = &v return s } // SetS3KeyPrefix sets the S3KeyPrefix field's value. func (s *LoggingInfo) SetS3KeyPrefix(v string) *LoggingInfo { s.S3KeyPrefix = &v return s } // SetS3Region sets the S3Region field's value. func (s *LoggingInfo) SetS3Region(v string) *LoggingInfo { s.S3Region = &v return s } // The parameters for an AUTOMATION task type. type MaintenanceWindowAutomationParameters struct { _ struct{} `type:"structure"` // The version of an Automation runbook to use during task execution. DocumentVersion *string `type:"string"` // The parameters for the AUTOMATION task. // // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow // and UpdateMaintenanceWindowTask. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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. // // For AUTOMATION task types, Amazon Web Services Systems Manager ignores any // values specified for these parameters. Parameters map[string][]*string `min:"1" type:"map"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowAutomationParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowAutomationParameters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *MaintenanceWindowAutomationParameters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowAutomationParameters"} if s.Parameters != nil && len(s.Parameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDocumentVersion sets the DocumentVersion field's value. func (s *MaintenanceWindowAutomationParameters) SetDocumentVersion(v string) *MaintenanceWindowAutomationParameters { s.DocumentVersion = &v return s } // SetParameters sets the Parameters field's value. func (s *MaintenanceWindowAutomationParameters) SetParameters(v map[string][]*string) *MaintenanceWindowAutomationParameters { s.Parameters = v return s } // Describes the information about an execution of a maintenance window. type MaintenanceWindowExecution struct { _ struct{} `type:"structure"` // The time the execution finished. EndTime *time.Time `type:"timestamp"` // The time the execution started. StartTime *time.Time `type:"timestamp"` // The status of the execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` // The details explaining the status. Not available for all status values. StatusDetails *string `type:"string"` // The ID of the maintenance window execution. WindowExecutionId *string `min:"36" type:"string"` // The ID of the maintenance window. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowExecution) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowExecution) GoString() string { return s.String() } // SetEndTime sets the EndTime field's value. func (s *MaintenanceWindowExecution) SetEndTime(v time.Time) *MaintenanceWindowExecution { s.EndTime = &v return s } // SetStartTime sets the StartTime field's value. func (s *MaintenanceWindowExecution) SetStartTime(v time.Time) *MaintenanceWindowExecution { s.StartTime = &v return s } // SetStatus sets the Status field's value. func (s *MaintenanceWindowExecution) SetStatus(v string) *MaintenanceWindowExecution { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *MaintenanceWindowExecution) SetStatusDetails(v string) *MaintenanceWindowExecution { s.StatusDetails = &v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *MaintenanceWindowExecution) SetWindowExecutionId(v string) *MaintenanceWindowExecution { s.WindowExecutionId = &v return s } // SetWindowId sets the WindowId field's value. func (s *MaintenanceWindowExecution) SetWindowId(v string) *MaintenanceWindowExecution { s.WindowId = &v return s } // Information about a task execution performed as part of a maintenance window // execution. type MaintenanceWindowExecutionTaskIdentity struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm applied to your maintenance window task. AlarmConfiguration *AlarmConfiguration `type:"structure"` // The time the task execution finished. EndTime *time.Time `type:"timestamp"` // The time the task execution started. StartTime *time.Time `type:"timestamp"` // The status of the task execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` // The details explaining the status of the task execution. Not available for // all status values. StatusDetails *string `type:"string"` // The Amazon Resource Name (ARN) of the task that ran. TaskArn *string `min:"1" type:"string"` // The ID of the specific task execution in the maintenance window execution. TaskExecutionId *string `min:"36" type:"string"` // The type of task that ran. TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` // The CloudWatch alarm that was invoked by the maintenance window task. TriggeredAlarms []*AlarmStateInformation `min:"1" type:"list"` // The ID of the maintenance window execution that ran the task. WindowExecutionId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowExecutionTaskIdentity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowExecutionTaskIdentity) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetAlarmConfiguration(v *AlarmConfiguration) *MaintenanceWindowExecutionTaskIdentity { s.AlarmConfiguration = v return s } // SetEndTime sets the EndTime field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetEndTime(v time.Time) *MaintenanceWindowExecutionTaskIdentity { s.EndTime = &v return s } // SetStartTime sets the StartTime field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetStartTime(v time.Time) *MaintenanceWindowExecutionTaskIdentity { s.StartTime = &v return s } // SetStatus sets the Status field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetStatus(v string) *MaintenanceWindowExecutionTaskIdentity { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetStatusDetails(v string) *MaintenanceWindowExecutionTaskIdentity { s.StatusDetails = &v return s } // SetTaskArn sets the TaskArn field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetTaskArn(v string) *MaintenanceWindowExecutionTaskIdentity { s.TaskArn = &v return s } // SetTaskExecutionId sets the TaskExecutionId field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetTaskExecutionId(v string) *MaintenanceWindowExecutionTaskIdentity { s.TaskExecutionId = &v return s } // SetTaskType sets the TaskType field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetTaskType(v string) *MaintenanceWindowExecutionTaskIdentity { s.TaskType = &v return s } // SetTriggeredAlarms sets the TriggeredAlarms field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetTriggeredAlarms(v []*AlarmStateInformation) *MaintenanceWindowExecutionTaskIdentity { s.TriggeredAlarms = v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *MaintenanceWindowExecutionTaskIdentity) SetWindowExecutionId(v string) *MaintenanceWindowExecutionTaskIdentity { s.WindowExecutionId = &v return s } // Describes the information about a task invocation for a particular target // as part of a task execution performed as part of a maintenance window execution. type MaintenanceWindowExecutionTaskInvocationIdentity struct { _ struct{} `type:"structure"` // The time the invocation finished. EndTime *time.Time `type:"timestamp"` // The ID of the action performed in the service that actually handled the task // invocation. If the task type is RUN_COMMAND, this value is the command ID. ExecutionId *string `type:"string"` // The ID of the task invocation. InvocationId *string `min:"36" type:"string"` // User-provided value that was specified when the target was registered with // the maintenance window. This was also included in any Amazon CloudWatch Events // events raised during the task invocation. // // OwnerInformation is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowExecutionTaskInvocationIdentity's // String and GoString methods. OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The parameters that were provided for the invocation when it was run. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowExecutionTaskInvocationIdentity's // String and GoString methods. Parameters *string `type:"string" sensitive:"true"` // The time the invocation started. StartTime *time.Time `type:"timestamp"` // The status of the task invocation. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` // The details explaining the status of the task invocation. Not available for // all status values. StatusDetails *string `type:"string"` // The ID of the specific task execution in the maintenance window execution. TaskExecutionId *string `min:"36" type:"string"` // The task type. TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` // The ID of the maintenance window execution that ran the task. WindowExecutionId *string `min:"36" type:"string"` // The ID of the target definition in this maintenance window the invocation // was performed for. WindowTargetId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowExecutionTaskInvocationIdentity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowExecutionTaskInvocationIdentity) GoString() string { return s.String() } // SetEndTime sets the EndTime field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetEndTime(v time.Time) *MaintenanceWindowExecutionTaskInvocationIdentity { s.EndTime = &v return s } // SetExecutionId sets the ExecutionId field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetExecutionId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.ExecutionId = &v return s } // SetInvocationId sets the InvocationId field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetInvocationId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.InvocationId = &v return s } // SetOwnerInformation sets the OwnerInformation field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetOwnerInformation(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.OwnerInformation = &v return s } // SetParameters sets the Parameters field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetParameters(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.Parameters = &v return s } // SetStartTime sets the StartTime field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetStartTime(v time.Time) *MaintenanceWindowExecutionTaskInvocationIdentity { s.StartTime = &v return s } // SetStatus sets the Status field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetStatus(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.Status = &v return s } // SetStatusDetails sets the StatusDetails field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetStatusDetails(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.StatusDetails = &v return s } // SetTaskExecutionId sets the TaskExecutionId field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetTaskExecutionId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.TaskExecutionId = &v return s } // SetTaskType sets the TaskType field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetTaskType(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.TaskType = &v return s } // SetWindowExecutionId sets the WindowExecutionId field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetWindowExecutionId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.WindowExecutionId = &v return s } // SetWindowTargetId sets the WindowTargetId field's value. func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetWindowTargetId(v string) *MaintenanceWindowExecutionTaskInvocationIdentity { s.WindowTargetId = &v return s } // Filter used in the request. Supported filter keys depend on the API operation // that includes the filter. API operations that use MaintenanceWindowFilter> // include the following: // // - DescribeMaintenanceWindowExecutions // // - DescribeMaintenanceWindowExecutionTaskInvocations // // - DescribeMaintenanceWindowExecutionTasks // // - DescribeMaintenanceWindows // // - DescribeMaintenanceWindowTargets // // - DescribeMaintenanceWindowTasks type MaintenanceWindowFilter struct { _ struct{} `type:"structure"` // The name of the filter. Key *string `min:"1" type:"string"` // The filter values. Values []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *MaintenanceWindowFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowFilter"} 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 *MaintenanceWindowFilter) SetKey(v string) *MaintenanceWindowFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *MaintenanceWindowFilter) SetValues(v []*string) *MaintenanceWindowFilter { s.Values = v return s } // Information about the maintenance window. type MaintenanceWindowIdentity struct { _ struct{} `type:"structure"` // The number of hours before the end of the maintenance window that Amazon // Web Services Systems Manager stops scheduling new tasks for execution. Cutoff *int64 `type:"integer"` // A description of the maintenance window. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowIdentity's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the maintenance window in hours. Duration *int64 `min:"1" type:"integer"` // Indicates whether the maintenance window is enabled. Enabled *bool `type:"boolean"` // The date and time, in ISO-8601 Extended format, for when the maintenance // window is scheduled to become inactive. EndDate *string `type:"string"` // The name of the maintenance window. Name *string `min:"3" type:"string"` // The next time the maintenance window will actually run, taking into account // any specified times for the maintenance window to become active or inactive. NextExecutionTime *string `type:"string"` // The schedule of the maintenance window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` // The number of days to wait to run a maintenance window after the scheduled // cron expression date and time. ScheduleOffset *int64 `min:"1" type:"integer"` // The time zone that the scheduled maintenance window executions are based // on, in Internet Assigned Numbers Authority (IANA) format. ScheduleTimezone *string `type:"string"` // The date and time, in ISO-8601 Extended format, for when the maintenance // window is scheduled to become active. StartDate *string `type:"string"` // The ID of the maintenance window. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowIdentity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowIdentity) GoString() string { return s.String() } // SetCutoff sets the Cutoff field's value. func (s *MaintenanceWindowIdentity) SetCutoff(v int64) *MaintenanceWindowIdentity { s.Cutoff = &v return s } // SetDescription sets the Description field's value. func (s *MaintenanceWindowIdentity) SetDescription(v string) *MaintenanceWindowIdentity { s.Description = &v return s } // SetDuration sets the Duration field's value. func (s *MaintenanceWindowIdentity) SetDuration(v int64) *MaintenanceWindowIdentity { s.Duration = &v return s } // SetEnabled sets the Enabled field's value. func (s *MaintenanceWindowIdentity) SetEnabled(v bool) *MaintenanceWindowIdentity { s.Enabled = &v return s } // SetEndDate sets the EndDate field's value. func (s *MaintenanceWindowIdentity) SetEndDate(v string) *MaintenanceWindowIdentity { s.EndDate = &v return s } // SetName sets the Name field's value. func (s *MaintenanceWindowIdentity) SetName(v string) *MaintenanceWindowIdentity { s.Name = &v return s } // SetNextExecutionTime sets the NextExecutionTime field's value. func (s *MaintenanceWindowIdentity) SetNextExecutionTime(v string) *MaintenanceWindowIdentity { s.NextExecutionTime = &v return s } // SetSchedule sets the Schedule field's value. func (s *MaintenanceWindowIdentity) SetSchedule(v string) *MaintenanceWindowIdentity { s.Schedule = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *MaintenanceWindowIdentity) SetScheduleOffset(v int64) *MaintenanceWindowIdentity { s.ScheduleOffset = &v return s } // SetScheduleTimezone sets the ScheduleTimezone field's value. func (s *MaintenanceWindowIdentity) SetScheduleTimezone(v string) *MaintenanceWindowIdentity { s.ScheduleTimezone = &v return s } // SetStartDate sets the StartDate field's value. func (s *MaintenanceWindowIdentity) SetStartDate(v string) *MaintenanceWindowIdentity { s.StartDate = &v return s } // SetWindowId sets the WindowId field's value. func (s *MaintenanceWindowIdentity) SetWindowId(v string) *MaintenanceWindowIdentity { s.WindowId = &v return s } // The maintenance window to which the specified target belongs. type MaintenanceWindowIdentityForTarget struct { _ struct{} `type:"structure"` // The name of the maintenance window. Name *string `min:"3" type:"string"` // The ID of the maintenance window. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowIdentityForTarget) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowIdentityForTarget) GoString() string { return s.String() } // SetName sets the Name field's value. func (s *MaintenanceWindowIdentityForTarget) SetName(v string) *MaintenanceWindowIdentityForTarget { s.Name = &v return s } // SetWindowId sets the WindowId field's value. func (s *MaintenanceWindowIdentityForTarget) SetWindowId(v string) *MaintenanceWindowIdentityForTarget { s.WindowId = &v return s } // The parameters for a LAMBDA task type. // // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow // and UpdateMaintenanceWindowTask. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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. // // For Lambda tasks, Systems Manager ignores any values specified for TaskParameters // and LoggingInfo. type MaintenanceWindowLambdaParameters struct { _ struct{} `type:"structure"` // Pass client-specific information to the Lambda function that you are invoking. // You can then process the client information in your Lambda function as you // choose through the context variable. ClientContext *string `min:"1" type:"string"` // JSON to provide to your Lambda function as input. // // Payload is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowLambdaParameters's // String and GoString methods. // // Payload is automatically base64 encoded/decoded by the SDK. Payload []byte `type:"blob" sensitive:"true"` // (Optional) Specify an Lambda function version or alias name. If you specify // a function version, the operation uses the qualified function Amazon Resource // Name (ARN) to invoke a specific Lambda function. If you specify an alias // name, the operation uses the alias ARN to invoke the Lambda function version // to which the alias points. Qualifier *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowLambdaParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowLambdaParameters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *MaintenanceWindowLambdaParameters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowLambdaParameters"} if s.ClientContext != nil && len(*s.ClientContext) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientContext", 1)) } if s.Qualifier != nil && len(*s.Qualifier) < 1 { invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetClientContext sets the ClientContext field's value. func (s *MaintenanceWindowLambdaParameters) SetClientContext(v string) *MaintenanceWindowLambdaParameters { s.ClientContext = &v return s } // SetPayload sets the Payload field's value. func (s *MaintenanceWindowLambdaParameters) SetPayload(v []byte) *MaintenanceWindowLambdaParameters { s.Payload = v return s } // SetQualifier sets the Qualifier field's value. func (s *MaintenanceWindowLambdaParameters) SetQualifier(v string) *MaintenanceWindowLambdaParameters { s.Qualifier = &v return s } // The parameters for a RUN_COMMAND task type. // // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow // and UpdateMaintenanceWindowTask. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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. // // For RUN_COMMAND tasks, Systems Manager uses specified values for TaskParameters // and LoggingInfo only if no values are specified for TaskInvocationParameters. type MaintenanceWindowRunCommandParameters struct { _ struct{} `type:"structure"` // Configuration options for sending command output to Amazon CloudWatch Logs. CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` // Information about the commands to run. Comment *string `type:"string"` // The SHA-256 or SHA-1 hash created by the system when the document was created. // SHA-1 hashes have been deprecated. DocumentHash *string `type:"string"` // SHA-256 or SHA-1. SHA-1 hashes have been deprecated. DocumentHashType *string `type:"string" enum:"DocumentHashType"` // The Amazon Web Services Systems Manager document (SSM document) version to // use in the request. You can specify $DEFAULT, $LATEST, or a specific version // number. If you run commands by using the Amazon Web Services CLI, then you // must escape the first two options by using a backslash. If you specify a // version number, then you don't need to use the backslash. For example: // // --document-version "\$DEFAULT" // // --document-version "\$LATEST" // // --document-version "3" DocumentVersion *string `type:"string"` // Configurations for sending notifications about command status changes on // a per-managed node basis. NotificationConfig *NotificationConfig `type:"structure"` // The name of the Amazon Simple Storage Service (Amazon S3) bucket. OutputS3BucketName *string `min:"3" type:"string"` // The S3 bucket subfolder. OutputS3KeyPrefix *string `type:"string"` // The parameters for the RUN_COMMAND task execution. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowRunCommandParameters's // String and GoString methods. Parameters map[string][]*string `type:"map" sensitive:"true"` // The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) // service role to use to publish Amazon Simple Notification Service (Amazon // SNS) notifications for maintenance window Run Command tasks. ServiceRoleArn *string `type:"string"` // If this time is reached and the command hasn't already started running, it // doesn't run. TimeoutSeconds *int64 `min:"30" type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowRunCommandParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowRunCommandParameters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *MaintenanceWindowRunCommandParameters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowRunCommandParameters"} if s.OutputS3BucketName != nil && len(*s.OutputS3BucketName) < 3 { invalidParams.Add(request.NewErrParamMinLen("OutputS3BucketName", 3)) } if s.TimeoutSeconds != nil && *s.TimeoutSeconds < 30 { invalidParams.Add(request.NewErrParamMinValue("TimeoutSeconds", 30)) } if s.CloudWatchOutputConfig != nil { if err := s.CloudWatchOutputConfig.Validate(); err != nil { invalidParams.AddNested("CloudWatchOutputConfig", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. func (s *MaintenanceWindowRunCommandParameters) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *MaintenanceWindowRunCommandParameters { s.CloudWatchOutputConfig = v return s } // SetComment sets the Comment field's value. func (s *MaintenanceWindowRunCommandParameters) SetComment(v string) *MaintenanceWindowRunCommandParameters { s.Comment = &v return s } // SetDocumentHash sets the DocumentHash field's value. func (s *MaintenanceWindowRunCommandParameters) SetDocumentHash(v string) *MaintenanceWindowRunCommandParameters { s.DocumentHash = &v return s } // SetDocumentHashType sets the DocumentHashType field's value. func (s *MaintenanceWindowRunCommandParameters) SetDocumentHashType(v string) *MaintenanceWindowRunCommandParameters { s.DocumentHashType = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *MaintenanceWindowRunCommandParameters) SetDocumentVersion(v string) *MaintenanceWindowRunCommandParameters { s.DocumentVersion = &v return s } // SetNotificationConfig sets the NotificationConfig field's value. func (s *MaintenanceWindowRunCommandParameters) SetNotificationConfig(v *NotificationConfig) *MaintenanceWindowRunCommandParameters { s.NotificationConfig = v return s } // SetOutputS3BucketName sets the OutputS3BucketName field's value. func (s *MaintenanceWindowRunCommandParameters) SetOutputS3BucketName(v string) *MaintenanceWindowRunCommandParameters { s.OutputS3BucketName = &v return s } // SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. func (s *MaintenanceWindowRunCommandParameters) SetOutputS3KeyPrefix(v string) *MaintenanceWindowRunCommandParameters { s.OutputS3KeyPrefix = &v return s } // SetParameters sets the Parameters field's value. func (s *MaintenanceWindowRunCommandParameters) SetParameters(v map[string][]*string) *MaintenanceWindowRunCommandParameters { s.Parameters = v return s } // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *MaintenanceWindowRunCommandParameters) SetServiceRoleArn(v string) *MaintenanceWindowRunCommandParameters { s.ServiceRoleArn = &v return s } // SetTimeoutSeconds sets the TimeoutSeconds field's value. func (s *MaintenanceWindowRunCommandParameters) SetTimeoutSeconds(v int64) *MaintenanceWindowRunCommandParameters { s.TimeoutSeconds = &v return s } // The parameters for a STEP_FUNCTIONS task. // // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow // and UpdateMaintenanceWindowTask. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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. // // For Step Functions tasks, Systems Manager ignores any values specified for // TaskParameters and LoggingInfo. type MaintenanceWindowStepFunctionsParameters struct { _ struct{} `type:"structure"` // The inputs for the STEP_FUNCTIONS task. // // Input is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowStepFunctionsParameters's // String and GoString methods. Input *string `type:"string" sensitive:"true"` // The name of the STEP_FUNCTIONS task. Name *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowStepFunctionsParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowStepFunctionsParameters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *MaintenanceWindowStepFunctionsParameters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowStepFunctionsParameters"} if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetInput sets the Input field's value. func (s *MaintenanceWindowStepFunctionsParameters) SetInput(v string) *MaintenanceWindowStepFunctionsParameters { s.Input = &v return s } // SetName sets the Name field's value. func (s *MaintenanceWindowStepFunctionsParameters) SetName(v string) *MaintenanceWindowStepFunctionsParameters { s.Name = &v return s } // The target registered with the maintenance window. type MaintenanceWindowTarget struct { _ struct{} `type:"structure"` // A description for the target. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowTarget's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The name for the maintenance window target. Name *string `min:"3" type:"string"` // A user-provided value that will be included in any Amazon CloudWatch Events // events that are raised while running tasks for these targets in this maintenance // window. // // OwnerInformation is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowTarget's // String and GoString methods. OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The type of target that is being registered with the maintenance window. ResourceType *string `type:"string" enum:"MaintenanceWindowResourceType"` // The targets, either managed nodes or tags. // // Specify managed nodes using the following format: // // Key=instanceids,Values=, // // Tags are specified using the following format: // // Key=,Values=. Targets []*Target `type:"list"` // The ID of the maintenance window to register the target with. WindowId *string `min:"20" type:"string"` // The ID of the target. WindowTargetId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowTarget) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowTarget) GoString() string { return s.String() } // SetDescription sets the Description field's value. func (s *MaintenanceWindowTarget) SetDescription(v string) *MaintenanceWindowTarget { s.Description = &v return s } // SetName sets the Name field's value. func (s *MaintenanceWindowTarget) SetName(v string) *MaintenanceWindowTarget { s.Name = &v return s } // SetOwnerInformation sets the OwnerInformation field's value. func (s *MaintenanceWindowTarget) SetOwnerInformation(v string) *MaintenanceWindowTarget { s.OwnerInformation = &v return s } // SetResourceType sets the ResourceType field's value. func (s *MaintenanceWindowTarget) SetResourceType(v string) *MaintenanceWindowTarget { s.ResourceType = &v return s } // SetTargets sets the Targets field's value. func (s *MaintenanceWindowTarget) SetTargets(v []*Target) *MaintenanceWindowTarget { s.Targets = v return s } // SetWindowId sets the WindowId field's value. func (s *MaintenanceWindowTarget) SetWindowId(v string) *MaintenanceWindowTarget { s.WindowId = &v return s } // SetWindowTargetId sets the WindowTargetId field's value. func (s *MaintenanceWindowTarget) SetWindowTargetId(v string) *MaintenanceWindowTarget { s.WindowTargetId = &v return s } // Information about a task defined for a maintenance window. type MaintenanceWindowTask struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm applied to your maintenance window task. AlarmConfiguration *AlarmConfiguration `type:"structure"` // The specification for whether tasks should continue to run after the cutoff // time specified in the maintenance windows is reached. CutoffBehavior *string `type:"string" enum:"MaintenanceWindowTaskCutoffBehavior"` // A description of the task. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowTask's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // Information about an S3 bucket to write task-level logs to. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets this task can be run for, in parallel. // // Although this element is listed as "Required: No", a value can be omitted // only when you are registering or updating a targetless task (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // You must provide a value in all other cases. // // For maintenance window tasks without a target specified, you can't supply // a value for this option. Instead, the system inserts a placeholder value // of 1. This value doesn't affect the running of your task. MaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed before this task stops being scheduled. // // Although this element is listed as "Required: No", a value can be omitted // only when you are registering or updating a targetless task (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // You must provide a value in all other cases. // // For maintenance window tasks without a target specified, you can't supply // a value for this option. Instead, the system inserts a placeholder value // of 1. This value doesn't affect the running of your task. MaxErrors *string `min:"1" type:"string"` // The task name. Name *string `min:"3" type:"string"` // The priority of the task in the maintenance window. The lower the number, // the higher the priority. Tasks that have the same priority are scheduled // in parallel. Priority *int64 `type:"integer"` // The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) // service role to use to publish Amazon Simple Notification Service (Amazon // SNS) notifications for maintenance window Run Command tasks. ServiceRoleArn *string `type:"string"` // The targets (either managed nodes or tags). Managed nodes are specified using // Key=instanceids,Values=,. Tags are specified using // Key=,Values=. Targets []*Target `type:"list"` // The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION // task types, TaskArn is the Amazon Web Services Systems Manager (SSM document) // name or ARN. For LAMBDA tasks, it's the function name or ARN. For STEP_FUNCTIONS // tasks, it's the state machine ARN. TaskArn *string `min:"1" type:"string"` // The parameters that should be passed to the task when it is run. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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 is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowTask's // String and GoString methods. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The type of task. Type *string `type:"string" enum:"MaintenanceWindowTaskType"` // The ID of the maintenance window where the task is registered. WindowId *string `min:"20" type:"string"` // The task ID. WindowTaskId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowTask) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowTask) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *MaintenanceWindowTask) SetAlarmConfiguration(v *AlarmConfiguration) *MaintenanceWindowTask { s.AlarmConfiguration = v return s } // SetCutoffBehavior sets the CutoffBehavior field's value. func (s *MaintenanceWindowTask) SetCutoffBehavior(v string) *MaintenanceWindowTask { s.CutoffBehavior = &v return s } // SetDescription sets the Description field's value. func (s *MaintenanceWindowTask) SetDescription(v string) *MaintenanceWindowTask { s.Description = &v return s } // SetLoggingInfo sets the LoggingInfo field's value. func (s *MaintenanceWindowTask) SetLoggingInfo(v *LoggingInfo) *MaintenanceWindowTask { s.LoggingInfo = v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *MaintenanceWindowTask) SetMaxConcurrency(v string) *MaintenanceWindowTask { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *MaintenanceWindowTask) SetMaxErrors(v string) *MaintenanceWindowTask { s.MaxErrors = &v return s } // SetName sets the Name field's value. func (s *MaintenanceWindowTask) SetName(v string) *MaintenanceWindowTask { s.Name = &v return s } // SetPriority sets the Priority field's value. func (s *MaintenanceWindowTask) SetPriority(v int64) *MaintenanceWindowTask { s.Priority = &v return s } // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *MaintenanceWindowTask) SetServiceRoleArn(v string) *MaintenanceWindowTask { s.ServiceRoleArn = &v return s } // SetTargets sets the Targets field's value. func (s *MaintenanceWindowTask) SetTargets(v []*Target) *MaintenanceWindowTask { s.Targets = v return s } // SetTaskArn sets the TaskArn field's value. func (s *MaintenanceWindowTask) SetTaskArn(v string) *MaintenanceWindowTask { s.TaskArn = &v return s } // SetTaskParameters sets the TaskParameters field's value. func (s *MaintenanceWindowTask) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *MaintenanceWindowTask { s.TaskParameters = v return s } // SetType sets the Type field's value. func (s *MaintenanceWindowTask) SetType(v string) *MaintenanceWindowTask { s.Type = &v return s } // SetWindowId sets the WindowId field's value. func (s *MaintenanceWindowTask) SetWindowId(v string) *MaintenanceWindowTask { s.WindowId = &v return s } // SetWindowTaskId sets the WindowTaskId field's value. func (s *MaintenanceWindowTask) SetWindowTaskId(v string) *MaintenanceWindowTask { s.WindowTaskId = &v return s } // The parameters for task execution. type MaintenanceWindowTaskInvocationParameters struct { _ struct{} `type:"structure"` // The parameters for an AUTOMATION task type. Automation *MaintenanceWindowAutomationParameters `type:"structure"` // The parameters for a LAMBDA task type. Lambda *MaintenanceWindowLambdaParameters `type:"structure"` // The parameters for a RUN_COMMAND task type. RunCommand *MaintenanceWindowRunCommandParameters `type:"structure"` // The parameters for a STEP_FUNCTIONS task type. StepFunctions *MaintenanceWindowStepFunctionsParameters `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowTaskInvocationParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowTaskInvocationParameters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *MaintenanceWindowTaskInvocationParameters) Validate() error { invalidParams := request.ErrInvalidParams{Context: "MaintenanceWindowTaskInvocationParameters"} if s.Automation != nil { if err := s.Automation.Validate(); err != nil { invalidParams.AddNested("Automation", err.(request.ErrInvalidParams)) } } if s.Lambda != nil { if err := s.Lambda.Validate(); err != nil { invalidParams.AddNested("Lambda", err.(request.ErrInvalidParams)) } } if s.RunCommand != nil { if err := s.RunCommand.Validate(); err != nil { invalidParams.AddNested("RunCommand", err.(request.ErrInvalidParams)) } } if s.StepFunctions != nil { if err := s.StepFunctions.Validate(); err != nil { invalidParams.AddNested("StepFunctions", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAutomation sets the Automation field's value. func (s *MaintenanceWindowTaskInvocationParameters) SetAutomation(v *MaintenanceWindowAutomationParameters) *MaintenanceWindowTaskInvocationParameters { s.Automation = v return s } // SetLambda sets the Lambda field's value. func (s *MaintenanceWindowTaskInvocationParameters) SetLambda(v *MaintenanceWindowLambdaParameters) *MaintenanceWindowTaskInvocationParameters { s.Lambda = v return s } // SetRunCommand sets the RunCommand field's value. func (s *MaintenanceWindowTaskInvocationParameters) SetRunCommand(v *MaintenanceWindowRunCommandParameters) *MaintenanceWindowTaskInvocationParameters { s.RunCommand = v return s } // SetStepFunctions sets the StepFunctions field's value. func (s *MaintenanceWindowTaskInvocationParameters) SetStepFunctions(v *MaintenanceWindowStepFunctionsParameters) *MaintenanceWindowTaskInvocationParameters { s.StepFunctions = v return s } // Defines the values for a task parameter. type MaintenanceWindowTaskParameterValueExpression struct { _ struct{} `type:"structure" sensitive:"true"` // This field contains an array of 0 or more strings, each 1 to 255 characters // in length. // // Values is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by MaintenanceWindowTaskParameterValueExpression's // String and GoString methods. Values []*string `type:"list" sensitive:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowTaskParameterValueExpression) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaintenanceWindowTaskParameterValueExpression) GoString() string { return s.String() } // SetValues sets the Values field's value. func (s *MaintenanceWindowTaskParameterValueExpression) SetValues(v []*string) *MaintenanceWindowTaskParameterValueExpression { s.Values = v return s } // The size limit of a document is 64 KB. type MaxDocumentSizeExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaxDocumentSizeExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MaxDocumentSizeExceeded) GoString() string { return s.String() } func newErrorMaxDocumentSizeExceeded(v protocol.ResponseMetadata) error { return &MaxDocumentSizeExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *MaxDocumentSizeExceeded) Code() string { return "MaxDocumentSizeExceeded" } // Message returns the exception's message. func (s *MaxDocumentSizeExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *MaxDocumentSizeExceeded) OrigErr() error { return nil } func (s *MaxDocumentSizeExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *MaxDocumentSizeExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *MaxDocumentSizeExceeded) RequestID() string { return s.RespMetadata.RequestID } // Metadata to assign to an Application Manager application. type MetadataValue struct { _ struct{} `type:"structure"` // Metadata value to assign to an Application Manager application. Value *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MetadataValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s MetadataValue) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *MetadataValue) Validate() error { invalidParams := request.ErrInvalidParams{Context: "MetadataValue"} if s.Value != nil && len(*s.Value) < 1 { invalidParams.Add(request.NewErrParamMinLen("Value", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetValue sets the Value field's value. func (s *MetadataValue) SetValue(v string) *MetadataValue { s.Value = &v return s } type ModifyDocumentPermissionInput struct { _ struct{} `type:"structure"` // The Amazon Web Services users that should have access to the document. The // account IDs can either be a group of account IDs or All. AccountIdsToAdd []*string `type:"list"` // The Amazon Web Services users that should no longer have access to the document. // The Amazon Web Services user can either be a group of account IDs or All. // This action has a higher priority than AccountIdsToAdd. If you specify an // ID to add and the same ID to remove, the system removes access to the document. AccountIdsToRemove []*string `type:"list"` // The name of the document that you want to share. // // Name is a required field Name *string `type:"string" required:"true"` // The permission type for the document. The permission type can be Share. // // PermissionType is a required field PermissionType *string `type:"string" required:"true" enum:"DocumentPermissionType"` // (Optional) The version of the document to share. If it isn't specified, the // system choose the Default version to share. SharedDocumentVersion *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ModifyDocumentPermissionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ModifyDocumentPermissionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ModifyDocumentPermissionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ModifyDocumentPermissionInput"} if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.PermissionType == nil { invalidParams.Add(request.NewErrParamRequired("PermissionType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccountIdsToAdd sets the AccountIdsToAdd field's value. func (s *ModifyDocumentPermissionInput) SetAccountIdsToAdd(v []*string) *ModifyDocumentPermissionInput { s.AccountIdsToAdd = v return s } // SetAccountIdsToRemove sets the AccountIdsToRemove field's value. func (s *ModifyDocumentPermissionInput) SetAccountIdsToRemove(v []*string) *ModifyDocumentPermissionInput { s.AccountIdsToRemove = v return s } // SetName sets the Name field's value. func (s *ModifyDocumentPermissionInput) SetName(v string) *ModifyDocumentPermissionInput { s.Name = &v return s } // SetPermissionType sets the PermissionType field's value. func (s *ModifyDocumentPermissionInput) SetPermissionType(v string) *ModifyDocumentPermissionInput { s.PermissionType = &v return s } // SetSharedDocumentVersion sets the SharedDocumentVersion field's value. func (s *ModifyDocumentPermissionInput) SetSharedDocumentVersion(v string) *ModifyDocumentPermissionInput { s.SharedDocumentVersion = &v return s } type ModifyDocumentPermissionOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ModifyDocumentPermissionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ModifyDocumentPermissionOutput) GoString() string { return s.String() } // A summary of resources that aren't compliant. The summary is organized according // to resource type. type NonCompliantSummary struct { _ struct{} `type:"structure"` // The total number of compliance items that aren't compliant. NonCompliantCount *int64 `type:"integer"` // A summary of the non-compliance severity by compliance type SeveritySummary *SeveritySummary `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s NonCompliantSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s NonCompliantSummary) GoString() string { return s.String() } // SetNonCompliantCount sets the NonCompliantCount field's value. func (s *NonCompliantSummary) SetNonCompliantCount(v int64) *NonCompliantSummary { s.NonCompliantCount = &v return s } // SetSeveritySummary sets the SeveritySummary field's value. func (s *NonCompliantSummary) SetSeveritySummary(v *SeveritySummary) *NonCompliantSummary { s.SeveritySummary = v return s } // Configurations for sending notifications. type NotificationConfig struct { _ struct{} `type:"structure"` // An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon // SNS) topic. Run Command pushes notifications about command status changes // to this topic. NotificationArn *string `type:"string"` // The different events for which you can receive notifications. To learn more // about these events, see Monitoring Systems Manager status changes using Amazon // SNS notifications (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html) // in the Amazon Web Services Systems Manager User Guide. NotificationEvents []*string `type:"list" enum:"NotificationEvent"` // The type of notification. // // * Command: Receive notification when the status of a command changes. // // * Invocation: For commands sent to multiple managed nodes, receive notification // on a per-node basis when the status of a command changes. NotificationType *string `type:"string" enum:"NotificationType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s NotificationConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s NotificationConfig) GoString() string { return s.String() } // SetNotificationArn sets the NotificationArn field's value. func (s *NotificationConfig) SetNotificationArn(v string) *NotificationConfig { s.NotificationArn = &v return s } // SetNotificationEvents sets the NotificationEvents field's value. func (s *NotificationConfig) SetNotificationEvents(v []*string) *NotificationConfig { s.NotificationEvents = v return s } // SetNotificationType sets the NotificationType field's value. func (s *NotificationConfig) SetNotificationType(v string) *NotificationConfig { s.NotificationType = &v return s } // One or more aggregators for viewing counts of OpsData using different dimensions // such as Source, CreatedTime, or Source and CreatedTime, to name a few. type OpsAggregator struct { _ struct{} `type:"structure"` // Either a Range or Count aggregator for limiting an OpsData summary. AggregatorType *string `min:"1" type:"string"` // A nested aggregator for viewing counts of OpsData. Aggregators []*OpsAggregator `min:"1" type:"list"` // The name of an OpsData attribute on which to limit the count of OpsData. AttributeName *string `min:"1" type:"string"` // The aggregator filters. Filters []*OpsFilter `min:"1" type:"list"` // The data type name to use for viewing counts of OpsData. TypeName *string `min:"1" type:"string"` // The aggregator value. Values map[string]*string `type:"map"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsAggregator) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsAggregator) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OpsAggregator) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OpsAggregator"} if s.AggregatorType != nil && len(*s.AggregatorType) < 1 { invalidParams.Add(request.NewErrParamMinLen("AggregatorType", 1)) } if s.Aggregators != nil && len(s.Aggregators) < 1 { invalidParams.Add(request.NewErrParamMinLen("Aggregators", 1)) } if s.AttributeName != nil && len(*s.AttributeName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) } if s.Filters != nil && len(s.Filters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } if s.TypeName != nil && len(*s.TypeName) < 1 { invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) } if s.Aggregators != nil { for i, v := range s.Aggregators { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Aggregators", i), err.(request.ErrInvalidParams)) } } } 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 } // SetAggregatorType sets the AggregatorType field's value. func (s *OpsAggregator) SetAggregatorType(v string) *OpsAggregator { s.AggregatorType = &v return s } // SetAggregators sets the Aggregators field's value. func (s *OpsAggregator) SetAggregators(v []*OpsAggregator) *OpsAggregator { s.Aggregators = v return s } // SetAttributeName sets the AttributeName field's value. func (s *OpsAggregator) SetAttributeName(v string) *OpsAggregator { s.AttributeName = &v return s } // SetFilters sets the Filters field's value. func (s *OpsAggregator) SetFilters(v []*OpsFilter) *OpsAggregator { s.Filters = v return s } // SetTypeName sets the TypeName field's value. func (s *OpsAggregator) SetTypeName(v string) *OpsAggregator { s.TypeName = &v return s } // SetValues sets the Values field's value. func (s *OpsAggregator) SetValues(v map[string]*string) *OpsAggregator { s.Values = v return s } // The result of the query. type OpsEntity struct { _ struct{} `type:"structure"` // The data returned by the query. Data map[string]*OpsEntityItem `type:"map"` // The query ID. Id *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsEntity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsEntity) GoString() string { return s.String() } // SetData sets the Data field's value. func (s *OpsEntity) SetData(v map[string]*OpsEntityItem) *OpsEntity { s.Data = v return s } // SetId sets the Id field's value. func (s *OpsEntity) SetId(v string) *OpsEntity { s.Id = &v return s } // The OpsData summary. type OpsEntityItem struct { _ struct{} `type:"structure"` // The time the OpsData was captured. CaptureTime *string `type:"string"` // The details of an OpsData summary. Content []map[string]*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsEntityItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsEntityItem) GoString() string { return s.String() } // SetCaptureTime sets the CaptureTime field's value. func (s *OpsEntityItem) SetCaptureTime(v string) *OpsEntityItem { s.CaptureTime = &v return s } // SetContent sets the Content field's value. func (s *OpsEntityItem) SetContent(v []map[string]*string) *OpsEntityItem { s.Content = v return s } // A filter for viewing OpsData summaries. type OpsFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // The type of filter. Type *string `type:"string" enum:"OpsFilterOperatorType"` // The filter value. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OpsFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OpsFilter"} 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.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *OpsFilter) SetKey(v string) *OpsFilter { s.Key = &v return s } // SetType sets the Type field's value. func (s *OpsFilter) SetType(v string) *OpsFilter { s.Type = &v return s } // SetValues sets the Values field's value. func (s *OpsFilter) SetValues(v []*string) *OpsFilter { s.Values = v return s } // Operations engineers and IT professionals use Amazon Web Services Systems // Manager OpsCenter to view, investigate, and remediate operational work items // (OpsItems) impacting the performance and health of their Amazon Web Services // resources. OpsCenter is integrated with Amazon EventBridge and Amazon CloudWatch. // This means you can configure these services to automatically create an OpsItem // in OpsCenter when a CloudWatch alarm enters the ALARM state or when EventBridge // processes an event from any Amazon Web Services service that publishes events. // Configuring Amazon CloudWatch alarms and EventBridge events to automatically // create OpsItems allows you to quickly diagnose and remediate issues with // Amazon Web Services resources from a single console. // // To help you diagnose issues, each OpsItem includes contextually relevant // information such as the name and ID of the Amazon Web Services resource that // generated the OpsItem, alarm or event details, alarm history, and an alarm // timeline graph. For the Amazon Web Services resource, OpsCenter aggregates // information from Config, CloudTrail logs, and EventBridge, so you don't have // to navigate across multiple console pages during your investigation. For // more information, see OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the Amazon Web Services Systems Manager User Guide. type OpsItem struct { _ struct{} `type:"structure"` // The time a runbook workflow ended. Currently reported only for the OpsItem // type /aws/changerequest. ActualEndTime *time.Time `type:"timestamp"` // The time a runbook workflow started. Currently reported only for the OpsItem // type /aws/changerequest. ActualStartTime *time.Time `type:"timestamp"` // An OpsItem category. Category options include: Availability, Cost, Performance, // Recovery, Security. Category *string `min:"1" type:"string"` // The ARN of the Amazon Web Services account that created the OpsItem. CreatedBy *string `type:"string"` // The date and time the OpsItem was created. CreatedTime *time.Time `type:"timestamp"` // The OpsItem description. Description *string `min:"1" type:"string"` // The ARN of the Amazon Web Services account that last updated the OpsItem. LastModifiedBy *string `type:"string"` // The date and time the OpsItem was last updated. LastModifiedTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of an Amazon Simple Notification Service (Amazon // SNS) topic where notifications are sent when this OpsItem is edited or changed. Notifications []*OpsItemNotification `type:"list"` // Operational data is custom data that provides useful reference details about // the OpsItem. For example, you can specify log files, error strings, license // keys, troubleshooting tips, or other relevant data. You enter operational // data as key-value pairs. The key has a maximum length of 128 characters. // The value has a maximum size of 20 KB. // // Operational data keys can't begin with the following: amazon, aws, amzn, // ssm, /amazon, /aws, /amzn, /ssm. // // You can choose to make the data searchable by other users in the account // or you can restrict search access. Searchable data means that all users with // access to the OpsItem Overview page (as provided by the DescribeOpsItems // API operation) can view and search on the specified data. Operational data // that isn't searchable is only viewable by users who have access to the OpsItem // (as provided by the GetOpsItem API operation). // // Use the /aws/resources key in OperationalData to specify a related resource // in the request. Use the /aws/automations key in OperationalData to associate // an Automation runbook with the OpsItem. To view Amazon Web Services CLI example // commands that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html) // in the Amazon Web Services Systems Manager User Guide. OperationalData map[string]*OpsItemDataValue `type:"map"` // The OpsItem Amazon Resource Name (ARN). OpsItemArn *string `min:"20" type:"string"` // The ID of the OpsItem. OpsItemId *string `type:"string"` // The type of OpsItem. Systems Manager supports the following types of OpsItems: // // * /aws/issue This type of OpsItem is used for default OpsItems created // by OpsCenter. // // * /aws/changerequest This type of OpsItem is used by Change Manager for // reviewing and approving or rejecting change requests. // // * /aws/insight This type of OpsItem is used by OpsCenter for aggregating // and reporting on duplicate OpsItems. OpsItemType *string `type:"string"` // The time specified in a change request for a runbook workflow to end. Currently // supported only for the OpsItem type /aws/changerequest. PlannedEndTime *time.Time `type:"timestamp"` // The time specified in a change request for a runbook workflow to start. Currently // supported only for the OpsItem type /aws/changerequest. PlannedStartTime *time.Time `type:"timestamp"` // The importance of this OpsItem in relation to other OpsItems in the system. Priority *int64 `min:"1" type:"integer"` // One or more OpsItems that share something in common with the current OpsItem. // For example, related OpsItems can include OpsItems with similar error messages, // impacted resources, or statuses for the impacted resource. RelatedOpsItems []*RelatedOpsItem `type:"list"` // The severity of the OpsItem. Severity options range from 1 to 4. Severity *string `min:"1" type:"string"` // The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The impacted // resource is a subset of source. Source *string `min:"1" type:"string"` // The OpsItem status. Status can be Open, In Progress, or Resolved. For more // information, see Editing OpsItem details (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html) // in the Amazon Web Services Systems Manager User Guide. Status *string `type:"string" enum:"OpsItemStatus"` // A short heading that describes the nature of the OpsItem and the impacted // resource. Title *string `min:"1" type:"string"` // The version of this OpsItem. Each time the OpsItem is edited the version // number increments by one. Version *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItem) GoString() string { return s.String() } // SetActualEndTime sets the ActualEndTime field's value. func (s *OpsItem) SetActualEndTime(v time.Time) *OpsItem { s.ActualEndTime = &v return s } // SetActualStartTime sets the ActualStartTime field's value. func (s *OpsItem) SetActualStartTime(v time.Time) *OpsItem { s.ActualStartTime = &v return s } // SetCategory sets the Category field's value. func (s *OpsItem) SetCategory(v string) *OpsItem { s.Category = &v return s } // SetCreatedBy sets the CreatedBy field's value. func (s *OpsItem) SetCreatedBy(v string) *OpsItem { s.CreatedBy = &v return s } // SetCreatedTime sets the CreatedTime field's value. func (s *OpsItem) SetCreatedTime(v time.Time) *OpsItem { s.CreatedTime = &v return s } // SetDescription sets the Description field's value. func (s *OpsItem) SetDescription(v string) *OpsItem { s.Description = &v return s } // SetLastModifiedBy sets the LastModifiedBy field's value. func (s *OpsItem) SetLastModifiedBy(v string) *OpsItem { s.LastModifiedBy = &v return s } // SetLastModifiedTime sets the LastModifiedTime field's value. func (s *OpsItem) SetLastModifiedTime(v time.Time) *OpsItem { s.LastModifiedTime = &v return s } // SetNotifications sets the Notifications field's value. func (s *OpsItem) SetNotifications(v []*OpsItemNotification) *OpsItem { s.Notifications = v return s } // SetOperationalData sets the OperationalData field's value. func (s *OpsItem) SetOperationalData(v map[string]*OpsItemDataValue) *OpsItem { s.OperationalData = v return s } // SetOpsItemArn sets the OpsItemArn field's value. func (s *OpsItem) SetOpsItemArn(v string) *OpsItem { s.OpsItemArn = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *OpsItem) SetOpsItemId(v string) *OpsItem { s.OpsItemId = &v return s } // SetOpsItemType sets the OpsItemType field's value. func (s *OpsItem) SetOpsItemType(v string) *OpsItem { s.OpsItemType = &v return s } // SetPlannedEndTime sets the PlannedEndTime field's value. func (s *OpsItem) SetPlannedEndTime(v time.Time) *OpsItem { s.PlannedEndTime = &v return s } // SetPlannedStartTime sets the PlannedStartTime field's value. func (s *OpsItem) SetPlannedStartTime(v time.Time) *OpsItem { s.PlannedStartTime = &v return s } // SetPriority sets the Priority field's value. func (s *OpsItem) SetPriority(v int64) *OpsItem { s.Priority = &v return s } // SetRelatedOpsItems sets the RelatedOpsItems field's value. func (s *OpsItem) SetRelatedOpsItems(v []*RelatedOpsItem) *OpsItem { s.RelatedOpsItems = v return s } // SetSeverity sets the Severity field's value. func (s *OpsItem) SetSeverity(v string) *OpsItem { s.Severity = &v return s } // SetSource sets the Source field's value. func (s *OpsItem) SetSource(v string) *OpsItem { s.Source = &v return s } // SetStatus sets the Status field's value. func (s *OpsItem) SetStatus(v string) *OpsItem { s.Status = &v return s } // SetTitle sets the Title field's value. func (s *OpsItem) SetTitle(v string) *OpsItem { s.Title = &v return s } // SetVersion sets the Version field's value. func (s *OpsItem) SetVersion(v string) *OpsItem { s.Version = &v return s } // You don't have permission to view OpsItems in the specified account. Verify // that your account is configured either as a Systems Manager delegated administrator // or that you are logged into the Organizations management account. type OpsItemAccessDeniedException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemAccessDeniedException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemAccessDeniedException) GoString() string { return s.String() } func newErrorOpsItemAccessDeniedException(v protocol.ResponseMetadata) error { return &OpsItemAccessDeniedException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsItemAccessDeniedException) Code() string { return "OpsItemAccessDeniedException" } // Message returns the exception's message. func (s *OpsItemAccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsItemAccessDeniedException) OrigErr() error { return nil } func (s *OpsItemAccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsItemAccessDeniedException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsItemAccessDeniedException) RequestID() string { return s.RespMetadata.RequestID } // The OpsItem already exists. type OpsItemAlreadyExistsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` OpsItemId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemAlreadyExistsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemAlreadyExistsException) GoString() string { return s.String() } func newErrorOpsItemAlreadyExistsException(v protocol.ResponseMetadata) error { return &OpsItemAlreadyExistsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsItemAlreadyExistsException) Code() string { return "OpsItemAlreadyExistsException" } // Message returns the exception's message. func (s *OpsItemAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsItemAlreadyExistsException) OrigErr() error { return nil } func (s *OpsItemAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsItemAlreadyExistsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsItemAlreadyExistsException) RequestID() string { return s.RespMetadata.RequestID } // The specified OpsItem is in the process of being deleted. type OpsItemConflictException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemConflictException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemConflictException) GoString() string { return s.String() } func newErrorOpsItemConflictException(v protocol.ResponseMetadata) error { return &OpsItemConflictException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsItemConflictException) Code() string { return "OpsItemConflictException" } // Message returns the exception's message. func (s *OpsItemConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsItemConflictException) OrigErr() error { return nil } func (s *OpsItemConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsItemConflictException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsItemConflictException) RequestID() string { return s.RespMetadata.RequestID } // An object that defines the value of the key and its type in the OperationalData // map. type OpsItemDataValue struct { _ struct{} `type:"structure"` // The type of key-value pair. Valid types include SearchableString and String. Type *string `type:"string" enum:"OpsItemDataType"` // The value of the OperationalData key. Value *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemDataValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemDataValue) GoString() string { return s.String() } // SetType sets the Type field's value. func (s *OpsItemDataValue) SetType(v string) *OpsItemDataValue { s.Type = &v return s } // SetValue sets the Value field's value. func (s *OpsItemDataValue) SetValue(v string) *OpsItemDataValue { s.Value = &v return s } // Describes a filter for a specific list of OpsItem events. You can filter // event information by using tags. You specify tags by using a key-value pair // mapping. type OpsItemEventFilter struct { _ struct{} `type:"structure"` // The name of the filter key. Currently, the only supported value is OpsItemId. // // Key is a required field Key *string `type:"string" required:"true" enum:"OpsItemEventFilterKey"` // The operator used by the filter call. Currently, the only supported value // is Equal. // // Operator is a required field Operator *string `type:"string" required:"true" enum:"OpsItemEventFilterOperator"` // The values for the filter, consisting of one or more OpsItem IDs. // // Values is a required field Values []*string `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemEventFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemEventFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OpsItemEventFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OpsItemEventFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Operator == nil { invalidParams.Add(request.NewErrParamRequired("Operator")) } if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *OpsItemEventFilter) SetKey(v string) *OpsItemEventFilter { s.Key = &v return s } // SetOperator sets the Operator field's value. func (s *OpsItemEventFilter) SetOperator(v string) *OpsItemEventFilter { s.Operator = &v return s } // SetValues sets the Values field's value. func (s *OpsItemEventFilter) SetValues(v []*string) *OpsItemEventFilter { s.Values = v return s } // Summary information about an OpsItem event or that associated an OpsItem // with a related item. type OpsItemEventSummary struct { _ struct{} `type:"structure"` // Information about the user or resource that created the OpsItem event. CreatedBy *OpsItemIdentity `type:"structure"` // The date and time the OpsItem event was created. CreatedTime *time.Time `type:"timestamp"` // Specific information about the OpsItem event. Detail *string `type:"string"` // The type of information provided as a detail. DetailType *string `type:"string"` // The ID of the OpsItem event. EventId *string `type:"string"` // The ID of the OpsItem. OpsItemId *string `type:"string"` // The source of the OpsItem event. Source *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemEventSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemEventSummary) GoString() string { return s.String() } // SetCreatedBy sets the CreatedBy field's value. func (s *OpsItemEventSummary) SetCreatedBy(v *OpsItemIdentity) *OpsItemEventSummary { s.CreatedBy = v return s } // SetCreatedTime sets the CreatedTime field's value. func (s *OpsItemEventSummary) SetCreatedTime(v time.Time) *OpsItemEventSummary { s.CreatedTime = &v return s } // SetDetail sets the Detail field's value. func (s *OpsItemEventSummary) SetDetail(v string) *OpsItemEventSummary { s.Detail = &v return s } // SetDetailType sets the DetailType field's value. func (s *OpsItemEventSummary) SetDetailType(v string) *OpsItemEventSummary { s.DetailType = &v return s } // SetEventId sets the EventId field's value. func (s *OpsItemEventSummary) SetEventId(v string) *OpsItemEventSummary { s.EventId = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *OpsItemEventSummary) SetOpsItemId(v string) *OpsItemEventSummary { s.OpsItemId = &v return s } // SetSource sets the Source field's value. func (s *OpsItemEventSummary) SetSource(v string) *OpsItemEventSummary { s.Source = &v return s } // Describes an OpsItem filter. type OpsItemFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // Key is a required field Key *string `type:"string" required:"true" enum:"OpsItemFilterKey"` // The operator used by the filter call. // // Operator is a required field Operator *string `type:"string" required:"true" enum:"OpsItemFilterOperator"` // The filter value. // // Values is a required field Values []*string `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OpsItemFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OpsItemFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Operator == nil { invalidParams.Add(request.NewErrParamRequired("Operator")) } if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *OpsItemFilter) SetKey(v string) *OpsItemFilter { s.Key = &v return s } // SetOperator sets the Operator field's value. func (s *OpsItemFilter) SetOperator(v string) *OpsItemFilter { s.Operator = &v return s } // SetValues sets the Values field's value. func (s *OpsItemFilter) SetValues(v []*string) *OpsItemFilter { s.Values = v return s } // Information about the user or resource that created an OpsItem event. type OpsItemIdentity struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem // event. Arn *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemIdentity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemIdentity) GoString() string { return s.String() } // SetArn sets the Arn field's value. func (s *OpsItemIdentity) SetArn(v string) *OpsItemIdentity { s.Arn = &v return s } // A specified parameter argument isn't valid. Verify the available arguments // and try again. type OpsItemInvalidParameterException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` ParameterNames []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemInvalidParameterException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemInvalidParameterException) GoString() string { return s.String() } func newErrorOpsItemInvalidParameterException(v protocol.ResponseMetadata) error { return &OpsItemInvalidParameterException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsItemInvalidParameterException) Code() string { return "OpsItemInvalidParameterException" } // Message returns the exception's message. func (s *OpsItemInvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsItemInvalidParameterException) OrigErr() error { return nil } func (s *OpsItemInvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsItemInvalidParameterException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsItemInvalidParameterException) RequestID() string { return s.RespMetadata.RequestID } // The request caused OpsItems to exceed one or more quotas. type OpsItemLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Limit *int64 `type:"integer"` LimitType *string `type:"string"` Message_ *string `locationName:"Message" type:"string"` ResourceTypes []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemLimitExceededException) GoString() string { return s.String() } func newErrorOpsItemLimitExceededException(v protocol.ResponseMetadata) error { return &OpsItemLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsItemLimitExceededException) Code() string { return "OpsItemLimitExceededException" } // Message returns the exception's message. func (s *OpsItemLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsItemLimitExceededException) OrigErr() error { return nil } func (s *OpsItemLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsItemLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsItemLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // The specified OpsItem ID doesn't exist. Verify the ID and try again. type OpsItemNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemNotFoundException) GoString() string { return s.String() } func newErrorOpsItemNotFoundException(v protocol.ResponseMetadata) error { return &OpsItemNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsItemNotFoundException) Code() string { return "OpsItemNotFoundException" } // Message returns the exception's message. func (s *OpsItemNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsItemNotFoundException) OrigErr() error { return nil } func (s *OpsItemNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsItemNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsItemNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // A notification about the OpsItem. type OpsItemNotification struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of an Amazon Simple Notification Service (Amazon // SNS) topic where notifications are sent when this OpsItem is edited or changed. Arn *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemNotification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemNotification) GoString() string { return s.String() } // SetArn sets the Arn field's value. func (s *OpsItemNotification) SetArn(v string) *OpsItemNotification { s.Arn = &v return s } // The Amazon Resource Name (ARN) is already associated with the OpsItem. type OpsItemRelatedItemAlreadyExistsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` OpsItemId *string `type:"string"` ResourceUri *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemRelatedItemAlreadyExistsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemRelatedItemAlreadyExistsException) GoString() string { return s.String() } func newErrorOpsItemRelatedItemAlreadyExistsException(v protocol.ResponseMetadata) error { return &OpsItemRelatedItemAlreadyExistsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsItemRelatedItemAlreadyExistsException) Code() string { return "OpsItemRelatedItemAlreadyExistsException" } // Message returns the exception's message. func (s *OpsItemRelatedItemAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsItemRelatedItemAlreadyExistsException) OrigErr() error { return nil } func (s *OpsItemRelatedItemAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsItemRelatedItemAlreadyExistsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsItemRelatedItemAlreadyExistsException) RequestID() string { return s.RespMetadata.RequestID } // The association wasn't found using the parameters you specified in the call. // Verify the information and try again. type OpsItemRelatedItemAssociationNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemRelatedItemAssociationNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemRelatedItemAssociationNotFoundException) GoString() string { return s.String() } func newErrorOpsItemRelatedItemAssociationNotFoundException(v protocol.ResponseMetadata) error { return &OpsItemRelatedItemAssociationNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsItemRelatedItemAssociationNotFoundException) Code() string { return "OpsItemRelatedItemAssociationNotFoundException" } // Message returns the exception's message. func (s *OpsItemRelatedItemAssociationNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsItemRelatedItemAssociationNotFoundException) OrigErr() error { return nil } func (s *OpsItemRelatedItemAssociationNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsItemRelatedItemAssociationNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsItemRelatedItemAssociationNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Summary information about related-item resources for an OpsItem. type OpsItemRelatedItemSummary struct { _ struct{} `type:"structure"` // The association ID. AssociationId *string `type:"string"` // The association type. AssociationType *string `type:"string"` // Information about the user or resource that created an OpsItem event. CreatedBy *OpsItemIdentity `type:"structure"` // The time the related-item association was created. CreatedTime *time.Time `type:"timestamp"` // Information about the user or resource that created an OpsItem event. LastModifiedBy *OpsItemIdentity `type:"structure"` // The time the related-item association was last updated. LastModifiedTime *time.Time `type:"timestamp"` // The OpsItem ID. OpsItemId *string `type:"string"` // The resource type. ResourceType *string `type:"string"` // The Amazon Resource Name (ARN) of the related-item resource. ResourceUri *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemRelatedItemSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemRelatedItemSummary) GoString() string { return s.String() } // SetAssociationId sets the AssociationId field's value. func (s *OpsItemRelatedItemSummary) SetAssociationId(v string) *OpsItemRelatedItemSummary { s.AssociationId = &v return s } // SetAssociationType sets the AssociationType field's value. func (s *OpsItemRelatedItemSummary) SetAssociationType(v string) *OpsItemRelatedItemSummary { s.AssociationType = &v return s } // SetCreatedBy sets the CreatedBy field's value. func (s *OpsItemRelatedItemSummary) SetCreatedBy(v *OpsItemIdentity) *OpsItemRelatedItemSummary { s.CreatedBy = v return s } // SetCreatedTime sets the CreatedTime field's value. func (s *OpsItemRelatedItemSummary) SetCreatedTime(v time.Time) *OpsItemRelatedItemSummary { s.CreatedTime = &v return s } // SetLastModifiedBy sets the LastModifiedBy field's value. func (s *OpsItemRelatedItemSummary) SetLastModifiedBy(v *OpsItemIdentity) *OpsItemRelatedItemSummary { s.LastModifiedBy = v return s } // SetLastModifiedTime sets the LastModifiedTime field's value. func (s *OpsItemRelatedItemSummary) SetLastModifiedTime(v time.Time) *OpsItemRelatedItemSummary { s.LastModifiedTime = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *OpsItemRelatedItemSummary) SetOpsItemId(v string) *OpsItemRelatedItemSummary { s.OpsItemId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *OpsItemRelatedItemSummary) SetResourceType(v string) *OpsItemRelatedItemSummary { s.ResourceType = &v return s } // SetResourceUri sets the ResourceUri field's value. func (s *OpsItemRelatedItemSummary) SetResourceUri(v string) *OpsItemRelatedItemSummary { s.ResourceUri = &v return s } // Describes a filter for a specific list of related-item resources. type OpsItemRelatedItemsFilter struct { _ struct{} `type:"structure"` // The name of the filter key. Supported values include ResourceUri, ResourceType, // or AssociationId. // // Key is a required field Key *string `type:"string" required:"true" enum:"OpsItemRelatedItemsFilterKey"` // The operator used by the filter call. The only supported operator is EQUAL. // // Operator is a required field Operator *string `type:"string" required:"true" enum:"OpsItemRelatedItemsFilterOperator"` // The values for the filter. // // Values is a required field Values []*string `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemRelatedItemsFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemRelatedItemsFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OpsItemRelatedItemsFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OpsItemRelatedItemsFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Operator == nil { invalidParams.Add(request.NewErrParamRequired("Operator")) } if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *OpsItemRelatedItemsFilter) SetKey(v string) *OpsItemRelatedItemsFilter { s.Key = &v return s } // SetOperator sets the Operator field's value. func (s *OpsItemRelatedItemsFilter) SetOperator(v string) *OpsItemRelatedItemsFilter { s.Operator = &v return s } // SetValues sets the Values field's value. func (s *OpsItemRelatedItemsFilter) SetValues(v []*string) *OpsItemRelatedItemsFilter { s.Values = v return s } // A count of OpsItems. type OpsItemSummary struct { _ struct{} `type:"structure"` // The time a runbook workflow ended. Currently reported only for the OpsItem // type /aws/changerequest. ActualEndTime *time.Time `type:"timestamp"` // The time a runbook workflow started. Currently reported only for the OpsItem // type /aws/changerequest. ActualStartTime *time.Time `type:"timestamp"` // A list of OpsItems by category. Category *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem. CreatedBy *string `type:"string"` // The date and time the OpsItem was created. CreatedTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem. LastModifiedBy *string `type:"string"` // The date and time the OpsItem was last updated. LastModifiedTime *time.Time `type:"timestamp"` // Operational data is custom data that provides useful reference details about // the OpsItem. OperationalData map[string]*OpsItemDataValue `type:"map"` // The ID of the OpsItem. OpsItemId *string `type:"string"` // The type of OpsItem. Systems Manager supports the following types of OpsItems: // // * /aws/issue This type of OpsItem is used for default OpsItems created // by OpsCenter. // // * /aws/changerequest This type of OpsItem is used by Change Manager for // reviewing and approving or rejecting change requests. // // * /aws/insight This type of OpsItem is used by OpsCenter for aggregating // and reporting on duplicate OpsItems. OpsItemType *string `type:"string"` // The time specified in a change request for a runbook workflow to end. Currently // supported only for the OpsItem type /aws/changerequest. PlannedEndTime *time.Time `type:"timestamp"` // The time specified in a change request for a runbook workflow to start. Currently // supported only for the OpsItem type /aws/changerequest. PlannedStartTime *time.Time `type:"timestamp"` // The importance of this OpsItem in relation to other OpsItems in the system. Priority *int64 `min:"1" type:"integer"` // A list of OpsItems by severity. Severity *string `min:"1" type:"string"` // The impacted Amazon Web Services resource. Source *string `min:"1" type:"string"` // The OpsItem status. Status can be Open, In Progress, or Resolved. Status *string `type:"string" enum:"OpsItemStatus"` // A short heading that describes the nature of the OpsItem and the impacted // resource. Title *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsItemSummary) GoString() string { return s.String() } // SetActualEndTime sets the ActualEndTime field's value. func (s *OpsItemSummary) SetActualEndTime(v time.Time) *OpsItemSummary { s.ActualEndTime = &v return s } // SetActualStartTime sets the ActualStartTime field's value. func (s *OpsItemSummary) SetActualStartTime(v time.Time) *OpsItemSummary { s.ActualStartTime = &v return s } // SetCategory sets the Category field's value. func (s *OpsItemSummary) SetCategory(v string) *OpsItemSummary { s.Category = &v return s } // SetCreatedBy sets the CreatedBy field's value. func (s *OpsItemSummary) SetCreatedBy(v string) *OpsItemSummary { s.CreatedBy = &v return s } // SetCreatedTime sets the CreatedTime field's value. func (s *OpsItemSummary) SetCreatedTime(v time.Time) *OpsItemSummary { s.CreatedTime = &v return s } // SetLastModifiedBy sets the LastModifiedBy field's value. func (s *OpsItemSummary) SetLastModifiedBy(v string) *OpsItemSummary { s.LastModifiedBy = &v return s } // SetLastModifiedTime sets the LastModifiedTime field's value. func (s *OpsItemSummary) SetLastModifiedTime(v time.Time) *OpsItemSummary { s.LastModifiedTime = &v return s } // SetOperationalData sets the OperationalData field's value. func (s *OpsItemSummary) SetOperationalData(v map[string]*OpsItemDataValue) *OpsItemSummary { s.OperationalData = v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *OpsItemSummary) SetOpsItemId(v string) *OpsItemSummary { s.OpsItemId = &v return s } // SetOpsItemType sets the OpsItemType field's value. func (s *OpsItemSummary) SetOpsItemType(v string) *OpsItemSummary { s.OpsItemType = &v return s } // SetPlannedEndTime sets the PlannedEndTime field's value. func (s *OpsItemSummary) SetPlannedEndTime(v time.Time) *OpsItemSummary { s.PlannedEndTime = &v return s } // SetPlannedStartTime sets the PlannedStartTime field's value. func (s *OpsItemSummary) SetPlannedStartTime(v time.Time) *OpsItemSummary { s.PlannedStartTime = &v return s } // SetPriority sets the Priority field's value. func (s *OpsItemSummary) SetPriority(v int64) *OpsItemSummary { s.Priority = &v return s } // SetSeverity sets the Severity field's value. func (s *OpsItemSummary) SetSeverity(v string) *OpsItemSummary { s.Severity = &v return s } // SetSource sets the Source field's value. func (s *OpsItemSummary) SetSource(v string) *OpsItemSummary { s.Source = &v return s } // SetStatus sets the Status field's value. func (s *OpsItemSummary) SetStatus(v string) *OpsItemSummary { s.Status = &v return s } // SetTitle sets the Title field's value. func (s *OpsItemSummary) SetTitle(v string) *OpsItemSummary { s.Title = &v return s } // Operational metadata for an application in Application Manager. type OpsMetadata struct { _ struct{} `type:"structure"` // The date the OpsMetadata objects was created. CreationDate *time.Time `type:"timestamp"` // The date the OpsMetadata object was last updated. LastModifiedDate *time.Time `type:"timestamp"` // The user name who last updated the OpsMetadata object. LastModifiedUser *string `type:"string"` // The Amazon Resource Name (ARN) of the OpsMetadata Object or blob. OpsMetadataArn *string `min:"1" type:"string"` // The ID of the Application Manager application. ResourceId *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadata) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadata) GoString() string { return s.String() } // SetCreationDate sets the CreationDate field's value. func (s *OpsMetadata) SetCreationDate(v time.Time) *OpsMetadata { s.CreationDate = &v return s } // SetLastModifiedDate sets the LastModifiedDate field's value. func (s *OpsMetadata) SetLastModifiedDate(v time.Time) *OpsMetadata { s.LastModifiedDate = &v return s } // SetLastModifiedUser sets the LastModifiedUser field's value. func (s *OpsMetadata) SetLastModifiedUser(v string) *OpsMetadata { s.LastModifiedUser = &v return s } // SetOpsMetadataArn sets the OpsMetadataArn field's value. func (s *OpsMetadata) SetOpsMetadataArn(v string) *OpsMetadata { s.OpsMetadataArn = &v return s } // SetResourceId sets the ResourceId field's value. func (s *OpsMetadata) SetResourceId(v string) *OpsMetadata { s.ResourceId = &v return s } // An OpsMetadata object already exists for the selected resource. type OpsMetadataAlreadyExistsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataAlreadyExistsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataAlreadyExistsException) GoString() string { return s.String() } func newErrorOpsMetadataAlreadyExistsException(v protocol.ResponseMetadata) error { return &OpsMetadataAlreadyExistsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsMetadataAlreadyExistsException) Code() string { return "OpsMetadataAlreadyExistsException" } // Message returns the exception's message. func (s *OpsMetadataAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsMetadataAlreadyExistsException) OrigErr() error { return nil } func (s *OpsMetadataAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsMetadataAlreadyExistsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsMetadataAlreadyExistsException) RequestID() string { return s.RespMetadata.RequestID } // A filter to limit the number of OpsMetadata objects displayed. type OpsMetadataFilter struct { _ struct{} `type:"structure"` // A filter key. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // A filter value. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OpsMetadataFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OpsMetadataFilter"} 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.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *OpsMetadataFilter) SetKey(v string) *OpsMetadataFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *OpsMetadataFilter) SetValues(v []*string) *OpsMetadataFilter { s.Values = v return s } // One of the arguments passed is invalid. type OpsMetadataInvalidArgumentException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataInvalidArgumentException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataInvalidArgumentException) GoString() string { return s.String() } func newErrorOpsMetadataInvalidArgumentException(v protocol.ResponseMetadata) error { return &OpsMetadataInvalidArgumentException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsMetadataInvalidArgumentException) Code() string { return "OpsMetadataInvalidArgumentException" } // Message returns the exception's message. func (s *OpsMetadataInvalidArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsMetadataInvalidArgumentException) OrigErr() error { return nil } func (s *OpsMetadataInvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsMetadataInvalidArgumentException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsMetadataInvalidArgumentException) RequestID() string { return s.RespMetadata.RequestID } // The OpsMetadata object exceeds the maximum number of OpsMetadata keys that // you can assign to an application in Application Manager. type OpsMetadataKeyLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataKeyLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataKeyLimitExceededException) GoString() string { return s.String() } func newErrorOpsMetadataKeyLimitExceededException(v protocol.ResponseMetadata) error { return &OpsMetadataKeyLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsMetadataKeyLimitExceededException) Code() string { return "OpsMetadataKeyLimitExceededException" } // Message returns the exception's message. func (s *OpsMetadataKeyLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsMetadataKeyLimitExceededException) OrigErr() error { return nil } func (s *OpsMetadataKeyLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsMetadataKeyLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsMetadataKeyLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // Your account reached the maximum number of OpsMetadata objects allowed by // Application Manager. The maximum is 200 OpsMetadata objects. Delete one or // more OpsMetadata object and try again. type OpsMetadataLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataLimitExceededException) GoString() string { return s.String() } func newErrorOpsMetadataLimitExceededException(v protocol.ResponseMetadata) error { return &OpsMetadataLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsMetadataLimitExceededException) Code() string { return "OpsMetadataLimitExceededException" } // Message returns the exception's message. func (s *OpsMetadataLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsMetadataLimitExceededException) OrigErr() error { return nil } func (s *OpsMetadataLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsMetadataLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsMetadataLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // The OpsMetadata object doesn't exist. type OpsMetadataNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataNotFoundException) GoString() string { return s.String() } func newErrorOpsMetadataNotFoundException(v protocol.ResponseMetadata) error { return &OpsMetadataNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsMetadataNotFoundException) Code() string { return "OpsMetadataNotFoundException" } // Message returns the exception's message. func (s *OpsMetadataNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsMetadataNotFoundException) OrigErr() error { return nil } func (s *OpsMetadataNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsMetadataNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsMetadataNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // The system is processing too many concurrent updates. Wait a few moments // and try again. type OpsMetadataTooManyUpdatesException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataTooManyUpdatesException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsMetadataTooManyUpdatesException) GoString() string { return s.String() } func newErrorOpsMetadataTooManyUpdatesException(v protocol.ResponseMetadata) error { return &OpsMetadataTooManyUpdatesException{ RespMetadata: v, } } // Code returns the exception type name. func (s *OpsMetadataTooManyUpdatesException) Code() string { return "OpsMetadataTooManyUpdatesException" } // Message returns the exception's message. func (s *OpsMetadataTooManyUpdatesException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *OpsMetadataTooManyUpdatesException) OrigErr() error { return nil } func (s *OpsMetadataTooManyUpdatesException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *OpsMetadataTooManyUpdatesException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *OpsMetadataTooManyUpdatesException) RequestID() string { return s.RespMetadata.RequestID } // The OpsItem data type to return. type OpsResultAttribute struct { _ struct{} `type:"structure"` // Name of the data type. Valid value: AWS:OpsItem, AWS:EC2InstanceInformation, // AWS:OpsItemTrendline, or AWS:ComplianceSummary. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsResultAttribute) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OpsResultAttribute) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *OpsResultAttribute) Validate() error { invalidParams := request.ErrInvalidParams{Context: "OpsResultAttribute"} 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 } return nil } // SetTypeName sets the TypeName field's value. func (s *OpsResultAttribute) SetTypeName(v string) *OpsResultAttribute { s.TypeName = &v return s } // Information about the source where the association execution details are // stored. type OutputSource struct { _ struct{} `type:"structure"` // The ID of the output source, for example the URL of an S3 bucket. OutputSourceId *string `min:"36" type:"string"` // The type of source where the association execution details are stored, for // example, Amazon S3. OutputSourceType *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OutputSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s OutputSource) GoString() string { return s.String() } // SetOutputSourceId sets the OutputSourceId field's value. func (s *OutputSource) SetOutputSourceId(v string) *OutputSource { s.OutputSourceId = &v return s } // SetOutputSourceType sets the OutputSourceType field's value. func (s *OutputSource) SetOutputSourceType(v string) *OutputSource { s.OutputSourceType = &v return s } // An Amazon Web Services Systems Manager parameter in Parameter Store. type Parameter struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the parameter. ARN *string `type:"string"` // The data type of the parameter, such as text or aws:ec2:image. The default // is text. DataType *string `type:"string"` // Date the parameter was last changed or updated and the parameter version // was created. LastModifiedDate *time.Time `type:"timestamp"` // The name of the parameter. Name *string `min:"1" type:"string"` // Either the version number or the label used to retrieve the parameter value. // Specify selectors by using one of the following formats: // // parameter_name:version // // parameter_name:label Selector *string `type:"string"` // Applies to parameters that reference information in other Amazon Web Services // services. SourceResult is the raw result or response from the source. SourceResult *string `type:"string"` // The type of parameter. Valid values include the following: String, StringList, // and SecureString. // // If type is StringList, the system returns a comma-separated string with no // spaces between commas in the Value field. Type *string `type:"string" enum:"ParameterType"` // The parameter value. // // If type is StringList, the system returns a comma-separated string with no // spaces between commas in the Value field. // // Value is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by Parameter's // String and GoString methods. Value *string `type:"string" sensitive:"true"` // The parameter version. Version *int64 `type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Parameter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Parameter) GoString() string { return s.String() } // SetARN sets the ARN field's value. func (s *Parameter) SetARN(v string) *Parameter { s.ARN = &v return s } // SetDataType sets the DataType field's value. func (s *Parameter) SetDataType(v string) *Parameter { s.DataType = &v return s } // SetLastModifiedDate sets the LastModifiedDate field's value. func (s *Parameter) SetLastModifiedDate(v time.Time) *Parameter { s.LastModifiedDate = &v return s } // SetName sets the Name field's value. func (s *Parameter) SetName(v string) *Parameter { s.Name = &v return s } // SetSelector sets the Selector field's value. func (s *Parameter) SetSelector(v string) *Parameter { s.Selector = &v return s } // SetSourceResult sets the SourceResult field's value. func (s *Parameter) SetSourceResult(v string) *Parameter { s.SourceResult = &v return s } // SetType sets the Type field's value. func (s *Parameter) SetType(v string) *Parameter { s.Type = &v return s } // SetValue sets the Value field's value. func (s *Parameter) SetValue(v string) *Parameter { s.Value = &v return s } // SetVersion sets the Version field's value. func (s *Parameter) SetVersion(v int64) *Parameter { s.Version = &v return s } // The parameter already exists. You can't create duplicate parameters. type ParameterAlreadyExists struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterAlreadyExists) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterAlreadyExists) GoString() string { return s.String() } func newErrorParameterAlreadyExists(v protocol.ResponseMetadata) error { return &ParameterAlreadyExists{ RespMetadata: v, } } // Code returns the exception type name. func (s *ParameterAlreadyExists) Code() string { return "ParameterAlreadyExists" } // Message returns the exception's message. func (s *ParameterAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ParameterAlreadyExists) OrigErr() error { return nil } func (s *ParameterAlreadyExists) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ParameterAlreadyExists) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ParameterAlreadyExists) RequestID() string { return s.RespMetadata.RequestID } // Information about parameter usage. type ParameterHistory struct { _ struct{} `type:"structure"` // Parameter names can include the following letters and symbols. // // a-zA-Z0-9_.- AllowedPattern *string `type:"string"` // The data type of the parameter, such as text or aws:ec2:image. The default // is text. DataType *string `type:"string"` // Information about the parameter. Description *string `type:"string"` // The ID of the query key used for this parameter. KeyId *string `min:"1" type:"string"` // Labels assigned to the parameter version. Labels []*string `min:"1" type:"list"` // Date the parameter was last changed or updated. LastModifiedDate *time.Time `type:"timestamp"` // Amazon Resource Name (ARN) of the Amazon Web Services user who last changed // the parameter. LastModifiedUser *string `type:"string"` // The name of the parameter. Name *string `min:"1" type:"string"` // Information about the policies assigned to a parameter. // // Assigning parameter policies (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html) // in the Amazon Web Services Systems Manager User Guide. Policies []*ParameterInlinePolicy `type:"list"` // The parameter tier. Tier *string `type:"string" enum:"ParameterTier"` // The type of parameter used. Type *string `type:"string" enum:"ParameterType"` // The parameter value. // // Value is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by ParameterHistory's // String and GoString methods. Value *string `type:"string" sensitive:"true"` // The parameter version. Version *int64 `type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterHistory) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterHistory) GoString() string { return s.String() } // SetAllowedPattern sets the AllowedPattern field's value. func (s *ParameterHistory) SetAllowedPattern(v string) *ParameterHistory { s.AllowedPattern = &v return s } // SetDataType sets the DataType field's value. func (s *ParameterHistory) SetDataType(v string) *ParameterHistory { s.DataType = &v return s } // SetDescription sets the Description field's value. func (s *ParameterHistory) SetDescription(v string) *ParameterHistory { s.Description = &v return s } // SetKeyId sets the KeyId field's value. func (s *ParameterHistory) SetKeyId(v string) *ParameterHistory { s.KeyId = &v return s } // SetLabels sets the Labels field's value. func (s *ParameterHistory) SetLabels(v []*string) *ParameterHistory { s.Labels = v return s } // SetLastModifiedDate sets the LastModifiedDate field's value. func (s *ParameterHistory) SetLastModifiedDate(v time.Time) *ParameterHistory { s.LastModifiedDate = &v return s } // SetLastModifiedUser sets the LastModifiedUser field's value. func (s *ParameterHistory) SetLastModifiedUser(v string) *ParameterHistory { s.LastModifiedUser = &v return s } // SetName sets the Name field's value. func (s *ParameterHistory) SetName(v string) *ParameterHistory { s.Name = &v return s } // SetPolicies sets the Policies field's value. func (s *ParameterHistory) SetPolicies(v []*ParameterInlinePolicy) *ParameterHistory { s.Policies = v return s } // SetTier sets the Tier field's value. func (s *ParameterHistory) SetTier(v string) *ParameterHistory { s.Tier = &v return s } // SetType sets the Type field's value. func (s *ParameterHistory) SetType(v string) *ParameterHistory { s.Type = &v return s } // SetValue sets the Value field's value. func (s *ParameterHistory) SetValue(v string) *ParameterHistory { s.Value = &v return s } // SetVersion sets the Version field's value. func (s *ParameterHistory) SetVersion(v int64) *ParameterHistory { s.Version = &v return s } // One or more policies assigned to a parameter. type ParameterInlinePolicy struct { _ struct{} `type:"structure"` // The status of the policy. Policies report the following statuses: Pending // (the policy hasn't been enforced or applied yet), Finished (the policy was // applied), Failed (the policy wasn't applied), or InProgress (the policy is // being applied now). PolicyStatus *string `type:"string"` // The JSON text of the policy. PolicyText *string `type:"string"` // The type of policy. Parameter Store, a capability of Amazon Web Services // Systems Manager, supports the following policy types: Expiration, ExpirationNotification, // and NoChangeNotification. PolicyType *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterInlinePolicy) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterInlinePolicy) GoString() string { return s.String() } // SetPolicyStatus sets the PolicyStatus field's value. func (s *ParameterInlinePolicy) SetPolicyStatus(v string) *ParameterInlinePolicy { s.PolicyStatus = &v return s } // SetPolicyText sets the PolicyText field's value. func (s *ParameterInlinePolicy) SetPolicyText(v string) *ParameterInlinePolicy { s.PolicyText = &v return s } // SetPolicyType sets the PolicyType field's value. func (s *ParameterInlinePolicy) SetPolicyType(v string) *ParameterInlinePolicy { s.PolicyType = &v return s } // You have exceeded the number of parameters for this Amazon Web Services account. // Delete one or more parameters and try again. type ParameterLimitExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterLimitExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterLimitExceeded) GoString() string { return s.String() } func newErrorParameterLimitExceeded(v protocol.ResponseMetadata) error { return &ParameterLimitExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *ParameterLimitExceeded) Code() string { return "ParameterLimitExceeded" } // Message returns the exception's message. func (s *ParameterLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ParameterLimitExceeded) OrigErr() error { return nil } func (s *ParameterLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ParameterLimitExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ParameterLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } // Parameter Store retains the 100 most recently created versions of a parameter. // After this number of versions has been created, Parameter Store deletes the // oldest version when a new one is created. However, if the oldest version // has a label attached to it, Parameter Store won't delete the version and // instead presents this error message: // // An error occurred (ParameterMaxVersionLimitExceeded) when calling the PutParameter // operation: You attempted to create a new version of parameter-name by calling // the PutParameter API with the overwrite flag. Version version-number, the // oldest version, can't be deleted because it has a label associated with it. // Move the label to another version of the parameter, and try again. // // This safeguard is to prevent parameter versions with mission critical labels // assigned to them from being deleted. To continue creating new parameters, // first move the label from the oldest version of the parameter to a newer // one for use in your operations. For information about moving parameter labels, // see Move a parameter label (console) (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html#sysman-paramstore-labels-console-move) // or Move a parameter label (CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html#sysman-paramstore-labels-cli-move) // in the Amazon Web Services Systems Manager User Guide. type ParameterMaxVersionLimitExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterMaxVersionLimitExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterMaxVersionLimitExceeded) GoString() string { return s.String() } func newErrorParameterMaxVersionLimitExceeded(v protocol.ResponseMetadata) error { return &ParameterMaxVersionLimitExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *ParameterMaxVersionLimitExceeded) Code() string { return "ParameterMaxVersionLimitExceeded" } // Message returns the exception's message. func (s *ParameterMaxVersionLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ParameterMaxVersionLimitExceeded) OrigErr() error { return nil } func (s *ParameterMaxVersionLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ParameterMaxVersionLimitExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ParameterMaxVersionLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } // Metadata includes information like the ARN of the last user and the date/time // the parameter was last used. type ParameterMetadata struct { _ struct{} `type:"structure"` // A parameter name can include only the following letters and symbols. // // a-zA-Z0-9_.- AllowedPattern *string `type:"string"` // The data type of the parameter, such as text or aws:ec2:image. The default // is text. DataType *string `type:"string"` // Description of the parameter actions. Description *string `type:"string"` // The ID of the query key used for this parameter. KeyId *string `min:"1" type:"string"` // Date the parameter was last changed or updated. LastModifiedDate *time.Time `type:"timestamp"` // Amazon Resource Name (ARN) of the Amazon Web Services user who last changed // the parameter. LastModifiedUser *string `type:"string"` // The parameter name. Name *string `min:"1" type:"string"` // A list of policies associated with a parameter. Policies []*ParameterInlinePolicy `type:"list"` // The parameter tier. Tier *string `type:"string" enum:"ParameterTier"` // The type of parameter. Valid parameter types include the following: String, // StringList, and SecureString. Type *string `type:"string" enum:"ParameterType"` // The parameter version. Version *int64 `type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterMetadata) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterMetadata) GoString() string { return s.String() } // SetAllowedPattern sets the AllowedPattern field's value. func (s *ParameterMetadata) SetAllowedPattern(v string) *ParameterMetadata { s.AllowedPattern = &v return s } // SetDataType sets the DataType field's value. func (s *ParameterMetadata) SetDataType(v string) *ParameterMetadata { s.DataType = &v return s } // SetDescription sets the Description field's value. func (s *ParameterMetadata) SetDescription(v string) *ParameterMetadata { s.Description = &v return s } // SetKeyId sets the KeyId field's value. func (s *ParameterMetadata) SetKeyId(v string) *ParameterMetadata { s.KeyId = &v return s } // SetLastModifiedDate sets the LastModifiedDate field's value. func (s *ParameterMetadata) SetLastModifiedDate(v time.Time) *ParameterMetadata { s.LastModifiedDate = &v return s } // SetLastModifiedUser sets the LastModifiedUser field's value. func (s *ParameterMetadata) SetLastModifiedUser(v string) *ParameterMetadata { s.LastModifiedUser = &v return s } // SetName sets the Name field's value. func (s *ParameterMetadata) SetName(v string) *ParameterMetadata { s.Name = &v return s } // SetPolicies sets the Policies field's value. func (s *ParameterMetadata) SetPolicies(v []*ParameterInlinePolicy) *ParameterMetadata { s.Policies = v return s } // SetTier sets the Tier field's value. func (s *ParameterMetadata) SetTier(v string) *ParameterMetadata { s.Tier = &v return s } // SetType sets the Type field's value. func (s *ParameterMetadata) SetType(v string) *ParameterMetadata { s.Type = &v return s } // SetVersion sets the Version field's value. func (s *ParameterMetadata) SetVersion(v int64) *ParameterMetadata { s.Version = &v return s } // The parameter couldn't be found. Verify the name and try again. type ParameterNotFound struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterNotFound) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterNotFound) GoString() string { return s.String() } func newErrorParameterNotFound(v protocol.ResponseMetadata) error { return &ParameterNotFound{ RespMetadata: v, } } // Code returns the exception type name. func (s *ParameterNotFound) Code() string { return "ParameterNotFound" } // Message returns the exception's message. func (s *ParameterNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ParameterNotFound) OrigErr() error { return nil } func (s *ParameterNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ParameterNotFound) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ParameterNotFound) RequestID() string { return s.RespMetadata.RequestID } // The parameter name isn't valid. type ParameterPatternMismatchException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The parameter name isn't valid. Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterPatternMismatchException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterPatternMismatchException) GoString() string { return s.String() } func newErrorParameterPatternMismatchException(v protocol.ResponseMetadata) error { return &ParameterPatternMismatchException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ParameterPatternMismatchException) Code() string { return "ParameterPatternMismatchException" } // Message returns the exception's message. func (s *ParameterPatternMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ParameterPatternMismatchException) OrigErr() error { return nil } func (s *ParameterPatternMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ParameterPatternMismatchException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ParameterPatternMismatchException) RequestID() string { return s.RespMetadata.RequestID } // One or more filters. Use a filter to return a more specific list of results. type ParameterStringFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // The ParameterStringFilter object is used by the DescribeParameters and GetParametersByPath // API operations. However, not all of the pattern values listed for Key can // be used with both operations. // // For DescribeParameters, all of the listed patterns are valid except Label. // // For GetParametersByPath, the following patterns listed for Key aren't valid: // tag, DataType, Name, Path, and Tier. // // For examples of Amazon Web Services CLI commands demonstrating valid parameter // filter constructions, see Searching for Systems Manager parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html) // in the Amazon Web Services Systems Manager User Guide. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // For all filters used with DescribeParameters, valid options include Equals // and BeginsWith. The Name filter additionally supports the Contains option. // (Exception: For filters using the key Path, valid options include Recursive // and OneLevel.) // // For filters used with GetParametersByPath, valid options include Equals and // BeginsWith. (Exception: For filters using Label as the Key name, the only // valid option is Equals.) Option *string `min:"1" type:"string"` // The value you want to search for. Values []*string `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterStringFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterStringFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ParameterStringFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ParameterStringFilter"} 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.Option != nil && len(*s.Option) < 1 { invalidParams.Add(request.NewErrParamMinLen("Option", 1)) } 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 *ParameterStringFilter) SetKey(v string) *ParameterStringFilter { s.Key = &v return s } // SetOption sets the Option field's value. func (s *ParameterStringFilter) SetOption(v string) *ParameterStringFilter { s.Option = &v return s } // SetValues sets the Values field's value. func (s *ParameterStringFilter) SetValues(v []*string) *ParameterStringFilter { s.Values = v return s } // A parameter version can have a maximum of ten labels. type ParameterVersionLabelLimitExceeded struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterVersionLabelLimitExceeded) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterVersionLabelLimitExceeded) GoString() string { return s.String() } func newErrorParameterVersionLabelLimitExceeded(v protocol.ResponseMetadata) error { return &ParameterVersionLabelLimitExceeded{ RespMetadata: v, } } // Code returns the exception type name. func (s *ParameterVersionLabelLimitExceeded) Code() string { return "ParameterVersionLabelLimitExceeded" } // Message returns the exception's message. func (s *ParameterVersionLabelLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ParameterVersionLabelLimitExceeded) OrigErr() error { return nil } func (s *ParameterVersionLabelLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ParameterVersionLabelLimitExceeded) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ParameterVersionLabelLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } // The specified parameter version wasn't found. Verify the parameter name and // version, and try again. type ParameterVersionNotFound struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterVersionNotFound) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParameterVersionNotFound) GoString() string { return s.String() } func newErrorParameterVersionNotFound(v protocol.ResponseMetadata) error { return &ParameterVersionNotFound{ RespMetadata: v, } } // Code returns the exception type name. func (s *ParameterVersionNotFound) Code() string { return "ParameterVersionNotFound" } // Message returns the exception's message. func (s *ParameterVersionNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ParameterVersionNotFound) OrigErr() error { return nil } func (s *ParameterVersionNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ParameterVersionNotFound) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ParameterVersionNotFound) RequestID() string { return s.RespMetadata.RequestID } // This data type is deprecated. Instead, use ParameterStringFilter. type ParametersFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // Key is a required field Key *string `type:"string" required:"true" enum:"ParametersFilterKey"` // The filter values. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParametersFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParametersFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ParametersFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ParametersFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *ParametersFilter) SetKey(v string) *ParametersFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *ParametersFilter) SetValues(v []*string) *ParametersFilter { s.Values = v return s } // A detailed status of the parent step. type ParentStepDetails struct { _ struct{} `type:"structure"` // The name of the automation action. Action *string `type:"string"` // The current repetition of the loop represented by an integer. Iteration *int64 `type:"integer"` // The current value of the specified iterator in the loop. IteratorValue *string `type:"string"` // The unique ID of a step execution. StepExecutionId *string `type:"string"` // The name of the step. StepName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParentStepDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ParentStepDetails) GoString() string { return s.String() } // SetAction sets the Action field's value. func (s *ParentStepDetails) SetAction(v string) *ParentStepDetails { s.Action = &v return s } // SetIteration sets the Iteration field's value. func (s *ParentStepDetails) SetIteration(v int64) *ParentStepDetails { s.Iteration = &v return s } // SetIteratorValue sets the IteratorValue field's value. func (s *ParentStepDetails) SetIteratorValue(v string) *ParentStepDetails { s.IteratorValue = &v return s } // SetStepExecutionId sets the StepExecutionId field's value. func (s *ParentStepDetails) SetStepExecutionId(v string) *ParentStepDetails { s.StepExecutionId = &v return s } // SetStepName sets the StepName field's value. func (s *ParentStepDetails) SetStepName(v string) *ParentStepDetails { s.StepName = &v return s } // Represents metadata about a patch. type Patch struct { _ struct{} `type:"structure"` // The Advisory ID of the patch. For example, RHSA-2020:3779. Applies to Linux-based // managed nodes only. AdvisoryIds []*string `type:"list"` // The architecture of the patch. For example, in example-pkg-0.710.10-2.7.abcd.x86_64, // the architecture is indicated by x86_64. Applies to Linux-based managed nodes // only. Arch *string `type:"string"` // The Bugzilla ID of the patch. For example, 1600646. Applies to Linux-based // managed nodes only. BugzillaIds []*string `type:"list"` // The Common Vulnerabilities and Exposures (CVE) ID of the patch. For example, // CVE-2011-3192. Applies to Linux-based managed nodes only. CVEIds []*string `type:"list"` // The classification of the patch. For example, SecurityUpdates, Updates, or // CriticalUpdates. Classification *string `type:"string"` // The URL where more information can be obtained about the patch. ContentUrl *string `type:"string"` // The description of the patch. Description *string `type:"string"` // The epoch of the patch. For example in pkg-example-EE-20180914-2.2.amzn1.noarch, // the epoch value is 20180914-2. Applies to Linux-based managed nodes only. Epoch *int64 `type:"integer"` // The ID of the patch. Applies to Windows patches only. // // This ID isn't the same as the Microsoft Knowledge Base ID. Id *string `min:"1" type:"string"` // The Microsoft Knowledge Base ID of the patch. Applies to Windows patches // only. KbNumber *string `type:"string"` // The language of the patch if it's language-specific. Language *string `type:"string"` // The ID of the Microsoft Security Response Center (MSRC) bulletin the patch // is related to. For example, MS14-045. Applies to Windows patches only. MsrcNumber *string `type:"string"` // The severity of the patch, such as Critical, Important, or Moderate. Applies // to Windows patches only. MsrcSeverity *string `type:"string"` // The name of the patch. Applies to Linux-based managed nodes only. Name *string `type:"string"` // The specific product the patch is applicable for. For example, WindowsServer2016 // or AmazonLinux2018.03. Product *string `type:"string"` // The product family the patch is applicable for. For example, Windows or Amazon // Linux 2. ProductFamily *string `type:"string"` // The particular release of a patch. For example, in pkg-example-EE-20180914-2.2.amzn1.noarch, // the release is 2.amaz1. Applies to Linux-based managed nodes only. Release *string `type:"string"` // The date the patch was released. ReleaseDate *time.Time `type:"timestamp"` // The source patch repository for the operating system and version, such as // trusty-security for Ubuntu Server 14.04 LTE and focal-security for Ubuntu // Server 20.04 LTE. Applies to Linux-based managed nodes only. Repository *string `type:"string"` // The severity level of the patch. For example, CRITICAL or MODERATE. Severity *string `type:"string"` // The title of the patch. Title *string `type:"string"` // The name of the vendor providing the patch. Vendor *string `type:"string"` // The version number of the patch. For example, in example-pkg-1.710.10-2.7.abcd.x86_64, // the version number is indicated by -1. Applies to Linux-based managed nodes // only. Version *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Patch) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Patch) GoString() string { return s.String() } // SetAdvisoryIds sets the AdvisoryIds field's value. func (s *Patch) SetAdvisoryIds(v []*string) *Patch { s.AdvisoryIds = v return s } // SetArch sets the Arch field's value. func (s *Patch) SetArch(v string) *Patch { s.Arch = &v return s } // SetBugzillaIds sets the BugzillaIds field's value. func (s *Patch) SetBugzillaIds(v []*string) *Patch { s.BugzillaIds = v return s } // SetCVEIds sets the CVEIds field's value. func (s *Patch) SetCVEIds(v []*string) *Patch { s.CVEIds = v return s } // SetClassification sets the Classification field's value. func (s *Patch) SetClassification(v string) *Patch { s.Classification = &v return s } // SetContentUrl sets the ContentUrl field's value. func (s *Patch) SetContentUrl(v string) *Patch { s.ContentUrl = &v return s } // SetDescription sets the Description field's value. func (s *Patch) SetDescription(v string) *Patch { s.Description = &v return s } // SetEpoch sets the Epoch field's value. func (s *Patch) SetEpoch(v int64) *Patch { s.Epoch = &v return s } // SetId sets the Id field's value. func (s *Patch) SetId(v string) *Patch { s.Id = &v return s } // SetKbNumber sets the KbNumber field's value. func (s *Patch) SetKbNumber(v string) *Patch { s.KbNumber = &v return s } // SetLanguage sets the Language field's value. func (s *Patch) SetLanguage(v string) *Patch { s.Language = &v return s } // SetMsrcNumber sets the MsrcNumber field's value. func (s *Patch) SetMsrcNumber(v string) *Patch { s.MsrcNumber = &v return s } // SetMsrcSeverity sets the MsrcSeverity field's value. func (s *Patch) SetMsrcSeverity(v string) *Patch { s.MsrcSeverity = &v return s } // SetName sets the Name field's value. func (s *Patch) SetName(v string) *Patch { s.Name = &v return s } // SetProduct sets the Product field's value. func (s *Patch) SetProduct(v string) *Patch { s.Product = &v return s } // SetProductFamily sets the ProductFamily field's value. func (s *Patch) SetProductFamily(v string) *Patch { s.ProductFamily = &v return s } // SetRelease sets the Release field's value. func (s *Patch) SetRelease(v string) *Patch { s.Release = &v return s } // SetReleaseDate sets the ReleaseDate field's value. func (s *Patch) SetReleaseDate(v time.Time) *Patch { s.ReleaseDate = &v return s } // SetRepository sets the Repository field's value. func (s *Patch) SetRepository(v string) *Patch { s.Repository = &v return s } // SetSeverity sets the Severity field's value. func (s *Patch) SetSeverity(v string) *Patch { s.Severity = &v return s } // SetTitle sets the Title field's value. func (s *Patch) SetTitle(v string) *Patch { s.Title = &v return s } // SetVendor sets the Vendor field's value. func (s *Patch) SetVendor(v string) *Patch { s.Vendor = &v return s } // SetVersion sets the Version field's value. func (s *Patch) SetVersion(v string) *Patch { s.Version = &v return s } // Defines the basic information about a patch baseline. type PatchBaselineIdentity struct { _ struct{} `type:"structure"` // The description of the patch baseline. BaselineDescription *string `min:"1" type:"string"` // The ID of the patch baseline. BaselineId *string `min:"20" type:"string"` // The name of the patch baseline. BaselineName *string `min:"3" type:"string"` // Whether this is the default baseline. Amazon Web Services Systems Manager // supports creating multiple default patch baselines. For example, you can // create a default patch baseline for each operating system. DefaultBaseline *bool `type:"boolean"` // Defines the operating system the patch baseline applies to. The default value // is WINDOWS. OperatingSystem *string `type:"string" enum:"OperatingSystem"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchBaselineIdentity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchBaselineIdentity) GoString() string { return s.String() } // SetBaselineDescription sets the BaselineDescription field's value. func (s *PatchBaselineIdentity) SetBaselineDescription(v string) *PatchBaselineIdentity { s.BaselineDescription = &v return s } // SetBaselineId sets the BaselineId field's value. func (s *PatchBaselineIdentity) SetBaselineId(v string) *PatchBaselineIdentity { s.BaselineId = &v return s } // SetBaselineName sets the BaselineName field's value. func (s *PatchBaselineIdentity) SetBaselineName(v string) *PatchBaselineIdentity { s.BaselineName = &v return s } // SetDefaultBaseline sets the DefaultBaseline field's value. func (s *PatchBaselineIdentity) SetDefaultBaseline(v bool) *PatchBaselineIdentity { s.DefaultBaseline = &v return s } // SetOperatingSystem sets the OperatingSystem field's value. func (s *PatchBaselineIdentity) SetOperatingSystem(v string) *PatchBaselineIdentity { s.OperatingSystem = &v return s } // Information about the state of a patch on a particular managed node as it // relates to the patch baseline used to patch the node. type PatchComplianceData struct { _ struct{} `type:"structure"` // The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that // are resolved by the patch. CVEIds *string `type:"string"` // The classification of the patch, such as SecurityUpdates, Updates, and CriticalUpdates. // // Classification is a required field Classification *string `type:"string" required:"true"` // The date/time the patch was installed on the managed node. Not all operating // systems provide this level of information. // // InstalledTime is a required field InstalledTime *time.Time `type:"timestamp" required:"true"` // The operating system-specific ID of the patch. // // KBId is a required field KBId *string `type:"string" required:"true"` // The severity of the patch such as Critical, Important, and Moderate. // // Severity is a required field Severity *string `type:"string" required:"true"` // The state of the patch on the managed node, such as INSTALLED or FAILED. // // For descriptions of each patch state, see About patch compliance (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch) // in the Amazon Web Services Systems Manager User Guide. // // State is a required field State *string `type:"string" required:"true" enum:"PatchComplianceDataState"` // The title of the patch. // // Title is a required field Title *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchComplianceData) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchComplianceData) GoString() string { return s.String() } // SetCVEIds sets the CVEIds field's value. func (s *PatchComplianceData) SetCVEIds(v string) *PatchComplianceData { s.CVEIds = &v return s } // SetClassification sets the Classification field's value. func (s *PatchComplianceData) SetClassification(v string) *PatchComplianceData { s.Classification = &v return s } // SetInstalledTime sets the InstalledTime field's value. func (s *PatchComplianceData) SetInstalledTime(v time.Time) *PatchComplianceData { s.InstalledTime = &v return s } // SetKBId sets the KBId field's value. func (s *PatchComplianceData) SetKBId(v string) *PatchComplianceData { s.KBId = &v return s } // SetSeverity sets the Severity field's value. func (s *PatchComplianceData) SetSeverity(v string) *PatchComplianceData { s.Severity = &v return s } // SetState sets the State field's value. func (s *PatchComplianceData) SetState(v string) *PatchComplianceData { s.State = &v return s } // SetTitle sets the Title field's value. func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { s.Title = &v return s } // Defines which patches should be included in a patch baseline. // // A patch filter consists of a key and a set of values. The filter key is a // patch property. For example, the available filter keys for WINDOWS are PATCH_SET, // PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY. // // The filter values define a matching criterion for the patch property indicated // by the key. For example, if the filter key is PRODUCT and the filter values // are ["Office 2013", "Office 2016"], then the filter accepts all patches where // product name is either "Office 2013" or "Office 2016". The filter values // can be exact values for the patch property given as a key, or a wildcard // (*), which matches all values. // // You can view lists of valid values for the patch properties by running the // DescribePatchProperties command. For information about which patch properties // can be used with each major operating system, see DescribePatchProperties. type PatchFilter struct { _ struct{} `type:"structure"` // The key for the filter. // // Run the DescribePatchProperties command to view lists of valid keys for each // operating system type. // // Key is a required field Key *string `type:"string" required:"true" enum:"PatchFilterKey"` // The value for the filter key. // // Run the DescribePatchProperties command to view lists of valid values for // each key based on operating system type. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PatchFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PatchFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *PatchFilter) SetKey(v string) *PatchFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *PatchFilter) SetValues(v []*string) *PatchFilter { s.Values = v return s } // A set of patch filters, typically used for approval rules. type PatchFilterGroup struct { _ struct{} `type:"structure"` // The set of patch filters that make up the group. // // PatchFilters is a required field PatchFilters []*PatchFilter `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchFilterGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchFilterGroup) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PatchFilterGroup) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PatchFilterGroup"} if s.PatchFilters == nil { invalidParams.Add(request.NewErrParamRequired("PatchFilters")) } if s.PatchFilters != nil { for i, v := range s.PatchFilters { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PatchFilters", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetPatchFilters sets the PatchFilters field's value. func (s *PatchFilterGroup) SetPatchFilters(v []*PatchFilter) *PatchFilterGroup { s.PatchFilters = v return s } // The mapping between a patch group and the patch baseline the patch group // is registered with. type PatchGroupPatchBaselineMapping struct { _ struct{} `type:"structure"` // The patch baseline the patch group is registered with. BaselineIdentity *PatchBaselineIdentity `type:"structure"` // The name of the patch group registered with the patch baseline. PatchGroup *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchGroupPatchBaselineMapping) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchGroupPatchBaselineMapping) GoString() string { return s.String() } // SetBaselineIdentity sets the BaselineIdentity field's value. func (s *PatchGroupPatchBaselineMapping) SetBaselineIdentity(v *PatchBaselineIdentity) *PatchGroupPatchBaselineMapping { s.BaselineIdentity = v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *PatchGroupPatchBaselineMapping) SetPatchGroup(v string) *PatchGroupPatchBaselineMapping { s.PatchGroup = &v return s } // Defines a filter used in Patch Manager APIs. Supported filter keys depend // on the API operation that includes the filter. Patch Manager API operations // that use PatchOrchestratorFilter include the following: // // - DescribeAvailablePatches // // - DescribeInstancePatches // // - DescribePatchBaselines // // - DescribePatchGroups type PatchOrchestratorFilter struct { _ struct{} `type:"structure"` // The key for the filter. Key *string `min:"1" type:"string"` // The value for the filter. Values []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchOrchestratorFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchOrchestratorFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PatchOrchestratorFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PatchOrchestratorFilter"} 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 *PatchOrchestratorFilter) SetKey(v string) *PatchOrchestratorFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *PatchOrchestratorFilter) SetValues(v []*string) *PatchOrchestratorFilter { s.Values = v return s } // Defines an approval rule for a patch baseline. type PatchRule struct { _ struct{} `type:"structure"` // The number of days after the release date of each patch matched by the rule // that the patch is marked as approved in the patch baseline. For example, // a value of 7 means that patches are approved seven days after they are released. // Not supported on Debian Server or Ubuntu Server. ApproveAfterDays *int64 `type:"integer"` // The cutoff date for auto approval of released patches. Any patches released // on or before this date are installed automatically. Not supported on Debian // Server or Ubuntu Server. // // Enter dates in the format YYYY-MM-DD. For example, 2021-12-31. ApproveUntilDate *string `min:"1" type:"string"` // A compliance severity level for all approved patches in a patch baseline. ComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // For managed nodes identified by the approval rule filters, enables a patch // baseline to apply non-security updates available in the specified repository. // The default value is false. Applies to Linux managed nodes only. EnableNonSecurity *bool `type:"boolean"` // The patch filter group that defines the criteria for the rule. // // PatchFilterGroup is a required field PatchFilterGroup *PatchFilterGroup `type:"structure" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchRule) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchRule) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PatchRule) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PatchRule"} if s.ApproveUntilDate != nil && len(*s.ApproveUntilDate) < 1 { invalidParams.Add(request.NewErrParamMinLen("ApproveUntilDate", 1)) } if s.PatchFilterGroup == nil { invalidParams.Add(request.NewErrParamRequired("PatchFilterGroup")) } if s.PatchFilterGroup != nil { if err := s.PatchFilterGroup.Validate(); err != nil { invalidParams.AddNested("PatchFilterGroup", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetApproveAfterDays sets the ApproveAfterDays field's value. func (s *PatchRule) SetApproveAfterDays(v int64) *PatchRule { s.ApproveAfterDays = &v return s } // SetApproveUntilDate sets the ApproveUntilDate field's value. func (s *PatchRule) SetApproveUntilDate(v string) *PatchRule { s.ApproveUntilDate = &v return s } // SetComplianceLevel sets the ComplianceLevel field's value. func (s *PatchRule) SetComplianceLevel(v string) *PatchRule { s.ComplianceLevel = &v return s } // SetEnableNonSecurity sets the EnableNonSecurity field's value. func (s *PatchRule) SetEnableNonSecurity(v bool) *PatchRule { s.EnableNonSecurity = &v return s } // SetPatchFilterGroup sets the PatchFilterGroup field's value. func (s *PatchRule) SetPatchFilterGroup(v *PatchFilterGroup) *PatchRule { s.PatchFilterGroup = v return s } // A set of rules defining the approval rules for a patch baseline. type PatchRuleGroup struct { _ struct{} `type:"structure"` // The rules that make up the rule group. // // PatchRules is a required field PatchRules []*PatchRule `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchRuleGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchRuleGroup) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PatchRuleGroup) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PatchRuleGroup"} if s.PatchRules == nil { invalidParams.Add(request.NewErrParamRequired("PatchRules")) } if s.PatchRules != nil { for i, v := range s.PatchRules { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PatchRules", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetPatchRules sets the PatchRules field's value. func (s *PatchRuleGroup) SetPatchRules(v []*PatchRule) *PatchRuleGroup { s.PatchRules = v return s } // Information about the patches to use to update the managed nodes, including // target operating systems and source repository. Applies to Linux managed // nodes only. type PatchSource struct { _ struct{} `type:"structure"` // The value of the yum repo configuration. For example: // // [main] // // name=MyCustomRepository // // baseurl=https://my-custom-repository // // enabled=1 // // For information about other options available for your yum repository configuration, // see dnf.conf(5) (https://man7.org/linux/man-pages/man5/dnf.conf.5.html). // // Configuration is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by PatchSource's // String and GoString methods. // // Configuration is a required field Configuration *string `min:"1" type:"string" required:"true" sensitive:"true"` // The name specified to identify the patch source. // // Name is a required field Name *string `type:"string" required:"true"` // The specific operating system versions a patch repository applies to, such // as "Ubuntu16.04", "AmazonLinux2016.09", "RedhatEnterpriseLinux7.2" or "Suse12.7". // For lists of supported product values, see PatchFilter. // // Products is a required field Products []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchSource) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PatchSource) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PatchSource"} if s.Configuration == nil { invalidParams.Add(request.NewErrParamRequired("Configuration")) } if s.Configuration != nil && len(*s.Configuration) < 1 { invalidParams.Add(request.NewErrParamMinLen("Configuration", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Products == nil { invalidParams.Add(request.NewErrParamRequired("Products")) } if s.Products != nil && len(s.Products) < 1 { invalidParams.Add(request.NewErrParamMinLen("Products", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetConfiguration sets the Configuration field's value. func (s *PatchSource) SetConfiguration(v string) *PatchSource { s.Configuration = &v return s } // SetName sets the Name field's value. func (s *PatchSource) SetName(v string) *PatchSource { s.Name = &v return s } // SetProducts sets the Products field's value. func (s *PatchSource) SetProducts(v []*string) *PatchSource { s.Products = v return s } // Information about the approval status of a patch. type PatchStatus struct { _ struct{} `type:"structure"` // The date the patch was approved (or will be approved if the status is PENDING_APPROVAL). ApprovalDate *time.Time `type:"timestamp"` // The compliance severity level for a patch. ComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // The approval status of a patch. DeploymentStatus *string `type:"string" enum:"PatchDeploymentStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PatchStatus) GoString() string { return s.String() } // SetApprovalDate sets the ApprovalDate field's value. func (s *PatchStatus) SetApprovalDate(v time.Time) *PatchStatus { s.ApprovalDate = &v return s } // SetComplianceLevel sets the ComplianceLevel field's value. func (s *PatchStatus) SetComplianceLevel(v string) *PatchStatus { s.ComplianceLevel = &v return s } // SetDeploymentStatus sets the DeploymentStatus field's value. func (s *PatchStatus) SetDeploymentStatus(v string) *PatchStatus { s.DeploymentStatus = &v return s } // You specified more than the maximum number of allowed policies for the parameter. // The maximum is 10. type PoliciesLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PoliciesLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PoliciesLimitExceededException) GoString() string { return s.String() } func newErrorPoliciesLimitExceededException(v protocol.ResponseMetadata) error { return &PoliciesLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *PoliciesLimitExceededException) Code() string { return "PoliciesLimitExceededException" } // Message returns the exception's message. func (s *PoliciesLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *PoliciesLimitExceededException) OrigErr() error { return nil } func (s *PoliciesLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *PoliciesLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *PoliciesLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // An aggregate of step execution statuses displayed in the Amazon Web Services // Systems Manager 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 Amazon // Web Services Regions and Amazon Web Services accounts for the current Automation // execution. CancelledSteps *int64 `type:"integer"` // The total number of steps that failed to run in all specified Amazon Web // Services Regions and Amazon Web Services accounts for the current Automation // execution. FailedSteps *int64 `type:"integer"` // The total number of steps that successfully completed in all specified Amazon // Web Services Regions and Amazon Web Services accounts for the current Automation // execution. SuccessSteps *int64 `type:"integer"` // The total number of steps that timed out in all specified Amazon Web Services // Regions and Amazon Web Services accounts for the current Automation execution. TimedOutSteps *int64 `type:"integer"` // The total number of steps run in all specified Amazon Web Services Regions // and Amazon Web Services accounts for the current Automation execution. TotalSteps *int64 `type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProgressCounters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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"` // Specify the compliance type. For example, specify Association (for a State // Manager association), Patch, or Custom:string. // // ComplianceType is a required field ComplianceType *string `min:"1" type:"string" required:"true"` // A summary of the call execution that includes an execution ID, the type of // execution (for example, Command), and the date/time of the execution using // a datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z'. // // ExecutionSummary is a required field ExecutionSummary *ComplianceExecutionSummary `type:"structure" required:"true"` // MD5 or SHA-256 content hash. The content hash is used to determine if existing // information should be overwritten or ignored. If the content hashes match, // the request to put compliance information is ignored. ItemContentHash *string `type:"string"` // Information about the compliance as defined by the resource type. For example, // for a patch compliance type, Items includes information about the PatchSeverity, // Classification, and so on. // // Items is a required field Items []*ComplianceItemEntry `type:"list" required:"true"` // Specify an ID for this resource. For a managed node, this is the node ID. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // Specify the type of resource. ManagedInstance is currently the only supported // resource type. // // ResourceType is a required field ResourceType *string `min:"1" type:"string" required:"true"` // The mode for uploading compliance items. You can specify COMPLETE or PARTIAL. // In COMPLETE mode, the system overwrites all existing compliance information // for the resource. You must provide a full list of compliance items each time // you send the request. // // In PARTIAL mode, the system overwrites compliance information for a specific // association. The association must be configured with SyncCompliance set to // MANUAL. By default, all requests use COMPLETE mode. // // This attribute is only valid for association compliance. UploadType *string `type:"string" enum:"ComplianceUploadType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutComplianceItemsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutComplianceItemsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutComplianceItemsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutComplianceItemsInput"} if s.ComplianceType == nil { invalidParams.Add(request.NewErrParamRequired("ComplianceType")) } if s.ComplianceType != nil && len(*s.ComplianceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("ComplianceType", 1)) } if s.ExecutionSummary == nil { invalidParams.Add(request.NewErrParamRequired("ExecutionSummary")) } if s.Items == nil { invalidParams.Add(request.NewErrParamRequired("Items")) } 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 s.ExecutionSummary != nil { if err := s.ExecutionSummary.Validate(); err != nil { invalidParams.AddNested("ExecutionSummary", err.(request.ErrInvalidParams)) } } 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 } // SetComplianceType sets the ComplianceType field's value. func (s *PutComplianceItemsInput) SetComplianceType(v string) *PutComplianceItemsInput { s.ComplianceType = &v return s } // SetExecutionSummary sets the ExecutionSummary field's value. func (s *PutComplianceItemsInput) SetExecutionSummary(v *ComplianceExecutionSummary) *PutComplianceItemsInput { s.ExecutionSummary = v return s } // SetItemContentHash sets the ItemContentHash field's value. func (s *PutComplianceItemsInput) SetItemContentHash(v string) *PutComplianceItemsInput { s.ItemContentHash = &v return s } // SetItems sets the Items field's value. func (s *PutComplianceItemsInput) SetItems(v []*ComplianceItemEntry) *PutComplianceItemsInput { s.Items = v return s } // SetResourceId sets the ResourceId field's value. func (s *PutComplianceItemsInput) SetResourceId(v string) *PutComplianceItemsInput { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *PutComplianceItemsInput) SetResourceType(v string) *PutComplianceItemsInput { s.ResourceType = &v return s } // SetUploadType sets the UploadType field's value. func (s *PutComplianceItemsInput) SetUploadType(v string) *PutComplianceItemsInput { s.UploadType = &v return s } type PutComplianceItemsOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutComplianceItemsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutComplianceItemsOutput) GoString() string { return s.String() } type PutInventoryInput struct { _ struct{} `type:"structure"` // An managed node ID where you want to add or update inventory items. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The inventory items that you want to add or update on managed nodes. // // Items is a required field Items []*InventoryItem `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutInventoryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutInventoryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutInventoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutInventoryInput"} if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } 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.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 } // SetInstanceId sets the InstanceId field's value. func (s *PutInventoryInput) SetInstanceId(v string) *PutInventoryInput { s.InstanceId = &v return s } // SetItems sets the Items field's value. func (s *PutInventoryInput) SetItems(v []*InventoryItem) *PutInventoryInput { s.Items = v return s } type PutInventoryOutput struct { _ struct{} `type:"structure"` // Information about the request. Message *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutInventoryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutInventoryOutput) GoString() string { return s.String() } // SetMessage sets the Message field's value. func (s *PutInventoryOutput) SetMessage(v string) *PutInventoryOutput { s.Message = &v return s } type PutParameterInput struct { _ struct{} `type:"structure"` // A regular expression used to validate the parameter value. For example, for // String types with values restricted to numbers, you can specify the following: // AllowedPattern=^\d+$ AllowedPattern *string `type:"string"` // The data type for a String parameter. Supported data types include plain // text and Amazon Machine Image (AMI) IDs. // // The following data type values are supported. // // * text // // * aws:ec2:image // // * aws:ssm:integration // // When you create a String parameter and specify aws:ec2:image, Amazon Web // Services Systems Manager validates the parameter value is in the required // format, such as ami-12345abcdeEXAMPLE, and that the specified AMI is available // in your Amazon Web Services account. // // If the action is successful, the service sends back an HTTP 200 response // which indicates a successful PutParameter call for all cases except for data // type aws:ec2:image. If you call PutParameter with aws:ec2:image data type, // a successful HTTP 200 response does not guarantee that your parameter was // successfully created or updated. The aws:ec2:image value is validated asynchronously, // and the PutParameter call returns before the validation is complete. If you // submit an invalid AMI value, the PutParameter operation will return success, // but the asynchronous validation will fail and the parameter will not be created // or updated. To monitor whether your aws:ec2:image parameters are created // successfully, see Setting up notifications or trigger actions based on Parameter // Store events (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html). // For more information about AMI format validation , see Native parameter support // for Amazon Machine Image (AMI) IDs (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html). DataType *string `type:"string"` // Information about the parameter that you want to add to the system. Optional // but recommended. // // Don't enter personally identifiable information in this field. Description *string `type:"string"` // The Key Management Service (KMS) ID that you want to use to encrypt a parameter. // Use a custom key for better security. Required for parameters that use the // SecureString data type. // // If you don't specify a key ID, the system uses the default key associated // with your Amazon Web Services account which is not as secure as using a custom // key. // // * To use a custom KMS key, choose the SecureString data type with the // Key ID parameter. KeyId *string `min:"1" type:"string"` // The fully qualified name of the parameter that you want to add to the system. // The fully qualified name includes the complete hierarchy of the parameter // path and name. For parameters in a hierarchy, you must include a leading // forward slash character (/) when you create or reference a parameter. For // example: /Dev/DBServer/MySQL/db-string13 // // Naming Constraints: // // * Parameter names are case sensitive. // // * A parameter name must be unique within an Amazon Web Services Region // // * A parameter name can't be prefixed with "aws" or "ssm" (case-insensitive). // // * Parameter names can include only the following symbols and letters: // a-zA-Z0-9_.- In addition, the slash character ( / ) is used to delineate // hierarchies in parameter names. For example: /Dev/Production/East/Project-ABC/MyParameter // // * A parameter name can't include spaces. // // * Parameter hierarchies are limited to a maximum depth of fifteen levels. // // For additional information about valid values for parameter names, see Creating // Systems Manager parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html) // in the Amazon Web Services Systems Manager User Guide. // // The maximum length constraint of 2048 characters listed below includes 1037 // characters reserved for internal use by Systems Manager. The maximum length // for a parameter name that you create is 1011 characters. This includes the // characters in the ARN that precede the name you specify, such as arn:aws:ssm:us-east-2:111122223333:parameter/. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Overwrite an existing parameter. The default value is false. Overwrite *bool `type:"boolean"` // One or more policies to apply to a parameter. This operation takes a JSON // array. Parameter Store, a capability of Amazon Web Services Systems Manager // supports the following policy types: // // Expiration: This policy deletes the parameter after it expires. When you // create the policy, you specify the expiration date. You can update the expiration // date and time by updating the policy. Updating the parameter doesn't affect // the expiration date and time. When the expiration time is reached, Parameter // Store deletes the parameter. // // ExpirationNotification: This policy initiates an event in Amazon CloudWatch // Events that notifies you about the expiration. By using this policy, you // can receive notification before or after the expiration time is reached, // in units of days or hours. // // NoChangeNotification: This policy initiates a CloudWatch Events event if // a parameter hasn't been modified for a specified period of time. This policy // type is useful when, for example, a secret needs to be changed within a period // of time, but it hasn't been changed. // // All existing policies are preserved until you send new policies or an empty // policy. For more information about parameter policies, see Assigning parameter // policies (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html). Policies *string `min:"1" type:"string"` // Optional metadata that you assign to a resource. Tags enable you to categorize // a resource in different ways, such as by purpose, owner, or environment. // For example, you might want to tag a Systems Manager parameter to identify // the type of resource to which it applies, the environment, or the type of // configuration data referenced by the parameter. In this case, you could specify // the following key-value pairs: // // * Key=Resource,Value=S3bucket // // * Key=OS,Value=Windows // // * Key=ParameterType,Value=LicenseKey // // To add tags to an existing Systems Manager parameter, use the AddTagsToResource // operation. Tags []*Tag `type:"list"` // The parameter tier to assign to a parameter. // // Parameter Store offers a standard tier and an advanced tier for parameters. // Standard parameters have a content size limit of 4 KB and can't be configured // to use parameter policies. You can create a maximum of 10,000 standard parameters // for each Region in an Amazon Web Services account. Standard parameters are // offered at no additional cost. // // Advanced parameters have a content size limit of 8 KB and can be configured // to use parameter policies. You can create a maximum of 100,000 advanced parameters // for each Region in an Amazon Web Services account. Advanced parameters incur // a charge. For more information, see Standard and advanced parameter tiers // (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html) // in the Amazon Web Services Systems Manager User Guide. // // You can change a standard parameter to an advanced parameter any time. But // you can't revert an advanced parameter to a standard parameter. Reverting // an advanced parameter to a standard parameter would result in data loss because // the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting // would also remove any policies attached to the parameter. Lastly, advanced // parameters use a different form of encryption than standard parameters. // // If you no longer need an advanced parameter, or if you no longer want to // incur charges for an advanced parameter, you must delete it and recreate // it as a new standard parameter. // // Using the Default Tier Configuration // // In PutParameter requests, you can specify the tier to create the parameter // in. Whenever you specify a tier in the request, Parameter Store creates or // updates the parameter according to that request. However, if you don't specify // a tier in a request, Parameter Store assigns the tier based on the current // Parameter Store default tier configuration. // // The default tier when you begin using Parameter Store is the standard-parameter // tier. If you use the advanced-parameter tier, you can specify one of the // following as the default: // // * Advanced: With this option, Parameter Store evaluates all requests as // advanced parameters. // // * Intelligent-Tiering: With this option, Parameter Store evaluates each // request to determine if the parameter is standard or advanced. If the // request doesn't include any options that require an advanced parameter, // the parameter is created in the standard-parameter tier. If one or more // options requiring an advanced parameter are included in the request, Parameter // Store create a parameter in the advanced-parameter tier. This approach // helps control your parameter-related costs by always creating standard // parameters unless an advanced parameter is necessary. // // Options that require an advanced parameter include the following: // // * The content size of the parameter is more than 4 KB. // // * The parameter uses a parameter policy. // // * More than 10,000 parameters already exist in your Amazon Web Services // account in the current Amazon Web Services Region. // // For more information about configuring the default tier option, see Specifying // a default parameter tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html) // in the Amazon Web Services Systems Manager User Guide. Tier *string `type:"string" enum:"ParameterTier"` // The type of parameter that you want to add to the system. // // SecureString isn't currently supported for CloudFormation templates. // // Items in a StringList must be separated by a comma (,). You can't use other // punctuation or special character to escape items in the list. If you have // a parameter value that requires a comma, then use the String data type. // // Specifying a parameter type isn't required when updating a parameter. You // must specify a parameter type when creating a parameter. Type *string `type:"string" enum:"ParameterType"` // The parameter value that you want to add to the system. Standard parameters // have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB. // // Parameters can't be referenced or nested in the values of other parameters. // You can't include {{}} or {{ssm:parameter-name}} in a parameter value. // // Value is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by PutParameterInput's // String and GoString methods. // // Value is a required field Value *string `type:"string" required:"true" sensitive:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutParameterInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutParameterInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PutParameterInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutParameterInput"} if s.KeyId != nil && len(*s.KeyId) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeyId", 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.Policies != nil && len(*s.Policies) < 1 { invalidParams.Add(request.NewErrParamMinLen("Policies", 1)) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } 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 } // SetAllowedPattern sets the AllowedPattern field's value. func (s *PutParameterInput) SetAllowedPattern(v string) *PutParameterInput { s.AllowedPattern = &v return s } // SetDataType sets the DataType field's value. func (s *PutParameterInput) SetDataType(v string) *PutParameterInput { s.DataType = &v return s } // SetDescription sets the Description field's value. func (s *PutParameterInput) SetDescription(v string) *PutParameterInput { s.Description = &v return s } // SetKeyId sets the KeyId field's value. func (s *PutParameterInput) SetKeyId(v string) *PutParameterInput { s.KeyId = &v return s } // SetName sets the Name field's value. func (s *PutParameterInput) SetName(v string) *PutParameterInput { s.Name = &v return s } // SetOverwrite sets the Overwrite field's value. func (s *PutParameterInput) SetOverwrite(v bool) *PutParameterInput { s.Overwrite = &v return s } // SetPolicies sets the Policies field's value. func (s *PutParameterInput) SetPolicies(v string) *PutParameterInput { s.Policies = &v return s } // SetTags sets the Tags field's value. func (s *PutParameterInput) SetTags(v []*Tag) *PutParameterInput { s.Tags = v return s } // SetTier sets the Tier field's value. func (s *PutParameterInput) SetTier(v string) *PutParameterInput { s.Tier = &v return s } // SetType sets the Type field's value. func (s *PutParameterInput) SetType(v string) *PutParameterInput { s.Type = &v return s } // SetValue sets the Value field's value. func (s *PutParameterInput) SetValue(v string) *PutParameterInput { s.Value = &v return s } type PutParameterOutput struct { _ struct{} `type:"structure"` // The tier assigned to the parameter. Tier *string `type:"string" enum:"ParameterTier"` // The new version number of a parameter. If you edit a parameter value, Parameter // Store automatically creates a new version and assigns this new version a // unique ID. You can reference a parameter version ID in API operations or // in Systems Manager documents (SSM documents). By default, if you don't specify // a specific version, the system returns the latest parameter value when a // parameter is called. Version *int64 `type:"long"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutParameterOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutParameterOutput) GoString() string { return s.String() } // SetTier sets the Tier field's value. func (s *PutParameterOutput) SetTier(v string) *PutParameterOutput { s.Tier = &v return s } // SetVersion sets the Version field's value. func (s *PutParameterOutput) SetVersion(v int64) *PutParameterOutput { s.Version = &v return s } type PutResourcePolicyInput struct { _ struct{} `type:"structure"` // A policy you want to associate with a resource. // // Policy is a required field Policy *string `type:"string" required:"true"` // ID of the current policy version. The hash helps to prevent a situation where // multiple users attempt to overwrite a policy. You must provide this hash // when updating or deleting a policy. PolicyHash *string `type:"string"` // The policy ID. PolicyId *string `type:"string"` // Amazon Resource Name (ARN) of the resource to which you want to attach a // policy. // // ResourceArn is a required field ResourceArn *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutResourcePolicyInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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.Policy == nil { invalidParams.Add(request.NewErrParamRequired("Policy")) } if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetPolicy sets the Policy field's value. func (s *PutResourcePolicyInput) SetPolicy(v string) *PutResourcePolicyInput { s.Policy = &v return s } // SetPolicyHash sets the PolicyHash field's value. func (s *PutResourcePolicyInput) SetPolicyHash(v string) *PutResourcePolicyInput { s.PolicyHash = &v return s } // SetPolicyId sets the PolicyId field's value. func (s *PutResourcePolicyInput) SetPolicyId(v string) *PutResourcePolicyInput { s.PolicyId = &v return s } // SetResourceArn sets the ResourceArn field's value. func (s *PutResourcePolicyInput) SetResourceArn(v string) *PutResourcePolicyInput { s.ResourceArn = &v return s } type PutResourcePolicyOutput struct { _ struct{} `type:"structure"` // ID of the current policy version. PolicyHash *string `type:"string"` // The policy ID. To update a policy, you must specify PolicyId and PolicyHash. PolicyId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PutResourcePolicyOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 } // SetPolicyId sets the PolicyId field's value. func (s *PutResourcePolicyOutput) SetPolicyId(v string) *PutResourcePolicyOutput { s.PolicyId = &v return s } type RegisterDefaultPatchBaselineInput struct { _ struct{} `type:"structure"` // The ID of the patch baseline that should be the default patch baseline. // // BaselineId is a required field BaselineId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterDefaultPatchBaselineInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterDefaultPatchBaselineInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RegisterDefaultPatchBaselineInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RegisterDefaultPatchBaselineInput"} if s.BaselineId == nil { invalidParams.Add(request.NewErrParamRequired("BaselineId")) } if s.BaselineId != nil && len(*s.BaselineId) < 20 { invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBaselineId sets the BaselineId field's value. func (s *RegisterDefaultPatchBaselineInput) SetBaselineId(v string) *RegisterDefaultPatchBaselineInput { s.BaselineId = &v return s } type RegisterDefaultPatchBaselineOutput struct { _ struct{} `type:"structure"` // The ID of the default patch baseline. BaselineId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterDefaultPatchBaselineOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterDefaultPatchBaselineOutput) GoString() string { return s.String() } // SetBaselineId sets the BaselineId field's value. func (s *RegisterDefaultPatchBaselineOutput) SetBaselineId(v string) *RegisterDefaultPatchBaselineOutput { s.BaselineId = &v return s } type RegisterPatchBaselineForPatchGroupInput struct { _ struct{} `type:"structure"` // The ID of the patch baseline to register with the patch group. // // BaselineId is a required field BaselineId *string `min:"20" type:"string" required:"true"` // The name of the patch group to be registered with the patch baseline. // // PatchGroup is a required field PatchGroup *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterPatchBaselineForPatchGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterPatchBaselineForPatchGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RegisterPatchBaselineForPatchGroupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RegisterPatchBaselineForPatchGroupInput"} if s.BaselineId == nil { invalidParams.Add(request.NewErrParamRequired("BaselineId")) } if s.BaselineId != nil && len(*s.BaselineId) < 20 { invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) } if s.PatchGroup == nil { invalidParams.Add(request.NewErrParamRequired("PatchGroup")) } if s.PatchGroup != nil && len(*s.PatchGroup) < 1 { invalidParams.Add(request.NewErrParamMinLen("PatchGroup", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetBaselineId sets the BaselineId field's value. func (s *RegisterPatchBaselineForPatchGroupInput) SetBaselineId(v string) *RegisterPatchBaselineForPatchGroupInput { s.BaselineId = &v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *RegisterPatchBaselineForPatchGroupInput) SetPatchGroup(v string) *RegisterPatchBaselineForPatchGroupInput { s.PatchGroup = &v return s } type RegisterPatchBaselineForPatchGroupOutput struct { _ struct{} `type:"structure"` // The ID of the patch baseline the patch group was registered with. BaselineId *string `min:"20" type:"string"` // The name of the patch group registered with the patch baseline. PatchGroup *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterPatchBaselineForPatchGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterPatchBaselineForPatchGroupOutput) GoString() string { return s.String() } // SetBaselineId sets the BaselineId field's value. func (s *RegisterPatchBaselineForPatchGroupOutput) SetBaselineId(v string) *RegisterPatchBaselineForPatchGroupOutput { s.BaselineId = &v return s } // SetPatchGroup sets the PatchGroup field's value. func (s *RegisterPatchBaselineForPatchGroupOutput) SetPatchGroup(v string) *RegisterPatchBaselineForPatchGroupOutput { s.PatchGroup = &v return s } type RegisterTargetWithMaintenanceWindowInput struct { _ struct{} `type:"structure"` // User-provided idempotency token. ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` // An optional description for the target. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by RegisterTargetWithMaintenanceWindowInput's // String and GoString methods. 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 Amazon CloudWatch Events // events raised while running tasks for these targets in this maintenance window. // // OwnerInformation is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by RegisterTargetWithMaintenanceWindowInput's // String and GoString methods. OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The type of target being registered with the maintenance window. // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"MaintenanceWindowResourceType"` // The targets to register with the maintenance window. In other words, the // managed nodes to run commands on when the maintenance window runs. // // If a single maintenance window task is registered with multiple targets, // its task invocations occur sequentially and not in parallel. If your task // must run on multiple targets at the same time, register a task for each target // individually and assign each task the same priority level. // // You can specify targets using managed node IDs, resource group names, or // tags that have been applied to managed nodes. // // Example 1: Specify managed node IDs // // Key=InstanceIds,Values=,, // // Example 2: Use tag key-pairs applied to managed nodes // // Key=tag:,Values=, // // Example 3: Use tag-keys applied to managed nodes // // Key=tag-key,Values=, // // Example 4: Use resource group names // // Key=resource-groups:Name,Values= // // Example 5: Use filters for resource group types // // Key=resource-groups:ResourceTypeFilters,Values=, // // For Key=resource-groups:ResourceTypeFilters, specify resource types in the // following format // // Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC // // For more information about these examples formats, including the best use // case for each one, see Examples: Register targets with a maintenance window // (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html) // in the Amazon Web Services Systems Manager User Guide. // // Targets is a required field Targets []*Target `type:"list" required:"true"` // The ID of the maintenance window the target should be registered with. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterTargetWithMaintenanceWindowInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterTargetWithMaintenanceWindowInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RegisterTargetWithMaintenanceWindowInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RegisterTargetWithMaintenanceWindowInput"} if s.ClientToken != nil && len(*s.ClientToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Name != nil && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } if s.OwnerInformation != nil && len(*s.OwnerInformation) < 1 { invalidParams.Add(request.NewErrParamMinLen("OwnerInformation", 1)) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.Targets == nil { invalidParams.Add(request.NewErrParamRequired("Targets")) } if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.Targets != nil { for i, v := range s.Targets { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetClientToken sets the ClientToken field's value. func (s *RegisterTargetWithMaintenanceWindowInput) SetClientToken(v string) *RegisterTargetWithMaintenanceWindowInput { s.ClientToken = &v return s } // SetDescription sets the Description field's value. func (s *RegisterTargetWithMaintenanceWindowInput) SetDescription(v string) *RegisterTargetWithMaintenanceWindowInput { s.Description = &v return s } // SetName sets the Name field's value. func (s *RegisterTargetWithMaintenanceWindowInput) SetName(v string) *RegisterTargetWithMaintenanceWindowInput { s.Name = &v return s } // SetOwnerInformation sets the OwnerInformation field's value. func (s *RegisterTargetWithMaintenanceWindowInput) SetOwnerInformation(v string) *RegisterTargetWithMaintenanceWindowInput { s.OwnerInformation = &v return s } // SetResourceType sets the ResourceType field's value. func (s *RegisterTargetWithMaintenanceWindowInput) SetResourceType(v string) *RegisterTargetWithMaintenanceWindowInput { s.ResourceType = &v return s } // SetTargets sets the Targets field's value. func (s *RegisterTargetWithMaintenanceWindowInput) SetTargets(v []*Target) *RegisterTargetWithMaintenanceWindowInput { s.Targets = v return s } // SetWindowId sets the WindowId field's value. func (s *RegisterTargetWithMaintenanceWindowInput) SetWindowId(v string) *RegisterTargetWithMaintenanceWindowInput { s.WindowId = &v return s } type RegisterTargetWithMaintenanceWindowOutput struct { _ struct{} `type:"structure"` // The ID of the target definition in this maintenance window. WindowTargetId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterTargetWithMaintenanceWindowOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterTargetWithMaintenanceWindowOutput) GoString() string { return s.String() } // SetWindowTargetId sets the WindowTargetId field's value. func (s *RegisterTargetWithMaintenanceWindowOutput) SetWindowTargetId(v string) *RegisterTargetWithMaintenanceWindowOutput { s.WindowTargetId = &v return s } type RegisterTaskWithMaintenanceWindowInput struct { _ struct{} `type:"structure"` // The CloudWatch alarm you want to apply to your maintenance window task. AlarmConfiguration *AlarmConfiguration `type:"structure"` // User-provided idempotency token. ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` // Indicates whether tasks should continue to run after the cutoff time specified // in the maintenance windows is reached. // // * CONTINUE_TASK: When the cutoff time is reached, any tasks that are running // continue. The default value. // // * CANCEL_TASK: For Automation, Lambda, Step Functions tasks: When the // cutoff time is reached, any task invocations that are already running // continue, but no new task invocations are started. For Run Command tasks: // When the cutoff time is reached, the system sends a CancelCommand operation // that attempts to cancel the command associated with the task. However, // there is no guarantee that the command will be terminated and the underlying // process stopped. The status for tasks that are not completed is TIMED_OUT. CutoffBehavior *string `type:"string" enum:"MaintenanceWindowTaskCutoffBehavior"` // An optional description for the task. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by RegisterTaskWithMaintenanceWindowInput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // A structure containing information about an Amazon Simple Storage Service // (Amazon S3) bucket to write managed node-level logs to. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets this task can be run for, in parallel. // // Although this element is listed as "Required: No", a value can be omitted // only when you are registering or updating a targetless task (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // You must provide a value in all other cases. // // For maintenance window tasks without a target specified, you can't supply // a value for this option. Instead, the system inserts a placeholder value // of 1. This value doesn't affect the running of your task. MaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed before this task stops being scheduled. // // Although this element is listed as "Required: No", a value can be omitted // only when you are registering or updating a targetless task (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // You must provide a value in all other cases. // // For maintenance window tasks without a target specified, you can't supply // a value for this option. Instead, the system inserts a placeholder value // of 1. This value doesn't affect the running of your task. MaxErrors *string `min:"1" type:"string"` // An optional name for the task. Name *string `min:"3" type:"string"` // The priority of the task in the maintenance window, the lower the number // the higher the priority. Tasks in a maintenance window are scheduled in priority // order with tasks that have the same priority scheduled in parallel. Priority *int64 `type:"integer"` // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services // Systems Manager to assume when running a maintenance window task. If you // do not specify a service role ARN, Systems Manager uses your account's service-linked // role. If no service-linked role for Systems Manager exists in your account, // it is created when you run RegisterTaskWithMaintenanceWindow. // // For more information, see the following topics in the in the Amazon Web Services // Systems Manager User Guide: // // * Using service-linked roles for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) // // * Should I use a service-linked role or a custom service role to run maintenance // window tasks? (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) ServiceRoleArn *string `type:"string"` // The targets (either managed nodes or maintenance window targets). // // One or more targets must be specified for maintenance window Run Command-type // tasks. Depending on the task, targets are optional for other maintenance // window task types (Automation, Lambda, and Step Functions). For more information // about running tasks that don't specify targets, see Registering maintenance // window tasks without targets (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // in the Amazon Web Services Systems Manager User Guide. // // Specify managed nodes using the following format: // // Key=InstanceIds,Values=, // // Specify maintenance window targets using the following format: // // Key=WindowTargetIds,Values=, Targets []*Target `type:"list"` // The ARN of the task to run. // // TaskArn is a required field TaskArn *string `min:"1" type:"string" required:"true"` // The parameters that the task should use during execution. Populate only the // fields that match the task type. All other fields should be empty. TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The parameters that should be passed to the task when it is run. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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 is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by RegisterTaskWithMaintenanceWindowInput's // String and GoString methods. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The type of task being registered. // // TaskType is a required field TaskType *string `type:"string" required:"true" enum:"MaintenanceWindowTaskType"` // The ID of the maintenance window the task should be added to. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterTaskWithMaintenanceWindowInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterTaskWithMaintenanceWindowInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RegisterTaskWithMaintenanceWindowInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RegisterTaskWithMaintenanceWindowInput"} if s.ClientToken != nil && len(*s.ClientToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } 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 && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } if s.TaskArn == nil { invalidParams.Add(request.NewErrParamRequired("TaskArn")) } if s.TaskArn != nil && len(*s.TaskArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("TaskArn", 1)) } if s.TaskType == nil { invalidParams.Add(request.NewErrParamRequired("TaskType")) } if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.AlarmConfiguration != nil { if err := s.AlarmConfiguration.Validate(); err != nil { invalidParams.AddNested("AlarmConfiguration", err.(request.ErrInvalidParams)) } } if s.LoggingInfo != nil { if err := s.LoggingInfo.Validate(); err != nil { invalidParams.AddNested("LoggingInfo", err.(request.ErrInvalidParams)) } } if s.Targets != nil { for i, v := range s.Targets { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if s.TaskInvocationParameters != nil { if err := s.TaskInvocationParameters.Validate(); err != nil { invalidParams.AddNested("TaskInvocationParameters", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetAlarmConfiguration(v *AlarmConfiguration) *RegisterTaskWithMaintenanceWindowInput { s.AlarmConfiguration = v return s } // SetClientToken sets the ClientToken field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetClientToken(v string) *RegisterTaskWithMaintenanceWindowInput { s.ClientToken = &v return s } // SetCutoffBehavior sets the CutoffBehavior field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetCutoffBehavior(v string) *RegisterTaskWithMaintenanceWindowInput { s.CutoffBehavior = &v return s } // SetDescription sets the Description field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetDescription(v string) *RegisterTaskWithMaintenanceWindowInput { s.Description = &v return s } // SetLoggingInfo sets the LoggingInfo field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetLoggingInfo(v *LoggingInfo) *RegisterTaskWithMaintenanceWindowInput { s.LoggingInfo = v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetMaxConcurrency(v string) *RegisterTaskWithMaintenanceWindowInput { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetMaxErrors(v string) *RegisterTaskWithMaintenanceWindowInput { s.MaxErrors = &v return s } // SetName sets the Name field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetName(v string) *RegisterTaskWithMaintenanceWindowInput { s.Name = &v return s } // SetPriority sets the Priority field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetPriority(v int64) *RegisterTaskWithMaintenanceWindowInput { s.Priority = &v return s } // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetServiceRoleArn(v string) *RegisterTaskWithMaintenanceWindowInput { s.ServiceRoleArn = &v return s } // SetTargets sets the Targets field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetTargets(v []*Target) *RegisterTaskWithMaintenanceWindowInput { s.Targets = v return s } // SetTaskArn sets the TaskArn field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetTaskArn(v string) *RegisterTaskWithMaintenanceWindowInput { s.TaskArn = &v return s } // SetTaskInvocationParameters sets the TaskInvocationParameters field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetTaskInvocationParameters(v *MaintenanceWindowTaskInvocationParameters) *RegisterTaskWithMaintenanceWindowInput { s.TaskInvocationParameters = v return s } // SetTaskParameters sets the TaskParameters field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *RegisterTaskWithMaintenanceWindowInput { s.TaskParameters = v return s } // SetTaskType sets the TaskType field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetTaskType(v string) *RegisterTaskWithMaintenanceWindowInput { s.TaskType = &v return s } // SetWindowId sets the WindowId field's value. func (s *RegisterTaskWithMaintenanceWindowInput) SetWindowId(v string) *RegisterTaskWithMaintenanceWindowInput { s.WindowId = &v return s } type RegisterTaskWithMaintenanceWindowOutput struct { _ struct{} `type:"structure"` // The ID of the task in the maintenance window. WindowTaskId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterTaskWithMaintenanceWindowOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterTaskWithMaintenanceWindowOutput) GoString() string { return s.String() } // SetWindowTaskId sets the WindowTaskId field's value. func (s *RegisterTaskWithMaintenanceWindowOutput) SetWindowTaskId(v string) *RegisterTaskWithMaintenanceWindowOutput { s.WindowTaskId = &v return s } // Reserved for internal use. type RegistrationMetadataItem struct { _ struct{} `type:"structure"` // Reserved for internal use. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // Reserved for internal use. // // Value is a required field Value *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegistrationMetadataItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegistrationMetadataItem) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RegistrationMetadataItem) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RegistrationMetadataItem"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if s.Value != nil && len(*s.Value) < 1 { invalidParams.Add(request.NewErrParamMinLen("Value", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *RegistrationMetadataItem) SetKey(v string) *RegistrationMetadataItem { s.Key = &v return s } // SetValue sets the Value field's value. func (s *RegistrationMetadataItem) SetValue(v string) *RegistrationMetadataItem { s.Value = &v return s } // An OpsItems that shares something in common with the current OpsItem. For // example, related OpsItems can include OpsItems with similar error messages, // impacted resources, or statuses for the impacted resource. type RelatedOpsItem struct { _ struct{} `type:"structure"` // The ID of an OpsItem related to the current OpsItem. // // OpsItemId is a required field OpsItemId *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RelatedOpsItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RelatedOpsItem) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RelatedOpsItem) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RelatedOpsItem"} if s.OpsItemId == nil { invalidParams.Add(request.NewErrParamRequired("OpsItemId")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOpsItemId sets the OpsItemId field's value. func (s *RelatedOpsItem) SetOpsItemId(v string) *RelatedOpsItem { s.OpsItemId = &v return s } type RemoveTagsFromResourceInput struct { _ struct{} `type:"structure"` // The ID of the resource from which you want to remove tags. For example: // // ManagedInstance: mi-012345abcde // // MaintenanceWindow: mw-012345abcde // // Automation: example-c160-4567-8519-012345abcde // // PatchBaseline: pb-012345abcde // // OpsMetadata object: ResourceID for tagging is created from the Amazon Resource // Name (ARN) for the object. Specifically, ResourceID is created from the strings // that come after the word opsmetadata in the ARN. For example, an OpsMetadata // object with an ARN of arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager // has a ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager. // // For the Document and Parameter values, use the name of the resource. // // The ManagedInstance type for this API operation is only for on-premises managed // nodes. Specify the name of the managed node in the following format: mi-ID_number. // For example, mi-1a2b3c4d5e6f. // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` // The type of resource from which you want to remove a tag. // // The ManagedInstance type for this API operation is only for on-premises managed // nodes. Specify the name of the managed node in the following format: mi-ID_number // . For example, mi-1a2b3c4d5e6f. // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` // Tag keys that you want to remove from the specified resource. // // TagKeys is a required field TagKeys []*string `type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RemoveTagsFromResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RemoveTagsFromResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RemoveTagsFromResourceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } if s.TagKeys == nil { invalidParams.Add(request.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceId sets the ResourceId field's value. func (s *RemoveTagsFromResourceInput) SetResourceId(v string) *RemoveTagsFromResourceInput { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *RemoveTagsFromResourceInput) SetResourceType(v string) *RemoveTagsFromResourceInput { s.ResourceType = &v return s } // SetTagKeys sets the TagKeys field's value. func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { s.TagKeys = v return s } type RemoveTagsFromResourceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RemoveTagsFromResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RemoveTagsFromResourceOutput) GoString() string { return s.String() } // The request body of the ResetServiceSetting API operation. type ResetServiceSettingInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the service setting to reset. The setting // ID can be one of the following. // // * /ssm/managed-instance/default-ec2-instance-management-role // // * /ssm/automation/customer-script-log-destination // // * /ssm/automation/customer-script-log-group-name // // * /ssm/documents/console/public-sharing-permission // // * /ssm/managed-instance/activation-tier // // * /ssm/opsinsights/opscenter // // * /ssm/parameter-store/default-parameter-tier // // * /ssm/parameter-store/high-throughput-enabled // // SettingId is a required field SettingId *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResetServiceSettingInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResetServiceSettingInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResetServiceSettingInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResetServiceSettingInput"} if s.SettingId == nil { invalidParams.Add(request.NewErrParamRequired("SettingId")) } if s.SettingId != nil && len(*s.SettingId) < 1 { invalidParams.Add(request.NewErrParamMinLen("SettingId", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSettingId sets the SettingId field's value. func (s *ResetServiceSettingInput) SetSettingId(v string) *ResetServiceSettingInput { s.SettingId = &v return s } // The result body of the ResetServiceSetting API operation. type ResetServiceSettingOutput struct { _ struct{} `type:"structure"` // The current, effective service setting after calling the ResetServiceSetting // API operation. ServiceSetting *ServiceSetting `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResetServiceSettingOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResetServiceSettingOutput) GoString() string { return s.String() } // SetServiceSetting sets the ServiceSetting field's value. func (s *ResetServiceSettingOutput) SetServiceSetting(v *ServiceSetting) *ResetServiceSettingOutput { s.ServiceSetting = v return s } // Information about targets that resolved during the Automation execution. type ResolvedTargets struct { _ struct{} `type:"structure"` // A list of parameter values sent to targets that resolved during the Automation // execution. ParameterValues []*string `type:"list"` // A boolean value indicating whether the resolved target list is truncated. Truncated *bool `type:"boolean"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResolvedTargets) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResolvedTargets) GoString() string { return s.String() } // SetParameterValues sets the ParameterValues field's value. func (s *ResolvedTargets) SetParameterValues(v []*string) *ResolvedTargets { s.ParameterValues = v return s } // SetTruncated sets the Truncated field's value. func (s *ResolvedTargets) SetTruncated(v bool) *ResolvedTargets { s.Truncated = &v return s } // Compliance summary information for a specific resource. type ResourceComplianceSummaryItem struct { _ struct{} `type:"structure"` // The compliance type. ComplianceType *string `min:"1" type:"string"` // A list of items that are compliant for the resource. CompliantSummary *CompliantSummary `type:"structure"` // Information about the execution. ExecutionSummary *ComplianceExecutionSummary `type:"structure"` // A list of items that aren't compliant for the resource. NonCompliantSummary *NonCompliantSummary `type:"structure"` // The highest severity item found for the resource. The resource is compliant // for this item. OverallSeverity *string `type:"string" enum:"ComplianceSeverity"` // The resource ID. ResourceId *string `min:"1" type:"string"` // The resource type. ResourceType *string `min:"1" type:"string"` // The compliance status for the resource. Status *string `type:"string" enum:"ComplianceStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceComplianceSummaryItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceComplianceSummaryItem) GoString() string { return s.String() } // SetComplianceType sets the ComplianceType field's value. func (s *ResourceComplianceSummaryItem) SetComplianceType(v string) *ResourceComplianceSummaryItem { s.ComplianceType = &v return s } // SetCompliantSummary sets the CompliantSummary field's value. func (s *ResourceComplianceSummaryItem) SetCompliantSummary(v *CompliantSummary) *ResourceComplianceSummaryItem { s.CompliantSummary = v return s } // SetExecutionSummary sets the ExecutionSummary field's value. func (s *ResourceComplianceSummaryItem) SetExecutionSummary(v *ComplianceExecutionSummary) *ResourceComplianceSummaryItem { s.ExecutionSummary = v return s } // SetNonCompliantSummary sets the NonCompliantSummary field's value. func (s *ResourceComplianceSummaryItem) SetNonCompliantSummary(v *NonCompliantSummary) *ResourceComplianceSummaryItem { s.NonCompliantSummary = v return s } // SetOverallSeverity sets the OverallSeverity field's value. func (s *ResourceComplianceSummaryItem) SetOverallSeverity(v string) *ResourceComplianceSummaryItem { s.OverallSeverity = &v return s } // SetResourceId sets the ResourceId field's value. func (s *ResourceComplianceSummaryItem) SetResourceId(v string) *ResourceComplianceSummaryItem { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. func (s *ResourceComplianceSummaryItem) SetResourceType(v string) *ResourceComplianceSummaryItem { s.ResourceType = &v return s } // SetStatus sets the Status field's value. func (s *ResourceComplianceSummaryItem) SetStatus(v string) *ResourceComplianceSummaryItem { s.Status = &v return s } // A sync configuration with the same name already exists. type ResourceDataSyncAlreadyExistsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` SyncName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncAlreadyExistsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncAlreadyExistsException) GoString() string { return s.String() } func newErrorResourceDataSyncAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceDataSyncAlreadyExistsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceDataSyncAlreadyExistsException) Code() string { return "ResourceDataSyncAlreadyExistsException" } // Message returns the exception's message. func (s *ResourceDataSyncAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceDataSyncAlreadyExistsException) OrigErr() error { return nil } func (s *ResourceDataSyncAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceDataSyncAlreadyExistsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceDataSyncAlreadyExistsException) RequestID() string { return s.RespMetadata.RequestID } // Information about the AwsOrganizationsSource resource data sync source. A // sync source of this type can synchronize data from Organizations or, if an // Amazon Web Services organization isn't present, from multiple Amazon Web // Services Regions. type ResourceDataSyncAwsOrganizationsSource struct { _ struct{} `type:"structure"` // If an Amazon Web Services organization is present, this is either OrganizationalUnits // or EntireOrganization. For OrganizationalUnits, the data is aggregated from // a set of organization units. For EntireOrganization, the data is aggregated // from the entire Amazon Web Services organization. // // OrganizationSourceType is a required field OrganizationSourceType *string `min:"1" type:"string" required:"true"` // The Organizations organization units included in the sync. OrganizationalUnits []*ResourceDataSyncOrganizationalUnit `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncAwsOrganizationsSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncAwsOrganizationsSource) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceDataSyncAwsOrganizationsSource) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncAwsOrganizationsSource"} if s.OrganizationSourceType == nil { invalidParams.Add(request.NewErrParamRequired("OrganizationSourceType")) } if s.OrganizationSourceType != nil && len(*s.OrganizationSourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationSourceType", 1)) } if s.OrganizationalUnits != nil && len(s.OrganizationalUnits) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnits", 1)) } if s.OrganizationalUnits != nil { for i, v := range s.OrganizationalUnits { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OrganizationalUnits", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOrganizationSourceType sets the OrganizationSourceType field's value. func (s *ResourceDataSyncAwsOrganizationsSource) SetOrganizationSourceType(v string) *ResourceDataSyncAwsOrganizationsSource { s.OrganizationSourceType = &v return s } // SetOrganizationalUnits sets the OrganizationalUnits field's value. func (s *ResourceDataSyncAwsOrganizationsSource) SetOrganizationalUnits(v []*ResourceDataSyncOrganizationalUnit) *ResourceDataSyncAwsOrganizationsSource { s.OrganizationalUnits = v return s } // Another UpdateResourceDataSync request is being processed. Wait a few minutes // and try again. type ResourceDataSyncConflictException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncConflictException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncConflictException) GoString() string { return s.String() } func newErrorResourceDataSyncConflictException(v protocol.ResponseMetadata) error { return &ResourceDataSyncConflictException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceDataSyncConflictException) Code() string { return "ResourceDataSyncConflictException" } // Message returns the exception's message. func (s *ResourceDataSyncConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceDataSyncConflictException) OrigErr() error { return nil } func (s *ResourceDataSyncConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceDataSyncConflictException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceDataSyncConflictException) RequestID() string { return s.RespMetadata.RequestID } // You have exceeded the allowed maximum sync configurations. type ResourceDataSyncCountExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncCountExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncCountExceededException) GoString() string { return s.String() } func newErrorResourceDataSyncCountExceededException(v protocol.ResponseMetadata) error { return &ResourceDataSyncCountExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceDataSyncCountExceededException) Code() string { return "ResourceDataSyncCountExceededException" } // Message returns the exception's message. func (s *ResourceDataSyncCountExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceDataSyncCountExceededException) OrigErr() error { return nil } func (s *ResourceDataSyncCountExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceDataSyncCountExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceDataSyncCountExceededException) RequestID() string { return s.RespMetadata.RequestID } // Synchronize Amazon Web Services Systems Manager Inventory data from multiple // Amazon Web Services accounts defined in Organizations to a centralized Amazon // S3 bucket. Data is synchronized to individual key prefixes in the central // bucket. Each key prefix represents a different Amazon Web Services account // ID. type ResourceDataSyncDestinationDataSharing struct { _ struct{} `type:"structure"` // The sharing data type. Only Organization is supported. DestinationDataSharingType *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncDestinationDataSharing) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncDestinationDataSharing) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceDataSyncDestinationDataSharing) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncDestinationDataSharing"} if s.DestinationDataSharingType != nil && len(*s.DestinationDataSharingType) < 1 { invalidParams.Add(request.NewErrParamMinLen("DestinationDataSharingType", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDestinationDataSharingType sets the DestinationDataSharingType field's value. func (s *ResourceDataSyncDestinationDataSharing) SetDestinationDataSharingType(v string) *ResourceDataSyncDestinationDataSharing { s.DestinationDataSharingType = &v return s } // The specified sync configuration is invalid. type ResourceDataSyncInvalidConfigurationException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncInvalidConfigurationException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncInvalidConfigurationException) GoString() string { return s.String() } func newErrorResourceDataSyncInvalidConfigurationException(v protocol.ResponseMetadata) error { return &ResourceDataSyncInvalidConfigurationException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceDataSyncInvalidConfigurationException) Code() string { return "ResourceDataSyncInvalidConfigurationException" } // Message returns the exception's message. func (s *ResourceDataSyncInvalidConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceDataSyncInvalidConfigurationException) OrigErr() error { return nil } func (s *ResourceDataSyncInvalidConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceDataSyncInvalidConfigurationException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceDataSyncInvalidConfigurationException) RequestID() string { return s.RespMetadata.RequestID } // Information about a resource data sync configuration, including its current // status and last successful sync. type ResourceDataSyncItem struct { _ struct{} `type:"structure"` // The status reported by the last sync. LastStatus *string `type:"string" enum:"LastResourceDataSyncStatus"` // The last time the sync operations returned a status of SUCCESSFUL (UTC). LastSuccessfulSyncTime *time.Time `type:"timestamp"` // The status message details reported by the last sync. LastSyncStatusMessage *string `type:"string"` // The last time the configuration attempted to sync (UTC). LastSyncTime *time.Time `type:"timestamp"` // Configuration information for the target S3 bucket. S3Destination *ResourceDataSyncS3Destination `type:"structure"` // The date and time the configuration was created (UTC). SyncCreatedTime *time.Time `type:"timestamp"` // The date and time the resource data sync was changed. SyncLastModifiedTime *time.Time `type:"timestamp"` // The name of the resource data sync. SyncName *string `min:"1" type:"string"` // Information about the source where the data was synchronized. SyncSource *ResourceDataSyncSourceWithState `type:"structure"` // The type of resource data sync. If SyncType is SyncToDestination, then the // resource data sync synchronizes data to an S3 bucket. If the SyncType is // SyncFromSource then the resource data sync synchronizes data from Organizations // or from multiple Amazon Web Services Regions. SyncType *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncItem) GoString() string { return s.String() } // SetLastStatus sets the LastStatus field's value. func (s *ResourceDataSyncItem) SetLastStatus(v string) *ResourceDataSyncItem { s.LastStatus = &v return s } // SetLastSuccessfulSyncTime sets the LastSuccessfulSyncTime field's value. func (s *ResourceDataSyncItem) SetLastSuccessfulSyncTime(v time.Time) *ResourceDataSyncItem { s.LastSuccessfulSyncTime = &v return s } // SetLastSyncStatusMessage sets the LastSyncStatusMessage field's value. func (s *ResourceDataSyncItem) SetLastSyncStatusMessage(v string) *ResourceDataSyncItem { s.LastSyncStatusMessage = &v return s } // SetLastSyncTime sets the LastSyncTime field's value. func (s *ResourceDataSyncItem) SetLastSyncTime(v time.Time) *ResourceDataSyncItem { s.LastSyncTime = &v return s } // SetS3Destination sets the S3Destination field's value. func (s *ResourceDataSyncItem) SetS3Destination(v *ResourceDataSyncS3Destination) *ResourceDataSyncItem { s.S3Destination = v return s } // SetSyncCreatedTime sets the SyncCreatedTime field's value. func (s *ResourceDataSyncItem) SetSyncCreatedTime(v time.Time) *ResourceDataSyncItem { s.SyncCreatedTime = &v return s } // SetSyncLastModifiedTime sets the SyncLastModifiedTime field's value. func (s *ResourceDataSyncItem) SetSyncLastModifiedTime(v time.Time) *ResourceDataSyncItem { s.SyncLastModifiedTime = &v return s } // SetSyncName sets the SyncName field's value. func (s *ResourceDataSyncItem) SetSyncName(v string) *ResourceDataSyncItem { s.SyncName = &v return s } // SetSyncSource sets the SyncSource field's value. func (s *ResourceDataSyncItem) SetSyncSource(v *ResourceDataSyncSourceWithState) *ResourceDataSyncItem { s.SyncSource = v return s } // SetSyncType sets the SyncType field's value. func (s *ResourceDataSyncItem) SetSyncType(v string) *ResourceDataSyncItem { s.SyncType = &v return s } // The specified sync name wasn't found. type ResourceDataSyncNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` SyncName *string `min:"1" type:"string"` SyncType *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncNotFoundException) GoString() string { return s.String() } func newErrorResourceDataSyncNotFoundException(v protocol.ResponseMetadata) error { return &ResourceDataSyncNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceDataSyncNotFoundException) Code() string { return "ResourceDataSyncNotFoundException" } // Message returns the exception's message. func (s *ResourceDataSyncNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceDataSyncNotFoundException) OrigErr() error { return nil } func (s *ResourceDataSyncNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceDataSyncNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceDataSyncNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // The Organizations organizational unit data source for the sync. type ResourceDataSyncOrganizationalUnit struct { _ struct{} `type:"structure"` // The Organizations unit ID data source for the sync. OrganizationalUnitId *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncOrganizationalUnit) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncOrganizationalUnit) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceDataSyncOrganizationalUnit) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncOrganizationalUnit"} if s.OrganizationalUnitId != nil && len(*s.OrganizationalUnitId) < 1 { invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnitId", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOrganizationalUnitId sets the OrganizationalUnitId field's value. func (s *ResourceDataSyncOrganizationalUnit) SetOrganizationalUnitId(v string) *ResourceDataSyncOrganizationalUnit { s.OrganizationalUnitId = &v return s } // Information about the target S3 bucket for the resource data sync. type ResourceDataSyncS3Destination struct { _ struct{} `type:"structure"` // The ARN of an encryption key for a destination in Amazon S3. Must belong // to the same Region as the destination S3 bucket. AWSKMSKeyARN *string `min:"1" type:"string"` // The name of the S3 bucket where the aggregated data is stored. // // BucketName is a required field BucketName *string `min:"1" type:"string" required:"true"` // Enables destination data sharing. By default, this field is null. DestinationDataSharing *ResourceDataSyncDestinationDataSharing `type:"structure"` // An Amazon S3 prefix for the bucket. Prefix *string `min:"1" type:"string"` // The Amazon Web Services Region with the S3 bucket targeted by the resource // data sync. // // Region is a required field Region *string `min:"1" type:"string" required:"true"` // A supported sync format. The following format is currently supported: JsonSerDe // // SyncFormat is a required field SyncFormat *string `type:"string" required:"true" enum:"ResourceDataSyncS3Format"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncS3Destination) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncS3Destination) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceDataSyncS3Destination) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncS3Destination"} if s.AWSKMSKeyARN != nil && len(*s.AWSKMSKeyARN) < 1 { invalidParams.Add(request.NewErrParamMinLen("AWSKMSKeyARN", 1)) } if s.BucketName == nil { invalidParams.Add(request.NewErrParamRequired("BucketName")) } if s.BucketName != nil && len(*s.BucketName) < 1 { invalidParams.Add(request.NewErrParamMinLen("BucketName", 1)) } if s.Prefix != nil && len(*s.Prefix) < 1 { invalidParams.Add(request.NewErrParamMinLen("Prefix", 1)) } if s.Region == nil { invalidParams.Add(request.NewErrParamRequired("Region")) } if s.Region != nil && len(*s.Region) < 1 { invalidParams.Add(request.NewErrParamMinLen("Region", 1)) } if s.SyncFormat == nil { invalidParams.Add(request.NewErrParamRequired("SyncFormat")) } if s.DestinationDataSharing != nil { if err := s.DestinationDataSharing.Validate(); err != nil { invalidParams.AddNested("DestinationDataSharing", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAWSKMSKeyARN sets the AWSKMSKeyARN field's value. func (s *ResourceDataSyncS3Destination) SetAWSKMSKeyARN(v string) *ResourceDataSyncS3Destination { s.AWSKMSKeyARN = &v return s } // SetBucketName sets the BucketName field's value. func (s *ResourceDataSyncS3Destination) SetBucketName(v string) *ResourceDataSyncS3Destination { s.BucketName = &v return s } // SetDestinationDataSharing sets the DestinationDataSharing field's value. func (s *ResourceDataSyncS3Destination) SetDestinationDataSharing(v *ResourceDataSyncDestinationDataSharing) *ResourceDataSyncS3Destination { s.DestinationDataSharing = v return s } // SetPrefix sets the Prefix field's value. func (s *ResourceDataSyncS3Destination) SetPrefix(v string) *ResourceDataSyncS3Destination { s.Prefix = &v return s } // SetRegion sets the Region field's value. func (s *ResourceDataSyncS3Destination) SetRegion(v string) *ResourceDataSyncS3Destination { s.Region = &v return s } // SetSyncFormat sets the SyncFormat field's value. func (s *ResourceDataSyncS3Destination) SetSyncFormat(v string) *ResourceDataSyncS3Destination { s.SyncFormat = &v return s } // Information about the source of the data included in the resource data sync. type ResourceDataSyncSource struct { _ struct{} `type:"structure"` // Information about the AwsOrganizationsSource resource data sync source. A // sync source of this type can synchronize data from Organizations. AwsOrganizationsSource *ResourceDataSyncAwsOrganizationsSource `type:"structure"` // When you create a resource data sync, if you choose one of the Organizations // options, then Systems Manager automatically enables all OpsData sources in // the selected Amazon Web Services Regions for all Amazon Web Services accounts // in your organization (or in the selected organization units). For more information, // see About multiple account and Region resource data syncs (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resouce-data-sync-multiple-accounts-and-regions.html) // in the Amazon Web Services Systems Manager User Guide. EnableAllOpsDataSources *bool `type:"boolean"` // Whether to automatically synchronize and aggregate data from new Amazon Web // Services Regions when those Regions come online. IncludeFutureRegions *bool `type:"boolean"` // The SyncSource Amazon Web Services Regions included in the resource data // sync. // // SourceRegions is a required field SourceRegions []*string `type:"list" required:"true"` // The type of data source for the resource data sync. SourceType is either // AwsOrganizations (if an organization is present in Organizations) or SingleAccountMultiRegions. // // SourceType is a required field SourceType *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncSource) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResourceDataSyncSource) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncSource"} if s.SourceRegions == nil { invalidParams.Add(request.NewErrParamRequired("SourceRegions")) } if s.SourceType == nil { invalidParams.Add(request.NewErrParamRequired("SourceType")) } if s.SourceType != nil && len(*s.SourceType) < 1 { invalidParams.Add(request.NewErrParamMinLen("SourceType", 1)) } if s.AwsOrganizationsSource != nil { if err := s.AwsOrganizationsSource.Validate(); err != nil { invalidParams.AddNested("AwsOrganizationsSource", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAwsOrganizationsSource sets the AwsOrganizationsSource field's value. func (s *ResourceDataSyncSource) SetAwsOrganizationsSource(v *ResourceDataSyncAwsOrganizationsSource) *ResourceDataSyncSource { s.AwsOrganizationsSource = v return s } // SetEnableAllOpsDataSources sets the EnableAllOpsDataSources field's value. func (s *ResourceDataSyncSource) SetEnableAllOpsDataSources(v bool) *ResourceDataSyncSource { s.EnableAllOpsDataSources = &v return s } // SetIncludeFutureRegions sets the IncludeFutureRegions field's value. func (s *ResourceDataSyncSource) SetIncludeFutureRegions(v bool) *ResourceDataSyncSource { s.IncludeFutureRegions = &v return s } // SetSourceRegions sets the SourceRegions field's value. func (s *ResourceDataSyncSource) SetSourceRegions(v []*string) *ResourceDataSyncSource { s.SourceRegions = v return s } // SetSourceType sets the SourceType field's value. func (s *ResourceDataSyncSource) SetSourceType(v string) *ResourceDataSyncSource { s.SourceType = &v return s } // The data type name for including resource data sync state. There are four // sync states: // // OrganizationNotExists (Your organization doesn't exist) // // NoPermissions (The system can't locate the service-linked role. This role // is automatically created when a user creates a resource data sync in Amazon // Web Services Systems Manager Explorer.) // // InvalidOrganizationalUnit (You specified or selected an invalid unit in the // resource data sync configuration.) // // TrustedAccessDisabled (You disabled Systems Manager access in the organization // in Organizations.) type ResourceDataSyncSourceWithState struct { _ struct{} `type:"structure"` // The field name in SyncSource for the ResourceDataSyncAwsOrganizationsSource // type. AwsOrganizationsSource *ResourceDataSyncAwsOrganizationsSource `type:"structure"` // When you create a resource data sync, if you choose one of the Organizations // options, then Systems Manager automatically enables all OpsData sources in // the selected Amazon Web Services Regions for all Amazon Web Services accounts // in your organization (or in the selected organization units). For more information, // see About multiple account and Region resource data syncs (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resouce-data-sync-multiple-accounts-and-regions.html) // in the Amazon Web Services Systems Manager User Guide. EnableAllOpsDataSources *bool `type:"boolean"` // Whether to automatically synchronize and aggregate data from new Amazon Web // Services Regions when those Regions come online. IncludeFutureRegions *bool `type:"boolean"` // The SyncSource Amazon Web Services Regions included in the resource data // sync. SourceRegions []*string `type:"list"` // The type of data source for the resource data sync. SourceType is either // AwsOrganizations (if an organization is present in Organizations) or singleAccountMultiRegions. SourceType *string `min:"1" type:"string"` // The data type name for including resource data sync state. There are four // sync states: // // OrganizationNotExists: Your organization doesn't exist. // // NoPermissions: The system can't locate the service-linked role. This role // is automatically created when a user creates a resource data sync in Explorer. // // InvalidOrganizationalUnit: You specified or selected an invalid unit in the // resource data sync configuration. // // TrustedAccessDisabled: You disabled Systems Manager access in the organization // in Organizations. State *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncSourceWithState) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceDataSyncSourceWithState) GoString() string { return s.String() } // SetAwsOrganizationsSource sets the AwsOrganizationsSource field's value. func (s *ResourceDataSyncSourceWithState) SetAwsOrganizationsSource(v *ResourceDataSyncAwsOrganizationsSource) *ResourceDataSyncSourceWithState { s.AwsOrganizationsSource = v return s } // SetEnableAllOpsDataSources sets the EnableAllOpsDataSources field's value. func (s *ResourceDataSyncSourceWithState) SetEnableAllOpsDataSources(v bool) *ResourceDataSyncSourceWithState { s.EnableAllOpsDataSources = &v return s } // SetIncludeFutureRegions sets the IncludeFutureRegions field's value. func (s *ResourceDataSyncSourceWithState) SetIncludeFutureRegions(v bool) *ResourceDataSyncSourceWithState { s.IncludeFutureRegions = &v return s } // SetSourceRegions sets the SourceRegions field's value. func (s *ResourceDataSyncSourceWithState) SetSourceRegions(v []*string) *ResourceDataSyncSourceWithState { s.SourceRegions = v return s } // SetSourceType sets the SourceType field's value. func (s *ResourceDataSyncSourceWithState) SetSourceType(v string) *ResourceDataSyncSourceWithState { s.SourceType = &v return s } // SetState sets the State field's value. func (s *ResourceDataSyncSourceWithState) SetState(v string) *ResourceDataSyncSourceWithState { s.State = &v return s } // Error returned if an attempt is made to delete a patch baseline that is registered // for a patch group. type ResourceInUseException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceInUseException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceInUseException) GoString() string { return s.String() } func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceInUseException) OrigErr() error { return nil } func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceInUseException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceInUseException) RequestID() string { return s.RespMetadata.RequestID } // Error returned when the caller has exceeded the default resource quotas. // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager // service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. type ResourceLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceLimitExceededException) GoString() string { return s.String() } func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error { return &ResourceLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceLimitExceededException) Code() string { return "ResourceLimitExceededException" } // Message returns the exception's message. func (s *ResourceLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceLimitExceededException) OrigErr() error { return nil } func (s *ResourceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // The hash provided in the call doesn't match the stored hash. This exception // is thrown when trying to update an obsolete policy version or when multiple // requests to update a policy are sent. type ResourcePolicyConflictException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourcePolicyConflictException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourcePolicyConflictException) GoString() string { return s.String() } func newErrorResourcePolicyConflictException(v protocol.ResponseMetadata) error { return &ResourcePolicyConflictException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourcePolicyConflictException) Code() string { return "ResourcePolicyConflictException" } // Message returns the exception's message. func (s *ResourcePolicyConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourcePolicyConflictException) OrigErr() error { return nil } func (s *ResourcePolicyConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourcePolicyConflictException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourcePolicyConflictException) RequestID() string { return s.RespMetadata.RequestID } // One or more parameters specified for the call aren't valid. Verify the parameters // and their values and try again. type ResourcePolicyInvalidParameterException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` ParameterNames []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourcePolicyInvalidParameterException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourcePolicyInvalidParameterException) GoString() string { return s.String() } func newErrorResourcePolicyInvalidParameterException(v protocol.ResponseMetadata) error { return &ResourcePolicyInvalidParameterException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourcePolicyInvalidParameterException) Code() string { return "ResourcePolicyInvalidParameterException" } // Message returns the exception's message. func (s *ResourcePolicyInvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourcePolicyInvalidParameterException) OrigErr() error { return nil } func (s *ResourcePolicyInvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourcePolicyInvalidParameterException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourcePolicyInvalidParameterException) RequestID() string { return s.RespMetadata.RequestID } // The PutResourcePolicy API action enforces two limits. A policy can't be greater // than 1024 bytes in size. And only one policy can be attached to OpsItemGroup. // Verify these limits and try again. type ResourcePolicyLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Limit *int64 `type:"integer"` LimitType *string `type:"string"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourcePolicyLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourcePolicyLimitExceededException) GoString() string { return s.String() } func newErrorResourcePolicyLimitExceededException(v protocol.ResponseMetadata) error { return &ResourcePolicyLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourcePolicyLimitExceededException) Code() string { return "ResourcePolicyLimitExceededException" } // Message returns the exception's message. func (s *ResourcePolicyLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourcePolicyLimitExceededException) OrigErr() error { return nil } func (s *ResourcePolicyLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourcePolicyLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourcePolicyLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // The inventory item result attribute. type ResultAttribute struct { _ struct{} `type:"structure"` // Name of the inventory item type. Valid value: AWS:InstanceInformation. Default // Value: AWS:InstanceInformation. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResultAttribute) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResultAttribute) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResultAttribute) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResultAttribute"} 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 } return nil } // SetTypeName sets the TypeName field's value. func (s *ResultAttribute) SetTypeName(v string) *ResultAttribute { s.TypeName = &v return s } type ResumeSessionInput struct { _ struct{} `type:"structure"` // The ID of the disconnected session to resume. // // SessionId is a required field SessionId *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResumeSessionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResumeSessionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ResumeSessionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ResumeSessionInput"} if s.SessionId == nil { invalidParams.Add(request.NewErrParamRequired("SessionId")) } if s.SessionId != nil && len(*s.SessionId) < 1 { invalidParams.Add(request.NewErrParamMinLen("SessionId", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSessionId sets the SessionId field's value. func (s *ResumeSessionInput) SetSessionId(v string) *ResumeSessionInput { s.SessionId = &v return s } type ResumeSessionOutput struct { _ struct{} `type:"structure"` // The ID of the session. SessionId *string `min:"1" type:"string"` // A URL back to SSM Agent on the managed node that the Session Manager client // uses to send commands and receive output from the managed node. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output). // // region represents the Region identifier for an Amazon Web Services Region // supported by Amazon Web Services Systems Manager, such as us-east-2 for the // US East (Ohio) Region. For a list of supported region values, see the Region // column in Systems Manager service endpoints (https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region) // in the Amazon Web Services General Reference. // // session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE. StreamUrl *string `type:"string"` // An encrypted token value containing session and caller information. Used // to authenticate the connection to the managed node. TokenValue *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResumeSessionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResumeSessionOutput) GoString() string { return s.String() } // SetSessionId sets the SessionId field's value. func (s *ResumeSessionOutput) SetSessionId(v string) *ResumeSessionOutput { s.SessionId = &v return s } // SetStreamUrl sets the StreamUrl field's value. func (s *ResumeSessionOutput) SetStreamUrl(v string) *ResumeSessionOutput { s.StreamUrl = &v return s } // SetTokenValue sets the TokenValue field's value. func (s *ResumeSessionOutput) SetTokenValue(v string) *ResumeSessionOutput { s.TokenValue = &v return s } // Information about the result of a document review request. type ReviewInformation struct { _ struct{} `type:"structure"` // The time that the reviewer took action on the document review request. ReviewedTime *time.Time `type:"timestamp"` // The reviewer assigned to take action on the document review request. Reviewer *string `type:"string"` // The current status of the document review request. Status *string `type:"string" enum:"ReviewStatus"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReviewInformation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ReviewInformation) GoString() string { return s.String() } // SetReviewedTime sets the ReviewedTime field's value. func (s *ReviewInformation) SetReviewedTime(v time.Time) *ReviewInformation { s.ReviewedTime = &v return s } // SetReviewer sets the Reviewer field's value. func (s *ReviewInformation) SetReviewer(v string) *ReviewInformation { s.Reviewer = &v return s } // SetStatus sets the Status field's value. func (s *ReviewInformation) SetStatus(v string) *ReviewInformation { s.Status = &v return s } // Information about an Automation runbook used in a runbook workflow in Change // Manager. // // The Automation runbooks specified for the runbook workflow can't run until // all required approvals for the change request have been received. type Runbook struct { _ struct{} `type:"structure"` // The name of the Automation runbook used in a runbook workflow. // // DocumentName is a required field DocumentName *string `type:"string" required:"true"` // The version of the Automation runbook used in a runbook workflow. DocumentVersion *string `type:"string"` // The MaxConcurrency value specified by the user when the operation started, // indicating the maximum number of resources that the runbook operation can // run on at the same time. MaxConcurrency *string `min:"1" type:"string"` // The MaxErrors value specified by the user when the execution started, indicating // the maximum number of errors that can occur during the operation before the // updates are stopped or rolled back. MaxErrors *string `min:"1" type:"string"` // The key-value map of execution parameters, which were supplied when calling // StartChangeRequestExecution. Parameters map[string][]*string `min:"1" type:"map"` // Information about the Amazon Web Services Regions and Amazon Web Services // accounts targeted by the current Runbook operation. TargetLocations []*TargetLocation `min:"1" type:"list"` // A key-value mapping of runbook parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]*string `type:"list"` // The name of the parameter used as the target resource for the rate-controlled // runbook workflow. Required if you specify Targets. TargetParameterName *string `min:"1" type:"string"` // A key-value mapping to target resources that the runbook operation performs // tasks on. Required if you specify TargetParameterName. Targets []*Target `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Runbook) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Runbook) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Runbook) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Runbook"} if s.DocumentName == nil { invalidParams.Add(request.NewErrParamRequired("DocumentName")) } 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.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 { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDocumentName sets the DocumentName field's value. func (s *Runbook) SetDocumentName(v string) *Runbook { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *Runbook) SetDocumentVersion(v string) *Runbook { s.DocumentVersion = &v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *Runbook) SetMaxConcurrency(v string) *Runbook { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *Runbook) SetMaxErrors(v string) *Runbook { s.MaxErrors = &v return s } // SetParameters sets the Parameters field's value. func (s *Runbook) SetParameters(v map[string][]*string) *Runbook { s.Parameters = v return s } // SetTargetLocations sets the TargetLocations field's value. func (s *Runbook) SetTargetLocations(v []*TargetLocation) *Runbook { s.TargetLocations = v return s } // SetTargetMaps sets the TargetMaps field's value. func (s *Runbook) SetTargetMaps(v []map[string][]*string) *Runbook { s.TargetMaps = v return s } // SetTargetParameterName sets the TargetParameterName field's value. func (s *Runbook) SetTargetParameterName(v string) *Runbook { s.TargetParameterName = &v return s } // SetTargets sets the Targets field's value. func (s *Runbook) SetTargets(v []*Target) *Runbook { s.Targets = v return s } // An S3 bucket where you want to store the results of this request. type S3OutputLocation struct { _ struct{} `type:"structure"` // The name of the S3 bucket. OutputS3BucketName *string `min:"3" type:"string"` // The S3 bucket subfolder. OutputS3KeyPrefix *string `type:"string"` // The Amazon Web Services Region of the S3 bucket. OutputS3Region *string `min:"3" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s S3OutputLocation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s S3OutputLocation) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *S3OutputLocation) Validate() error { invalidParams := request.ErrInvalidParams{Context: "S3OutputLocation"} if s.OutputS3BucketName != nil && len(*s.OutputS3BucketName) < 3 { invalidParams.Add(request.NewErrParamMinLen("OutputS3BucketName", 3)) } if s.OutputS3Region != nil && len(*s.OutputS3Region) < 3 { invalidParams.Add(request.NewErrParamMinLen("OutputS3Region", 3)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetOutputS3BucketName sets the OutputS3BucketName field's value. func (s *S3OutputLocation) SetOutputS3BucketName(v string) *S3OutputLocation { s.OutputS3BucketName = &v return s } // SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. func (s *S3OutputLocation) SetOutputS3KeyPrefix(v string) *S3OutputLocation { s.OutputS3KeyPrefix = &v return s } // SetOutputS3Region sets the OutputS3Region field's value. func (s *S3OutputLocation) SetOutputS3Region(v string) *S3OutputLocation { s.OutputS3Region = &v return s } // A URL for the Amazon Web Services Systems Manager (Systems Manager) bucket // where you want to store the results of this request. type S3OutputUrl struct { _ struct{} `type:"structure"` // A URL for an S3 bucket where you want to store the results of this request. OutputUrl *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s S3OutputUrl) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s S3OutputUrl) GoString() string { return s.String() } // SetOutputUrl sets the OutputUrl field's value. func (s *S3OutputUrl) SetOutputUrl(v string) *S3OutputUrl { s.OutputUrl = &v return s } // Information about a scheduled execution for a maintenance window. type ScheduledWindowExecution struct { _ struct{} `type:"structure"` // The time, in ISO-8601 Extended format, that the maintenance window is scheduled // to be run. ExecutionTime *string `type:"string"` // The name of the maintenance window to be run. Name *string `min:"3" type:"string"` // The ID of the maintenance window to be run. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ScheduledWindowExecution) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ScheduledWindowExecution) GoString() string { return s.String() } // SetExecutionTime sets the ExecutionTime field's value. func (s *ScheduledWindowExecution) SetExecutionTime(v string) *ScheduledWindowExecution { s.ExecutionTime = &v return s } // SetName sets the Name field's value. func (s *ScheduledWindowExecution) SetName(v string) *ScheduledWindowExecution { s.Name = &v return s } // SetWindowId sets the WindowId field's value. func (s *ScheduledWindowExecution) SetWindowId(v string) *ScheduledWindowExecution { s.WindowId = &v return s } type SendAutomationSignalInput struct { _ struct{} `type:"structure"` // The unique identifier for an existing Automation execution that you want // to send the signal to. // // AutomationExecutionId is a required field AutomationExecutionId *string `min:"36" type:"string" required:"true"` // The data sent with the signal. The data schema depends on the type of signal // used in the request. // // For Approve and Reject signal types, the payload is an optional comment that // you can send with the signal type. For example: // // Comment="Looks good" // // For StartStep and Resume signal types, you must send the name of the Automation // step to start or resume as the payload. For example: // // StepName="step1" // // For the StopStep signal type, you must send the step execution ID as the // payload. For example: // // StepExecutionId="97fff367-fc5a-4299-aed8-0123456789ab" Payload map[string][]*string `min:"1" type:"map"` // The type of signal to send to an Automation execution. // // SignalType is a required field SignalType *string `type:"string" required:"true" enum:"SignalType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SendAutomationSignalInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SendAutomationSignalInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *SendAutomationSignalInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "SendAutomationSignalInput"} if s.AutomationExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("AutomationExecutionId")) } if s.AutomationExecutionId != nil && len(*s.AutomationExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("AutomationExecutionId", 36)) } if s.Payload != nil && len(s.Payload) < 1 { invalidParams.Add(request.NewErrParamMinLen("Payload", 1)) } if s.SignalType == nil { invalidParams.Add(request.NewErrParamRequired("SignalType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAutomationExecutionId sets the AutomationExecutionId field's value. func (s *SendAutomationSignalInput) SetAutomationExecutionId(v string) *SendAutomationSignalInput { s.AutomationExecutionId = &v return s } // SetPayload sets the Payload field's value. func (s *SendAutomationSignalInput) SetPayload(v map[string][]*string) *SendAutomationSignalInput { s.Payload = v return s } // SetSignalType sets the SignalType field's value. func (s *SendAutomationSignalInput) SetSignalType(v string) *SendAutomationSignalInput { s.SignalType = &v return s } type SendAutomationSignalOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SendAutomationSignalOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SendAutomationSignalOutput) GoString() string { return s.String() } type SendCommandInput struct { _ struct{} `type:"structure"` // The CloudWatch alarm you want to apply to your command. AlarmConfiguration *AlarmConfiguration `type:"structure"` // Enables Amazon Web Services Systems Manager to send Run Command output to // Amazon CloudWatch Logs. Run Command is a capability of Amazon Web Services // Systems Manager. CloudWatchOutputConfig *CloudWatchOutputConfig `type:"structure"` // User-specified information about the command, such as a brief description // of what the command should do. Comment *string `type:"string"` // The Sha256 or Sha1 hash created by the system when the document was created. // // Sha1 hashes have been deprecated. DocumentHash *string `type:"string"` // Sha256 or Sha1. // // Sha1 hashes have been deprecated. DocumentHashType *string `type:"string" enum:"DocumentHashType"` // The name of the Amazon Web Services Systems Manager document (SSM document) // to run. This can be a public document or a custom document. To run a shared // document belonging to another account, specify the document Amazon Resource // Name (ARN). For more information about how to use shared documents, see Using // shared SSM documents (https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-using-shared.html) // in the Amazon Web Services Systems Manager User Guide. // // If you specify a document name or ARN that hasn't been shared with your account, // you receive an InvalidDocument error. // // DocumentName is a required field DocumentName *string `type:"string" required:"true"` // The SSM document version to use in the request. You can specify $DEFAULT, // $LATEST, or a specific version number. If you run commands by using the Command // Line Interface (Amazon Web Services CLI), then you must escape the first // two options by using a backslash. If you specify a version number, then you // don't need to use the backslash. For example: // // --document-version "\$DEFAULT" // // --document-version "\$LATEST" // // --document-version "3" DocumentVersion *string `type:"string"` // The IDs of the managed nodes where the command should run. Specifying managed // node IDs is most useful when you are targeting a limited number of managed // nodes, though you can specify up to 50 IDs. // // To target a larger number of managed nodes, or if you prefer not to list // individual node IDs, we recommend using the Targets option instead. Using // Targets, which accepts tag key-value pairs to identify the managed nodes // to send commands to, you can a send command to tens, hundreds, or thousands // of nodes at once. // // For more information about how to use targets, see Using targets and rate // controls to send commands to a fleet (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the Amazon Web Services Systems Manager User Guide. InstanceIds []*string `type:"list"` // (Optional) The maximum number of managed nodes that are allowed to run the // command at the same time. You can specify a number such as 10 or a percentage // such as 10%. The default value is 50. For more information about how to use // MaxConcurrency, see Using concurrency controls (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity) // in the Amazon Web Services Systems Manager User Guide. MaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed without the command failing. When the // command fails one more time beyond the value of MaxErrors, the systems stops // sending the command to additional targets. You can specify a number like // 10 or a percentage like 10%. The default value is 0. For more information // about how to use MaxErrors, see Using error controls (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors) // in the Amazon Web Services Systems Manager User Guide. MaxErrors *string `min:"1" type:"string"` // Configurations for sending notifications. NotificationConfig *NotificationConfig `type:"structure"` // The name of the S3 bucket where command execution responses should be stored. OutputS3BucketName *string `min:"3" type:"string"` // The directory structure within the S3 bucket where the responses should be // stored. OutputS3KeyPrefix *string `type:"string"` // (Deprecated) You can no longer specify this parameter. The system ignores // it. Instead, Systems Manager automatically determines the Amazon Web Services // Region of the S3 bucket. OutputS3Region *string `min:"3" type:"string"` // The required and optional parameters specified in the document being run. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by SendCommandInput's // String and GoString methods. Parameters map[string][]*string `type:"map" sensitive:"true"` // The ARN of the Identity and Access Management (IAM) service role to use to // publish Amazon Simple Notification Service (Amazon SNS) notifications for // Run Command commands. // // This role must provide the sns:Publish permission for your notification topic. // For information about creating and using this service role, see Monitoring // Systems Manager status changes using Amazon SNS notifications (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html) // in the Amazon Web Services Systems Manager User Guide. ServiceRoleArn *string `type:"string"` // An array of search criteria that targets managed nodes using a Key,Value // combination that you specify. Specifying targets is most useful when you // want to send a command to a large number of managed nodes at once. Using // Targets, which accepts tag key-value pairs to identify managed nodes, you // can send a command to tens, hundreds, or thousands of nodes at once. // // To send a command to a smaller number of managed nodes, you can use the InstanceIds // option instead. // // For more information about how to use targets, see Sending commands to a // fleet (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the Amazon Web Services Systems Manager User Guide. Targets []*Target `type:"list"` // If this time is reached and the command hasn't already started running, it // won't run. TimeoutSeconds *int64 `min:"30" type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SendCommandInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SendCommandInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *SendCommandInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "SendCommandInput"} if s.DocumentName == nil { invalidParams.Add(request.NewErrParamRequired("DocumentName")) } 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.OutputS3BucketName != nil && len(*s.OutputS3BucketName) < 3 { invalidParams.Add(request.NewErrParamMinLen("OutputS3BucketName", 3)) } if s.OutputS3Region != nil && len(*s.OutputS3Region) < 3 { invalidParams.Add(request.NewErrParamMinLen("OutputS3Region", 3)) } if s.TimeoutSeconds != nil && *s.TimeoutSeconds < 30 { invalidParams.Add(request.NewErrParamMinValue("TimeoutSeconds", 30)) } if s.AlarmConfiguration != nil { if err := s.AlarmConfiguration.Validate(); err != nil { invalidParams.AddNested("AlarmConfiguration", err.(request.ErrInvalidParams)) } } if s.CloudWatchOutputConfig != nil { if err := s.CloudWatchOutputConfig.Validate(); err != nil { invalidParams.AddNested("CloudWatchOutputConfig", err.(request.ErrInvalidParams)) } } if s.Targets != nil { for i, v := range s.Targets { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *SendCommandInput) SetAlarmConfiguration(v *AlarmConfiguration) *SendCommandInput { s.AlarmConfiguration = v return s } // SetCloudWatchOutputConfig sets the CloudWatchOutputConfig field's value. func (s *SendCommandInput) SetCloudWatchOutputConfig(v *CloudWatchOutputConfig) *SendCommandInput { s.CloudWatchOutputConfig = v return s } // SetComment sets the Comment field's value. func (s *SendCommandInput) SetComment(v string) *SendCommandInput { s.Comment = &v return s } // SetDocumentHash sets the DocumentHash field's value. func (s *SendCommandInput) SetDocumentHash(v string) *SendCommandInput { s.DocumentHash = &v return s } // SetDocumentHashType sets the DocumentHashType field's value. func (s *SendCommandInput) SetDocumentHashType(v string) *SendCommandInput { s.DocumentHashType = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *SendCommandInput) SetDocumentName(v string) *SendCommandInput { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *SendCommandInput) SetDocumentVersion(v string) *SendCommandInput { s.DocumentVersion = &v return s } // SetInstanceIds sets the InstanceIds field's value. func (s *SendCommandInput) SetInstanceIds(v []*string) *SendCommandInput { s.InstanceIds = v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *SendCommandInput) SetMaxConcurrency(v string) *SendCommandInput { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *SendCommandInput) SetMaxErrors(v string) *SendCommandInput { s.MaxErrors = &v return s } // SetNotificationConfig sets the NotificationConfig field's value. func (s *SendCommandInput) SetNotificationConfig(v *NotificationConfig) *SendCommandInput { s.NotificationConfig = v return s } // SetOutputS3BucketName sets the OutputS3BucketName field's value. func (s *SendCommandInput) SetOutputS3BucketName(v string) *SendCommandInput { s.OutputS3BucketName = &v return s } // SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. func (s *SendCommandInput) SetOutputS3KeyPrefix(v string) *SendCommandInput { s.OutputS3KeyPrefix = &v return s } // SetOutputS3Region sets the OutputS3Region field's value. func (s *SendCommandInput) SetOutputS3Region(v string) *SendCommandInput { s.OutputS3Region = &v return s } // SetParameters sets the Parameters field's value. func (s *SendCommandInput) SetParameters(v map[string][]*string) *SendCommandInput { s.Parameters = v return s } // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *SendCommandInput) SetServiceRoleArn(v string) *SendCommandInput { s.ServiceRoleArn = &v return s } // SetTargets sets the Targets field's value. func (s *SendCommandInput) SetTargets(v []*Target) *SendCommandInput { s.Targets = v return s } // SetTimeoutSeconds sets the TimeoutSeconds field's value. func (s *SendCommandInput) SetTimeoutSeconds(v int64) *SendCommandInput { s.TimeoutSeconds = &v return s } type SendCommandOutput struct { _ struct{} `type:"structure"` // The request as it was received by Systems Manager. Also provides the command // ID which can be used future references to this request. Command *Command `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SendCommandOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SendCommandOutput) GoString() string { return s.String() } // SetCommand sets the Command field's value. func (s *SendCommandOutput) SetCommand(v *Command) *SendCommandOutput { s.Command = v return s } // The service setting data structure. // // ServiceSetting is an account-level setting for an Amazon Web Services service. // This setting defines how a user interacts with or uses a service or a feature // of a service. For example, if an Amazon Web Services service charges money // to the account based on feature or service usage, then the Amazon Web Services // service team might create a default setting of "false". This means the user // can't use this feature unless they change the setting to "true" and intentionally // opt in for a paid feature. // // Services map a SettingId object to a setting value. Amazon Web Services services // teams define the default value for a SettingId. You can't create a new SettingId, // but you can overwrite the default value if you have the ssm:UpdateServiceSetting // permission for the setting. Use the UpdateServiceSetting API operation to // change the default setting. Or, use the ResetServiceSetting to change the // value back to the original value defined by the Amazon Web Services service // team. type ServiceSetting struct { _ struct{} `type:"structure"` // The ARN of the service setting. ARN *string `type:"string"` // The last time the service setting was modified. LastModifiedDate *time.Time `type:"timestamp"` // The ARN of the last modified user. This field is populated only if the setting // value was overwritten. LastModifiedUser *string `type:"string"` // The ID of the service setting. SettingId *string `min:"1" type:"string"` // The value of the service setting. SettingValue *string `min:"1" type:"string"` // The status of the service setting. The value can be Default, Customized or // PendingUpdate. // // * Default: The current setting uses a default value provisioned by the // Amazon Web Services service team. // // * Customized: The current setting use a custom value specified by the // customer. // // * PendingUpdate: The current setting uses a default or custom value, but // a setting change request is pending approval. Status *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ServiceSetting) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ServiceSetting) GoString() string { return s.String() } // SetARN sets the ARN field's value. func (s *ServiceSetting) SetARN(v string) *ServiceSetting { s.ARN = &v return s } // SetLastModifiedDate sets the LastModifiedDate field's value. func (s *ServiceSetting) SetLastModifiedDate(v time.Time) *ServiceSetting { s.LastModifiedDate = &v return s } // SetLastModifiedUser sets the LastModifiedUser field's value. func (s *ServiceSetting) SetLastModifiedUser(v string) *ServiceSetting { s.LastModifiedUser = &v return s } // SetSettingId sets the SettingId field's value. func (s *ServiceSetting) SetSettingId(v string) *ServiceSetting { s.SettingId = &v return s } // SetSettingValue sets the SettingValue field's value. func (s *ServiceSetting) SetSettingValue(v string) *ServiceSetting { s.SettingValue = &v return s } // SetStatus sets the Status field's value. func (s *ServiceSetting) SetStatus(v string) *ServiceSetting { s.Status = &v return s } // The specified service setting wasn't found. Either the service name or the // setting hasn't been provisioned by the Amazon Web Services service team. type ServiceSettingNotFound struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ServiceSettingNotFound) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ServiceSettingNotFound) GoString() string { return s.String() } func newErrorServiceSettingNotFound(v protocol.ResponseMetadata) error { return &ServiceSettingNotFound{ RespMetadata: v, } } // Code returns the exception type name. func (s *ServiceSettingNotFound) Code() string { return "ServiceSettingNotFound" } // Message returns the exception's message. func (s *ServiceSettingNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ServiceSettingNotFound) OrigErr() error { return nil } func (s *ServiceSettingNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ServiceSettingNotFound) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ServiceSettingNotFound) RequestID() string { return s.RespMetadata.RequestID } // Information about a Session Manager connection to a managed node. type Session struct { _ struct{} `type:"structure"` // Reserved for future use. Details *string `min:"1" type:"string"` // The name of the Session Manager SSM document used to define the parameters // and plugin settings for the session. For example, SSM-SessionManagerRunShell. DocumentName *string `type:"string"` // The date and time, in ISO-8601 Extended format, when the session was terminated. EndDate *time.Time `type:"timestamp"` // The maximum duration of a session before it terminates. MaxSessionDuration *string `min:"1" type:"string"` // Reserved for future use. OutputUrl *SessionManagerOutputUrl `type:"structure"` // The ID of the Amazon Web Services user that started the session. Owner *string `min:"1" type:"string"` // The reason for connecting to the instance. Reason *string `min:"1" type:"string"` // The ID of the session. SessionId *string `min:"1" type:"string"` // The date and time, in ISO-8601 Extended format, when the session began. StartDate *time.Time `type:"timestamp"` // The status of the session. For example, "Connected" or "Terminated". Status *string `type:"string" enum:"SessionStatus"` // The managed node that the Session Manager session connected to. Target *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Session) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Session) GoString() string { return s.String() } // SetDetails sets the Details field's value. func (s *Session) SetDetails(v string) *Session { s.Details = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *Session) SetDocumentName(v string) *Session { s.DocumentName = &v return s } // SetEndDate sets the EndDate field's value. func (s *Session) SetEndDate(v time.Time) *Session { s.EndDate = &v return s } // SetMaxSessionDuration sets the MaxSessionDuration field's value. func (s *Session) SetMaxSessionDuration(v string) *Session { s.MaxSessionDuration = &v return s } // SetOutputUrl sets the OutputUrl field's value. func (s *Session) SetOutputUrl(v *SessionManagerOutputUrl) *Session { s.OutputUrl = v return s } // SetOwner sets the Owner field's value. func (s *Session) SetOwner(v string) *Session { s.Owner = &v return s } // SetReason sets the Reason field's value. func (s *Session) SetReason(v string) *Session { s.Reason = &v return s } // SetSessionId sets the SessionId field's value. func (s *Session) SetSessionId(v string) *Session { s.SessionId = &v return s } // SetStartDate sets the StartDate field's value. func (s *Session) SetStartDate(v time.Time) *Session { s.StartDate = &v return s } // SetStatus sets the Status field's value. func (s *Session) SetStatus(v string) *Session { s.Status = &v return s } // SetTarget sets the Target field's value. func (s *Session) SetTarget(v string) *Session { s.Target = &v return s } // Describes a filter for Session Manager information. type SessionFilter struct { _ struct{} `type:"structure"` // The name of the filter. // // Key is a required field Key *string `locationName:"key" type:"string" required:"true" enum:"SessionFilterKey"` // The filter value. Valid values for each filter key are as follows: // // * InvokedAfter: Specify a timestamp to limit your results. For example, // specify 2018-08-29T00:00:00Z to see sessions that started August 29, 2018, // and later. // // * InvokedBefore: Specify a timestamp to limit your results. For example, // specify 2018-08-29T00:00:00Z to see sessions that started before August // 29, 2018. // // * Target: Specify a managed node to which session connections have been // made. // // * Owner: Specify an Amazon Web Services user to see a list of sessions // started by that user. // // * Status: Specify a valid session status to see a list of all sessions // with that status. Status values you can specify include: Connected Connecting // Disconnected Terminated Terminating Failed // // * SessionId: Specify a session ID to return details about the session. // // Value is a required field Value *string `locationName:"value" min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SessionFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SessionFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *SessionFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "SessionFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if s.Value != nil && len(*s.Value) < 1 { invalidParams.Add(request.NewErrParamMinLen("Value", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKey sets the Key field's value. func (s *SessionFilter) SetKey(v string) *SessionFilter { s.Key = &v return s } // SetValue sets the Value field's value. func (s *SessionFilter) SetValue(v string) *SessionFilter { s.Value = &v return s } // Reserved for future use. type SessionManagerOutputUrl struct { _ struct{} `type:"structure"` // Reserved for future use. CloudWatchOutputUrl *string `min:"1" type:"string"` // Reserved for future use. S3OutputUrl *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SessionManagerOutputUrl) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SessionManagerOutputUrl) GoString() string { return s.String() } // SetCloudWatchOutputUrl sets the CloudWatchOutputUrl field's value. func (s *SessionManagerOutputUrl) SetCloudWatchOutputUrl(v string) *SessionManagerOutputUrl { s.CloudWatchOutputUrl = &v return s } // SetS3OutputUrl sets the S3OutputUrl field's value. func (s *SessionManagerOutputUrl) SetS3OutputUrl(v string) *SessionManagerOutputUrl { s.S3OutputUrl = &v return s } // The number of managed nodes found for each patch severity level defined in // the request filter. type SeveritySummary struct { _ struct{} `type:"structure"` // The total number of resources or compliance items that have a severity level // of Critical. Critical severity is determined by the organization that published // the compliance items. CriticalCount *int64 `type:"integer"` // The total number of resources or compliance items that have a severity level // of high. High severity is determined by the organization that published the // compliance items. HighCount *int64 `type:"integer"` // The total number of resources or compliance items that have a severity level // of informational. Informational severity is determined by the organization // that published the compliance items. InformationalCount *int64 `type:"integer"` // The total number of resources or compliance items that have a severity level // of low. Low severity is determined by the organization that published the // compliance items. LowCount *int64 `type:"integer"` // The total number of resources or compliance items that have a severity level // of medium. Medium severity is determined by the organization that published // the compliance items. MediumCount *int64 `type:"integer"` // The total number of resources or compliance items that have a severity level // of unspecified. Unspecified severity is determined by the organization that // published the compliance items. UnspecifiedCount *int64 `type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SeveritySummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SeveritySummary) GoString() string { return s.String() } // SetCriticalCount sets the CriticalCount field's value. func (s *SeveritySummary) SetCriticalCount(v int64) *SeveritySummary { s.CriticalCount = &v return s } // SetHighCount sets the HighCount field's value. func (s *SeveritySummary) SetHighCount(v int64) *SeveritySummary { s.HighCount = &v return s } // SetInformationalCount sets the InformationalCount field's value. func (s *SeveritySummary) SetInformationalCount(v int64) *SeveritySummary { s.InformationalCount = &v return s } // SetLowCount sets the LowCount field's value. func (s *SeveritySummary) SetLowCount(v int64) *SeveritySummary { s.LowCount = &v return s } // SetMediumCount sets the MediumCount field's value. func (s *SeveritySummary) SetMediumCount(v int64) *SeveritySummary { s.MediumCount = &v return s } // SetUnspecifiedCount sets the UnspecifiedCount field's value. func (s *SeveritySummary) SetUnspecifiedCount(v int64) *SeveritySummary { s.UnspecifiedCount = &v return s } type StartAssociationsOnceInput struct { _ struct{} `type:"structure"` // The association IDs that you want to run immediately and only one time. // // AssociationIds is a required field AssociationIds []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartAssociationsOnceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartAssociationsOnceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StartAssociationsOnceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartAssociationsOnceInput"} if s.AssociationIds == nil { invalidParams.Add(request.NewErrParamRequired("AssociationIds")) } if s.AssociationIds != nil && len(s.AssociationIds) < 1 { invalidParams.Add(request.NewErrParamMinLen("AssociationIds", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAssociationIds sets the AssociationIds field's value. func (s *StartAssociationsOnceInput) SetAssociationIds(v []*string) *StartAssociationsOnceInput { s.AssociationIds = v return s } type StartAssociationsOnceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartAssociationsOnceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartAssociationsOnceOutput) GoString() string { return s.String() } type StartAutomationExecutionInput struct { _ struct{} `type:"structure"` // The CloudWatch alarm you want to apply to your automation. AlarmConfiguration *AlarmConfiguration `type:"structure"` // User-provided idempotency token. The token must be unique, is case insensitive, // enforces the UUID format, and can't be reused. ClientToken *string `min:"36" type:"string"` // The name of the SSM document to run. This can be a public document or a custom // document. To run a shared document belonging to another account, specify // the document ARN. For more information about how to use shared documents, // see Using shared SSM documents (https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-using-shared.html) // in the Amazon Web Services Systems Manager User Guide. // // DocumentName is a required field DocumentName *string `type:"string" required:"true"` // The version of the Automation runbook to use for this execution. DocumentVersion *string `type:"string"` // The maximum number of targets allowed to run this task in parallel. You can // specify a number, such as 10, or a percentage, such as 10%. The default value // is 10. MaxConcurrency *string `min:"1" type:"string"` // The number of errors that are allowed before the system stops running the // automation 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 running the automation // when the fourth error is received. If you specify 0, then the system stops // running the automation on additional targets after the first error result // is returned. If you run an automation on 50 resources and set max-errors // to 10%, then the system stops running the automation on additional targets // when the sixth error is received. // // Executions that are already running an automation when max-errors 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 max-concurrency to 1 so the executions proceed one at a time. MaxErrors *string `min:"1" type:"string"` // The execution mode of the automation. Valid modes include the following: // Auto and Interactive. The default mode is Auto. Mode *string `type:"string" enum:"ExecutionMode"` // A key-value map of execution parameters, which match the declared parameters // in the Automation runbook. Parameters map[string][]*string `min:"1" type:"map"` // Optional metadata that you assign to a resource. You can specify a maximum // of five tags for an automation. Tags enable you to categorize a resource // in different ways, such as by purpose, owner, or environment. For example, // you might want to tag an automation to identify an environment or operating // system. In this case, you could specify the following key-value pairs: // // * Key=environment,Value=test // // * Key=OS,Value=Windows // // To add tags to an existing automation, use the AddTagsToResource operation. Tags []*Tag `type:"list"` // A location is a combination of Amazon Web Services Regions and/or Amazon // Web Services accounts where you want to run the automation. Use this operation // to start an automation in multiple Amazon Web Services Regions and multiple // Amazon Web Services accounts. For more information, see Running Automation // workflows in multiple Amazon Web Services Regions and Amazon Web Services // accounts (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) // in the Amazon Web Services Systems Manager User Guide. TargetLocations []*TargetLocation `min:"1" type:"list"` // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]*string `type:"list"` // The name of the parameter used as the target resource for the rate-controlled // execution. Required if you specify targets. TargetParameterName *string `min:"1" type:"string"` // A key-value mapping to target resources. Required if you specify TargetParameterName. Targets []*Target `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartAutomationExecutionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartAutomationExecutionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StartAutomationExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartAutomationExecutionInput"} if s.ClientToken != nil && len(*s.ClientToken) < 36 { invalidParams.Add(request.NewErrParamMinLen("ClientToken", 36)) } if s.DocumentName == nil { invalidParams.Add(request.NewErrParamRequired("DocumentName")) } 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.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.AlarmConfiguration != nil { if err := s.AlarmConfiguration.Validate(); err != nil { invalidParams.AddNested("AlarmConfiguration", 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 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 { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *StartAutomationExecutionInput) SetAlarmConfiguration(v *AlarmConfiguration) *StartAutomationExecutionInput { s.AlarmConfiguration = v return s } // SetClientToken sets the ClientToken field's value. func (s *StartAutomationExecutionInput) SetClientToken(v string) *StartAutomationExecutionInput { s.ClientToken = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *StartAutomationExecutionInput) SetDocumentName(v string) *StartAutomationExecutionInput { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *StartAutomationExecutionInput) SetDocumentVersion(v string) *StartAutomationExecutionInput { s.DocumentVersion = &v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *StartAutomationExecutionInput) SetMaxConcurrency(v string) *StartAutomationExecutionInput { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *StartAutomationExecutionInput) SetMaxErrors(v string) *StartAutomationExecutionInput { s.MaxErrors = &v return s } // SetMode sets the Mode field's value. func (s *StartAutomationExecutionInput) SetMode(v string) *StartAutomationExecutionInput { s.Mode = &v return s } // SetParameters sets the Parameters field's value. func (s *StartAutomationExecutionInput) SetParameters(v map[string][]*string) *StartAutomationExecutionInput { s.Parameters = v return s } // SetTags sets the Tags field's value. func (s *StartAutomationExecutionInput) SetTags(v []*Tag) *StartAutomationExecutionInput { s.Tags = v 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 return s } // SetTargetParameterName sets the TargetParameterName field's value. func (s *StartAutomationExecutionInput) SetTargetParameterName(v string) *StartAutomationExecutionInput { s.TargetParameterName = &v return s } // SetTargets sets the Targets field's value. func (s *StartAutomationExecutionInput) SetTargets(v []*Target) *StartAutomationExecutionInput { s.Targets = v return s } type StartAutomationExecutionOutput struct { _ struct{} `type:"structure"` // The unique ID of a newly scheduled automation execution. AutomationExecutionId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartAutomationExecutionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartAutomationExecutionOutput) GoString() string { return s.String() } // SetAutomationExecutionId sets the AutomationExecutionId field's value. func (s *StartAutomationExecutionOutput) SetAutomationExecutionId(v string) *StartAutomationExecutionOutput { s.AutomationExecutionId = &v return s } type StartChangeRequestExecutionInput struct { _ struct{} `type:"structure"` // Indicates whether the change request can be approved automatically without // the need for manual approvals. // // If AutoApprovable is enabled in a change template, then setting AutoApprove // to true in StartChangeRequestExecution creates a change request that bypasses // approver review. // // Change Calendar restrictions are not bypassed in this scenario. If the state // of an associated calendar is CLOSED, change freeze approvers must still grant // permission for this change request to run. If they don't, the change won't // be processed until the calendar state is again OPEN. AutoApprove *bool `type:"boolean"` // User-provided details about the change. If no details are provided, content // specified in the Template information section of the associated change template // is added. ChangeDetails *string `min:"1" type:"string"` // The name of the change request associated with the runbook workflow to be // run. ChangeRequestName *string `min:"1" type:"string"` // The user-provided idempotency token. The token must be unique, is case insensitive, // enforces the UUID format, and can't be reused. ClientToken *string `min:"36" type:"string"` // The name of the change template document to run during the runbook workflow. // // DocumentName is a required field DocumentName *string `type:"string" required:"true"` // The version of the change template document to run during the runbook workflow. DocumentVersion *string `type:"string"` // A key-value map of parameters that match the declared parameters in the change // template document. Parameters map[string][]*string `min:"1" type:"map"` // Information about the Automation runbooks that are run during the runbook // workflow. // // The Automation runbooks specified for the runbook workflow can't run until // all required approvals for the change request have been received. // // Runbooks is a required field Runbooks []*Runbook `min:"1" type:"list" required:"true"` // The time that the requester expects the runbook workflow related to the change // request to complete. The time is an estimate only that the requester provides // for reviewers. ScheduledEndTime *time.Time `type:"timestamp"` // The date and time specified in the change request to run the Automation runbooks. // // The Automation runbooks specified for the runbook workflow can't run until // all required approvals for the change request have been received. ScheduledTime *time.Time `type:"timestamp"` // Optional metadata that you assign to a resource. You can specify a maximum // of five tags for a change request. Tags enable you to categorize a resource // in different ways, such as by purpose, owner, or environment. For example, // you might want to tag a change request to identify an environment or target // Amazon Web Services Region. In this case, you could specify the following // key-value pairs: // // * Key=Environment,Value=Production // // * Key=Region,Value=us-east-2 Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartChangeRequestExecutionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartChangeRequestExecutionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StartChangeRequestExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartChangeRequestExecutionInput"} if s.ChangeDetails != nil && len(*s.ChangeDetails) < 1 { invalidParams.Add(request.NewErrParamMinLen("ChangeDetails", 1)) } if s.ChangeRequestName != nil && len(*s.ChangeRequestName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ChangeRequestName", 1)) } if s.ClientToken != nil && len(*s.ClientToken) < 36 { invalidParams.Add(request.NewErrParamMinLen("ClientToken", 36)) } if s.DocumentName == nil { invalidParams.Add(request.NewErrParamRequired("DocumentName")) } if s.Parameters != nil && len(s.Parameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) } if s.Runbooks == nil { invalidParams.Add(request.NewErrParamRequired("Runbooks")) } if s.Runbooks != nil && len(s.Runbooks) < 1 { invalidParams.Add(request.NewErrParamMinLen("Runbooks", 1)) } if s.Runbooks != nil { for i, v := range s.Runbooks { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Runbooks", i), 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 } // SetAutoApprove sets the AutoApprove field's value. func (s *StartChangeRequestExecutionInput) SetAutoApprove(v bool) *StartChangeRequestExecutionInput { s.AutoApprove = &v return s } // SetChangeDetails sets the ChangeDetails field's value. func (s *StartChangeRequestExecutionInput) SetChangeDetails(v string) *StartChangeRequestExecutionInput { s.ChangeDetails = &v return s } // SetChangeRequestName sets the ChangeRequestName field's value. func (s *StartChangeRequestExecutionInput) SetChangeRequestName(v string) *StartChangeRequestExecutionInput { s.ChangeRequestName = &v return s } // SetClientToken sets the ClientToken field's value. func (s *StartChangeRequestExecutionInput) SetClientToken(v string) *StartChangeRequestExecutionInput { s.ClientToken = &v return s } // SetDocumentName sets the DocumentName field's value. func (s *StartChangeRequestExecutionInput) SetDocumentName(v string) *StartChangeRequestExecutionInput { s.DocumentName = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *StartChangeRequestExecutionInput) SetDocumentVersion(v string) *StartChangeRequestExecutionInput { s.DocumentVersion = &v return s } // SetParameters sets the Parameters field's value. func (s *StartChangeRequestExecutionInput) SetParameters(v map[string][]*string) *StartChangeRequestExecutionInput { s.Parameters = v return s } // SetRunbooks sets the Runbooks field's value. func (s *StartChangeRequestExecutionInput) SetRunbooks(v []*Runbook) *StartChangeRequestExecutionInput { s.Runbooks = v return s } // SetScheduledEndTime sets the ScheduledEndTime field's value. func (s *StartChangeRequestExecutionInput) SetScheduledEndTime(v time.Time) *StartChangeRequestExecutionInput { s.ScheduledEndTime = &v return s } // SetScheduledTime sets the ScheduledTime field's value. func (s *StartChangeRequestExecutionInput) SetScheduledTime(v time.Time) *StartChangeRequestExecutionInput { s.ScheduledTime = &v return s } // SetTags sets the Tags field's value. func (s *StartChangeRequestExecutionInput) SetTags(v []*Tag) *StartChangeRequestExecutionInput { s.Tags = v return s } type StartChangeRequestExecutionOutput struct { _ struct{} `type:"structure"` // The unique ID of a runbook workflow operation. (A runbook workflow is a type // of Automation operation.) AutomationExecutionId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartChangeRequestExecutionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartChangeRequestExecutionOutput) GoString() string { return s.String() } // SetAutomationExecutionId sets the AutomationExecutionId field's value. func (s *StartChangeRequestExecutionOutput) SetAutomationExecutionId(v string) *StartChangeRequestExecutionOutput { s.AutomationExecutionId = &v return s } type StartSessionInput struct { _ struct{} `type:"structure"` // The name of the SSM document you want to use to define the type of session, // input parameters, or preferences for the session. For example, SSM-SessionManagerRunShell. // You can call the GetDocument API to verify the document exists before attempting // to start a session. If no document name is provided, a shell to the managed // node is launched by default. For more information, see Start a session (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html) // in the Amazon Web Services Systems Manager User Guide. DocumentName *string `type:"string"` // The values you want to specify for the parameters defined in the Session // document. Parameters map[string][]*string `type:"map"` // The reason for connecting to the instance. This value is included in the // details for the Amazon CloudWatch Events event created when you start the // session. Reason *string `min:"1" type:"string"` // The managed node to connect to for the session. // // Target is a required field Target *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartSessionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartSessionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StartSessionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartSessionInput"} if s.Reason != nil && len(*s.Reason) < 1 { invalidParams.Add(request.NewErrParamMinLen("Reason", 1)) } 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 } return nil } // SetDocumentName sets the DocumentName field's value. func (s *StartSessionInput) SetDocumentName(v string) *StartSessionInput { s.DocumentName = &v return s } // SetParameters sets the Parameters field's value. func (s *StartSessionInput) SetParameters(v map[string][]*string) *StartSessionInput { s.Parameters = v return s } // SetReason sets the Reason field's value. func (s *StartSessionInput) SetReason(v string) *StartSessionInput { s.Reason = &v return s } // SetTarget sets the Target field's value. func (s *StartSessionInput) SetTarget(v string) *StartSessionInput { s.Target = &v return s } type StartSessionOutput struct { _ struct{} `type:"structure"` // The ID of the session. SessionId *string `min:"1" type:"string"` // A URL back to SSM Agent on the managed node that the Session Manager client // uses to send commands and receive output from the node. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) // // region represents the Region identifier for an Amazon Web Services Region // supported by Amazon Web Services Systems Manager, such as us-east-2 for the // US East (Ohio) Region. For a list of supported region values, see the Region // column in Systems Manager service endpoints (https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region) // in the Amazon Web Services General Reference. // // session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE. StreamUrl *string `type:"string"` // An encrypted token value containing session and caller information. This // token is used to authenticate the connection to the managed node, and is // valid only long enough to ensure the connection is successful. Never share // your session's token. TokenValue *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartSessionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartSessionOutput) GoString() string { return s.String() } // SetSessionId sets the SessionId field's value. func (s *StartSessionOutput) SetSessionId(v string) *StartSessionOutput { s.SessionId = &v return s } // SetStreamUrl sets the StreamUrl field's value. func (s *StartSessionOutput) SetStreamUrl(v string) *StartSessionOutput { s.StreamUrl = &v return s } // SetTokenValue sets the TokenValue field's value. func (s *StartSessionOutput) SetTokenValue(v string) *StartSessionOutput { s.TokenValue = &v return s } // The updated status is the same as the current status. type StatusUnchanged struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StatusUnchanged) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StatusUnchanged) GoString() string { return s.String() } func newErrorStatusUnchanged(v protocol.ResponseMetadata) error { return &StatusUnchanged{ RespMetadata: v, } } // Code returns the exception type name. func (s *StatusUnchanged) Code() string { return "StatusUnchanged" } // Message returns the exception's message. func (s *StatusUnchanged) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *StatusUnchanged) OrigErr() error { return nil } func (s *StatusUnchanged) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *StatusUnchanged) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *StatusUnchanged) RequestID() string { return s.RespMetadata.RequestID } // Detailed information about an the execution state of an Automation step. type StepExecution struct { _ struct{} `type:"structure"` // The action this step performs. The action determines the behavior of the // step. Action *string `type:"string"` // If a step has finished execution, this contains the time the execution ended. // If the step hasn't yet concluded, this field isn't populated. ExecutionEndTime *time.Time `type:"timestamp"` // If a step has begun execution, this contains the time the step started. If // the step is in Pending status, this field isn't populated. ExecutionStartTime *time.Time `type:"timestamp"` // Information about the Automation failure. FailureDetails *FailureDetails `type:"structure"` // If a step failed, this message explains why the execution failed. FailureMessage *string `type:"string"` // Fully-resolved values passed into the step before execution. Inputs map[string]*string `type:"map"` // The flag which can be used to help decide whether the failure of current // step leads to the Automation failure. IsCritical *bool `type:"boolean"` // The flag which can be used to end automation no matter whether the step succeeds // or fails. IsEnd *bool `type:"boolean"` // The maximum number of tries to run the action of the step. The default value // is 1. MaxAttempts *int64 `type:"integer"` // The next step after the step succeeds. NextStep *string `type:"string"` // The action to take if the step fails. The default value is Abort. OnFailure *string `type:"string"` // Returned values from the execution of the step. Outputs map[string][]*string `min:"1" type:"map"` // A user-specified list of parameters to override when running a step. OverriddenParameters map[string][]*string `min:"1" type:"map"` // Information about the parent step. ParentStepDetails *ParentStepDetails `type:"structure"` // A message associated with the response code for an execution. Response *string `type:"string"` // The response code returned by the execution of the step. ResponseCode *string `type:"string"` // The unique ID of a step execution. StepExecutionId *string `type:"string"` // The name of this execution step. StepName *string `type:"string"` // The execution status for this step. StepStatus *string `type:"string" enum:"AutomationExecutionStatus"` // The combination of Amazon Web Services Regions and Amazon Web Services 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"` // The CloudWatch alarms that were invoked by the automation. TriggeredAlarms []*AlarmStateInformation `min:"1" type:"list"` // Strategies used when step fails, we support Continue and Abort. Abort will // fail the automation when the step fails. Continue will ignore the failure // of current step and allow automation to run the next step. With conditional // branching, we add step:stepName to support the automation to go to another // specific step. ValidNextSteps []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StepExecution) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StepExecution) GoString() string { return s.String() } // SetAction sets the Action field's value. func (s *StepExecution) SetAction(v string) *StepExecution { s.Action = &v return s } // SetExecutionEndTime sets the ExecutionEndTime field's value. func (s *StepExecution) SetExecutionEndTime(v time.Time) *StepExecution { s.ExecutionEndTime = &v return s } // SetExecutionStartTime sets the ExecutionStartTime field's value. func (s *StepExecution) SetExecutionStartTime(v time.Time) *StepExecution { s.ExecutionStartTime = &v return s } // SetFailureDetails sets the FailureDetails field's value. func (s *StepExecution) SetFailureDetails(v *FailureDetails) *StepExecution { s.FailureDetails = v return s } // SetFailureMessage sets the FailureMessage field's value. func (s *StepExecution) SetFailureMessage(v string) *StepExecution { s.FailureMessage = &v return s } // SetInputs sets the Inputs field's value. func (s *StepExecution) SetInputs(v map[string]*string) *StepExecution { s.Inputs = v return s } // SetIsCritical sets the IsCritical field's value. func (s *StepExecution) SetIsCritical(v bool) *StepExecution { s.IsCritical = &v return s } // SetIsEnd sets the IsEnd field's value. func (s *StepExecution) SetIsEnd(v bool) *StepExecution { s.IsEnd = &v return s } // SetMaxAttempts sets the MaxAttempts field's value. func (s *StepExecution) SetMaxAttempts(v int64) *StepExecution { s.MaxAttempts = &v return s } // SetNextStep sets the NextStep field's value. func (s *StepExecution) SetNextStep(v string) *StepExecution { s.NextStep = &v return s } // SetOnFailure sets the OnFailure field's value. func (s *StepExecution) SetOnFailure(v string) *StepExecution { s.OnFailure = &v return s } // SetOutputs sets the Outputs field's value. func (s *StepExecution) SetOutputs(v map[string][]*string) *StepExecution { s.Outputs = v return s } // SetOverriddenParameters sets the OverriddenParameters field's value. func (s *StepExecution) SetOverriddenParameters(v map[string][]*string) *StepExecution { s.OverriddenParameters = v return s } // SetParentStepDetails sets the ParentStepDetails field's value. func (s *StepExecution) SetParentStepDetails(v *ParentStepDetails) *StepExecution { s.ParentStepDetails = v return s } // SetResponse sets the Response field's value. func (s *StepExecution) SetResponse(v string) *StepExecution { s.Response = &v return s } // SetResponseCode sets the ResponseCode field's value. func (s *StepExecution) SetResponseCode(v string) *StepExecution { s.ResponseCode = &v return s } // SetStepExecutionId sets the StepExecutionId field's value. func (s *StepExecution) SetStepExecutionId(v string) *StepExecution { s.StepExecutionId = &v return s } // SetStepName sets the StepName field's value. func (s *StepExecution) SetStepName(v string) *StepExecution { s.StepName = &v return s } // SetStepStatus sets the StepStatus field's value. func (s *StepExecution) SetStepStatus(v string) *StepExecution { s.StepStatus = &v 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 return s } // SetTriggeredAlarms sets the TriggeredAlarms field's value. func (s *StepExecution) SetTriggeredAlarms(v []*AlarmStateInformation) *StepExecution { s.TriggeredAlarms = v return s } // SetValidNextSteps sets the ValidNextSteps field's value. func (s *StepExecution) SetValidNextSteps(v []*string) *StepExecution { s.ValidNextSteps = v return s } // A filter to limit the amount of step execution information returned by the // call. type StepExecutionFilter struct { _ struct{} `type:"structure"` // One or more keys to limit the results. // // Key is a required field Key *string `type:"string" required:"true" enum:"StepExecutionFilterKey"` // The values of the filter key. // // Values is a required field Values []*string `min:"1" type:"list" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StepExecutionFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StepExecutionFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StepExecutionFilter) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StepExecutionFilter"} if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Values == nil { invalidParams.Add(request.NewErrParamRequired("Values")) } 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 *StepExecutionFilter) SetKey(v string) *StepExecutionFilter { s.Key = &v return s } // SetValues sets the Values field's value. func (s *StepExecutionFilter) SetValues(v []*string) *StepExecutionFilter { s.Values = v return s } type StopAutomationExecutionInput struct { _ struct{} `type:"structure"` // The execution ID of the Automation to stop. // // AutomationExecutionId is a required field AutomationExecutionId *string `min:"36" type:"string" required:"true"` // The stop request type. Valid types include the following: Cancel and Complete. // The default type is Cancel. Type *string `type:"string" enum:"StopType"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StopAutomationExecutionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StopAutomationExecutionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StopAutomationExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StopAutomationExecutionInput"} if s.AutomationExecutionId == nil { invalidParams.Add(request.NewErrParamRequired("AutomationExecutionId")) } if s.AutomationExecutionId != nil && len(*s.AutomationExecutionId) < 36 { invalidParams.Add(request.NewErrParamMinLen("AutomationExecutionId", 36)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAutomationExecutionId sets the AutomationExecutionId field's value. func (s *StopAutomationExecutionInput) SetAutomationExecutionId(v string) *StopAutomationExecutionInput { s.AutomationExecutionId = &v return s } // SetType sets the Type field's value. func (s *StopAutomationExecutionInput) SetType(v string) *StopAutomationExecutionInput { s.Type = &v return s } type StopAutomationExecutionOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StopAutomationExecutionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StopAutomationExecutionOutput) GoString() string { return s.String() } // The sub-type count exceeded the limit for the inventory type. type SubTypeCountLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SubTypeCountLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SubTypeCountLimitExceededException) GoString() string { return s.String() } func newErrorSubTypeCountLimitExceededException(v protocol.ResponseMetadata) error { return &SubTypeCountLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *SubTypeCountLimitExceededException) Code() string { return "SubTypeCountLimitExceededException" } // Message returns the exception's message. func (s *SubTypeCountLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *SubTypeCountLimitExceededException) OrigErr() error { return nil } func (s *SubTypeCountLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *SubTypeCountLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *SubTypeCountLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } // Metadata that you assign to your Amazon Web Services resources. Tags enable // you to categorize your resources in different ways, for example, by purpose, // owner, or environment. In Amazon Web Services Systems Manager, you can apply // tags to Systems Manager documents (SSM documents), managed nodes, maintenance // windows, parameters, patch baselines, OpsItems, and OpsMetadata. type Tag struct { _ struct{} `type:"structure"` // The name of the tag. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // The value of the tag. // // Value is a required field Value *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Tag) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 } // An array of search criteria that targets managed nodes using a key-value // pair that you specify. // // One or more targets must be specified for maintenance window Run Command-type // tasks. Depending on the task, targets are optional for other maintenance // window task types (Automation, Lambda, and Step Functions). For more information // about running tasks that don't specify targets, see Registering maintenance // window tasks without targets (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // in the Amazon Web Services Systems Manager User Guide. // // Supported formats include the following. // // - Key=InstanceIds,Values=,, // // - Key=tag:,Values=, // // - Key=tag-key,Values=, // // - Run Command and Maintenance window targets only: Key=resource-groups:Name,Values= // // - Maintenance window targets only: Key=resource-groups:ResourceTypeFilters,Values=, // // - Automation targets only: Key=ResourceGroup;Values= // // For example: // // - Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE // // - Key=tag:CostCenter,Values=CostCenter1,CostCenter2,CostCenter3 // // - Key=tag-key,Values=Name,Instance-Type,CostCenter // // - Run Command and Maintenance window targets only: Key=resource-groups:Name,Values=ProductionResourceGroup // This example demonstrates how to target all resources in the resource // group ProductionResourceGroup in your maintenance window. // // - Maintenance window targets only: Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC // This example demonstrates how to target only Amazon Elastic Compute Cloud // (Amazon EC2) instances and VPCs in your maintenance window. // // - Automation targets only: Key=ResourceGroup,Values=MyResourceGroup // // - State Manager association targets only: Key=InstanceIds,Values=* This // example demonstrates how to target all managed instances in the Amazon // Web Services Region where the association was created. // // For more information about how to send commands that target managed nodes // using Key,Value parameters, see Targeting multiple instances (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) // in the Amazon Web Services Systems Manager User Guide. type Target struct { _ struct{} `type:"structure"` // User-defined criteria for sending commands that target managed nodes that // meet the criteria. Key *string `min:"1" type:"string"` // User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, // you could specify value:WebServer to run a command on instances that include // EC2 tags of ServerRole,WebServer. // // Depending on the type of target, the maximum number of values for a key might // be lower than the global maximum of 50. Values []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Target) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Target) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Target) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Target"} 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 *Target) SetKey(v string) *Target { s.Key = &v return s } // SetValues sets the Values field's value. func (s *Target) SetValues(v []*string) *Target { s.Values = v return s } // You specified the Safe option for the DeregisterTargetFromMaintenanceWindow // operation, but the target is still referenced in a task. type TargetInUseException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TargetInUseException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TargetInUseException) GoString() string { return s.String() } func newErrorTargetInUseException(v protocol.ResponseMetadata) error { return &TargetInUseException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TargetInUseException) Code() string { return "TargetInUseException" } // Message returns the exception's message. func (s *TargetInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TargetInUseException) OrigErr() error { return nil } func (s *TargetInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TargetInUseException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TargetInUseException) RequestID() string { return s.RespMetadata.RequestID } // The combination of Amazon Web Services Regions and Amazon Web Services accounts // targeted by the current Automation execution. type TargetLocation struct { _ struct{} `type:"structure"` // The Amazon Web Services accounts targeted by the current Automation execution. Accounts []*string `min:"1" type:"list"` // The Automation execution role used by the currently running Automation. If // not specified, the default value is AWS-SystemsManager-AutomationExecutionRole. ExecutionRoleName *string `min:"1" type:"string"` // The Amazon Web Services Regions targeted by the current Automation execution. Regions []*string `min:"1" type:"list"` // The details for the CloudWatch alarm you want to apply to an automation or // command. TargetLocationAlarmConfiguration *AlarmConfiguration `type:"structure"` // The maximum number of Amazon Web Services Regions and Amazon Web Services // accounts allowed to run the Automation concurrently. TargetLocationMaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed before the system stops queueing additional // Automation executions for the currently running Automation. TargetLocationMaxErrors *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TargetLocation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 s.TargetLocationAlarmConfiguration != nil { if err := s.TargetLocationAlarmConfiguration.Validate(); err != nil { invalidParams.AddNested("TargetLocationAlarmConfiguration", err.(request.ErrInvalidParams)) } } 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 } // SetTargetLocationAlarmConfiguration sets the TargetLocationAlarmConfiguration field's value. func (s *TargetLocation) SetTargetLocationAlarmConfiguration(v *AlarmConfiguration) *TargetLocation { s.TargetLocationAlarmConfiguration = 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 } // The specified target managed node for the session isn't fully configured // for use with Session Manager. For more information, see Getting started with // Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) // in the Amazon Web Services Systems Manager User Guide. This error is also // returned if you attempt to start a session on a managed node that is located // in a different account or Region type TargetNotConnected struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TargetNotConnected) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TargetNotConnected) GoString() string { return s.String() } func newErrorTargetNotConnected(v protocol.ResponseMetadata) error { return &TargetNotConnected{ RespMetadata: v, } } // Code returns the exception type name. func (s *TargetNotConnected) Code() string { return "TargetNotConnected" } // Message returns the exception's message. func (s *TargetNotConnected) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TargetNotConnected) OrigErr() error { return nil } func (s *TargetNotConnected) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TargetNotConnected) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TargetNotConnected) RequestID() string { return s.RespMetadata.RequestID } type TerminateSessionInput struct { _ struct{} `type:"structure"` // The ID of the session to terminate. // // SessionId is a required field SessionId *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TerminateSessionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TerminateSessionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *TerminateSessionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "TerminateSessionInput"} if s.SessionId == nil { invalidParams.Add(request.NewErrParamRequired("SessionId")) } if s.SessionId != nil && len(*s.SessionId) < 1 { invalidParams.Add(request.NewErrParamMinLen("SessionId", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSessionId sets the SessionId field's value. func (s *TerminateSessionInput) SetSessionId(v string) *TerminateSessionInput { s.SessionId = &v return s } type TerminateSessionOutput struct { _ struct{} `type:"structure"` // The ID of the session that has been terminated. SessionId *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TerminateSessionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TerminateSessionOutput) GoString() string { return s.String() } // SetSessionId sets the SessionId field's value. func (s *TerminateSessionOutput) SetSessionId(v string) *TerminateSessionOutput { s.SessionId = &v return s } // The Targets parameter includes too many tags. Remove one or more tags and // try the command again. type TooManyTagsError struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TooManyTagsError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TooManyTagsError) GoString() string { return s.String() } func newErrorTooManyTagsError(v protocol.ResponseMetadata) error { return &TooManyTagsError{ RespMetadata: v, } } // Code returns the exception type name. func (s *TooManyTagsError) Code() string { return "TooManyTagsError" } // Message returns the exception's message. func (s *TooManyTagsError) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TooManyTagsError) OrigErr() error { return nil } func (s *TooManyTagsError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TooManyTagsError) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TooManyTagsError) RequestID() string { return s.RespMetadata.RequestID } // There are concurrent updates for a resource that supports one update at a // time. type TooManyUpdates struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TooManyUpdates) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TooManyUpdates) GoString() string { return s.String() } func newErrorTooManyUpdates(v protocol.ResponseMetadata) error { return &TooManyUpdates{ RespMetadata: v, } } // Code returns the exception type name. func (s *TooManyUpdates) Code() string { return "TooManyUpdates" } // Message returns the exception's message. func (s *TooManyUpdates) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TooManyUpdates) OrigErr() error { return nil } func (s *TooManyUpdates) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TooManyUpdates) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TooManyUpdates) RequestID() string { return s.RespMetadata.RequestID } // The size of inventory data has exceeded the total size limit for the resource. type TotalSizeLimitExceededException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TotalSizeLimitExceededException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TotalSizeLimitExceededException) GoString() string { return s.String() } func newErrorTotalSizeLimitExceededException(v protocol.ResponseMetadata) error { return &TotalSizeLimitExceededException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TotalSizeLimitExceededException) Code() string { return "TotalSizeLimitExceededException" } // Message returns the exception's message. func (s *TotalSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TotalSizeLimitExceededException) OrigErr() error { return nil } func (s *TotalSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TotalSizeLimitExceededException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TotalSizeLimitExceededException) RequestID() string { return s.RespMetadata.RequestID } type UnlabelParameterVersionInput struct { _ struct{} `type:"structure"` // One or more labels to delete from the specified parameter version. // // Labels is a required field Labels []*string `min:"1" type:"list" required:"true"` // The name of the parameter from which you want to delete one or more labels. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // The specific version of the parameter which you want to delete one or more // labels from. If it isn't present, the call will fail. // // ParameterVersion is a required field ParameterVersion *int64 `type:"long" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnlabelParameterVersionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnlabelParameterVersionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UnlabelParameterVersionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UnlabelParameterVersionInput"} if s.Labels == nil { invalidParams.Add(request.NewErrParamRequired("Labels")) } if s.Labels != nil && len(s.Labels) < 1 { invalidParams.Add(request.NewErrParamMinLen("Labels", 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.ParameterVersion == nil { invalidParams.Add(request.NewErrParamRequired("ParameterVersion")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetLabels sets the Labels field's value. func (s *UnlabelParameterVersionInput) SetLabels(v []*string) *UnlabelParameterVersionInput { s.Labels = v return s } // SetName sets the Name field's value. func (s *UnlabelParameterVersionInput) SetName(v string) *UnlabelParameterVersionInput { s.Name = &v return s } // SetParameterVersion sets the ParameterVersion field's value. func (s *UnlabelParameterVersionInput) SetParameterVersion(v int64) *UnlabelParameterVersionInput { s.ParameterVersion = &v return s } type UnlabelParameterVersionOutput struct { _ struct{} `type:"structure"` // The labels that aren't attached to the given parameter version. InvalidLabels []*string `min:"1" type:"list"` // A list of all labels deleted from the parameter. RemovedLabels []*string `min:"1" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnlabelParameterVersionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnlabelParameterVersionOutput) GoString() string { return s.String() } // SetInvalidLabels sets the InvalidLabels field's value. func (s *UnlabelParameterVersionOutput) SetInvalidLabels(v []*string) *UnlabelParameterVersionOutput { s.InvalidLabels = v return s } // SetRemovedLabels sets the RemovedLabels field's value. func (s *UnlabelParameterVersionOutput) SetRemovedLabels(v []*string) *UnlabelParameterVersionOutput { s.RemovedLabels = v return s } // The calendar entry contained in the specified SSM document isn't supported. type UnsupportedCalendarException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedCalendarException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedCalendarException) GoString() string { return s.String() } func newErrorUnsupportedCalendarException(v protocol.ResponseMetadata) error { return &UnsupportedCalendarException{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnsupportedCalendarException) Code() string { return "UnsupportedCalendarException" } // Message returns the exception's message. func (s *UnsupportedCalendarException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnsupportedCalendarException) OrigErr() error { return nil } func (s *UnsupportedCalendarException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *UnsupportedCalendarException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnsupportedCalendarException) RequestID() string { return s.RespMetadata.RequestID } // Patching for applications released by Microsoft is only available on EC2 // instances and advanced instances. To patch applications released by Microsoft // on on-premises servers and VMs, you must enable advanced instances. For more // information, see Enabling the advanced-instances tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) // in the Amazon Web Services Systems Manager User Guide. type UnsupportedFeatureRequiredException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedFeatureRequiredException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedFeatureRequiredException) GoString() string { return s.String() } func newErrorUnsupportedFeatureRequiredException(v protocol.ResponseMetadata) error { return &UnsupportedFeatureRequiredException{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnsupportedFeatureRequiredException) Code() string { return "UnsupportedFeatureRequiredException" } // Message returns the exception's message. func (s *UnsupportedFeatureRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnsupportedFeatureRequiredException) OrigErr() error { return nil } func (s *UnsupportedFeatureRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *UnsupportedFeatureRequiredException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnsupportedFeatureRequiredException) RequestID() string { return s.RespMetadata.RequestID } // The Context attribute that you specified for the InventoryItem isn't allowed // for this inventory type. You can only use the Context attribute with inventory // types like AWS:ComplianceItem. type UnsupportedInventoryItemContextException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` TypeName *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedInventoryItemContextException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedInventoryItemContextException) GoString() string { return s.String() } func newErrorUnsupportedInventoryItemContextException(v protocol.ResponseMetadata) error { return &UnsupportedInventoryItemContextException{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnsupportedInventoryItemContextException) Code() string { return "UnsupportedInventoryItemContextException" } // Message returns the exception's message. func (s *UnsupportedInventoryItemContextException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnsupportedInventoryItemContextException) OrigErr() error { return nil } func (s *UnsupportedInventoryItemContextException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *UnsupportedInventoryItemContextException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnsupportedInventoryItemContextException) RequestID() string { return s.RespMetadata.RequestID } // Inventory item type schema version has to match supported versions in the // service. Check output of GetInventorySchema to see the available schema version // for each type. type UnsupportedInventorySchemaVersionException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedInventorySchemaVersionException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedInventorySchemaVersionException) GoString() string { return s.String() } func newErrorUnsupportedInventorySchemaVersionException(v protocol.ResponseMetadata) error { return &UnsupportedInventorySchemaVersionException{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnsupportedInventorySchemaVersionException) Code() string { return "UnsupportedInventorySchemaVersionException" } // Message returns the exception's message. func (s *UnsupportedInventorySchemaVersionException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnsupportedInventorySchemaVersionException) OrigErr() error { return nil } func (s *UnsupportedInventorySchemaVersionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *UnsupportedInventorySchemaVersionException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnsupportedInventorySchemaVersionException) RequestID() string { return s.RespMetadata.RequestID } // The operating systems you specified isn't supported, or the operation isn't // supported for the operating system. type UnsupportedOperatingSystem struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedOperatingSystem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedOperatingSystem) GoString() string { return s.String() } func newErrorUnsupportedOperatingSystem(v protocol.ResponseMetadata) error { return &UnsupportedOperatingSystem{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnsupportedOperatingSystem) Code() string { return "UnsupportedOperatingSystem" } // Message returns the exception's message. func (s *UnsupportedOperatingSystem) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnsupportedOperatingSystem) OrigErr() error { return nil } func (s *UnsupportedOperatingSystem) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *UnsupportedOperatingSystem) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnsupportedOperatingSystem) RequestID() string { return s.RespMetadata.RequestID } // The parameter type isn't supported. type UnsupportedParameterType struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedParameterType) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedParameterType) GoString() string { return s.String() } func newErrorUnsupportedParameterType(v protocol.ResponseMetadata) error { return &UnsupportedParameterType{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnsupportedParameterType) Code() string { return "UnsupportedParameterType" } // Message returns the exception's message. func (s *UnsupportedParameterType) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnsupportedParameterType) OrigErr() error { return nil } func (s *UnsupportedParameterType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *UnsupportedParameterType) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnsupportedParameterType) RequestID() string { return s.RespMetadata.RequestID } // The document doesn't support the platform type of the given managed node // ID(s). For example, you sent an document for a Windows managed node to a // Linux node. type UnsupportedPlatformType struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedPlatformType) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedPlatformType) GoString() string { return s.String() } func newErrorUnsupportedPlatformType(v protocol.ResponseMetadata) error { return &UnsupportedPlatformType{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnsupportedPlatformType) Code() string { return "UnsupportedPlatformType" } // Message returns the exception's message. func (s *UnsupportedPlatformType) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnsupportedPlatformType) OrigErr() error { return nil } func (s *UnsupportedPlatformType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *UnsupportedPlatformType) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnsupportedPlatformType) RequestID() string { return s.RespMetadata.RequestID } type UpdateAssociationInput struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm you want to apply to an automation or // command. AlarmConfiguration *AlarmConfiguration `type:"structure"` // By default, when you update an association, the system runs it immediately // after it is updated and then according to the schedule you specified. Specify // this option if you don't want an association to run immediately after you // update it. This parameter isn't supported for rate expressions. // // If you chose this option when you created an association and later you edit // that association or you make changes to the SSM document on which that association // is based (by using the Documents page in the console), State Manager applies // the association at the next specified cron interval. For example, if you // chose the Latest version of an SSM document when you created an association // and you edit the association by choosing a different document version on // the Documents page, State Manager applies the association at the next specified // cron interval if you previously selected this option. If this option wasn't // selected, State Manager immediately runs the association. // // You can reset this option. To do so, specify the no-apply-only-at-cron-interval // parameter when you update the association from the command line. This parameter // forces the association to run immediately after updating it and according // to the interval specified. ApplyOnlyAtCronInterval *bool `type:"boolean"` // The ID of the association you want to update. // // AssociationId is a required field AssociationId *string `type:"string" required:"true"` // The name of the association that you want to update. AssociationName *string `type:"string"` // This parameter is provided for concurrency control purposes. You must specify // the latest association version in the service. If you want to ensure that // this request succeeds, either specify $LATEST, or omit this parameter. AssociationVersion *string `type:"string"` // Choose the parameter that will define how your automation will branch out. // This target is required for associations that use an Automation runbook and // target resources by using rate controls. Automation is a capability of Amazon // Web Services Systems Manager. AutomationTargetParameterName *string `min:"1" type:"string"` // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents // you want to gate your associations under. The associations only run when // that change calendar is open. For more information, see Amazon Web Services // Systems Manager Change Calendar (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar). CalendarNames []*string `type:"list"` // The severity level to assign to the association. ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` // The document version you want update for the association. // // State Manager doesn't support running associations that use a new version // of a document if that document is shared from another account. State Manager // always runs the default version of a document if shared from another account, // even though the Systems Manager console shows that a new version was processed. // If you want to run an association using a new version of a document shared // form another account, you must set the document version to default. 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 managed node starts and attempts to run an association while Systems // Manager is running MaxConcurrency associations, the association is allowed // to run. During the next association interval, the new managed node 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 managed nodes 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 SSM Command document or Automation runbook that contains // the configuration information for the managed node. // // You can specify Amazon Web Services-predefined documents, documents you created, // or a document that is shared with you from another account. // // For Systems Manager document (SSM document) that are shared with you from // other Amazon Web Services accounts, you must specify the complete SSM document // ARN, in the following format: // // arn:aws:ssm:region:account-id:document/document-name // // For example: // // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document // // For Amazon Web Services-predefined documents and SSM documents you created // in your account, you only need to specify the document name. For example, // AWS-ApplyPatchBaseline or My-Document. Name *string `type:"string"` // An S3 bucket where you want to store the results of this request. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // The parameters you want to update for the association. If you create a parameter // using Parameter Store, a capability of Amazon Web Services Systems Manager, // you can reference the parameter using {{ssm:parameter-name}}. // // Parameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateAssociationInput's // String and GoString methods. Parameters map[string][]*string `type:"map" sensitive:"true"` // The cron expression used to schedule the association that you want to update. ScheduleExpression *string `min:"1" type:"string"` // Number of days to wait after the scheduled day to run an association. For // example, if you specified a cron schedule of cron(0 0 ? * THU#2 *), you could // specify an offset of 3 to run the association each Sunday after the second // Thursday of the month. For more information about cron schedules for associations, // see Reference: Cron and rate expressions for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html) // in the Amazon Web Services Systems Manager User Guide. // // To use offsets, you must specify the ApplyOnlyAtCronInterval parameter. This // option tells the system not to run an association immediately after you create // it. ScheduleOffset *int64 `min:"1" type:"integer"` // The mode for generating association compliance. You can specify AUTO or MANUAL. // In AUTO mode, the system uses the status of the association execution to // determine the compliance status. If the association execution runs successfully, // then the association is COMPLIANT. If the association execution doesn't run // successfully, the association is NON-COMPLIANT. // // In MANUAL mode, you must specify the AssociationId as a parameter for the // PutComplianceItems API operation. In this case, compliance data isn't managed // by State Manager, a capability of Amazon Web Services Systems Manager. It // is managed by your direct call to the PutComplianceItems API operation. // // By default, all associations use AUTO mode. SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` // A location is a combination of Amazon Web Services Regions and Amazon Web // Services accounts where you want to run the association. Use this action // to update an association in multiple Regions and multiple accounts. TargetLocations []*TargetLocation `min:"1" type:"list"` // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]*string `type:"list"` // The targets of the association. Targets []*Target `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateAssociationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateAssociationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateAssociationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateAssociationInput"} if s.AssociationId == nil { invalidParams.Add(request.NewErrParamRequired("AssociationId")) } if s.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) } 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)) } if s.ScheduleOffset != nil && *s.ScheduleOffset < 1 { invalidParams.Add(request.NewErrParamMinValue("ScheduleOffset", 1)) } if s.TargetLocations != nil && len(s.TargetLocations) < 1 { invalidParams.Add(request.NewErrParamMinLen("TargetLocations", 1)) } if s.AlarmConfiguration != nil { if err := s.AlarmConfiguration.Validate(); err != nil { invalidParams.AddNested("AlarmConfiguration", err.(request.ErrInvalidParams)) } } if s.OutputLocation != nil { if err := s.OutputLocation.Validate(); err != nil { invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams)) } } 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 { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *UpdateAssociationInput) SetAlarmConfiguration(v *AlarmConfiguration) *UpdateAssociationInput { s.AlarmConfiguration = v return s } // SetApplyOnlyAtCronInterval sets the ApplyOnlyAtCronInterval field's value. func (s *UpdateAssociationInput) SetApplyOnlyAtCronInterval(v bool) *UpdateAssociationInput { s.ApplyOnlyAtCronInterval = &v return s } // SetAssociationId sets the AssociationId field's value. func (s *UpdateAssociationInput) SetAssociationId(v string) *UpdateAssociationInput { s.AssociationId = &v return s } // SetAssociationName sets the AssociationName field's value. func (s *UpdateAssociationInput) SetAssociationName(v string) *UpdateAssociationInput { s.AssociationName = &v return s } // SetAssociationVersion sets the AssociationVersion field's value. func (s *UpdateAssociationInput) SetAssociationVersion(v string) *UpdateAssociationInput { s.AssociationVersion = &v return s } // SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. func (s *UpdateAssociationInput) SetAutomationTargetParameterName(v string) *UpdateAssociationInput { s.AutomationTargetParameterName = &v return s } // SetCalendarNames sets the CalendarNames field's value. func (s *UpdateAssociationInput) SetCalendarNames(v []*string) *UpdateAssociationInput { s.CalendarNames = v 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 return s } // SetOutputLocation sets the OutputLocation field's value. func (s *UpdateAssociationInput) SetOutputLocation(v *InstanceAssociationOutputLocation) *UpdateAssociationInput { s.OutputLocation = v return s } // SetParameters sets the Parameters field's value. func (s *UpdateAssociationInput) SetParameters(v map[string][]*string) *UpdateAssociationInput { s.Parameters = v return s } // SetScheduleExpression sets the ScheduleExpression field's value. func (s *UpdateAssociationInput) SetScheduleExpression(v string) *UpdateAssociationInput { s.ScheduleExpression = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *UpdateAssociationInput) SetScheduleOffset(v int64) *UpdateAssociationInput { s.ScheduleOffset = &v return s } // SetSyncCompliance sets the SyncCompliance field's value. func (s *UpdateAssociationInput) SetSyncCompliance(v string) *UpdateAssociationInput { s.SyncCompliance = &v return s } // SetTargetLocations sets the TargetLocations field's value. func (s *UpdateAssociationInput) SetTargetLocations(v []*TargetLocation) *UpdateAssociationInput { s.TargetLocations = v return s } // SetTargetMaps sets the TargetMaps field's value. func (s *UpdateAssociationInput) SetTargetMaps(v []map[string][]*string) *UpdateAssociationInput { s.TargetMaps = v return s } // SetTargets sets the Targets field's value. func (s *UpdateAssociationInput) SetTargets(v []*Target) *UpdateAssociationInput { s.Targets = v return s } type UpdateAssociationOutput struct { _ struct{} `type:"structure"` // The description of the association that was updated. AssociationDescription *AssociationDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateAssociationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateAssociationOutput) GoString() string { return s.String() } // SetAssociationDescription sets the AssociationDescription field's value. func (s *UpdateAssociationOutput) SetAssociationDescription(v *AssociationDescription) *UpdateAssociationOutput { s.AssociationDescription = v return s } type UpdateAssociationStatusInput struct { _ struct{} `type:"structure"` // The association status. // // AssociationStatus is a required field AssociationStatus *AssociationStatus `type:"structure" required:"true"` // The managed node ID. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` // The name of the SSM document. // // Name is a required field Name *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateAssociationStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateAssociationStatusInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateAssociationStatusInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateAssociationStatusInput"} if s.AssociationStatus == nil { invalidParams.Add(request.NewErrParamRequired("AssociationStatus")) } if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.AssociationStatus != nil { if err := s.AssociationStatus.Validate(); err != nil { invalidParams.AddNested("AssociationStatus", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAssociationStatus sets the AssociationStatus field's value. func (s *UpdateAssociationStatusInput) SetAssociationStatus(v *AssociationStatus) *UpdateAssociationStatusInput { s.AssociationStatus = v return s } // SetInstanceId sets the InstanceId field's value. func (s *UpdateAssociationStatusInput) SetInstanceId(v string) *UpdateAssociationStatusInput { s.InstanceId = &v return s } // SetName sets the Name field's value. func (s *UpdateAssociationStatusInput) SetName(v string) *UpdateAssociationStatusInput { s.Name = &v return s } type UpdateAssociationStatusOutput struct { _ struct{} `type:"structure"` // Information about the association. AssociationDescription *AssociationDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateAssociationStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateAssociationStatusOutput) GoString() string { return s.String() } // SetAssociationDescription sets the AssociationDescription field's value. func (s *UpdateAssociationStatusOutput) SetAssociationDescription(v *AssociationDescription) *UpdateAssociationStatusOutput { s.AssociationDescription = v return s } type UpdateDocumentDefaultVersionInput struct { _ struct{} `type:"structure"` // The version of a custom document that you want to set as the default version. // // DocumentVersion is a required field DocumentVersion *string `type:"string" required:"true"` // The name of a custom document that you want to set as the default version. // // Name is a required field Name *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentDefaultVersionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentDefaultVersionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateDocumentDefaultVersionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentDefaultVersionInput"} if s.DocumentVersion == nil { invalidParams.Add(request.NewErrParamRequired("DocumentVersion")) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDocumentVersion sets the DocumentVersion field's value. func (s *UpdateDocumentDefaultVersionInput) SetDocumentVersion(v string) *UpdateDocumentDefaultVersionInput { s.DocumentVersion = &v return s } // SetName sets the Name field's value. func (s *UpdateDocumentDefaultVersionInput) SetName(v string) *UpdateDocumentDefaultVersionInput { s.Name = &v return s } type UpdateDocumentDefaultVersionOutput struct { _ struct{} `type:"structure"` // The description of a custom document that you want to set as the default // version. Description *DocumentDefaultVersionDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentDefaultVersionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentDefaultVersionOutput) GoString() string { return s.String() } // SetDescription sets the Description field's value. func (s *UpdateDocumentDefaultVersionOutput) SetDescription(v *DocumentDefaultVersionDescription) *UpdateDocumentDefaultVersionOutput { s.Description = v return s } type UpdateDocumentInput struct { _ struct{} `type:"structure"` // A list of key-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"` // The friendly name of the SSM document that you want to update. This value // can differ for each version of the document. If you don't specify a value // for this parameter in your request, the existing value is applied to the // new document version. DisplayName *string `type:"string"` // Specify the document format for the new document version. Systems Manager // supports JSON and YAML documents. JSON is the default format. DocumentFormat *string `type:"string" enum:"DocumentFormat"` // The version of the document that you want to update. Currently, Systems Manager // supports updating only the latest version of the document. You can specify // the version number of the latest version or use the $LATEST variable. // // If you change a document version for a State Manager association, Systems // Manager immediately runs the association unless you previously specifed the // apply-only-at-cron-interval parameter. DocumentVersion *string `type:"string"` // The name of the SSM document that you want to update. // // Name is a required field Name *string `type:"string" required:"true"` // 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 can't be changed. VersionName *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateDocumentInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentInput"} if s.Content == nil { invalidParams.Add(request.NewErrParamRequired("Content")) } if s.Content != nil && len(*s.Content) < 1 { invalidParams.Add(request.NewErrParamMinLen("Content", 1)) } 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 } 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 return s } // SetDisplayName sets the DisplayName field's value. func (s *UpdateDocumentInput) SetDisplayName(v string) *UpdateDocumentInput { s.DisplayName = &v return s } // SetDocumentFormat sets the DocumentFormat field's value. func (s *UpdateDocumentInput) SetDocumentFormat(v string) *UpdateDocumentInput { s.DocumentFormat = &v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *UpdateDocumentInput) SetDocumentVersion(v string) *UpdateDocumentInput { s.DocumentVersion = &v return s } // SetName sets the Name field's value. func (s *UpdateDocumentInput) SetName(v string) *UpdateDocumentInput { s.Name = &v return s } // SetTargetType sets the TargetType field's value. func (s *UpdateDocumentInput) SetTargetType(v string) *UpdateDocumentInput { s.TargetType = &v return s } // SetVersionName sets the VersionName field's value. func (s *UpdateDocumentInput) SetVersionName(v string) *UpdateDocumentInput { s.VersionName = &v return s } type UpdateDocumentMetadataInput struct { _ struct{} `type:"structure"` // The change template review details to update. // // DocumentReviews is a required field DocumentReviews *DocumentReviews `type:"structure" required:"true"` // The version of a change template in which to update approval metadata. DocumentVersion *string `type:"string"` // The name of the change template for which a version's metadata is to be updated. // // Name is a required field Name *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentMetadataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentMetadataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateDocumentMetadataInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentMetadataInput"} if s.DocumentReviews == nil { invalidParams.Add(request.NewErrParamRequired("DocumentReviews")) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.DocumentReviews != nil { if err := s.DocumentReviews.Validate(); err != nil { invalidParams.AddNested("DocumentReviews", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDocumentReviews sets the DocumentReviews field's value. func (s *UpdateDocumentMetadataInput) SetDocumentReviews(v *DocumentReviews) *UpdateDocumentMetadataInput { s.DocumentReviews = v return s } // SetDocumentVersion sets the DocumentVersion field's value. func (s *UpdateDocumentMetadataInput) SetDocumentVersion(v string) *UpdateDocumentMetadataInput { s.DocumentVersion = &v return s } // SetName sets the Name field's value. func (s *UpdateDocumentMetadataInput) SetName(v string) *UpdateDocumentMetadataInput { s.Name = &v return s } type UpdateDocumentMetadataOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentMetadataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentMetadataOutput) GoString() string { return s.String() } type UpdateDocumentOutput struct { _ struct{} `type:"structure"` // A description of the document that was updated. DocumentDescription *DocumentDescription `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateDocumentOutput) GoString() string { return s.String() } // SetDocumentDescription sets the DocumentDescription field's value. func (s *UpdateDocumentOutput) SetDocumentDescription(v *DocumentDescription) *UpdateDocumentOutput { s.DocumentDescription = v return s } type UpdateMaintenanceWindowInput struct { _ struct{} `type:"structure"` // Whether targets must be registered with the maintenance window before tasks // can be defined for those targets. AllowUnassociatedTargets *bool `type:"boolean"` // The number of hours before the end of the maintenance window that Amazon // Web Services Systems Manager stops scheduling new tasks for execution. Cutoff *int64 `type:"integer"` // An optional description for the update request. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowInput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the maintenance window in hours. Duration *int64 `min:"1" type:"integer"` // Whether the maintenance window is enabled. Enabled *bool `type:"boolean"` // The date and time, in ISO-8601 Extended format, for when you want the maintenance // window to become inactive. EndDate allows you to set a date and time in the // future when the maintenance window will no longer run. EndDate *string `type:"string"` // The name of the maintenance window. Name *string `min:"3" type:"string"` // If True, then all fields that are required by the CreateMaintenanceWindow // operation are also required for this API request. Optional fields that aren't // specified are set to null. Replace *bool `type:"boolean"` // The schedule of the maintenance window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` // The number of days to wait after the date and time specified by a cron expression // before running the maintenance window. // // For example, the following cron expression schedules a maintenance window // to run the third Tuesday of every month at 11:30 PM. // // cron(30 23 ? * TUE#3 *) // // If the schedule offset is 2, the maintenance window won't run until two days // later. ScheduleOffset *int64 `min:"1" type:"integer"` // The time zone that the scheduled maintenance window executions are based // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", // "UTC", or "Asia/Seoul". For more information, see the Time Zone Database // (https://www.iana.org/time-zones) on the IANA website. ScheduleTimezone *string `type:"string"` // The date and time, in ISO-8601 Extended format, for when you want the maintenance // window to become active. StartDate allows you to delay activation of the // maintenance window until the specified future date. StartDate *string `type:"string"` // The ID of the maintenance window to update. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateMaintenanceWindowInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceWindowInput"} if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Duration != nil && *s.Duration < 1 { invalidParams.Add(request.NewErrParamMinValue("Duration", 1)) } if s.Name != nil && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } if s.Schedule != nil && len(*s.Schedule) < 1 { invalidParams.Add(request.NewErrParamMinLen("Schedule", 1)) } if s.ScheduleOffset != nil && *s.ScheduleOffset < 1 { invalidParams.Add(request.NewErrParamMinValue("ScheduleOffset", 1)) } if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAllowUnassociatedTargets sets the AllowUnassociatedTargets field's value. func (s *UpdateMaintenanceWindowInput) SetAllowUnassociatedTargets(v bool) *UpdateMaintenanceWindowInput { s.AllowUnassociatedTargets = &v return s } // SetCutoff sets the Cutoff field's value. func (s *UpdateMaintenanceWindowInput) SetCutoff(v int64) *UpdateMaintenanceWindowInput { s.Cutoff = &v return s } // SetDescription sets the Description field's value. func (s *UpdateMaintenanceWindowInput) SetDescription(v string) *UpdateMaintenanceWindowInput { s.Description = &v return s } // SetDuration sets the Duration field's value. func (s *UpdateMaintenanceWindowInput) SetDuration(v int64) *UpdateMaintenanceWindowInput { s.Duration = &v return s } // SetEnabled sets the Enabled field's value. func (s *UpdateMaintenanceWindowInput) SetEnabled(v bool) *UpdateMaintenanceWindowInput { s.Enabled = &v return s } // SetEndDate sets the EndDate field's value. func (s *UpdateMaintenanceWindowInput) SetEndDate(v string) *UpdateMaintenanceWindowInput { s.EndDate = &v return s } // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowInput) SetName(v string) *UpdateMaintenanceWindowInput { s.Name = &v return s } // SetReplace sets the Replace field's value. func (s *UpdateMaintenanceWindowInput) SetReplace(v bool) *UpdateMaintenanceWindowInput { s.Replace = &v return s } // SetSchedule sets the Schedule field's value. func (s *UpdateMaintenanceWindowInput) SetSchedule(v string) *UpdateMaintenanceWindowInput { s.Schedule = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *UpdateMaintenanceWindowInput) SetScheduleOffset(v int64) *UpdateMaintenanceWindowInput { s.ScheduleOffset = &v return s } // SetScheduleTimezone sets the ScheduleTimezone field's value. func (s *UpdateMaintenanceWindowInput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowInput { s.ScheduleTimezone = &v return s } // SetStartDate sets the StartDate field's value. func (s *UpdateMaintenanceWindowInput) SetStartDate(v string) *UpdateMaintenanceWindowInput { s.StartDate = &v return s } // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowInput) SetWindowId(v string) *UpdateMaintenanceWindowInput { s.WindowId = &v return s } type UpdateMaintenanceWindowOutput struct { _ struct{} `type:"structure"` // Whether targets must be registered with the maintenance window before tasks // can be defined for those targets. AllowUnassociatedTargets *bool `type:"boolean"` // The number of hours before the end of the maintenance window that Amazon // Web Services Systems Manager stops scheduling new tasks for execution. Cutoff *int64 `type:"integer"` // An optional description of the update. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowOutput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the maintenance window in hours. Duration *int64 `min:"1" type:"integer"` // Whether the maintenance window is enabled. Enabled *bool `type:"boolean"` // The date and time, in ISO-8601 Extended format, for when the maintenance // window is scheduled to become inactive. The maintenance window won't run // after this specified time. EndDate *string `type:"string"` // The name of the maintenance window. Name *string `min:"3" type:"string"` // The schedule of the maintenance window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` // The number of days to wait to run a maintenance window after the scheduled // cron expression date and time. ScheduleOffset *int64 `min:"1" type:"integer"` // The time zone that the scheduled maintenance window executions are based // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", // "UTC", or "Asia/Seoul". For more information, see the Time Zone Database // (https://www.iana.org/time-zones) on the IANA website. ScheduleTimezone *string `type:"string"` // The date and time, in ISO-8601 Extended format, for when the maintenance // window is scheduled to become active. The maintenance window won't run before // this specified time. StartDate *string `type:"string"` // The ID of the created maintenance window. WindowId *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowOutput) GoString() string { return s.String() } // SetAllowUnassociatedTargets sets the AllowUnassociatedTargets field's value. func (s *UpdateMaintenanceWindowOutput) SetAllowUnassociatedTargets(v bool) *UpdateMaintenanceWindowOutput { s.AllowUnassociatedTargets = &v return s } // SetCutoff sets the Cutoff field's value. func (s *UpdateMaintenanceWindowOutput) SetCutoff(v int64) *UpdateMaintenanceWindowOutput { s.Cutoff = &v return s } // SetDescription sets the Description field's value. func (s *UpdateMaintenanceWindowOutput) SetDescription(v string) *UpdateMaintenanceWindowOutput { s.Description = &v return s } // SetDuration sets the Duration field's value. func (s *UpdateMaintenanceWindowOutput) SetDuration(v int64) *UpdateMaintenanceWindowOutput { s.Duration = &v return s } // SetEnabled sets the Enabled field's value. func (s *UpdateMaintenanceWindowOutput) SetEnabled(v bool) *UpdateMaintenanceWindowOutput { s.Enabled = &v return s } // SetEndDate sets the EndDate field's value. func (s *UpdateMaintenanceWindowOutput) SetEndDate(v string) *UpdateMaintenanceWindowOutput { s.EndDate = &v return s } // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowOutput) SetName(v string) *UpdateMaintenanceWindowOutput { s.Name = &v return s } // SetSchedule sets the Schedule field's value. func (s *UpdateMaintenanceWindowOutput) SetSchedule(v string) *UpdateMaintenanceWindowOutput { s.Schedule = &v return s } // SetScheduleOffset sets the ScheduleOffset field's value. func (s *UpdateMaintenanceWindowOutput) SetScheduleOffset(v int64) *UpdateMaintenanceWindowOutput { s.ScheduleOffset = &v return s } // SetScheduleTimezone sets the ScheduleTimezone field's value. func (s *UpdateMaintenanceWindowOutput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowOutput { s.ScheduleTimezone = &v return s } // SetStartDate sets the StartDate field's value. func (s *UpdateMaintenanceWindowOutput) SetStartDate(v string) *UpdateMaintenanceWindowOutput { s.StartDate = &v return s } // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowOutput) SetWindowId(v string) *UpdateMaintenanceWindowOutput { s.WindowId = &v return s } type UpdateMaintenanceWindowTargetInput struct { _ struct{} `type:"structure"` // An optional description for the update. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowTargetInput's // String and GoString methods. 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 Amazon CloudWatch Events // events raised while running tasks for these targets in this maintenance window. // // OwnerInformation is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowTargetInput's // String and GoString methods. OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // If True, then all fields that are required by the RegisterTargetWithMaintenanceWindow // operation are also required for this API request. Optional fields that aren't // specified are set to null. Replace *bool `type:"boolean"` // The targets to add or replace. Targets []*Target `type:"list"` // The maintenance window ID with which to modify the target. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` // The target ID to modify. // // WindowTargetId is a required field WindowTargetId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowTargetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowTargetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateMaintenanceWindowTargetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceWindowTargetInput"} if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Name != nil && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } if s.OwnerInformation != nil && len(*s.OwnerInformation) < 1 { invalidParams.Add(request.NewErrParamMinLen("OwnerInformation", 1)) } if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.WindowTargetId == nil { invalidParams.Add(request.NewErrParamRequired("WindowTargetId")) } if s.WindowTargetId != nil && len(*s.WindowTargetId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowTargetId", 36)) } if s.Targets != nil { for i, v := range s.Targets { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDescription sets the Description field's value. func (s *UpdateMaintenanceWindowTargetInput) SetDescription(v string) *UpdateMaintenanceWindowTargetInput { s.Description = &v return s } // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowTargetInput) SetName(v string) *UpdateMaintenanceWindowTargetInput { s.Name = &v return s } // SetOwnerInformation sets the OwnerInformation field's value. func (s *UpdateMaintenanceWindowTargetInput) SetOwnerInformation(v string) *UpdateMaintenanceWindowTargetInput { s.OwnerInformation = &v return s } // SetReplace sets the Replace field's value. func (s *UpdateMaintenanceWindowTargetInput) SetReplace(v bool) *UpdateMaintenanceWindowTargetInput { s.Replace = &v return s } // SetTargets sets the Targets field's value. func (s *UpdateMaintenanceWindowTargetInput) SetTargets(v []*Target) *UpdateMaintenanceWindowTargetInput { s.Targets = v return s } // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowTargetInput) SetWindowId(v string) *UpdateMaintenanceWindowTargetInput { s.WindowId = &v return s } // SetWindowTargetId sets the WindowTargetId field's value. func (s *UpdateMaintenanceWindowTargetInput) SetWindowTargetId(v string) *UpdateMaintenanceWindowTargetInput { s.WindowTargetId = &v return s } type UpdateMaintenanceWindowTargetOutput struct { _ struct{} `type:"structure"` // The updated description. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowTargetOutput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The updated name. Name *string `min:"3" type:"string"` // The updated owner. // // OwnerInformation is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowTargetOutput's // String and GoString methods. OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The updated targets. Targets []*Target `type:"list"` // The maintenance window ID specified in the update request. WindowId *string `min:"20" type:"string"` // The target ID specified in the update request. WindowTargetId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowTargetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowTargetOutput) GoString() string { return s.String() } // SetDescription sets the Description field's value. func (s *UpdateMaintenanceWindowTargetOutput) SetDescription(v string) *UpdateMaintenanceWindowTargetOutput { s.Description = &v return s } // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowTargetOutput) SetName(v string) *UpdateMaintenanceWindowTargetOutput { s.Name = &v return s } // SetOwnerInformation sets the OwnerInformation field's value. func (s *UpdateMaintenanceWindowTargetOutput) SetOwnerInformation(v string) *UpdateMaintenanceWindowTargetOutput { s.OwnerInformation = &v return s } // SetTargets sets the Targets field's value. func (s *UpdateMaintenanceWindowTargetOutput) SetTargets(v []*Target) *UpdateMaintenanceWindowTargetOutput { s.Targets = v return s } // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowTargetOutput) SetWindowId(v string) *UpdateMaintenanceWindowTargetOutput { s.WindowId = &v return s } // SetWindowTargetId sets the WindowTargetId field's value. func (s *UpdateMaintenanceWindowTargetOutput) SetWindowTargetId(v string) *UpdateMaintenanceWindowTargetOutput { s.WindowTargetId = &v return s } type UpdateMaintenanceWindowTaskInput struct { _ struct{} `type:"structure"` // The CloudWatch alarm you want to apply to your maintenance window task. AlarmConfiguration *AlarmConfiguration `type:"structure"` // Indicates whether tasks should continue to run after the cutoff time specified // in the maintenance windows is reached. // // * CONTINUE_TASK: When the cutoff time is reached, any tasks that are running // continue. The default value. // // * CANCEL_TASK: For Automation, Lambda, Step Functions tasks: When the // cutoff time is reached, any task invocations that are already running // continue, but no new task invocations are started. For Run Command tasks: // When the cutoff time is reached, the system sends a CancelCommand operation // that attempts to cancel the command associated with the task. However, // there is no guarantee that the command will be terminated and the underlying // process stopped. The status for tasks that are not completed is TIMED_OUT. CutoffBehavior *string `type:"string" enum:"MaintenanceWindowTaskCutoffBehavior"` // The new task description to specify. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowTaskInput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The new logging location in Amazon S3 to specify. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The new MaxConcurrency value you want to specify. MaxConcurrency is the number // of targets that are allowed to run this task, in parallel. // // Although this element is listed as "Required: No", a value can be omitted // only when you are registering or updating a targetless task (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // You must provide a value in all other cases. // // For maintenance window tasks without a target specified, you can't supply // a value for this option. Instead, the system inserts a placeholder value // of 1. This value doesn't affect the running of your task. MaxConcurrency *string `min:"1" type:"string"` // The new MaxErrors value to specify. MaxErrors is the maximum number of errors // that are allowed before the task stops being scheduled. // // Although this element is listed as "Required: No", a value can be omitted // only when you are registering or updating a targetless task (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // You must provide a value in all other cases. // // For maintenance window tasks without a target specified, you can't supply // a value for this option. Instead, the system inserts a placeholder value // of 1. This value doesn't affect the running of your task. MaxErrors *string `min:"1" type:"string"` // The new task name to specify. Name *string `min:"3" type:"string"` // The new task priority to specify. The lower the number, the higher the priority. // Tasks that have the same priority are scheduled in parallel. Priority *int64 `type:"integer"` // If True, then all fields that are required by the RegisterTaskWithMaintenanceWindow // operation are also required for this API request. Optional fields that aren't // specified are set to null. Replace *bool `type:"boolean"` // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services // Systems Manager to assume when running a maintenance window task. If you // do not specify a service role ARN, Systems Manager uses your account's service-linked // role. If no service-linked role for Systems Manager exists in your account, // it is created when you run RegisterTaskWithMaintenanceWindow. // // For more information, see the following topics in the in the Amazon Web Services // Systems Manager User Guide: // // * Using service-linked roles for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) // // * Should I use a service-linked role or a custom service role to run maintenance // window tasks? (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) ServiceRoleArn *string `type:"string"` // The targets (either managed nodes or tags) to modify. Managed nodes are specified // using the format Key=instanceids,Values=instanceID_1,instanceID_2. Tags are // specified using the format Key=tag_name,Values=tag_value. // // One or more targets must be specified for maintenance window Run Command-type // tasks. Depending on the task, targets are optional for other maintenance // window task types (Automation, Lambda, and Step Functions). For more information // about running tasks that don't specify targets, see Registering maintenance // window tasks without targets (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // in the Amazon Web Services Systems Manager User Guide. Targets []*Target `type:"list"` // The task ARN to modify. TaskArn *string `min:"1" type:"string"` // The parameters that the task should use during execution. Populate only the // fields that match the task type. All other fields should be empty. // // When you update a maintenance window task that has options specified in TaskInvocationParameters, // you must provide again all the TaskInvocationParameters values that you want // to retain. The values you don't specify again are removed. For example, suppose // that when you registered a Run Command task, you specified TaskInvocationParameters // values for Comment, NotificationConfig, and OutputS3BucketName. If you update // the maintenance window task and specify only a different OutputS3BucketName // value, the values for Comment and NotificationConfig are removed. TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The parameters to modify. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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. // // The map has the following format: // // Key: string, between 1 and 255 characters // // Value: an array of strings, each string is between 1 and 255 characters // // TaskParameters is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowTaskInput's // String and GoString methods. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The maintenance window ID that contains the task to modify. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` // The task ID to modify. // // WindowTaskId is a required field WindowTaskId *string `min:"36" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowTaskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowTaskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateMaintenanceWindowTaskInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceWindowTaskInput"} if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } 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 && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } if s.TaskArn != nil && len(*s.TaskArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("TaskArn", 1)) } if s.WindowId == nil { invalidParams.Add(request.NewErrParamRequired("WindowId")) } if s.WindowId != nil && len(*s.WindowId) < 20 { invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) } if s.WindowTaskId == nil { invalidParams.Add(request.NewErrParamRequired("WindowTaskId")) } if s.WindowTaskId != nil && len(*s.WindowTaskId) < 36 { invalidParams.Add(request.NewErrParamMinLen("WindowTaskId", 36)) } if s.AlarmConfiguration != nil { if err := s.AlarmConfiguration.Validate(); err != nil { invalidParams.AddNested("AlarmConfiguration", err.(request.ErrInvalidParams)) } } if s.LoggingInfo != nil { if err := s.LoggingInfo.Validate(); err != nil { invalidParams.AddNested("LoggingInfo", err.(request.ErrInvalidParams)) } } if s.Targets != nil { for i, v := range s.Targets { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) } } } if s.TaskInvocationParameters != nil { if err := s.TaskInvocationParameters.Validate(); err != nil { invalidParams.AddNested("TaskInvocationParameters", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *UpdateMaintenanceWindowTaskInput) SetAlarmConfiguration(v *AlarmConfiguration) *UpdateMaintenanceWindowTaskInput { s.AlarmConfiguration = v return s } // SetCutoffBehavior sets the CutoffBehavior field's value. func (s *UpdateMaintenanceWindowTaskInput) SetCutoffBehavior(v string) *UpdateMaintenanceWindowTaskInput { s.CutoffBehavior = &v return s } // SetDescription sets the Description field's value. func (s *UpdateMaintenanceWindowTaskInput) SetDescription(v string) *UpdateMaintenanceWindowTaskInput { s.Description = &v return s } // SetLoggingInfo sets the LoggingInfo field's value. func (s *UpdateMaintenanceWindowTaskInput) SetLoggingInfo(v *LoggingInfo) *UpdateMaintenanceWindowTaskInput { s.LoggingInfo = v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *UpdateMaintenanceWindowTaskInput) SetMaxConcurrency(v string) *UpdateMaintenanceWindowTaskInput { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *UpdateMaintenanceWindowTaskInput) SetMaxErrors(v string) *UpdateMaintenanceWindowTaskInput { s.MaxErrors = &v return s } // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowTaskInput) SetName(v string) *UpdateMaintenanceWindowTaskInput { s.Name = &v return s } // SetPriority sets the Priority field's value. func (s *UpdateMaintenanceWindowTaskInput) SetPriority(v int64) *UpdateMaintenanceWindowTaskInput { s.Priority = &v return s } // SetReplace sets the Replace field's value. func (s *UpdateMaintenanceWindowTaskInput) SetReplace(v bool) *UpdateMaintenanceWindowTaskInput { s.Replace = &v return s } // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *UpdateMaintenanceWindowTaskInput) SetServiceRoleArn(v string) *UpdateMaintenanceWindowTaskInput { s.ServiceRoleArn = &v return s } // SetTargets sets the Targets field's value. func (s *UpdateMaintenanceWindowTaskInput) SetTargets(v []*Target) *UpdateMaintenanceWindowTaskInput { s.Targets = v return s } // SetTaskArn sets the TaskArn field's value. func (s *UpdateMaintenanceWindowTaskInput) SetTaskArn(v string) *UpdateMaintenanceWindowTaskInput { s.TaskArn = &v return s } // SetTaskInvocationParameters sets the TaskInvocationParameters field's value. func (s *UpdateMaintenanceWindowTaskInput) SetTaskInvocationParameters(v *MaintenanceWindowTaskInvocationParameters) *UpdateMaintenanceWindowTaskInput { s.TaskInvocationParameters = v return s } // SetTaskParameters sets the TaskParameters field's value. func (s *UpdateMaintenanceWindowTaskInput) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *UpdateMaintenanceWindowTaskInput { s.TaskParameters = v return s } // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowTaskInput) SetWindowId(v string) *UpdateMaintenanceWindowTaskInput { s.WindowId = &v return s } // SetWindowTaskId sets the WindowTaskId field's value. func (s *UpdateMaintenanceWindowTaskInput) SetWindowTaskId(v string) *UpdateMaintenanceWindowTaskInput { s.WindowTaskId = &v return s } type UpdateMaintenanceWindowTaskOutput struct { _ struct{} `type:"structure"` // The details for the CloudWatch alarm you applied to your maintenance window // task. AlarmConfiguration *AlarmConfiguration `type:"structure"` // The specification for whether tasks should continue to run after the cutoff // time specified in the maintenance windows is reached. CutoffBehavior *string `type:"string" enum:"MaintenanceWindowTaskCutoffBehavior"` // The updated task description. // // Description is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowTaskOutput's // String and GoString methods. Description *string `min:"1" type:"string" sensitive:"true"` // The updated logging information in Amazon S3. // // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For // information about how Amazon Web Services Systems Manager handles these options // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The updated MaxConcurrency value. MaxConcurrency *string `min:"1" type:"string"` // The updated MaxErrors value. MaxErrors *string `min:"1" type:"string"` // The updated task name. Name *string `min:"3" type:"string"` // The updated priority value. Priority *int64 `type:"integer"` // The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) // service role to use to publish Amazon Simple Notification Service (Amazon // SNS) notifications for maintenance window Run Command tasks. ServiceRoleArn *string `type:"string"` // The updated target values. Targets []*Target `type:"list"` // The updated task ARN value. TaskArn *string `min:"1" type:"string"` // The updated parameter values. TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The updated parameter values. // // TaskParameters has been deprecated. To specify parameters to pass to a task // 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 is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by UpdateMaintenanceWindowTaskOutput's // String and GoString methods. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The ID of the maintenance window that was updated. WindowId *string `min:"20" type:"string"` // The task ID of the maintenance window that was updated. WindowTaskId *string `min:"36" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowTaskOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateMaintenanceWindowTaskOutput) GoString() string { return s.String() } // SetAlarmConfiguration sets the AlarmConfiguration field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetAlarmConfiguration(v *AlarmConfiguration) *UpdateMaintenanceWindowTaskOutput { s.AlarmConfiguration = v return s } // SetCutoffBehavior sets the CutoffBehavior field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetCutoffBehavior(v string) *UpdateMaintenanceWindowTaskOutput { s.CutoffBehavior = &v return s } // SetDescription sets the Description field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetDescription(v string) *UpdateMaintenanceWindowTaskOutput { s.Description = &v return s } // SetLoggingInfo sets the LoggingInfo field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetLoggingInfo(v *LoggingInfo) *UpdateMaintenanceWindowTaskOutput { s.LoggingInfo = v return s } // SetMaxConcurrency sets the MaxConcurrency field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetMaxConcurrency(v string) *UpdateMaintenanceWindowTaskOutput { s.MaxConcurrency = &v return s } // SetMaxErrors sets the MaxErrors field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetMaxErrors(v string) *UpdateMaintenanceWindowTaskOutput { s.MaxErrors = &v return s } // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetName(v string) *UpdateMaintenanceWindowTaskOutput { s.Name = &v return s } // SetPriority sets the Priority field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetPriority(v int64) *UpdateMaintenanceWindowTaskOutput { s.Priority = &v return s } // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetServiceRoleArn(v string) *UpdateMaintenanceWindowTaskOutput { s.ServiceRoleArn = &v return s } // SetTargets sets the Targets field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetTargets(v []*Target) *UpdateMaintenanceWindowTaskOutput { s.Targets = v return s } // SetTaskArn sets the TaskArn field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetTaskArn(v string) *UpdateMaintenanceWindowTaskOutput { s.TaskArn = &v return s } // SetTaskInvocationParameters sets the TaskInvocationParameters field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetTaskInvocationParameters(v *MaintenanceWindowTaskInvocationParameters) *UpdateMaintenanceWindowTaskOutput { s.TaskInvocationParameters = v return s } // SetTaskParameters sets the TaskParameters field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetTaskParameters(v map[string]*MaintenanceWindowTaskParameterValueExpression) *UpdateMaintenanceWindowTaskOutput { s.TaskParameters = v return s } // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetWindowId(v string) *UpdateMaintenanceWindowTaskOutput { s.WindowId = &v return s } // SetWindowTaskId sets the WindowTaskId field's value. func (s *UpdateMaintenanceWindowTaskOutput) SetWindowTaskId(v string) *UpdateMaintenanceWindowTaskOutput { s.WindowTaskId = &v return s } type UpdateManagedInstanceRoleInput struct { _ struct{} `type:"structure"` // The name of the Identity and Access Management (IAM) role that you want to // assign to the managed node. This IAM role must provide AssumeRole permissions // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com. // For more information, see Create an IAM service role for a hybrid environment // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html) // in the Amazon Web Services Systems Manager User Guide. // // You can't specify an IAM service-linked role for this parameter. You must // create a unique role. // // IamRole is a required field IamRole *string `type:"string" required:"true"` // The ID of the managed node where you want to update the role. // // InstanceId is a required field InstanceId *string `min:"20" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateManagedInstanceRoleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateManagedInstanceRoleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateManagedInstanceRoleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateManagedInstanceRoleInput"} if s.IamRole == nil { invalidParams.Add(request.NewErrParamRequired("IamRole")) } if s.InstanceId == nil { invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if s.InstanceId != nil && len(*s.InstanceId) < 20 { invalidParams.Add(request.NewErrParamMinLen("InstanceId", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetIamRole sets the IamRole field's value. func (s *UpdateManagedInstanceRoleInput) SetIamRole(v string) *UpdateManagedInstanceRoleInput { s.IamRole = &v return s } // SetInstanceId sets the InstanceId field's value. func (s *UpdateManagedInstanceRoleInput) SetInstanceId(v string) *UpdateManagedInstanceRoleInput { s.InstanceId = &v return s } type UpdateManagedInstanceRoleOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateManagedInstanceRoleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateManagedInstanceRoleOutput) GoString() string { return s.String() } type UpdateOpsItemInput struct { _ struct{} `type:"structure"` // The time a runbook workflow ended. Currently reported only for the OpsItem // type /aws/changerequest. ActualEndTime *time.Time `type:"timestamp"` // The time a runbook workflow started. Currently reported only for the OpsItem // type /aws/changerequest. ActualStartTime *time.Time `type:"timestamp"` // Specify a new category for an OpsItem. Category *string `min:"1" type:"string"` // User-defined text that contains information about the OpsItem, in Markdown // format. Description *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of an SNS topic where notifications are sent // when this OpsItem is edited or changed. Notifications []*OpsItemNotification `type:"list"` // Add new keys or edit existing key-value pairs of the OperationalData map // in the OpsItem object. // // Operational data is custom data that provides useful reference details about // the OpsItem. For example, you can specify log files, error strings, license // keys, troubleshooting tips, or other relevant data. You enter operational // data as key-value pairs. The key has a maximum length of 128 characters. // The value has a maximum size of 20 KB. // // Operational data keys can't begin with the following: amazon, aws, amzn, // ssm, /amazon, /aws, /amzn, /ssm. // // You can choose to make the data searchable by other users in the account // or you can restrict search access. Searchable data means that all users with // access to the OpsItem Overview page (as provided by the DescribeOpsItems // API operation) can view and search on the specified data. Operational data // that isn't searchable is only viewable by users who have access to the OpsItem // (as provided by the GetOpsItem API operation). // // Use the /aws/resources key in OperationalData to specify a related resource // in the request. Use the /aws/automations key in OperationalData to associate // an Automation runbook with the OpsItem. To view Amazon Web Services CLI example // commands that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html) // in the Amazon Web Services Systems Manager User Guide. OperationalData map[string]*OpsItemDataValue `type:"map"` // Keys that you want to remove from the OperationalData map. OperationalDataToDelete []*string `type:"list"` // The OpsItem Amazon Resource Name (ARN). OpsItemArn *string `min:"20" type:"string"` // The ID of the OpsItem. // // OpsItemId is a required field OpsItemId *string `type:"string" required:"true"` // The time specified in a change request for a runbook workflow to end. Currently // supported only for the OpsItem type /aws/changerequest. PlannedEndTime *time.Time `type:"timestamp"` // The time specified in a change request for a runbook workflow to start. Currently // supported only for the OpsItem type /aws/changerequest. PlannedStartTime *time.Time `type:"timestamp"` // The importance of this OpsItem in relation to other OpsItems in the system. Priority *int64 `min:"1" type:"integer"` // One or more OpsItems that share something in common with the current OpsItems. // For example, related OpsItems can include OpsItems with similar error messages, // impacted resources, or statuses for the impacted resource. RelatedOpsItems []*RelatedOpsItem `type:"list"` // Specify a new severity for an OpsItem. Severity *string `min:"1" type:"string"` // The OpsItem status. Status can be Open, In Progress, or Resolved. For more // information, see Editing OpsItem details (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html) // in the Amazon Web Services Systems Manager User Guide. Status *string `type:"string" enum:"OpsItemStatus"` // A short heading that describes the nature of the OpsItem and the impacted // resource. Title *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateOpsItemInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateOpsItemInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateOpsItemInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateOpsItemInput"} if s.Category != nil && len(*s.Category) < 1 { invalidParams.Add(request.NewErrParamMinLen("Category", 1)) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.OpsItemArn != nil && len(*s.OpsItemArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("OpsItemArn", 20)) } if s.OpsItemId == nil { invalidParams.Add(request.NewErrParamRequired("OpsItemId")) } if s.Priority != nil && *s.Priority < 1 { invalidParams.Add(request.NewErrParamMinValue("Priority", 1)) } if s.Severity != nil && len(*s.Severity) < 1 { invalidParams.Add(request.NewErrParamMinLen("Severity", 1)) } if s.Title != nil && len(*s.Title) < 1 { invalidParams.Add(request.NewErrParamMinLen("Title", 1)) } if s.RelatedOpsItems != nil { for i, v := range s.RelatedOpsItems { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RelatedOpsItems", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetActualEndTime sets the ActualEndTime field's value. func (s *UpdateOpsItemInput) SetActualEndTime(v time.Time) *UpdateOpsItemInput { s.ActualEndTime = &v return s } // SetActualStartTime sets the ActualStartTime field's value. func (s *UpdateOpsItemInput) SetActualStartTime(v time.Time) *UpdateOpsItemInput { s.ActualStartTime = &v return s } // SetCategory sets the Category field's value. func (s *UpdateOpsItemInput) SetCategory(v string) *UpdateOpsItemInput { s.Category = &v return s } // SetDescription sets the Description field's value. func (s *UpdateOpsItemInput) SetDescription(v string) *UpdateOpsItemInput { s.Description = &v return s } // SetNotifications sets the Notifications field's value. func (s *UpdateOpsItemInput) SetNotifications(v []*OpsItemNotification) *UpdateOpsItemInput { s.Notifications = v return s } // SetOperationalData sets the OperationalData field's value. func (s *UpdateOpsItemInput) SetOperationalData(v map[string]*OpsItemDataValue) *UpdateOpsItemInput { s.OperationalData = v return s } // SetOperationalDataToDelete sets the OperationalDataToDelete field's value. func (s *UpdateOpsItemInput) SetOperationalDataToDelete(v []*string) *UpdateOpsItemInput { s.OperationalDataToDelete = v return s } // SetOpsItemArn sets the OpsItemArn field's value. func (s *UpdateOpsItemInput) SetOpsItemArn(v string) *UpdateOpsItemInput { s.OpsItemArn = &v return s } // SetOpsItemId sets the OpsItemId field's value. func (s *UpdateOpsItemInput) SetOpsItemId(v string) *UpdateOpsItemInput { s.OpsItemId = &v return s } // SetPlannedEndTime sets the PlannedEndTime field's value. func (s *UpdateOpsItemInput) SetPlannedEndTime(v time.Time) *UpdateOpsItemInput { s.PlannedEndTime = &v return s } // SetPlannedStartTime sets the PlannedStartTime field's value. func (s *UpdateOpsItemInput) SetPlannedStartTime(v time.Time) *UpdateOpsItemInput { s.PlannedStartTime = &v return s } // SetPriority sets the Priority field's value. func (s *UpdateOpsItemInput) SetPriority(v int64) *UpdateOpsItemInput { s.Priority = &v return s } // SetRelatedOpsItems sets the RelatedOpsItems field's value. func (s *UpdateOpsItemInput) SetRelatedOpsItems(v []*RelatedOpsItem) *UpdateOpsItemInput { s.RelatedOpsItems = v return s } // SetSeverity sets the Severity field's value. func (s *UpdateOpsItemInput) SetSeverity(v string) *UpdateOpsItemInput { s.Severity = &v return s } // SetStatus sets the Status field's value. func (s *UpdateOpsItemInput) SetStatus(v string) *UpdateOpsItemInput { s.Status = &v return s } // SetTitle sets the Title field's value. func (s *UpdateOpsItemInput) SetTitle(v string) *UpdateOpsItemInput { s.Title = &v return s } type UpdateOpsItemOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateOpsItemOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateOpsItemOutput) GoString() string { return s.String() } type UpdateOpsMetadataInput struct { _ struct{} `type:"structure"` // The metadata keys to delete from the OpsMetadata object. KeysToDelete []*string `min:"1" type:"list"` // Metadata to add to an OpsMetadata object. MetadataToUpdate map[string]*MetadataValue `min:"1" type:"map"` // The Amazon Resource Name (ARN) of the OpsMetadata Object to update. // // OpsMetadataArn is a required field OpsMetadataArn *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateOpsMetadataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateOpsMetadataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateOpsMetadataInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateOpsMetadataInput"} if s.KeysToDelete != nil && len(s.KeysToDelete) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeysToDelete", 1)) } if s.MetadataToUpdate != nil && len(s.MetadataToUpdate) < 1 { invalidParams.Add(request.NewErrParamMinLen("MetadataToUpdate", 1)) } if s.OpsMetadataArn == nil { invalidParams.Add(request.NewErrParamRequired("OpsMetadataArn")) } if s.OpsMetadataArn != nil && len(*s.OpsMetadataArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("OpsMetadataArn", 1)) } if s.MetadataToUpdate != nil { for i, v := range s.MetadataToUpdate { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetadataToUpdate", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetKeysToDelete sets the KeysToDelete field's value. func (s *UpdateOpsMetadataInput) SetKeysToDelete(v []*string) *UpdateOpsMetadataInput { s.KeysToDelete = v return s } // SetMetadataToUpdate sets the MetadataToUpdate field's value. func (s *UpdateOpsMetadataInput) SetMetadataToUpdate(v map[string]*MetadataValue) *UpdateOpsMetadataInput { s.MetadataToUpdate = v return s } // SetOpsMetadataArn sets the OpsMetadataArn field's value. func (s *UpdateOpsMetadataInput) SetOpsMetadataArn(v string) *UpdateOpsMetadataInput { s.OpsMetadataArn = &v return s } type UpdateOpsMetadataOutput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the OpsMetadata Object that was updated. OpsMetadataArn *string `min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateOpsMetadataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateOpsMetadataOutput) GoString() string { return s.String() } // SetOpsMetadataArn sets the OpsMetadataArn field's value. func (s *UpdateOpsMetadataOutput) SetOpsMetadataArn(v string) *UpdateOpsMetadataOutput { s.OpsMetadataArn = &v return s } type UpdatePatchBaselineInput struct { _ struct{} `type:"structure"` // A set of rules used to include patches in the baseline. ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and // rejected patches, see About package name formats for approved and rejected // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the Amazon Web Services Systems Manager User Guide. ApprovedPatches []*string `type:"list"` // Assigns a new compliance severity level to an existing patch baseline. ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // Indicates whether the list of approved patches includes non-security updates // that should be applied to the managed nodes. The default value is false. // Applies to Linux managed nodes only. ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` // The ID of the patch baseline to update. // // BaselineId is a required field BaselineId *string `min:"20" type:"string" required:"true"` // A description of the patch baseline. Description *string `min:"1" type:"string"` // A set of global filters used to include patches in the baseline. GlobalFilters *PatchFilterGroup `type:"structure"` // The name of the patch baseline. Name *string `min:"3" type:"string"` // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and // rejected patches, see About package name formats for approved and rejected // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the Amazon Web Services Systems Manager User Guide. RejectedPatches []*string `type:"list"` // The action for Patch Manager to take on patches included in the RejectedPackages // list. // // * ALLOW_AS_DEPENDENCY : A package in the Rejected patches list is installed // only if it is a dependency of another package. It is considered compliant // with the patch baseline, and its status is reported as InstalledOther. // This is the default action if no option is specified. // // * BLOCK : Packages in the RejectedPatches list, and packages that include // them as dependencies, aren't installed under any circumstances. If a package // was installed before it was added to the Rejected patches list, it is // considered non-compliant with the patch baseline, and its status is reported // as InstalledRejected. RejectedPatchesAction *string `type:"string" enum:"PatchAction"` // If True, then all fields that are required by the CreatePatchBaseline operation // are also required for this API request. Optional fields that aren't specified // are set to null. Replace *bool `type:"boolean"` // Information about the patches to use to update the managed nodes, including // target operating systems and source repositories. Applies to Linux managed // nodes only. Sources []*PatchSource `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdatePatchBaselineInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdatePatchBaselineInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdatePatchBaselineInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdatePatchBaselineInput"} if s.BaselineId == nil { invalidParams.Add(request.NewErrParamRequired("BaselineId")) } if s.BaselineId != nil && len(*s.BaselineId) < 20 { invalidParams.Add(request.NewErrParamMinLen("BaselineId", 20)) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Name != nil && len(*s.Name) < 3 { invalidParams.Add(request.NewErrParamMinLen("Name", 3)) } if s.ApprovalRules != nil { if err := s.ApprovalRules.Validate(); err != nil { invalidParams.AddNested("ApprovalRules", err.(request.ErrInvalidParams)) } } if s.GlobalFilters != nil { if err := s.GlobalFilters.Validate(); err != nil { invalidParams.AddNested("GlobalFilters", err.(request.ErrInvalidParams)) } } if s.Sources != nil { for i, v := range s.Sources { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sources", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetApprovalRules sets the ApprovalRules field's value. func (s *UpdatePatchBaselineInput) SetApprovalRules(v *PatchRuleGroup) *UpdatePatchBaselineInput { s.ApprovalRules = v return s } // SetApprovedPatches sets the ApprovedPatches field's value. func (s *UpdatePatchBaselineInput) SetApprovedPatches(v []*string) *UpdatePatchBaselineInput { s.ApprovedPatches = v return s } // SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. func (s *UpdatePatchBaselineInput) SetApprovedPatchesComplianceLevel(v string) *UpdatePatchBaselineInput { s.ApprovedPatchesComplianceLevel = &v return s } // SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. func (s *UpdatePatchBaselineInput) SetApprovedPatchesEnableNonSecurity(v bool) *UpdatePatchBaselineInput { s.ApprovedPatchesEnableNonSecurity = &v return s } // SetBaselineId sets the BaselineId field's value. func (s *UpdatePatchBaselineInput) SetBaselineId(v string) *UpdatePatchBaselineInput { s.BaselineId = &v return s } // SetDescription sets the Description field's value. func (s *UpdatePatchBaselineInput) SetDescription(v string) *UpdatePatchBaselineInput { s.Description = &v return s } // SetGlobalFilters sets the GlobalFilters field's value. func (s *UpdatePatchBaselineInput) SetGlobalFilters(v *PatchFilterGroup) *UpdatePatchBaselineInput { s.GlobalFilters = v return s } // SetName sets the Name field's value. func (s *UpdatePatchBaselineInput) SetName(v string) *UpdatePatchBaselineInput { s.Name = &v return s } // SetRejectedPatches sets the RejectedPatches field's value. func (s *UpdatePatchBaselineInput) SetRejectedPatches(v []*string) *UpdatePatchBaselineInput { s.RejectedPatches = v return s } // SetRejectedPatchesAction sets the RejectedPatchesAction field's value. func (s *UpdatePatchBaselineInput) SetRejectedPatchesAction(v string) *UpdatePatchBaselineInput { s.RejectedPatchesAction = &v return s } // SetReplace sets the Replace field's value. func (s *UpdatePatchBaselineInput) SetReplace(v bool) *UpdatePatchBaselineInput { s.Replace = &v return s } // SetSources sets the Sources field's value. func (s *UpdatePatchBaselineInput) SetSources(v []*PatchSource) *UpdatePatchBaselineInput { s.Sources = v return s } type UpdatePatchBaselineOutput struct { _ struct{} `type:"structure"` // A set of rules used to include patches in the baseline. ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. ApprovedPatches []*string `type:"list"` // The compliance severity level assigned to the patch baseline after the update // completed. ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // Indicates whether the list of approved patches includes non-security updates // that should be applied to the managed nodes. The default value is false. // Applies to Linux managed nodes only. ApprovedPatchesEnableNonSecurity *bool `type:"boolean"` // The ID of the deleted patch baseline. BaselineId *string `min:"20" type:"string"` // The date when the patch baseline was created. CreatedDate *time.Time `type:"timestamp"` // A description of the patch baseline. Description *string `min:"1" type:"string"` // A set of global filters used to exclude patches from the baseline. GlobalFilters *PatchFilterGroup `type:"structure"` // The date when the patch baseline was last modified. ModifiedDate *time.Time `type:"timestamp"` // The name of the patch baseline. Name *string `min:"3" type:"string"` // The operating system rule used by the updated patch baseline. OperatingSystem *string `type:"string" enum:"OperatingSystem"` // A list of explicitly rejected patches for the baseline. RejectedPatches []*string `type:"list"` // The action specified to take on patches included in the RejectedPatches list. // A patch can be allowed only if it is a dependency of another package, or // blocked entirely along with packages that include it as a dependency. RejectedPatchesAction *string `type:"string" enum:"PatchAction"` // Information about the patches to use to update the managed nodes, including // target operating systems and source repositories. Applies to Linux managed // nodes only. Sources []*PatchSource `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdatePatchBaselineOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdatePatchBaselineOutput) GoString() string { return s.String() } // SetApprovalRules sets the ApprovalRules field's value. func (s *UpdatePatchBaselineOutput) SetApprovalRules(v *PatchRuleGroup) *UpdatePatchBaselineOutput { s.ApprovalRules = v return s } // SetApprovedPatches sets the ApprovedPatches field's value. func (s *UpdatePatchBaselineOutput) SetApprovedPatches(v []*string) *UpdatePatchBaselineOutput { s.ApprovedPatches = v return s } // SetApprovedPatchesComplianceLevel sets the ApprovedPatchesComplianceLevel field's value. func (s *UpdatePatchBaselineOutput) SetApprovedPatchesComplianceLevel(v string) *UpdatePatchBaselineOutput { s.ApprovedPatchesComplianceLevel = &v return s } // SetApprovedPatchesEnableNonSecurity sets the ApprovedPatchesEnableNonSecurity field's value. func (s *UpdatePatchBaselineOutput) SetApprovedPatchesEnableNonSecurity(v bool) *UpdatePatchBaselineOutput { s.ApprovedPatchesEnableNonSecurity = &v return s } // SetBaselineId sets the BaselineId field's value. func (s *UpdatePatchBaselineOutput) SetBaselineId(v string) *UpdatePatchBaselineOutput { s.BaselineId = &v return s } // SetCreatedDate sets the CreatedDate field's value. func (s *UpdatePatchBaselineOutput) SetCreatedDate(v time.Time) *UpdatePatchBaselineOutput { s.CreatedDate = &v return s } // SetDescription sets the Description field's value. func (s *UpdatePatchBaselineOutput) SetDescription(v string) *UpdatePatchBaselineOutput { s.Description = &v return s } // SetGlobalFilters sets the GlobalFilters field's value. func (s *UpdatePatchBaselineOutput) SetGlobalFilters(v *PatchFilterGroup) *UpdatePatchBaselineOutput { s.GlobalFilters = v return s } // SetModifiedDate sets the ModifiedDate field's value. func (s *UpdatePatchBaselineOutput) SetModifiedDate(v time.Time) *UpdatePatchBaselineOutput { s.ModifiedDate = &v return s } // SetName sets the Name field's value. func (s *UpdatePatchBaselineOutput) SetName(v string) *UpdatePatchBaselineOutput { s.Name = &v return s } // SetOperatingSystem sets the OperatingSystem field's value. func (s *UpdatePatchBaselineOutput) SetOperatingSystem(v string) *UpdatePatchBaselineOutput { s.OperatingSystem = &v return s } // SetRejectedPatches sets the RejectedPatches field's value. func (s *UpdatePatchBaselineOutput) SetRejectedPatches(v []*string) *UpdatePatchBaselineOutput { s.RejectedPatches = v return s } // SetRejectedPatchesAction sets the RejectedPatchesAction field's value. func (s *UpdatePatchBaselineOutput) SetRejectedPatchesAction(v string) *UpdatePatchBaselineOutput { s.RejectedPatchesAction = &v return s } // SetSources sets the Sources field's value. func (s *UpdatePatchBaselineOutput) SetSources(v []*PatchSource) *UpdatePatchBaselineOutput { s.Sources = v return s } type UpdateResourceDataSyncInput struct { _ struct{} `type:"structure"` // The name of the resource data sync you want to update. // // SyncName is a required field SyncName *string `min:"1" type:"string" required:"true"` // Specify information about the data sources to synchronize. // // SyncSource is a required field SyncSource *ResourceDataSyncSource `type:"structure" required:"true"` // The type of resource data sync. The supported SyncType is SyncFromSource. // // SyncType is a required field SyncType *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateResourceDataSyncInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateResourceDataSyncInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateResourceDataSyncInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateResourceDataSyncInput"} if s.SyncName == nil { invalidParams.Add(request.NewErrParamRequired("SyncName")) } if s.SyncName != nil && len(*s.SyncName) < 1 { invalidParams.Add(request.NewErrParamMinLen("SyncName", 1)) } if s.SyncSource == nil { invalidParams.Add(request.NewErrParamRequired("SyncSource")) } if s.SyncType == nil { invalidParams.Add(request.NewErrParamRequired("SyncType")) } if s.SyncType != nil && len(*s.SyncType) < 1 { invalidParams.Add(request.NewErrParamMinLen("SyncType", 1)) } if s.SyncSource != nil { if err := s.SyncSource.Validate(); err != nil { invalidParams.AddNested("SyncSource", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSyncName sets the SyncName field's value. func (s *UpdateResourceDataSyncInput) SetSyncName(v string) *UpdateResourceDataSyncInput { s.SyncName = &v return s } // SetSyncSource sets the SyncSource field's value. func (s *UpdateResourceDataSyncInput) SetSyncSource(v *ResourceDataSyncSource) *UpdateResourceDataSyncInput { s.SyncSource = v return s } // SetSyncType sets the SyncType field's value. func (s *UpdateResourceDataSyncInput) SetSyncType(v string) *UpdateResourceDataSyncInput { s.SyncType = &v return s } type UpdateResourceDataSyncOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateResourceDataSyncOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateResourceDataSyncOutput) GoString() string { return s.String() } // The request body of the UpdateServiceSetting API operation. type UpdateServiceSettingInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the service setting to update. For example, // arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled. // The setting ID can be one of the following. // // * /ssm/managed-instance/default-ec2-instance-management-role // // * /ssm/automation/customer-script-log-destination // // * /ssm/automation/customer-script-log-group-name // // * /ssm/documents/console/public-sharing-permission // // * /ssm/managed-instance/activation-tier // // * /ssm/opsinsights/opscenter // // * /ssm/parameter-store/default-parameter-tier // // * /ssm/parameter-store/high-throughput-enabled // // Permissions to update the /ssm/managed-instance/default-ec2-instance-management-role // setting should only be provided to administrators. Implement least privilege // access when allowing individuals to configure or modify the Default Host // Management Configuration. // // SettingId is a required field SettingId *string `min:"1" type:"string" required:"true"` // The new value to specify for the service setting. The following list specifies // the available values for each setting. // // * For /ssm/managed-instance/default-ec2-instance-management-role, enter // the name of an IAM role. // // * For /ssm/automation/customer-script-log-destination, enter CloudWatch. // // * For /ssm/automation/customer-script-log-group-name, enter the name of // an Amazon CloudWatch Logs log group. // // * For /ssm/documents/console/public-sharing-permission, enter Enable or // Disable. // // * For /ssm/managed-instance/activation-tier, enter standard or advanced. // // * For /ssm/opsinsights/opscenter, enter Enabled or Disabled. // // * For /ssm/parameter-store/default-parameter-tier, enter Standard, Advanced, // or Intelligent-Tiering // // * For /ssm/parameter-store/high-throughput-enabled, enter true or false. // // SettingValue is a required field SettingValue *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateServiceSettingInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateServiceSettingInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateServiceSettingInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateServiceSettingInput"} if s.SettingId == nil { invalidParams.Add(request.NewErrParamRequired("SettingId")) } if s.SettingId != nil && len(*s.SettingId) < 1 { invalidParams.Add(request.NewErrParamMinLen("SettingId", 1)) } if s.SettingValue == nil { invalidParams.Add(request.NewErrParamRequired("SettingValue")) } if s.SettingValue != nil && len(*s.SettingValue) < 1 { invalidParams.Add(request.NewErrParamMinLen("SettingValue", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetSettingId sets the SettingId field's value. func (s *UpdateServiceSettingInput) SetSettingId(v string) *UpdateServiceSettingInput { s.SettingId = &v return s } // SetSettingValue sets the SettingValue field's value. func (s *UpdateServiceSettingInput) SetSettingValue(v string) *UpdateServiceSettingInput { s.SettingValue = &v return s } // The result body of the UpdateServiceSetting API operation. type UpdateServiceSettingOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateServiceSettingOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UpdateServiceSettingOutput) GoString() string { return s.String() } 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" ) // AssociationComplianceSeverity_Values returns all elements of the AssociationComplianceSeverity enum func AssociationComplianceSeverity_Values() []string { return []string{ AssociationComplianceSeverityCritical, AssociationComplianceSeverityHigh, AssociationComplianceSeverityMedium, AssociationComplianceSeverityLow, AssociationComplianceSeverityUnspecified, } } const ( // AssociationExecutionFilterKeyExecutionId is a AssociationExecutionFilterKey enum value AssociationExecutionFilterKeyExecutionId = "ExecutionId" // AssociationExecutionFilterKeyStatus is a AssociationExecutionFilterKey enum value AssociationExecutionFilterKeyStatus = "Status" // AssociationExecutionFilterKeyCreatedTime is a AssociationExecutionFilterKey enum value AssociationExecutionFilterKeyCreatedTime = "CreatedTime" ) // AssociationExecutionFilterKey_Values returns all elements of the AssociationExecutionFilterKey enum func AssociationExecutionFilterKey_Values() []string { return []string{ AssociationExecutionFilterKeyExecutionId, AssociationExecutionFilterKeyStatus, AssociationExecutionFilterKeyCreatedTime, } } const ( // AssociationExecutionTargetsFilterKeyStatus is a AssociationExecutionTargetsFilterKey enum value AssociationExecutionTargetsFilterKeyStatus = "Status" // AssociationExecutionTargetsFilterKeyResourceId is a AssociationExecutionTargetsFilterKey enum value AssociationExecutionTargetsFilterKeyResourceId = "ResourceId" // AssociationExecutionTargetsFilterKeyResourceType is a AssociationExecutionTargetsFilterKey enum value AssociationExecutionTargetsFilterKeyResourceType = "ResourceType" ) // AssociationExecutionTargetsFilterKey_Values returns all elements of the AssociationExecutionTargetsFilterKey enum func AssociationExecutionTargetsFilterKey_Values() []string { return []string{ AssociationExecutionTargetsFilterKeyStatus, AssociationExecutionTargetsFilterKeyResourceId, AssociationExecutionTargetsFilterKeyResourceType, } } const ( // AssociationFilterKeyInstanceId is a AssociationFilterKey enum value AssociationFilterKeyInstanceId = "InstanceId" // AssociationFilterKeyName is a AssociationFilterKey enum value AssociationFilterKeyName = "Name" // AssociationFilterKeyAssociationId is a AssociationFilterKey enum value AssociationFilterKeyAssociationId = "AssociationId" // AssociationFilterKeyAssociationStatusName is a AssociationFilterKey enum value AssociationFilterKeyAssociationStatusName = "AssociationStatusName" // AssociationFilterKeyLastExecutedBefore is a AssociationFilterKey enum value AssociationFilterKeyLastExecutedBefore = "LastExecutedBefore" // AssociationFilterKeyLastExecutedAfter is a AssociationFilterKey enum value AssociationFilterKeyLastExecutedAfter = "LastExecutedAfter" // AssociationFilterKeyAssociationName is a AssociationFilterKey enum value AssociationFilterKeyAssociationName = "AssociationName" // AssociationFilterKeyResourceGroupName is a AssociationFilterKey enum value AssociationFilterKeyResourceGroupName = "ResourceGroupName" ) // AssociationFilterKey_Values returns all elements of the AssociationFilterKey enum func AssociationFilterKey_Values() []string { return []string{ AssociationFilterKeyInstanceId, AssociationFilterKeyName, AssociationFilterKeyAssociationId, AssociationFilterKeyAssociationStatusName, AssociationFilterKeyLastExecutedBefore, AssociationFilterKeyLastExecutedAfter, AssociationFilterKeyAssociationName, AssociationFilterKeyResourceGroupName, } } const ( // AssociationFilterOperatorTypeEqual is a AssociationFilterOperatorType enum value AssociationFilterOperatorTypeEqual = "EQUAL" // AssociationFilterOperatorTypeLessThan is a AssociationFilterOperatorType enum value AssociationFilterOperatorTypeLessThan = "LESS_THAN" // AssociationFilterOperatorTypeGreaterThan is a AssociationFilterOperatorType enum value AssociationFilterOperatorTypeGreaterThan = "GREATER_THAN" ) // AssociationFilterOperatorType_Values returns all elements of the AssociationFilterOperatorType enum func AssociationFilterOperatorType_Values() []string { return []string{ AssociationFilterOperatorTypeEqual, AssociationFilterOperatorTypeLessThan, AssociationFilterOperatorTypeGreaterThan, } } const ( // AssociationStatusNamePending is a AssociationStatusName enum value AssociationStatusNamePending = "Pending" // AssociationStatusNameSuccess is a AssociationStatusName enum value AssociationStatusNameSuccess = "Success" // AssociationStatusNameFailed is a AssociationStatusName enum value AssociationStatusNameFailed = "Failed" ) // AssociationStatusName_Values returns all elements of the AssociationStatusName enum func AssociationStatusName_Values() []string { return []string{ AssociationStatusNamePending, AssociationStatusNameSuccess, AssociationStatusNameFailed, } } const ( // AssociationSyncComplianceAuto is a AssociationSyncCompliance enum value AssociationSyncComplianceAuto = "AUTO" // AssociationSyncComplianceManual is a AssociationSyncCompliance enum value AssociationSyncComplianceManual = "MANUAL" ) // AssociationSyncCompliance_Values returns all elements of the AssociationSyncCompliance enum func AssociationSyncCompliance_Values() []string { return []string{ AssociationSyncComplianceAuto, AssociationSyncComplianceManual, } } const ( // AttachmentHashTypeSha256 is a AttachmentHashType enum value AttachmentHashTypeSha256 = "Sha256" ) // AttachmentHashType_Values returns all elements of the AttachmentHashType enum func AttachmentHashType_Values() []string { return []string{ AttachmentHashTypeSha256, } } const ( // AttachmentsSourceKeySourceUrl is a AttachmentsSourceKey enum value AttachmentsSourceKeySourceUrl = "SourceUrl" // AttachmentsSourceKeyS3fileUrl is a AttachmentsSourceKey enum value AttachmentsSourceKeyS3fileUrl = "S3FileUrl" // AttachmentsSourceKeyAttachmentReference is a AttachmentsSourceKey enum value AttachmentsSourceKeyAttachmentReference = "AttachmentReference" ) // AttachmentsSourceKey_Values returns all elements of the AttachmentsSourceKey enum func AttachmentsSourceKey_Values() []string { return []string{ AttachmentsSourceKeySourceUrl, AttachmentsSourceKeyS3fileUrl, AttachmentsSourceKeyAttachmentReference, } } const ( // AutomationExecutionFilterKeyDocumentNamePrefix is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyDocumentNamePrefix = "DocumentNamePrefix" // AutomationExecutionFilterKeyExecutionStatus is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyExecutionStatus = "ExecutionStatus" // AutomationExecutionFilterKeyExecutionId is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyExecutionId = "ExecutionId" // AutomationExecutionFilterKeyParentExecutionId is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyParentExecutionId = "ParentExecutionId" // AutomationExecutionFilterKeyCurrentAction is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyCurrentAction = "CurrentAction" // AutomationExecutionFilterKeyStartTimeBefore is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyStartTimeBefore = "StartTimeBefore" // AutomationExecutionFilterKeyStartTimeAfter is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyStartTimeAfter = "StartTimeAfter" // AutomationExecutionFilterKeyAutomationType is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyAutomationType = "AutomationType" // AutomationExecutionFilterKeyTagKey is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyTagKey = "TagKey" // AutomationExecutionFilterKeyTargetResourceGroup is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyTargetResourceGroup = "TargetResourceGroup" // AutomationExecutionFilterKeyAutomationSubtype is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyAutomationSubtype = "AutomationSubtype" // AutomationExecutionFilterKeyOpsItemId is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyOpsItemId = "OpsItemId" ) // AutomationExecutionFilterKey_Values returns all elements of the AutomationExecutionFilterKey enum func AutomationExecutionFilterKey_Values() []string { return []string{ AutomationExecutionFilterKeyDocumentNamePrefix, AutomationExecutionFilterKeyExecutionStatus, AutomationExecutionFilterKeyExecutionId, AutomationExecutionFilterKeyParentExecutionId, AutomationExecutionFilterKeyCurrentAction, AutomationExecutionFilterKeyStartTimeBefore, AutomationExecutionFilterKeyStartTimeAfter, AutomationExecutionFilterKeyAutomationType, AutomationExecutionFilterKeyTagKey, AutomationExecutionFilterKeyTargetResourceGroup, AutomationExecutionFilterKeyAutomationSubtype, AutomationExecutionFilterKeyOpsItemId, } } const ( // AutomationExecutionStatusPending is a AutomationExecutionStatus enum value AutomationExecutionStatusPending = "Pending" // AutomationExecutionStatusInProgress is a AutomationExecutionStatus enum value AutomationExecutionStatusInProgress = "InProgress" // AutomationExecutionStatusWaiting is a AutomationExecutionStatus enum value AutomationExecutionStatusWaiting = "Waiting" // AutomationExecutionStatusSuccess is a AutomationExecutionStatus enum value AutomationExecutionStatusSuccess = "Success" // AutomationExecutionStatusTimedOut is a AutomationExecutionStatus enum value AutomationExecutionStatusTimedOut = "TimedOut" // AutomationExecutionStatusCancelling is a AutomationExecutionStatus enum value AutomationExecutionStatusCancelling = "Cancelling" // AutomationExecutionStatusCancelled is a AutomationExecutionStatus enum value AutomationExecutionStatusCancelled = "Cancelled" // AutomationExecutionStatusFailed is a AutomationExecutionStatus enum value AutomationExecutionStatusFailed = "Failed" // AutomationExecutionStatusPendingApproval is a AutomationExecutionStatus enum value AutomationExecutionStatusPendingApproval = "PendingApproval" // AutomationExecutionStatusApproved is a AutomationExecutionStatus enum value AutomationExecutionStatusApproved = "Approved" // AutomationExecutionStatusRejected is a AutomationExecutionStatus enum value AutomationExecutionStatusRejected = "Rejected" // AutomationExecutionStatusScheduled is a AutomationExecutionStatus enum value AutomationExecutionStatusScheduled = "Scheduled" // AutomationExecutionStatusRunbookInProgress is a AutomationExecutionStatus enum value AutomationExecutionStatusRunbookInProgress = "RunbookInProgress" // AutomationExecutionStatusPendingChangeCalendarOverride is a AutomationExecutionStatus enum value AutomationExecutionStatusPendingChangeCalendarOverride = "PendingChangeCalendarOverride" // AutomationExecutionStatusChangeCalendarOverrideApproved is a AutomationExecutionStatus enum value AutomationExecutionStatusChangeCalendarOverrideApproved = "ChangeCalendarOverrideApproved" // AutomationExecutionStatusChangeCalendarOverrideRejected is a AutomationExecutionStatus enum value AutomationExecutionStatusChangeCalendarOverrideRejected = "ChangeCalendarOverrideRejected" // AutomationExecutionStatusCompletedWithSuccess is a AutomationExecutionStatus enum value AutomationExecutionStatusCompletedWithSuccess = "CompletedWithSuccess" // AutomationExecutionStatusCompletedWithFailure is a AutomationExecutionStatus enum value AutomationExecutionStatusCompletedWithFailure = "CompletedWithFailure" // AutomationExecutionStatusExited is a AutomationExecutionStatus enum value AutomationExecutionStatusExited = "Exited" ) // AutomationExecutionStatus_Values returns all elements of the AutomationExecutionStatus enum func AutomationExecutionStatus_Values() []string { return []string{ AutomationExecutionStatusPending, AutomationExecutionStatusInProgress, AutomationExecutionStatusWaiting, AutomationExecutionStatusSuccess, AutomationExecutionStatusTimedOut, AutomationExecutionStatusCancelling, AutomationExecutionStatusCancelled, AutomationExecutionStatusFailed, AutomationExecutionStatusPendingApproval, AutomationExecutionStatusApproved, AutomationExecutionStatusRejected, AutomationExecutionStatusScheduled, AutomationExecutionStatusRunbookInProgress, AutomationExecutionStatusPendingChangeCalendarOverride, AutomationExecutionStatusChangeCalendarOverrideApproved, AutomationExecutionStatusChangeCalendarOverrideRejected, AutomationExecutionStatusCompletedWithSuccess, AutomationExecutionStatusCompletedWithFailure, AutomationExecutionStatusExited, } } const ( // AutomationSubtypeChangeRequest is a AutomationSubtype enum value AutomationSubtypeChangeRequest = "ChangeRequest" ) // AutomationSubtype_Values returns all elements of the AutomationSubtype enum func AutomationSubtype_Values() []string { return []string{ AutomationSubtypeChangeRequest, } } const ( // AutomationTypeCrossAccount is a AutomationType enum value AutomationTypeCrossAccount = "CrossAccount" // AutomationTypeLocal is a AutomationType enum value AutomationTypeLocal = "Local" ) // AutomationType_Values returns all elements of the AutomationType enum func AutomationType_Values() []string { return []string{ AutomationTypeCrossAccount, AutomationTypeLocal, } } const ( // CalendarStateOpen is a CalendarState enum value CalendarStateOpen = "OPEN" // CalendarStateClosed is a CalendarState enum value CalendarStateClosed = "CLOSED" ) // CalendarState_Values returns all elements of the CalendarState enum func CalendarState_Values() []string { return []string{ CalendarStateOpen, CalendarStateClosed, } } const ( // CommandFilterKeyInvokedAfter is a CommandFilterKey enum value CommandFilterKeyInvokedAfter = "InvokedAfter" // CommandFilterKeyInvokedBefore is a CommandFilterKey enum value CommandFilterKeyInvokedBefore = "InvokedBefore" // CommandFilterKeyStatus is a CommandFilterKey enum value CommandFilterKeyStatus = "Status" // CommandFilterKeyExecutionStage is a CommandFilterKey enum value CommandFilterKeyExecutionStage = "ExecutionStage" // CommandFilterKeyDocumentName is a CommandFilterKey enum value CommandFilterKeyDocumentName = "DocumentName" ) // CommandFilterKey_Values returns all elements of the CommandFilterKey enum func CommandFilterKey_Values() []string { return []string{ CommandFilterKeyInvokedAfter, CommandFilterKeyInvokedBefore, CommandFilterKeyStatus, CommandFilterKeyExecutionStage, CommandFilterKeyDocumentName, } } const ( // CommandInvocationStatusPending is a CommandInvocationStatus enum value CommandInvocationStatusPending = "Pending" // CommandInvocationStatusInProgress is a CommandInvocationStatus enum value CommandInvocationStatusInProgress = "InProgress" // CommandInvocationStatusDelayed is a CommandInvocationStatus enum value CommandInvocationStatusDelayed = "Delayed" // CommandInvocationStatusSuccess is a CommandInvocationStatus enum value CommandInvocationStatusSuccess = "Success" // CommandInvocationStatusCancelled is a CommandInvocationStatus enum value CommandInvocationStatusCancelled = "Cancelled" // CommandInvocationStatusTimedOut is a CommandInvocationStatus enum value CommandInvocationStatusTimedOut = "TimedOut" // CommandInvocationStatusFailed is a CommandInvocationStatus enum value CommandInvocationStatusFailed = "Failed" // CommandInvocationStatusCancelling is a CommandInvocationStatus enum value CommandInvocationStatusCancelling = "Cancelling" ) // CommandInvocationStatus_Values returns all elements of the CommandInvocationStatus enum func CommandInvocationStatus_Values() []string { return []string{ CommandInvocationStatusPending, CommandInvocationStatusInProgress, CommandInvocationStatusDelayed, CommandInvocationStatusSuccess, CommandInvocationStatusCancelled, CommandInvocationStatusTimedOut, CommandInvocationStatusFailed, CommandInvocationStatusCancelling, } } const ( // CommandPluginStatusPending is a CommandPluginStatus enum value CommandPluginStatusPending = "Pending" // CommandPluginStatusInProgress is a CommandPluginStatus enum value CommandPluginStatusInProgress = "InProgress" // CommandPluginStatusSuccess is a CommandPluginStatus enum value CommandPluginStatusSuccess = "Success" // CommandPluginStatusTimedOut is a CommandPluginStatus enum value CommandPluginStatusTimedOut = "TimedOut" // CommandPluginStatusCancelled is a CommandPluginStatus enum value CommandPluginStatusCancelled = "Cancelled" // CommandPluginStatusFailed is a CommandPluginStatus enum value CommandPluginStatusFailed = "Failed" ) // CommandPluginStatus_Values returns all elements of the CommandPluginStatus enum func CommandPluginStatus_Values() []string { return []string{ CommandPluginStatusPending, CommandPluginStatusInProgress, CommandPluginStatusSuccess, CommandPluginStatusTimedOut, CommandPluginStatusCancelled, CommandPluginStatusFailed, } } const ( // CommandStatusPending is a CommandStatus enum value CommandStatusPending = "Pending" // CommandStatusInProgress is a CommandStatus enum value CommandStatusInProgress = "InProgress" // CommandStatusSuccess is a CommandStatus enum value CommandStatusSuccess = "Success" // CommandStatusCancelled is a CommandStatus enum value CommandStatusCancelled = "Cancelled" // CommandStatusFailed is a CommandStatus enum value CommandStatusFailed = "Failed" // CommandStatusTimedOut is a CommandStatus enum value CommandStatusTimedOut = "TimedOut" // CommandStatusCancelling is a CommandStatus enum value CommandStatusCancelling = "Cancelling" ) // CommandStatus_Values returns all elements of the CommandStatus enum func CommandStatus_Values() []string { return []string{ CommandStatusPending, CommandStatusInProgress, CommandStatusSuccess, CommandStatusCancelled, CommandStatusFailed, CommandStatusTimedOut, CommandStatusCancelling, } } const ( // ComplianceQueryOperatorTypeEqual is a ComplianceQueryOperatorType enum value ComplianceQueryOperatorTypeEqual = "EQUAL" // ComplianceQueryOperatorTypeNotEqual is a ComplianceQueryOperatorType enum value ComplianceQueryOperatorTypeNotEqual = "NOT_EQUAL" // ComplianceQueryOperatorTypeBeginWith is a ComplianceQueryOperatorType enum value ComplianceQueryOperatorTypeBeginWith = "BEGIN_WITH" // ComplianceQueryOperatorTypeLessThan is a ComplianceQueryOperatorType enum value ComplianceQueryOperatorTypeLessThan = "LESS_THAN" // ComplianceQueryOperatorTypeGreaterThan is a ComplianceQueryOperatorType enum value ComplianceQueryOperatorTypeGreaterThan = "GREATER_THAN" ) // ComplianceQueryOperatorType_Values returns all elements of the ComplianceQueryOperatorType enum func ComplianceQueryOperatorType_Values() []string { return []string{ ComplianceQueryOperatorTypeEqual, ComplianceQueryOperatorTypeNotEqual, ComplianceQueryOperatorTypeBeginWith, ComplianceQueryOperatorTypeLessThan, ComplianceQueryOperatorTypeGreaterThan, } } const ( // ComplianceSeverityCritical is a ComplianceSeverity enum value ComplianceSeverityCritical = "CRITICAL" // ComplianceSeverityHigh is a ComplianceSeverity enum value ComplianceSeverityHigh = "HIGH" // ComplianceSeverityMedium is a ComplianceSeverity enum value ComplianceSeverityMedium = "MEDIUM" // ComplianceSeverityLow is a ComplianceSeverity enum value ComplianceSeverityLow = "LOW" // ComplianceSeverityInformational is a ComplianceSeverity enum value ComplianceSeverityInformational = "INFORMATIONAL" // ComplianceSeverityUnspecified is a ComplianceSeverity enum value ComplianceSeverityUnspecified = "UNSPECIFIED" ) // ComplianceSeverity_Values returns all elements of the ComplianceSeverity enum func ComplianceSeverity_Values() []string { return []string{ ComplianceSeverityCritical, ComplianceSeverityHigh, ComplianceSeverityMedium, ComplianceSeverityLow, ComplianceSeverityInformational, ComplianceSeverityUnspecified, } } const ( // ComplianceStatusCompliant is a ComplianceStatus enum value ComplianceStatusCompliant = "COMPLIANT" // ComplianceStatusNonCompliant is a ComplianceStatus enum value ComplianceStatusNonCompliant = "NON_COMPLIANT" ) // ComplianceStatus_Values returns all elements of the ComplianceStatus enum func ComplianceStatus_Values() []string { return []string{ ComplianceStatusCompliant, ComplianceStatusNonCompliant, } } const ( // ComplianceUploadTypeComplete is a ComplianceUploadType enum value ComplianceUploadTypeComplete = "COMPLETE" // ComplianceUploadTypePartial is a ComplianceUploadType enum value ComplianceUploadTypePartial = "PARTIAL" ) // ComplianceUploadType_Values returns all elements of the ComplianceUploadType enum func ComplianceUploadType_Values() []string { return []string{ ComplianceUploadTypeComplete, ComplianceUploadTypePartial, } } const ( // ConnectionStatusConnected is a ConnectionStatus enum value ConnectionStatusConnected = "connected" // ConnectionStatusNotconnected is a ConnectionStatus enum value ConnectionStatusNotconnected = "notconnected" ) // ConnectionStatus_Values returns all elements of the ConnectionStatus enum func ConnectionStatus_Values() []string { return []string{ ConnectionStatusConnected, ConnectionStatusNotconnected, } } const ( // DescribeActivationsFilterKeysActivationIds is a DescribeActivationsFilterKeys enum value DescribeActivationsFilterKeysActivationIds = "ActivationIds" // DescribeActivationsFilterKeysDefaultInstanceName is a DescribeActivationsFilterKeys enum value DescribeActivationsFilterKeysDefaultInstanceName = "DefaultInstanceName" // DescribeActivationsFilterKeysIamRole is a DescribeActivationsFilterKeys enum value DescribeActivationsFilterKeysIamRole = "IamRole" ) // DescribeActivationsFilterKeys_Values returns all elements of the DescribeActivationsFilterKeys enum func DescribeActivationsFilterKeys_Values() []string { return []string{ DescribeActivationsFilterKeysActivationIds, DescribeActivationsFilterKeysDefaultInstanceName, DescribeActivationsFilterKeysIamRole, } } const ( // DocumentFilterKeyName is a DocumentFilterKey enum value DocumentFilterKeyName = "Name" // DocumentFilterKeyOwner is a DocumentFilterKey enum value DocumentFilterKeyOwner = "Owner" // DocumentFilterKeyPlatformTypes is a DocumentFilterKey enum value DocumentFilterKeyPlatformTypes = "PlatformTypes" // DocumentFilterKeyDocumentType is a DocumentFilterKey enum value DocumentFilterKeyDocumentType = "DocumentType" ) // DocumentFilterKey_Values returns all elements of the DocumentFilterKey enum func DocumentFilterKey_Values() []string { return []string{ DocumentFilterKeyName, DocumentFilterKeyOwner, DocumentFilterKeyPlatformTypes, DocumentFilterKeyDocumentType, } } const ( // DocumentFormatYaml is a DocumentFormat enum value DocumentFormatYaml = "YAML" // DocumentFormatJson is a DocumentFormat enum value DocumentFormatJson = "JSON" // DocumentFormatText is a DocumentFormat enum value DocumentFormatText = "TEXT" ) // DocumentFormat_Values returns all elements of the DocumentFormat enum func DocumentFormat_Values() []string { return []string{ DocumentFormatYaml, DocumentFormatJson, DocumentFormatText, } } const ( // DocumentHashTypeSha256 is a DocumentHashType enum value DocumentHashTypeSha256 = "Sha256" // DocumentHashTypeSha1 is a DocumentHashType enum value DocumentHashTypeSha1 = "Sha1" ) // DocumentHashType_Values returns all elements of the DocumentHashType enum func DocumentHashType_Values() []string { return []string{ DocumentHashTypeSha256, DocumentHashTypeSha1, } } const ( // DocumentMetadataEnumDocumentReviews is a DocumentMetadataEnum enum value DocumentMetadataEnumDocumentReviews = "DocumentReviews" ) // DocumentMetadataEnum_Values returns all elements of the DocumentMetadataEnum enum func DocumentMetadataEnum_Values() []string { return []string{ DocumentMetadataEnumDocumentReviews, } } const ( // DocumentParameterTypeString is a DocumentParameterType enum value DocumentParameterTypeString = "String" // DocumentParameterTypeStringList is a DocumentParameterType enum value DocumentParameterTypeStringList = "StringList" ) // DocumentParameterType_Values returns all elements of the DocumentParameterType enum func DocumentParameterType_Values() []string { return []string{ DocumentParameterTypeString, DocumentParameterTypeStringList, } } const ( // DocumentPermissionTypeShare is a DocumentPermissionType enum value DocumentPermissionTypeShare = "Share" ) // DocumentPermissionType_Values returns all elements of the DocumentPermissionType enum func DocumentPermissionType_Values() []string { return []string{ DocumentPermissionTypeShare, } } const ( // DocumentReviewActionSendForReview is a DocumentReviewAction enum value DocumentReviewActionSendForReview = "SendForReview" // DocumentReviewActionUpdateReview is a DocumentReviewAction enum value DocumentReviewActionUpdateReview = "UpdateReview" // DocumentReviewActionApprove is a DocumentReviewAction enum value DocumentReviewActionApprove = "Approve" // DocumentReviewActionReject is a DocumentReviewAction enum value DocumentReviewActionReject = "Reject" ) // DocumentReviewAction_Values returns all elements of the DocumentReviewAction enum func DocumentReviewAction_Values() []string { return []string{ DocumentReviewActionSendForReview, DocumentReviewActionUpdateReview, DocumentReviewActionApprove, DocumentReviewActionReject, } } const ( // DocumentReviewCommentTypeComment is a DocumentReviewCommentType enum value DocumentReviewCommentTypeComment = "Comment" ) // DocumentReviewCommentType_Values returns all elements of the DocumentReviewCommentType enum func DocumentReviewCommentType_Values() []string { return []string{ DocumentReviewCommentTypeComment, } } // The status of a document. const ( // DocumentStatusCreating is a DocumentStatus enum value DocumentStatusCreating = "Creating" // DocumentStatusActive is a DocumentStatus enum value DocumentStatusActive = "Active" // DocumentStatusUpdating is a DocumentStatus enum value DocumentStatusUpdating = "Updating" // DocumentStatusDeleting is a DocumentStatus enum value DocumentStatusDeleting = "Deleting" // DocumentStatusFailed is a DocumentStatus enum value DocumentStatusFailed = "Failed" ) // DocumentStatus_Values returns all elements of the DocumentStatus enum func DocumentStatus_Values() []string { return []string{ DocumentStatusCreating, DocumentStatusActive, DocumentStatusUpdating, DocumentStatusDeleting, DocumentStatusFailed, } } const ( // DocumentTypeCommand is a DocumentType enum value DocumentTypeCommand = "Command" // DocumentTypePolicy is a DocumentType enum value DocumentTypePolicy = "Policy" // DocumentTypeAutomation is a DocumentType enum value DocumentTypeAutomation = "Automation" // DocumentTypeSession is a DocumentType enum value DocumentTypeSession = "Session" // DocumentTypePackage is a DocumentType enum value DocumentTypePackage = "Package" // DocumentTypeApplicationConfiguration is a DocumentType enum value DocumentTypeApplicationConfiguration = "ApplicationConfiguration" // DocumentTypeApplicationConfigurationSchema is a DocumentType enum value DocumentTypeApplicationConfigurationSchema = "ApplicationConfigurationSchema" // DocumentTypeDeploymentStrategy is a DocumentType enum value DocumentTypeDeploymentStrategy = "DeploymentStrategy" // DocumentTypeChangeCalendar is a DocumentType enum value DocumentTypeChangeCalendar = "ChangeCalendar" // DocumentTypeAutomationChangeTemplate is a DocumentType enum value DocumentTypeAutomationChangeTemplate = "Automation.ChangeTemplate" // DocumentTypeProblemAnalysis is a DocumentType enum value DocumentTypeProblemAnalysis = "ProblemAnalysis" // DocumentTypeProblemAnalysisTemplate is a DocumentType enum value DocumentTypeProblemAnalysisTemplate = "ProblemAnalysisTemplate" // DocumentTypeCloudFormation is a DocumentType enum value DocumentTypeCloudFormation = "CloudFormation" // DocumentTypeConformancePackTemplate is a DocumentType enum value DocumentTypeConformancePackTemplate = "ConformancePackTemplate" // DocumentTypeQuickSetup is a DocumentType enum value DocumentTypeQuickSetup = "QuickSetup" ) // DocumentType_Values returns all elements of the DocumentType enum func DocumentType_Values() []string { return []string{ DocumentTypeCommand, DocumentTypePolicy, DocumentTypeAutomation, DocumentTypeSession, DocumentTypePackage, DocumentTypeApplicationConfiguration, DocumentTypeApplicationConfigurationSchema, DocumentTypeDeploymentStrategy, DocumentTypeChangeCalendar, DocumentTypeAutomationChangeTemplate, DocumentTypeProblemAnalysis, DocumentTypeProblemAnalysisTemplate, DocumentTypeCloudFormation, DocumentTypeConformancePackTemplate, DocumentTypeQuickSetup, } } const ( // ExecutionModeAuto is a ExecutionMode enum value ExecutionModeAuto = "Auto" // ExecutionModeInteractive is a ExecutionMode enum value ExecutionModeInteractive = "Interactive" ) // ExecutionMode_Values returns all elements of the ExecutionMode enum func ExecutionMode_Values() []string { return []string{ ExecutionModeAuto, ExecutionModeInteractive, } } const ( // ExternalAlarmStateUnknown is a ExternalAlarmState enum value ExternalAlarmStateUnknown = "UNKNOWN" // ExternalAlarmStateAlarm is a ExternalAlarmState enum value ExternalAlarmStateAlarm = "ALARM" ) // ExternalAlarmState_Values returns all elements of the ExternalAlarmState enum func ExternalAlarmState_Values() []string { return []string{ ExternalAlarmStateUnknown, ExternalAlarmStateAlarm, } } const ( // FaultClient is a Fault enum value FaultClient = "Client" // FaultServer is a Fault enum value FaultServer = "Server" // FaultUnknown is a Fault enum value FaultUnknown = "Unknown" ) // Fault_Values returns all elements of the Fault enum func Fault_Values() []string { return []string{ FaultClient, FaultServer, FaultUnknown, } } const ( // InstanceInformationFilterKeyInstanceIds is a InstanceInformationFilterKey enum value InstanceInformationFilterKeyInstanceIds = "InstanceIds" // InstanceInformationFilterKeyAgentVersion is a InstanceInformationFilterKey enum value InstanceInformationFilterKeyAgentVersion = "AgentVersion" // InstanceInformationFilterKeyPingStatus is a InstanceInformationFilterKey enum value InstanceInformationFilterKeyPingStatus = "PingStatus" // InstanceInformationFilterKeyPlatformTypes is a InstanceInformationFilterKey enum value InstanceInformationFilterKeyPlatformTypes = "PlatformTypes" // InstanceInformationFilterKeyActivationIds is a InstanceInformationFilterKey enum value InstanceInformationFilterKeyActivationIds = "ActivationIds" // InstanceInformationFilterKeyIamRole is a InstanceInformationFilterKey enum value InstanceInformationFilterKeyIamRole = "IamRole" // InstanceInformationFilterKeyResourceType is a InstanceInformationFilterKey enum value InstanceInformationFilterKeyResourceType = "ResourceType" // InstanceInformationFilterKeyAssociationStatus is a InstanceInformationFilterKey enum value InstanceInformationFilterKeyAssociationStatus = "AssociationStatus" ) // InstanceInformationFilterKey_Values returns all elements of the InstanceInformationFilterKey enum func InstanceInformationFilterKey_Values() []string { return []string{ InstanceInformationFilterKeyInstanceIds, InstanceInformationFilterKeyAgentVersion, InstanceInformationFilterKeyPingStatus, InstanceInformationFilterKeyPlatformTypes, InstanceInformationFilterKeyActivationIds, InstanceInformationFilterKeyIamRole, InstanceInformationFilterKeyResourceType, InstanceInformationFilterKeyAssociationStatus, } } const ( // InstancePatchStateOperatorTypeEqual is a InstancePatchStateOperatorType enum value InstancePatchStateOperatorTypeEqual = "Equal" // InstancePatchStateOperatorTypeNotEqual is a InstancePatchStateOperatorType enum value InstancePatchStateOperatorTypeNotEqual = "NotEqual" // InstancePatchStateOperatorTypeLessThan is a InstancePatchStateOperatorType enum value InstancePatchStateOperatorTypeLessThan = "LessThan" // InstancePatchStateOperatorTypeGreaterThan is a InstancePatchStateOperatorType enum value InstancePatchStateOperatorTypeGreaterThan = "GreaterThan" ) // InstancePatchStateOperatorType_Values returns all elements of the InstancePatchStateOperatorType enum func InstancePatchStateOperatorType_Values() []string { return []string{ InstancePatchStateOperatorTypeEqual, InstancePatchStateOperatorTypeNotEqual, InstancePatchStateOperatorTypeLessThan, InstancePatchStateOperatorTypeGreaterThan, } } const ( // InventoryAttributeDataTypeString is a InventoryAttributeDataType enum value InventoryAttributeDataTypeString = "string" // InventoryAttributeDataTypeNumber is a InventoryAttributeDataType enum value InventoryAttributeDataTypeNumber = "number" ) // InventoryAttributeDataType_Values returns all elements of the InventoryAttributeDataType enum func InventoryAttributeDataType_Values() []string { return []string{ InventoryAttributeDataTypeString, InventoryAttributeDataTypeNumber, } } const ( // InventoryDeletionStatusInProgress is a InventoryDeletionStatus enum value InventoryDeletionStatusInProgress = "InProgress" // InventoryDeletionStatusComplete is a InventoryDeletionStatus enum value InventoryDeletionStatusComplete = "Complete" ) // InventoryDeletionStatus_Values returns all elements of the InventoryDeletionStatus enum func InventoryDeletionStatus_Values() []string { return []string{ InventoryDeletionStatusInProgress, InventoryDeletionStatusComplete, } } const ( // InventoryQueryOperatorTypeEqual is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeEqual = "Equal" // InventoryQueryOperatorTypeNotEqual is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeNotEqual = "NotEqual" // InventoryQueryOperatorTypeBeginWith is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeBeginWith = "BeginWith" // InventoryQueryOperatorTypeLessThan is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeLessThan = "LessThan" // InventoryQueryOperatorTypeGreaterThan is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeGreaterThan = "GreaterThan" // InventoryQueryOperatorTypeExists is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeExists = "Exists" ) // InventoryQueryOperatorType_Values returns all elements of the InventoryQueryOperatorType enum func InventoryQueryOperatorType_Values() []string { return []string{ InventoryQueryOperatorTypeEqual, InventoryQueryOperatorTypeNotEqual, InventoryQueryOperatorTypeBeginWith, InventoryQueryOperatorTypeLessThan, InventoryQueryOperatorTypeGreaterThan, InventoryQueryOperatorTypeExists, } } const ( // InventorySchemaDeleteOptionDisableSchema is a InventorySchemaDeleteOption enum value InventorySchemaDeleteOptionDisableSchema = "DisableSchema" // InventorySchemaDeleteOptionDeleteSchema is a InventorySchemaDeleteOption enum value InventorySchemaDeleteOptionDeleteSchema = "DeleteSchema" ) // InventorySchemaDeleteOption_Values returns all elements of the InventorySchemaDeleteOption enum func InventorySchemaDeleteOption_Values() []string { return []string{ InventorySchemaDeleteOptionDisableSchema, InventorySchemaDeleteOptionDeleteSchema, } } const ( // LastResourceDataSyncStatusSuccessful is a LastResourceDataSyncStatus enum value LastResourceDataSyncStatusSuccessful = "Successful" // LastResourceDataSyncStatusFailed is a LastResourceDataSyncStatus enum value LastResourceDataSyncStatusFailed = "Failed" // LastResourceDataSyncStatusInProgress is a LastResourceDataSyncStatus enum value LastResourceDataSyncStatusInProgress = "InProgress" ) // LastResourceDataSyncStatus_Values returns all elements of the LastResourceDataSyncStatus enum func LastResourceDataSyncStatus_Values() []string { return []string{ LastResourceDataSyncStatusSuccessful, LastResourceDataSyncStatusFailed, LastResourceDataSyncStatusInProgress, } } const ( // MaintenanceWindowExecutionStatusPending is a MaintenanceWindowExecutionStatus enum value MaintenanceWindowExecutionStatusPending = "PENDING" // MaintenanceWindowExecutionStatusInProgress is a MaintenanceWindowExecutionStatus enum value MaintenanceWindowExecutionStatusInProgress = "IN_PROGRESS" // MaintenanceWindowExecutionStatusSuccess is a MaintenanceWindowExecutionStatus enum value MaintenanceWindowExecutionStatusSuccess = "SUCCESS" // MaintenanceWindowExecutionStatusFailed is a MaintenanceWindowExecutionStatus enum value MaintenanceWindowExecutionStatusFailed = "FAILED" // MaintenanceWindowExecutionStatusTimedOut is a MaintenanceWindowExecutionStatus enum value MaintenanceWindowExecutionStatusTimedOut = "TIMED_OUT" // MaintenanceWindowExecutionStatusCancelling is a MaintenanceWindowExecutionStatus enum value MaintenanceWindowExecutionStatusCancelling = "CANCELLING" // MaintenanceWindowExecutionStatusCancelled is a MaintenanceWindowExecutionStatus enum value MaintenanceWindowExecutionStatusCancelled = "CANCELLED" // MaintenanceWindowExecutionStatusSkippedOverlapping is a MaintenanceWindowExecutionStatus enum value MaintenanceWindowExecutionStatusSkippedOverlapping = "SKIPPED_OVERLAPPING" ) // MaintenanceWindowExecutionStatus_Values returns all elements of the MaintenanceWindowExecutionStatus enum func MaintenanceWindowExecutionStatus_Values() []string { return []string{ MaintenanceWindowExecutionStatusPending, MaintenanceWindowExecutionStatusInProgress, MaintenanceWindowExecutionStatusSuccess, MaintenanceWindowExecutionStatusFailed, MaintenanceWindowExecutionStatusTimedOut, MaintenanceWindowExecutionStatusCancelling, MaintenanceWindowExecutionStatusCancelled, MaintenanceWindowExecutionStatusSkippedOverlapping, } } const ( // MaintenanceWindowResourceTypeInstance is a MaintenanceWindowResourceType enum value MaintenanceWindowResourceTypeInstance = "INSTANCE" // MaintenanceWindowResourceTypeResourceGroup is a MaintenanceWindowResourceType enum value MaintenanceWindowResourceTypeResourceGroup = "RESOURCE_GROUP" ) // MaintenanceWindowResourceType_Values returns all elements of the MaintenanceWindowResourceType enum func MaintenanceWindowResourceType_Values() []string { return []string{ MaintenanceWindowResourceTypeInstance, MaintenanceWindowResourceTypeResourceGroup, } } const ( // MaintenanceWindowTaskCutoffBehaviorContinueTask is a MaintenanceWindowTaskCutoffBehavior enum value MaintenanceWindowTaskCutoffBehaviorContinueTask = "CONTINUE_TASK" // MaintenanceWindowTaskCutoffBehaviorCancelTask is a MaintenanceWindowTaskCutoffBehavior enum value MaintenanceWindowTaskCutoffBehaviorCancelTask = "CANCEL_TASK" ) // MaintenanceWindowTaskCutoffBehavior_Values returns all elements of the MaintenanceWindowTaskCutoffBehavior enum func MaintenanceWindowTaskCutoffBehavior_Values() []string { return []string{ MaintenanceWindowTaskCutoffBehaviorContinueTask, MaintenanceWindowTaskCutoffBehaviorCancelTask, } } const ( // MaintenanceWindowTaskTypeRunCommand is a MaintenanceWindowTaskType enum value MaintenanceWindowTaskTypeRunCommand = "RUN_COMMAND" // MaintenanceWindowTaskTypeAutomation is a MaintenanceWindowTaskType enum value MaintenanceWindowTaskTypeAutomation = "AUTOMATION" // MaintenanceWindowTaskTypeStepFunctions is a MaintenanceWindowTaskType enum value MaintenanceWindowTaskTypeStepFunctions = "STEP_FUNCTIONS" // MaintenanceWindowTaskTypeLambda is a MaintenanceWindowTaskType enum value MaintenanceWindowTaskTypeLambda = "LAMBDA" ) // MaintenanceWindowTaskType_Values returns all elements of the MaintenanceWindowTaskType enum func MaintenanceWindowTaskType_Values() []string { return []string{ MaintenanceWindowTaskTypeRunCommand, MaintenanceWindowTaskTypeAutomation, MaintenanceWindowTaskTypeStepFunctions, MaintenanceWindowTaskTypeLambda, } } const ( // NotificationEventAll is a NotificationEvent enum value NotificationEventAll = "All" // NotificationEventInProgress is a NotificationEvent enum value NotificationEventInProgress = "InProgress" // NotificationEventSuccess is a NotificationEvent enum value NotificationEventSuccess = "Success" // NotificationEventTimedOut is a NotificationEvent enum value NotificationEventTimedOut = "TimedOut" // NotificationEventCancelled is a NotificationEvent enum value NotificationEventCancelled = "Cancelled" // NotificationEventFailed is a NotificationEvent enum value NotificationEventFailed = "Failed" ) // NotificationEvent_Values returns all elements of the NotificationEvent enum func NotificationEvent_Values() []string { return []string{ NotificationEventAll, NotificationEventInProgress, NotificationEventSuccess, NotificationEventTimedOut, NotificationEventCancelled, NotificationEventFailed, } } const ( // NotificationTypeCommand is a NotificationType enum value NotificationTypeCommand = "Command" // NotificationTypeInvocation is a NotificationType enum value NotificationTypeInvocation = "Invocation" ) // NotificationType_Values returns all elements of the NotificationType enum func NotificationType_Values() []string { return []string{ NotificationTypeCommand, NotificationTypeInvocation, } } const ( // OperatingSystemWindows is a OperatingSystem enum value OperatingSystemWindows = "WINDOWS" // OperatingSystemAmazonLinux is a OperatingSystem enum value OperatingSystemAmazonLinux = "AMAZON_LINUX" // OperatingSystemAmazonLinux2 is a OperatingSystem enum value OperatingSystemAmazonLinux2 = "AMAZON_LINUX_2" // OperatingSystemAmazonLinux2022 is a OperatingSystem enum value OperatingSystemAmazonLinux2022 = "AMAZON_LINUX_2022" // OperatingSystemUbuntu is a OperatingSystem enum value OperatingSystemUbuntu = "UBUNTU" // OperatingSystemRedhatEnterpriseLinux is a OperatingSystem enum value OperatingSystemRedhatEnterpriseLinux = "REDHAT_ENTERPRISE_LINUX" // OperatingSystemSuse is a OperatingSystem enum value OperatingSystemSuse = "SUSE" // OperatingSystemCentos is a OperatingSystem enum value OperatingSystemCentos = "CENTOS" // OperatingSystemOracleLinux is a OperatingSystem enum value OperatingSystemOracleLinux = "ORACLE_LINUX" // OperatingSystemDebian is a OperatingSystem enum value OperatingSystemDebian = "DEBIAN" // OperatingSystemMacos is a OperatingSystem enum value OperatingSystemMacos = "MACOS" // OperatingSystemRaspbian is a OperatingSystem enum value OperatingSystemRaspbian = "RASPBIAN" // OperatingSystemRockyLinux is a OperatingSystem enum value OperatingSystemRockyLinux = "ROCKY_LINUX" // OperatingSystemAlmaLinux is a OperatingSystem enum value OperatingSystemAlmaLinux = "ALMA_LINUX" // OperatingSystemAmazonLinux2023 is a OperatingSystem enum value OperatingSystemAmazonLinux2023 = "AMAZON_LINUX_2023" ) // OperatingSystem_Values returns all elements of the OperatingSystem enum func OperatingSystem_Values() []string { return []string{ OperatingSystemWindows, OperatingSystemAmazonLinux, OperatingSystemAmazonLinux2, OperatingSystemAmazonLinux2022, OperatingSystemUbuntu, OperatingSystemRedhatEnterpriseLinux, OperatingSystemSuse, OperatingSystemCentos, OperatingSystemOracleLinux, OperatingSystemDebian, OperatingSystemMacos, OperatingSystemRaspbian, OperatingSystemRockyLinux, OperatingSystemAlmaLinux, OperatingSystemAmazonLinux2023, } } const ( // OpsFilterOperatorTypeEqual is a OpsFilterOperatorType enum value OpsFilterOperatorTypeEqual = "Equal" // OpsFilterOperatorTypeNotEqual is a OpsFilterOperatorType enum value OpsFilterOperatorTypeNotEqual = "NotEqual" // OpsFilterOperatorTypeBeginWith is a OpsFilterOperatorType enum value OpsFilterOperatorTypeBeginWith = "BeginWith" // OpsFilterOperatorTypeLessThan is a OpsFilterOperatorType enum value OpsFilterOperatorTypeLessThan = "LessThan" // OpsFilterOperatorTypeGreaterThan is a OpsFilterOperatorType enum value OpsFilterOperatorTypeGreaterThan = "GreaterThan" // OpsFilterOperatorTypeExists is a OpsFilterOperatorType enum value OpsFilterOperatorTypeExists = "Exists" ) // OpsFilterOperatorType_Values returns all elements of the OpsFilterOperatorType enum func OpsFilterOperatorType_Values() []string { return []string{ OpsFilterOperatorTypeEqual, OpsFilterOperatorTypeNotEqual, OpsFilterOperatorTypeBeginWith, OpsFilterOperatorTypeLessThan, OpsFilterOperatorTypeGreaterThan, OpsFilterOperatorTypeExists, } } const ( // OpsItemDataTypeSearchableString is a OpsItemDataType enum value OpsItemDataTypeSearchableString = "SearchableString" // OpsItemDataTypeString is a OpsItemDataType enum value OpsItemDataTypeString = "String" ) // OpsItemDataType_Values returns all elements of the OpsItemDataType enum func OpsItemDataType_Values() []string { return []string{ OpsItemDataTypeSearchableString, OpsItemDataTypeString, } } const ( // OpsItemEventFilterKeyOpsItemId is a OpsItemEventFilterKey enum value OpsItemEventFilterKeyOpsItemId = "OpsItemId" ) // OpsItemEventFilterKey_Values returns all elements of the OpsItemEventFilterKey enum func OpsItemEventFilterKey_Values() []string { return []string{ OpsItemEventFilterKeyOpsItemId, } } const ( // OpsItemEventFilterOperatorEqual is a OpsItemEventFilterOperator enum value OpsItemEventFilterOperatorEqual = "Equal" ) // OpsItemEventFilterOperator_Values returns all elements of the OpsItemEventFilterOperator enum func OpsItemEventFilterOperator_Values() []string { return []string{ OpsItemEventFilterOperatorEqual, } } const ( // OpsItemFilterKeyStatus is a OpsItemFilterKey enum value OpsItemFilterKeyStatus = "Status" // OpsItemFilterKeyCreatedBy is a OpsItemFilterKey enum value OpsItemFilterKeyCreatedBy = "CreatedBy" // OpsItemFilterKeySource is a OpsItemFilterKey enum value OpsItemFilterKeySource = "Source" // OpsItemFilterKeyPriority is a OpsItemFilterKey enum value OpsItemFilterKeyPriority = "Priority" // OpsItemFilterKeyTitle is a OpsItemFilterKey enum value OpsItemFilterKeyTitle = "Title" // OpsItemFilterKeyOpsItemId is a OpsItemFilterKey enum value OpsItemFilterKeyOpsItemId = "OpsItemId" // OpsItemFilterKeyCreatedTime is a OpsItemFilterKey enum value OpsItemFilterKeyCreatedTime = "CreatedTime" // OpsItemFilterKeyLastModifiedTime is a OpsItemFilterKey enum value OpsItemFilterKeyLastModifiedTime = "LastModifiedTime" // OpsItemFilterKeyActualStartTime is a OpsItemFilterKey enum value OpsItemFilterKeyActualStartTime = "ActualStartTime" // OpsItemFilterKeyActualEndTime is a OpsItemFilterKey enum value OpsItemFilterKeyActualEndTime = "ActualEndTime" // OpsItemFilterKeyPlannedStartTime is a OpsItemFilterKey enum value OpsItemFilterKeyPlannedStartTime = "PlannedStartTime" // OpsItemFilterKeyPlannedEndTime is a OpsItemFilterKey enum value OpsItemFilterKeyPlannedEndTime = "PlannedEndTime" // OpsItemFilterKeyOperationalData is a OpsItemFilterKey enum value OpsItemFilterKeyOperationalData = "OperationalData" // OpsItemFilterKeyOperationalDataKey is a OpsItemFilterKey enum value OpsItemFilterKeyOperationalDataKey = "OperationalDataKey" // OpsItemFilterKeyOperationalDataValue is a OpsItemFilterKey enum value OpsItemFilterKeyOperationalDataValue = "OperationalDataValue" // OpsItemFilterKeyResourceId is a OpsItemFilterKey enum value OpsItemFilterKeyResourceId = "ResourceId" // OpsItemFilterKeyAutomationId is a OpsItemFilterKey enum value OpsItemFilterKeyAutomationId = "AutomationId" // OpsItemFilterKeyCategory is a OpsItemFilterKey enum value OpsItemFilterKeyCategory = "Category" // OpsItemFilterKeySeverity is a OpsItemFilterKey enum value OpsItemFilterKeySeverity = "Severity" // OpsItemFilterKeyOpsItemType is a OpsItemFilterKey enum value OpsItemFilterKeyOpsItemType = "OpsItemType" // OpsItemFilterKeyChangeRequestByRequesterArn is a OpsItemFilterKey enum value OpsItemFilterKeyChangeRequestByRequesterArn = "ChangeRequestByRequesterArn" // OpsItemFilterKeyChangeRequestByRequesterName is a OpsItemFilterKey enum value OpsItemFilterKeyChangeRequestByRequesterName = "ChangeRequestByRequesterName" // OpsItemFilterKeyChangeRequestByApproverArn is a OpsItemFilterKey enum value OpsItemFilterKeyChangeRequestByApproverArn = "ChangeRequestByApproverArn" // OpsItemFilterKeyChangeRequestByApproverName is a OpsItemFilterKey enum value OpsItemFilterKeyChangeRequestByApproverName = "ChangeRequestByApproverName" // OpsItemFilterKeyChangeRequestByTemplate is a OpsItemFilterKey enum value OpsItemFilterKeyChangeRequestByTemplate = "ChangeRequestByTemplate" // OpsItemFilterKeyChangeRequestByTargetsResourceGroup is a OpsItemFilterKey enum value OpsItemFilterKeyChangeRequestByTargetsResourceGroup = "ChangeRequestByTargetsResourceGroup" // OpsItemFilterKeyInsightByType is a OpsItemFilterKey enum value OpsItemFilterKeyInsightByType = "InsightByType" // OpsItemFilterKeyAccountId is a OpsItemFilterKey enum value OpsItemFilterKeyAccountId = "AccountId" ) // OpsItemFilterKey_Values returns all elements of the OpsItemFilterKey enum func OpsItemFilterKey_Values() []string { return []string{ OpsItemFilterKeyStatus, OpsItemFilterKeyCreatedBy, OpsItemFilterKeySource, OpsItemFilterKeyPriority, OpsItemFilterKeyTitle, OpsItemFilterKeyOpsItemId, OpsItemFilterKeyCreatedTime, OpsItemFilterKeyLastModifiedTime, OpsItemFilterKeyActualStartTime, OpsItemFilterKeyActualEndTime, OpsItemFilterKeyPlannedStartTime, OpsItemFilterKeyPlannedEndTime, OpsItemFilterKeyOperationalData, OpsItemFilterKeyOperationalDataKey, OpsItemFilterKeyOperationalDataValue, OpsItemFilterKeyResourceId, OpsItemFilterKeyAutomationId, OpsItemFilterKeyCategory, OpsItemFilterKeySeverity, OpsItemFilterKeyOpsItemType, OpsItemFilterKeyChangeRequestByRequesterArn, OpsItemFilterKeyChangeRequestByRequesterName, OpsItemFilterKeyChangeRequestByApproverArn, OpsItemFilterKeyChangeRequestByApproverName, OpsItemFilterKeyChangeRequestByTemplate, OpsItemFilterKeyChangeRequestByTargetsResourceGroup, OpsItemFilterKeyInsightByType, OpsItemFilterKeyAccountId, } } const ( // OpsItemFilterOperatorEqual is a OpsItemFilterOperator enum value OpsItemFilterOperatorEqual = "Equal" // OpsItemFilterOperatorContains is a OpsItemFilterOperator enum value OpsItemFilterOperatorContains = "Contains" // OpsItemFilterOperatorGreaterThan is a OpsItemFilterOperator enum value OpsItemFilterOperatorGreaterThan = "GreaterThan" // OpsItemFilterOperatorLessThan is a OpsItemFilterOperator enum value OpsItemFilterOperatorLessThan = "LessThan" ) // OpsItemFilterOperator_Values returns all elements of the OpsItemFilterOperator enum func OpsItemFilterOperator_Values() []string { return []string{ OpsItemFilterOperatorEqual, OpsItemFilterOperatorContains, OpsItemFilterOperatorGreaterThan, OpsItemFilterOperatorLessThan, } } const ( // OpsItemRelatedItemsFilterKeyResourceType is a OpsItemRelatedItemsFilterKey enum value OpsItemRelatedItemsFilterKeyResourceType = "ResourceType" // OpsItemRelatedItemsFilterKeyAssociationId is a OpsItemRelatedItemsFilterKey enum value OpsItemRelatedItemsFilterKeyAssociationId = "AssociationId" // OpsItemRelatedItemsFilterKeyResourceUri is a OpsItemRelatedItemsFilterKey enum value OpsItemRelatedItemsFilterKeyResourceUri = "ResourceUri" ) // OpsItemRelatedItemsFilterKey_Values returns all elements of the OpsItemRelatedItemsFilterKey enum func OpsItemRelatedItemsFilterKey_Values() []string { return []string{ OpsItemRelatedItemsFilterKeyResourceType, OpsItemRelatedItemsFilterKeyAssociationId, OpsItemRelatedItemsFilterKeyResourceUri, } } const ( // OpsItemRelatedItemsFilterOperatorEqual is a OpsItemRelatedItemsFilterOperator enum value OpsItemRelatedItemsFilterOperatorEqual = "Equal" ) // OpsItemRelatedItemsFilterOperator_Values returns all elements of the OpsItemRelatedItemsFilterOperator enum func OpsItemRelatedItemsFilterOperator_Values() []string { return []string{ OpsItemRelatedItemsFilterOperatorEqual, } } const ( // OpsItemStatusOpen is a OpsItemStatus enum value OpsItemStatusOpen = "Open" // OpsItemStatusInProgress is a OpsItemStatus enum value OpsItemStatusInProgress = "InProgress" // OpsItemStatusResolved is a OpsItemStatus enum value OpsItemStatusResolved = "Resolved" // OpsItemStatusPending is a OpsItemStatus enum value OpsItemStatusPending = "Pending" // OpsItemStatusTimedOut is a OpsItemStatus enum value OpsItemStatusTimedOut = "TimedOut" // OpsItemStatusCancelling is a OpsItemStatus enum value OpsItemStatusCancelling = "Cancelling" // OpsItemStatusCancelled is a OpsItemStatus enum value OpsItemStatusCancelled = "Cancelled" // OpsItemStatusFailed is a OpsItemStatus enum value OpsItemStatusFailed = "Failed" // OpsItemStatusCompletedWithSuccess is a OpsItemStatus enum value OpsItemStatusCompletedWithSuccess = "CompletedWithSuccess" // OpsItemStatusCompletedWithFailure is a OpsItemStatus enum value OpsItemStatusCompletedWithFailure = "CompletedWithFailure" // OpsItemStatusScheduled is a OpsItemStatus enum value OpsItemStatusScheduled = "Scheduled" // OpsItemStatusRunbookInProgress is a OpsItemStatus enum value OpsItemStatusRunbookInProgress = "RunbookInProgress" // OpsItemStatusPendingChangeCalendarOverride is a OpsItemStatus enum value OpsItemStatusPendingChangeCalendarOverride = "PendingChangeCalendarOverride" // OpsItemStatusChangeCalendarOverrideApproved is a OpsItemStatus enum value OpsItemStatusChangeCalendarOverrideApproved = "ChangeCalendarOverrideApproved" // OpsItemStatusChangeCalendarOverrideRejected is a OpsItemStatus enum value OpsItemStatusChangeCalendarOverrideRejected = "ChangeCalendarOverrideRejected" // OpsItemStatusPendingApproval is a OpsItemStatus enum value OpsItemStatusPendingApproval = "PendingApproval" // OpsItemStatusApproved is a OpsItemStatus enum value OpsItemStatusApproved = "Approved" // OpsItemStatusRejected is a OpsItemStatus enum value OpsItemStatusRejected = "Rejected" // OpsItemStatusClosed is a OpsItemStatus enum value OpsItemStatusClosed = "Closed" ) // OpsItemStatus_Values returns all elements of the OpsItemStatus enum func OpsItemStatus_Values() []string { return []string{ OpsItemStatusOpen, OpsItemStatusInProgress, OpsItemStatusResolved, OpsItemStatusPending, OpsItemStatusTimedOut, OpsItemStatusCancelling, OpsItemStatusCancelled, OpsItemStatusFailed, OpsItemStatusCompletedWithSuccess, OpsItemStatusCompletedWithFailure, OpsItemStatusScheduled, OpsItemStatusRunbookInProgress, OpsItemStatusPendingChangeCalendarOverride, OpsItemStatusChangeCalendarOverrideApproved, OpsItemStatusChangeCalendarOverrideRejected, OpsItemStatusPendingApproval, OpsItemStatusApproved, OpsItemStatusRejected, OpsItemStatusClosed, } } const ( // ParameterTierStandard is a ParameterTier enum value ParameterTierStandard = "Standard" // ParameterTierAdvanced is a ParameterTier enum value ParameterTierAdvanced = "Advanced" // ParameterTierIntelligentTiering is a ParameterTier enum value ParameterTierIntelligentTiering = "Intelligent-Tiering" ) // ParameterTier_Values returns all elements of the ParameterTier enum func ParameterTier_Values() []string { return []string{ ParameterTierStandard, ParameterTierAdvanced, ParameterTierIntelligentTiering, } } const ( // ParameterTypeString is a ParameterType enum value ParameterTypeString = "String" // ParameterTypeStringList is a ParameterType enum value ParameterTypeStringList = "StringList" // ParameterTypeSecureString is a ParameterType enum value ParameterTypeSecureString = "SecureString" ) // ParameterType_Values returns all elements of the ParameterType enum func ParameterType_Values() []string { return []string{ ParameterTypeString, ParameterTypeStringList, ParameterTypeSecureString, } } const ( // ParametersFilterKeyName is a ParametersFilterKey enum value ParametersFilterKeyName = "Name" // ParametersFilterKeyType is a ParametersFilterKey enum value ParametersFilterKeyType = "Type" // ParametersFilterKeyKeyId is a ParametersFilterKey enum value ParametersFilterKeyKeyId = "KeyId" ) // ParametersFilterKey_Values returns all elements of the ParametersFilterKey enum func ParametersFilterKey_Values() []string { return []string{ ParametersFilterKeyName, ParametersFilterKeyType, ParametersFilterKeyKeyId, } } const ( // PatchActionAllowAsDependency is a PatchAction enum value PatchActionAllowAsDependency = "ALLOW_AS_DEPENDENCY" // PatchActionBlock is a PatchAction enum value PatchActionBlock = "BLOCK" ) // PatchAction_Values returns all elements of the PatchAction enum func PatchAction_Values() []string { return []string{ PatchActionAllowAsDependency, PatchActionBlock, } } const ( // PatchComplianceDataStateInstalled is a PatchComplianceDataState enum value PatchComplianceDataStateInstalled = "INSTALLED" // PatchComplianceDataStateInstalledOther is a PatchComplianceDataState enum value PatchComplianceDataStateInstalledOther = "INSTALLED_OTHER" // PatchComplianceDataStateInstalledPendingReboot is a PatchComplianceDataState enum value PatchComplianceDataStateInstalledPendingReboot = "INSTALLED_PENDING_REBOOT" // PatchComplianceDataStateInstalledRejected is a PatchComplianceDataState enum value PatchComplianceDataStateInstalledRejected = "INSTALLED_REJECTED" // PatchComplianceDataStateMissing is a PatchComplianceDataState enum value PatchComplianceDataStateMissing = "MISSING" // PatchComplianceDataStateNotApplicable is a PatchComplianceDataState enum value PatchComplianceDataStateNotApplicable = "NOT_APPLICABLE" // PatchComplianceDataStateFailed is a PatchComplianceDataState enum value PatchComplianceDataStateFailed = "FAILED" ) // PatchComplianceDataState_Values returns all elements of the PatchComplianceDataState enum func PatchComplianceDataState_Values() []string { return []string{ PatchComplianceDataStateInstalled, PatchComplianceDataStateInstalledOther, PatchComplianceDataStateInstalledPendingReboot, PatchComplianceDataStateInstalledRejected, PatchComplianceDataStateMissing, PatchComplianceDataStateNotApplicable, PatchComplianceDataStateFailed, } } const ( // PatchComplianceLevelCritical is a PatchComplianceLevel enum value PatchComplianceLevelCritical = "CRITICAL" // PatchComplianceLevelHigh is a PatchComplianceLevel enum value PatchComplianceLevelHigh = "HIGH" // PatchComplianceLevelMedium is a PatchComplianceLevel enum value PatchComplianceLevelMedium = "MEDIUM" // PatchComplianceLevelLow is a PatchComplianceLevel enum value PatchComplianceLevelLow = "LOW" // PatchComplianceLevelInformational is a PatchComplianceLevel enum value PatchComplianceLevelInformational = "INFORMATIONAL" // PatchComplianceLevelUnspecified is a PatchComplianceLevel enum value PatchComplianceLevelUnspecified = "UNSPECIFIED" ) // PatchComplianceLevel_Values returns all elements of the PatchComplianceLevel enum func PatchComplianceLevel_Values() []string { return []string{ PatchComplianceLevelCritical, PatchComplianceLevelHigh, PatchComplianceLevelMedium, PatchComplianceLevelLow, PatchComplianceLevelInformational, PatchComplianceLevelUnspecified, } } const ( // PatchDeploymentStatusApproved is a PatchDeploymentStatus enum value PatchDeploymentStatusApproved = "APPROVED" // PatchDeploymentStatusPendingApproval is a PatchDeploymentStatus enum value PatchDeploymentStatusPendingApproval = "PENDING_APPROVAL" // PatchDeploymentStatusExplicitApproved is a PatchDeploymentStatus enum value PatchDeploymentStatusExplicitApproved = "EXPLICIT_APPROVED" // PatchDeploymentStatusExplicitRejected is a PatchDeploymentStatus enum value PatchDeploymentStatusExplicitRejected = "EXPLICIT_REJECTED" ) // PatchDeploymentStatus_Values returns all elements of the PatchDeploymentStatus enum func PatchDeploymentStatus_Values() []string { return []string{ PatchDeploymentStatusApproved, PatchDeploymentStatusPendingApproval, PatchDeploymentStatusExplicitApproved, PatchDeploymentStatusExplicitRejected, } } const ( // PatchFilterKeyArch is a PatchFilterKey enum value PatchFilterKeyArch = "ARCH" // PatchFilterKeyAdvisoryId is a PatchFilterKey enum value PatchFilterKeyAdvisoryId = "ADVISORY_ID" // PatchFilterKeyBugzillaId is a PatchFilterKey enum value PatchFilterKeyBugzillaId = "BUGZILLA_ID" // PatchFilterKeyPatchSet is a PatchFilterKey enum value PatchFilterKeyPatchSet = "PATCH_SET" // PatchFilterKeyProduct is a PatchFilterKey enum value PatchFilterKeyProduct = "PRODUCT" // PatchFilterKeyProductFamily is a PatchFilterKey enum value PatchFilterKeyProductFamily = "PRODUCT_FAMILY" // PatchFilterKeyClassification is a PatchFilterKey enum value PatchFilterKeyClassification = "CLASSIFICATION" // PatchFilterKeyCveId is a PatchFilterKey enum value PatchFilterKeyCveId = "CVE_ID" // PatchFilterKeyEpoch is a PatchFilterKey enum value PatchFilterKeyEpoch = "EPOCH" // PatchFilterKeyMsrcSeverity is a PatchFilterKey enum value PatchFilterKeyMsrcSeverity = "MSRC_SEVERITY" // PatchFilterKeyName is a PatchFilterKey enum value PatchFilterKeyName = "NAME" // PatchFilterKeyPatchId is a PatchFilterKey enum value PatchFilterKeyPatchId = "PATCH_ID" // PatchFilterKeySection is a PatchFilterKey enum value PatchFilterKeySection = "SECTION" // PatchFilterKeyPriority is a PatchFilterKey enum value PatchFilterKeyPriority = "PRIORITY" // PatchFilterKeyRepository is a PatchFilterKey enum value PatchFilterKeyRepository = "REPOSITORY" // PatchFilterKeyRelease is a PatchFilterKey enum value PatchFilterKeyRelease = "RELEASE" // PatchFilterKeySeverity is a PatchFilterKey enum value PatchFilterKeySeverity = "SEVERITY" // PatchFilterKeySecurity is a PatchFilterKey enum value PatchFilterKeySecurity = "SECURITY" // PatchFilterKeyVersion is a PatchFilterKey enum value PatchFilterKeyVersion = "VERSION" ) // PatchFilterKey_Values returns all elements of the PatchFilterKey enum func PatchFilterKey_Values() []string { return []string{ PatchFilterKeyArch, PatchFilterKeyAdvisoryId, PatchFilterKeyBugzillaId, PatchFilterKeyPatchSet, PatchFilterKeyProduct, PatchFilterKeyProductFamily, PatchFilterKeyClassification, PatchFilterKeyCveId, PatchFilterKeyEpoch, PatchFilterKeyMsrcSeverity, PatchFilterKeyName, PatchFilterKeyPatchId, PatchFilterKeySection, PatchFilterKeyPriority, PatchFilterKeyRepository, PatchFilterKeyRelease, PatchFilterKeySeverity, PatchFilterKeySecurity, PatchFilterKeyVersion, } } const ( // PatchOperationTypeScan is a PatchOperationType enum value PatchOperationTypeScan = "Scan" // PatchOperationTypeInstall is a PatchOperationType enum value PatchOperationTypeInstall = "Install" ) // PatchOperationType_Values returns all elements of the PatchOperationType enum func PatchOperationType_Values() []string { return []string{ PatchOperationTypeScan, PatchOperationTypeInstall, } } const ( // PatchPropertyProduct is a PatchProperty enum value PatchPropertyProduct = "PRODUCT" // PatchPropertyProductFamily is a PatchProperty enum value PatchPropertyProductFamily = "PRODUCT_FAMILY" // PatchPropertyClassification is a PatchProperty enum value PatchPropertyClassification = "CLASSIFICATION" // PatchPropertyMsrcSeverity is a PatchProperty enum value PatchPropertyMsrcSeverity = "MSRC_SEVERITY" // PatchPropertyPriority is a PatchProperty enum value PatchPropertyPriority = "PRIORITY" // PatchPropertySeverity is a PatchProperty enum value PatchPropertySeverity = "SEVERITY" ) // PatchProperty_Values returns all elements of the PatchProperty enum func PatchProperty_Values() []string { return []string{ PatchPropertyProduct, PatchPropertyProductFamily, PatchPropertyClassification, PatchPropertyMsrcSeverity, PatchPropertyPriority, PatchPropertySeverity, } } const ( // PatchSetOs is a PatchSet enum value PatchSetOs = "OS" // PatchSetApplication is a PatchSet enum value PatchSetApplication = "APPLICATION" ) // PatchSet_Values returns all elements of the PatchSet enum func PatchSet_Values() []string { return []string{ PatchSetOs, PatchSetApplication, } } const ( // PingStatusOnline is a PingStatus enum value PingStatusOnline = "Online" // PingStatusConnectionLost is a PingStatus enum value PingStatusConnectionLost = "ConnectionLost" // PingStatusInactive is a PingStatus enum value PingStatusInactive = "Inactive" ) // PingStatus_Values returns all elements of the PingStatus enum func PingStatus_Values() []string { return []string{ PingStatusOnline, PingStatusConnectionLost, PingStatusInactive, } } const ( // PlatformTypeWindows is a PlatformType enum value PlatformTypeWindows = "Windows" // PlatformTypeLinux is a PlatformType enum value PlatformTypeLinux = "Linux" // PlatformTypeMacOs is a PlatformType enum value PlatformTypeMacOs = "MacOS" ) // PlatformType_Values returns all elements of the PlatformType enum func PlatformType_Values() []string { return []string{ PlatformTypeWindows, PlatformTypeLinux, PlatformTypeMacOs, } } const ( // RebootOptionRebootIfNeeded is a RebootOption enum value RebootOptionRebootIfNeeded = "RebootIfNeeded" // RebootOptionNoReboot is a RebootOption enum value RebootOptionNoReboot = "NoReboot" ) // RebootOption_Values returns all elements of the RebootOption enum func RebootOption_Values() []string { return []string{ RebootOptionRebootIfNeeded, RebootOptionNoReboot, } } const ( // ResourceDataSyncS3FormatJsonSerDe is a ResourceDataSyncS3Format enum value ResourceDataSyncS3FormatJsonSerDe = "JsonSerDe" ) // ResourceDataSyncS3Format_Values returns all elements of the ResourceDataSyncS3Format enum func ResourceDataSyncS3Format_Values() []string { return []string{ ResourceDataSyncS3FormatJsonSerDe, } } const ( // ResourceTypeManagedInstance is a ResourceType enum value ResourceTypeManagedInstance = "ManagedInstance" // ResourceTypeEc2instance is a ResourceType enum value ResourceTypeEc2instance = "EC2Instance" ) // ResourceType_Values returns all elements of the ResourceType enum func ResourceType_Values() []string { return []string{ ResourceTypeManagedInstance, ResourceTypeEc2instance, } } const ( // ResourceTypeForTaggingDocument is a ResourceTypeForTagging enum value ResourceTypeForTaggingDocument = "Document" // ResourceTypeForTaggingManagedInstance is a ResourceTypeForTagging enum value ResourceTypeForTaggingManagedInstance = "ManagedInstance" // ResourceTypeForTaggingMaintenanceWindow is a ResourceTypeForTagging enum value ResourceTypeForTaggingMaintenanceWindow = "MaintenanceWindow" // ResourceTypeForTaggingParameter is a ResourceTypeForTagging enum value ResourceTypeForTaggingParameter = "Parameter" // ResourceTypeForTaggingPatchBaseline is a ResourceTypeForTagging enum value ResourceTypeForTaggingPatchBaseline = "PatchBaseline" // ResourceTypeForTaggingOpsItem is a ResourceTypeForTagging enum value ResourceTypeForTaggingOpsItem = "OpsItem" // ResourceTypeForTaggingOpsMetadata is a ResourceTypeForTagging enum value ResourceTypeForTaggingOpsMetadata = "OpsMetadata" // ResourceTypeForTaggingAutomation is a ResourceTypeForTagging enum value ResourceTypeForTaggingAutomation = "Automation" // ResourceTypeForTaggingAssociation is a ResourceTypeForTagging enum value ResourceTypeForTaggingAssociation = "Association" ) // ResourceTypeForTagging_Values returns all elements of the ResourceTypeForTagging enum func ResourceTypeForTagging_Values() []string { return []string{ ResourceTypeForTaggingDocument, ResourceTypeForTaggingManagedInstance, ResourceTypeForTaggingMaintenanceWindow, ResourceTypeForTaggingParameter, ResourceTypeForTaggingPatchBaseline, ResourceTypeForTaggingOpsItem, ResourceTypeForTaggingOpsMetadata, ResourceTypeForTaggingAutomation, ResourceTypeForTaggingAssociation, } } const ( // ReviewStatusApproved is a ReviewStatus enum value ReviewStatusApproved = "APPROVED" // ReviewStatusNotReviewed is a ReviewStatus enum value ReviewStatusNotReviewed = "NOT_REVIEWED" // ReviewStatusPending is a ReviewStatus enum value ReviewStatusPending = "PENDING" // ReviewStatusRejected is a ReviewStatus enum value ReviewStatusRejected = "REJECTED" ) // ReviewStatus_Values returns all elements of the ReviewStatus enum func ReviewStatus_Values() []string { return []string{ ReviewStatusApproved, ReviewStatusNotReviewed, ReviewStatusPending, ReviewStatusRejected, } } const ( // SessionFilterKeyInvokedAfter is a SessionFilterKey enum value SessionFilterKeyInvokedAfter = "InvokedAfter" // SessionFilterKeyInvokedBefore is a SessionFilterKey enum value SessionFilterKeyInvokedBefore = "InvokedBefore" // SessionFilterKeyTarget is a SessionFilterKey enum value SessionFilterKeyTarget = "Target" // SessionFilterKeyOwner is a SessionFilterKey enum value SessionFilterKeyOwner = "Owner" // SessionFilterKeyStatus is a SessionFilterKey enum value SessionFilterKeyStatus = "Status" // SessionFilterKeySessionId is a SessionFilterKey enum value SessionFilterKeySessionId = "SessionId" ) // SessionFilterKey_Values returns all elements of the SessionFilterKey enum func SessionFilterKey_Values() []string { return []string{ SessionFilterKeyInvokedAfter, SessionFilterKeyInvokedBefore, SessionFilterKeyTarget, SessionFilterKeyOwner, SessionFilterKeyStatus, SessionFilterKeySessionId, } } const ( // SessionStateActive is a SessionState enum value SessionStateActive = "Active" // SessionStateHistory is a SessionState enum value SessionStateHistory = "History" ) // SessionState_Values returns all elements of the SessionState enum func SessionState_Values() []string { return []string{ SessionStateActive, SessionStateHistory, } } const ( // SessionStatusConnected is a SessionStatus enum value SessionStatusConnected = "Connected" // SessionStatusConnecting is a SessionStatus enum value SessionStatusConnecting = "Connecting" // SessionStatusDisconnected is a SessionStatus enum value SessionStatusDisconnected = "Disconnected" // SessionStatusTerminated is a SessionStatus enum value SessionStatusTerminated = "Terminated" // SessionStatusTerminating is a SessionStatus enum value SessionStatusTerminating = "Terminating" // SessionStatusFailed is a SessionStatus enum value SessionStatusFailed = "Failed" ) // SessionStatus_Values returns all elements of the SessionStatus enum func SessionStatus_Values() []string { return []string{ SessionStatusConnected, SessionStatusConnecting, SessionStatusDisconnected, SessionStatusTerminated, SessionStatusTerminating, SessionStatusFailed, } } const ( // SignalTypeApprove is a SignalType enum value SignalTypeApprove = "Approve" // SignalTypeReject is a SignalType enum value SignalTypeReject = "Reject" // SignalTypeStartStep is a SignalType enum value SignalTypeStartStep = "StartStep" // SignalTypeStopStep is a SignalType enum value SignalTypeStopStep = "StopStep" // SignalTypeResume is a SignalType enum value SignalTypeResume = "Resume" ) // SignalType_Values returns all elements of the SignalType enum func SignalType_Values() []string { return []string{ SignalTypeApprove, SignalTypeReject, SignalTypeStartStep, SignalTypeStopStep, SignalTypeResume, } } const ( // SourceTypeAwsEc2Instance is a SourceType enum value SourceTypeAwsEc2Instance = "AWS::EC2::Instance" // SourceTypeAwsIoTThing is a SourceType enum value SourceTypeAwsIoTThing = "AWS::IoT::Thing" // SourceTypeAwsSsmManagedInstance is a SourceType enum value SourceTypeAwsSsmManagedInstance = "AWS::SSM::ManagedInstance" ) // SourceType_Values returns all elements of the SourceType enum func SourceType_Values() []string { return []string{ SourceTypeAwsEc2Instance, SourceTypeAwsIoTThing, SourceTypeAwsSsmManagedInstance, } } const ( // StepExecutionFilterKeyStartTimeBefore is a StepExecutionFilterKey enum value StepExecutionFilterKeyStartTimeBefore = "StartTimeBefore" // StepExecutionFilterKeyStartTimeAfter is a StepExecutionFilterKey enum value StepExecutionFilterKeyStartTimeAfter = "StartTimeAfter" // StepExecutionFilterKeyStepExecutionStatus is a StepExecutionFilterKey enum value StepExecutionFilterKeyStepExecutionStatus = "StepExecutionStatus" // StepExecutionFilterKeyStepExecutionId is a StepExecutionFilterKey enum value StepExecutionFilterKeyStepExecutionId = "StepExecutionId" // StepExecutionFilterKeyStepName is a StepExecutionFilterKey enum value StepExecutionFilterKeyStepName = "StepName" // StepExecutionFilterKeyAction is a StepExecutionFilterKey enum value StepExecutionFilterKeyAction = "Action" // StepExecutionFilterKeyParentStepExecutionId is a StepExecutionFilterKey enum value StepExecutionFilterKeyParentStepExecutionId = "ParentStepExecutionId" // StepExecutionFilterKeyParentStepIteration is a StepExecutionFilterKey enum value StepExecutionFilterKeyParentStepIteration = "ParentStepIteration" // StepExecutionFilterKeyParentStepIteratorValue is a StepExecutionFilterKey enum value StepExecutionFilterKeyParentStepIteratorValue = "ParentStepIteratorValue" ) // StepExecutionFilterKey_Values returns all elements of the StepExecutionFilterKey enum func StepExecutionFilterKey_Values() []string { return []string{ StepExecutionFilterKeyStartTimeBefore, StepExecutionFilterKeyStartTimeAfter, StepExecutionFilterKeyStepExecutionStatus, StepExecutionFilterKeyStepExecutionId, StepExecutionFilterKeyStepName, StepExecutionFilterKeyAction, StepExecutionFilterKeyParentStepExecutionId, StepExecutionFilterKeyParentStepIteration, StepExecutionFilterKeyParentStepIteratorValue, } } const ( // StopTypeComplete is a StopType enum value StopTypeComplete = "Complete" // StopTypeCancel is a StopType enum value StopTypeCancel = "Cancel" ) // StopType_Values returns all elements of the StopType enum func StopType_Values() []string { return []string{ StopTypeComplete, StopTypeCancel, } } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package ssm provides the client and types for making API // requests to Amazon Simple Systems Manager (SSM). // // Amazon Web Services Systems Manager is the operations hub for your Amazon // Web Services applications and resources and a secure end-to-end management // solution for hybrid cloud environments that enables safe and secure operations // at scale. // // This reference is intended to be used with the Amazon Web Services Systems // Manager User Guide (https://docs.aws.amazon.com/systems-manager/latest/userguide/). // To get started, see Setting up Amazon Web Services Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html). // // Related resources // // - For information about each of the capabilities that comprise Systems // Manager, see Systems Manager capabilities (https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html#systems-manager-capabilities) // in the Amazon Web Services Systems Manager User Guide. // // - For details about predefined runbooks for Automation, a capability of // Amazon Web Services Systems Manager, see the Systems Manager Automation // runbook reference (https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-runbook-reference.html) . // // - For information about AppConfig, a capability of Systems Manager, see // the AppConfig User Guide (https://docs.aws.amazon.com/appconfig/latest/userguide/) // and the AppConfig API Reference (https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/) . // // - For information about Incident Manager, a capability of Systems Manager, // see the Systems Manager Incident Manager User Guide (https://docs.aws.amazon.com/incident-manager/latest/userguide/) // and the Systems Manager Incident Manager API Reference (https://docs.aws.amazon.com/incident-manager/latest/APIReference/) . // // See https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06 for more information on this service. // // See ssm package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/ssm/ // // # Using the Client // // To contact Amazon Simple Systems Manager (SSM) 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 Simple Systems Manager (SSM) client SSM for more // information on creating client for this service. // https://docs.aws.amazon.com/sdk-for-go/api/service/ssm/#New package ssm ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ssm import ( "github.com/aws/aws-sdk-go/private/protocol" ) const ( // ErrCodeAlreadyExistsException for service response error code // "AlreadyExistsException". // // Error returned if an attempt is made to register a patch group with a patch // baseline that is already registered with a different patch baseline. ErrCodeAlreadyExistsException = "AlreadyExistsException" // ErrCodeAssociatedInstances for service response error code // "AssociatedInstances". // // You must disassociate a document from all managed nodes before you can delete // it. ErrCodeAssociatedInstances = "AssociatedInstances" // ErrCodeAssociationAlreadyExists for service response error code // "AssociationAlreadyExists". // // The specified association already exists. ErrCodeAssociationAlreadyExists = "AssociationAlreadyExists" // ErrCodeAssociationDoesNotExist for service response error code // "AssociationDoesNotExist". // // The specified association doesn't exist. ErrCodeAssociationDoesNotExist = "AssociationDoesNotExist" // ErrCodeAssociationExecutionDoesNotExist for service response error code // "AssociationExecutionDoesNotExist". // // The specified execution ID doesn't exist. Verify the ID number and try again. ErrCodeAssociationExecutionDoesNotExist = "AssociationExecutionDoesNotExist" // ErrCodeAssociationLimitExceeded for service response error code // "AssociationLimitExceeded". // // You can have at most 2,000 active associations. ErrCodeAssociationLimitExceeded = "AssociationLimitExceeded" // ErrCodeAssociationVersionLimitExceeded for service response error code // "AssociationVersionLimitExceeded". // // You have reached the maximum number versions allowed for an association. // Each association has a limit of 1,000 versions. ErrCodeAssociationVersionLimitExceeded = "AssociationVersionLimitExceeded" // ErrCodeAutomationDefinitionNotApprovedException for service response error code // "AutomationDefinitionNotApprovedException". // // Indicates that the Change Manager change template used in the change request // was rejected or is still in a pending state. ErrCodeAutomationDefinitionNotApprovedException = "AutomationDefinitionNotApprovedException" // ErrCodeAutomationDefinitionNotFoundException for service response error code // "AutomationDefinitionNotFoundException". // // An Automation runbook with the specified name couldn't be found. ErrCodeAutomationDefinitionNotFoundException = "AutomationDefinitionNotFoundException" // ErrCodeAutomationDefinitionVersionNotFoundException for service response error code // "AutomationDefinitionVersionNotFoundException". // // An Automation runbook with the specified name and version couldn't be found. ErrCodeAutomationDefinitionVersionNotFoundException = "AutomationDefinitionVersionNotFoundException" // ErrCodeAutomationExecutionLimitExceededException for service response error code // "AutomationExecutionLimitExceededException". // // The number of simultaneously running Automation executions exceeded the allowable // limit. ErrCodeAutomationExecutionLimitExceededException = "AutomationExecutionLimitExceededException" // ErrCodeAutomationExecutionNotFoundException for service response error code // "AutomationExecutionNotFoundException". // // There is no automation execution information for the requested automation // execution ID. ErrCodeAutomationExecutionNotFoundException = "AutomationExecutionNotFoundException" // ErrCodeAutomationStepNotFoundException for service response error code // "AutomationStepNotFoundException". // // The specified step name and execution ID don't exist. Verify the information // and try again. ErrCodeAutomationStepNotFoundException = "AutomationStepNotFoundException" // ErrCodeComplianceTypeCountLimitExceededException for service response error code // "ComplianceTypeCountLimitExceededException". // // You specified too many custom compliance types. You can specify a maximum // of 10 different types. ErrCodeComplianceTypeCountLimitExceededException = "ComplianceTypeCountLimitExceededException" // ErrCodeCustomSchemaCountLimitExceededException for service response error code // "CustomSchemaCountLimitExceededException". // // You have exceeded the limit for custom schemas. Delete one or more custom // schemas and try again. ErrCodeCustomSchemaCountLimitExceededException = "CustomSchemaCountLimitExceededException" // ErrCodeDocumentAlreadyExists for service response error code // "DocumentAlreadyExists". // // The specified document already exists. ErrCodeDocumentAlreadyExists = "DocumentAlreadyExists" // ErrCodeDocumentLimitExceeded for service response error code // "DocumentLimitExceeded". // // You can have at most 500 active SSM documents. ErrCodeDocumentLimitExceeded = "DocumentLimitExceeded" // ErrCodeDocumentPermissionLimit for service response error code // "DocumentPermissionLimit". // // The document can't be shared with more Amazon Web Services accounts. You // can specify a maximum of 20 accounts per API operation to share a private // document. // // By default, you can share a private document with a maximum of 1,000 accounts // and publicly share up to five documents. // // If you need to increase the quota for privately or publicly shared Systems // Manager documents, contact Amazon Web Services Support. ErrCodeDocumentPermissionLimit = "DocumentPermissionLimit" // ErrCodeDocumentVersionLimitExceeded for service response error code // "DocumentVersionLimitExceeded". // // The document has too many versions. Delete one or more document versions // and try again. ErrCodeDocumentVersionLimitExceeded = "DocumentVersionLimitExceeded" // ErrCodeDoesNotExistException for service response error code // "DoesNotExistException". // // Error returned when the ID specified for a resource, such as a maintenance // window or patch baseline, doesn't exist. // // For information about resource quotas in Amazon Web Services Systems Manager, // see Systems Manager service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. ErrCodeDoesNotExistException = "DoesNotExistException" // ErrCodeDuplicateDocumentContent for service response error code // "DuplicateDocumentContent". // // The content of the association document matches another document. Change // 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". // // You can't specify a managed node ID in more than one association. ErrCodeDuplicateInstanceId = "DuplicateInstanceId" // ErrCodeFeatureNotAvailableException for service response error code // "FeatureNotAvailableException". // // You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where // the corresponding service isn't available. ErrCodeFeatureNotAvailableException = "FeatureNotAvailableException" // ErrCodeHierarchyLevelLimitExceededException for service response error code // "HierarchyLevelLimitExceededException". // // A hierarchy can have a maximum of 15 levels. For more information, see Requirements // and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the Amazon Web Services Systems Manager User Guide. ErrCodeHierarchyLevelLimitExceededException = "HierarchyLevelLimitExceededException" // ErrCodeHierarchyTypeMismatchException for service response error code // "HierarchyTypeMismatchException". // // Parameter Store doesn't support changing a parameter type in a hierarchy. // For example, you can't change a parameter from a String type to a SecureString // type. You must create a new, unique parameter. ErrCodeHierarchyTypeMismatchException = "HierarchyTypeMismatchException" // ErrCodeIdempotentParameterMismatch for service response error code // "IdempotentParameterMismatch". // // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. ErrCodeIdempotentParameterMismatch = "IdempotentParameterMismatch" // ErrCodeIncompatiblePolicyException for service response error code // "IncompatiblePolicyException". // // There is a conflict in the policies specified for this parameter. You can't, // for example, specify two Expiration policies for a parameter. Review your // policies, and try again. ErrCodeIncompatiblePolicyException = "IncompatiblePolicyException" // ErrCodeInternalServerError for service response error code // "InternalServerError". // // An error occurred on the server side. ErrCodeInternalServerError = "InternalServerError" // ErrCodeInvalidActivation for service response error code // "InvalidActivation". // // The activation isn't valid. The activation might have been deleted, or the // ActivationId and the ActivationCode don't match. ErrCodeInvalidActivation = "InvalidActivation" // ErrCodeInvalidActivationId for service response error code // "InvalidActivationId". // // The activation ID isn't valid. Verify the you entered the correct ActivationId // or ActivationCode and try again. ErrCodeInvalidActivationId = "InvalidActivationId" // ErrCodeInvalidAggregatorException for service response error code // "InvalidAggregatorException". // // The specified aggregator isn't valid for inventory groups. Verify that the // aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. ErrCodeInvalidAggregatorException = "InvalidAggregatorException" // ErrCodeInvalidAllowedPatternException for service response error code // "InvalidAllowedPatternException". // // The request doesn't meet the regular expression requirement. ErrCodeInvalidAllowedPatternException = "InvalidAllowedPatternException" // ErrCodeInvalidAssociation for service response error code // "InvalidAssociation". // // The association isn't valid or doesn't exist. ErrCodeInvalidAssociation = "InvalidAssociation" // ErrCodeInvalidAssociationVersion for service response error code // "InvalidAssociationVersion". // // The version you specified isn't valid. Use ListAssociationVersions to view // all versions of an association according to the association ID. Or, use the // $LATEST parameter to view the latest version of the association. ErrCodeInvalidAssociationVersion = "InvalidAssociationVersion" // ErrCodeInvalidAutomationExecutionParametersException for service response error code // "InvalidAutomationExecutionParametersException". // // The supplied parameters for invoking the specified Automation runbook are // incorrect. For example, they may not match the set of parameters permitted // for the specified Automation document. ErrCodeInvalidAutomationExecutionParametersException = "InvalidAutomationExecutionParametersException" // ErrCodeInvalidAutomationSignalException for service response error code // "InvalidAutomationSignalException". // // The signal isn't valid for the current Automation execution. ErrCodeInvalidAutomationSignalException = "InvalidAutomationSignalException" // ErrCodeInvalidAutomationStatusUpdateException for service response error code // "InvalidAutomationStatusUpdateException". // // The specified update status operation isn't valid. ErrCodeInvalidAutomationStatusUpdateException = "InvalidAutomationStatusUpdateException" // ErrCodeInvalidCommandId for service response error code // "InvalidCommandId". // // The specified command ID isn't valid. Verify the ID and try again. ErrCodeInvalidCommandId = "InvalidCommandId" // ErrCodeInvalidDeleteInventoryParametersException for service response error code // "InvalidDeleteInventoryParametersException". // // One or more of the parameters specified for the delete operation isn't valid. // Verify all parameters and try again. ErrCodeInvalidDeleteInventoryParametersException = "InvalidDeleteInventoryParametersException" // ErrCodeInvalidDeletionIdException for service response error code // "InvalidDeletionIdException". // // The ID specified for the delete operation doesn't exist or isn't valid. Verify // the ID and try again. ErrCodeInvalidDeletionIdException = "InvalidDeletionIdException" // ErrCodeInvalidDocument for service response error code // "InvalidDocument". // // The specified SSM document doesn't exist. ErrCodeInvalidDocument = "InvalidDocument" // ErrCodeInvalidDocumentContent for service response error code // "InvalidDocumentContent". // // The content for the document isn't valid. ErrCodeInvalidDocumentContent = "InvalidDocumentContent" // ErrCodeInvalidDocumentOperation for service response error code // "InvalidDocumentOperation". // // You attempted to delete a document while it is still shared. You must stop // sharing the document before you can delete it. ErrCodeInvalidDocumentOperation = "InvalidDocumentOperation" // ErrCodeInvalidDocumentSchemaVersion for service response error code // "InvalidDocumentSchemaVersion". // // The version of the document schema isn't supported. ErrCodeInvalidDocumentSchemaVersion = "InvalidDocumentSchemaVersion" // ErrCodeInvalidDocumentType for service response error code // "InvalidDocumentType". // // The SSM document type isn't valid. Valid document types are described in // the DocumentType property. ErrCodeInvalidDocumentType = "InvalidDocumentType" // ErrCodeInvalidDocumentVersion for service response error code // "InvalidDocumentVersion". // // The document version isn't valid or doesn't exist. ErrCodeInvalidDocumentVersion = "InvalidDocumentVersion" // ErrCodeInvalidFilter for service response error code // "InvalidFilter". // // The filter name isn't valid. Verify the you entered the correct name and // try again. ErrCodeInvalidFilter = "InvalidFilter" // ErrCodeInvalidFilterKey for service response error code // "InvalidFilterKey". // // The specified key isn't valid. ErrCodeInvalidFilterKey = "InvalidFilterKey" // ErrCodeInvalidFilterOption for service response error code // "InvalidFilterOption". // // The specified filter option isn't valid. Valid options are Equals and BeginsWith. // For Path filter, valid options are Recursive and OneLevel. ErrCodeInvalidFilterOption = "InvalidFilterOption" // ErrCodeInvalidFilterValue for service response error code // "InvalidFilterValue". // // The filter value isn't valid. Verify the value and try again. ErrCodeInvalidFilterValue = "InvalidFilterValue" // ErrCodeInvalidInstanceId for service response error code // "InvalidInstanceId". // // The following problems can cause this exception: // // * You don't have permission to access the managed node. // // * Amazon Web Services Systems Manager Agent(SSM Agent) isn't running. // Verify that SSM Agent is running. // // * SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM // Agent. // // * The managed node isn't in valid state. Valid states are: Running, Pending, // Stopped, and Stopping. Invalid states are: Shutting-down and Terminated. ErrCodeInvalidInstanceId = "InvalidInstanceId" // ErrCodeInvalidInstanceInformationFilterValue for service response error code // "InvalidInstanceInformationFilterValue". // // The specified filter value isn't valid. ErrCodeInvalidInstanceInformationFilterValue = "InvalidInstanceInformationFilterValue" // ErrCodeInvalidInventoryGroupException for service response error code // "InvalidInventoryGroupException". // // The specified inventory group isn't valid. ErrCodeInvalidInventoryGroupException = "InvalidInventoryGroupException" // ErrCodeInvalidInventoryItemContextException for service response error code // "InvalidInventoryItemContextException". // // You specified invalid keys or values in the Context attribute for InventoryItem. // Verify the keys and values, and try again. ErrCodeInvalidInventoryItemContextException = "InvalidInventoryItemContextException" // ErrCodeInvalidInventoryRequestException for service response error code // "InvalidInventoryRequestException". // // The request isn't valid. ErrCodeInvalidInventoryRequestException = "InvalidInventoryRequestException" // ErrCodeInvalidItemContentException for service response error code // "InvalidItemContentException". // // One or more content items isn't valid. ErrCodeInvalidItemContentException = "InvalidItemContentException" // ErrCodeInvalidKeyId for service response error code // "InvalidKeyId". // // The query key ID isn't valid. ErrCodeInvalidKeyId = "InvalidKeyId" // ErrCodeInvalidNextToken for service response error code // "InvalidNextToken". // // The specified token isn't valid. ErrCodeInvalidNextToken = "InvalidNextToken" // ErrCodeInvalidNotificationConfig for service response error code // "InvalidNotificationConfig". // // One or more configuration items isn't valid. Verify that a valid Amazon Resource // Name (ARN) was provided for an Amazon Simple Notification Service topic. ErrCodeInvalidNotificationConfig = "InvalidNotificationConfig" // ErrCodeInvalidOptionException for service response error code // "InvalidOptionException". // // The delete inventory option specified isn't valid. Verify the option and // try again. ErrCodeInvalidOptionException = "InvalidOptionException" // ErrCodeInvalidOutputFolder for service response error code // "InvalidOutputFolder". // // The S3 bucket doesn't exist. ErrCodeInvalidOutputFolder = "InvalidOutputFolder" // ErrCodeInvalidOutputLocation for service response error code // "InvalidOutputLocation". // // The output location isn't valid or doesn't exist. ErrCodeInvalidOutputLocation = "InvalidOutputLocation" // ErrCodeInvalidParameters for service response error code // "InvalidParameters". // // You must specify values for all required parameters in the Amazon Web Services // Systems Manager document (SSM document). You can only supply values to parameters // defined in the SSM document. ErrCodeInvalidParameters = "InvalidParameters" // ErrCodeInvalidPermissionType for service response error code // "InvalidPermissionType". // // The permission type isn't supported. Share is the only supported permission // type. ErrCodeInvalidPermissionType = "InvalidPermissionType" // ErrCodeInvalidPluginName for service response error code // "InvalidPluginName". // // The plugin name isn't valid. ErrCodeInvalidPluginName = "InvalidPluginName" // ErrCodeInvalidPolicyAttributeException for service response error code // "InvalidPolicyAttributeException". // // A policy attribute or its value is invalid. ErrCodeInvalidPolicyAttributeException = "InvalidPolicyAttributeException" // ErrCodeInvalidPolicyTypeException for service response error code // "InvalidPolicyTypeException". // // The policy type isn't supported. Parameter Store supports the following policy // types: Expiration, ExpirationNotification, and NoChangeNotification. ErrCodeInvalidPolicyTypeException = "InvalidPolicyTypeException" // ErrCodeInvalidResourceId for service response error code // "InvalidResourceId". // // The resource ID isn't valid. Verify that you entered the correct ID and try // again. ErrCodeInvalidResourceId = "InvalidResourceId" // ErrCodeInvalidResourceType for service response error code // "InvalidResourceType". // // The resource type isn't valid. For example, if you are attempting to tag // an EC2 instance, the instance must be a registered managed node. ErrCodeInvalidResourceType = "InvalidResourceType" // ErrCodeInvalidResultAttributeException for service response error code // "InvalidResultAttributeException". // // The specified inventory item result attribute isn't valid. ErrCodeInvalidResultAttributeException = "InvalidResultAttributeException" // ErrCodeInvalidRole for service response error code // "InvalidRole". // // The role name can't contain invalid characters. Also verify that you specified // an IAM role for notifications that includes the required trust policy. For // information about configuring the IAM role for Run Command notifications, // see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) // in the Amazon Web Services Systems Manager User Guide. ErrCodeInvalidRole = "InvalidRole" // ErrCodeInvalidSchedule for service response error code // "InvalidSchedule". // // The schedule is invalid. Verify your cron or rate expression and try again. ErrCodeInvalidSchedule = "InvalidSchedule" // ErrCodeInvalidTag for service response error code // "InvalidTag". // // The specified tag key or value isn't valid. ErrCodeInvalidTag = "InvalidTag" // ErrCodeInvalidTarget for service response error code // "InvalidTarget". // // The target isn't valid or doesn't exist. It might not be configured for Systems // Manager or you might not have permission to perform the operation. ErrCodeInvalidTarget = "InvalidTarget" // ErrCodeInvalidTargetMaps for service response error code // "InvalidTargetMaps". // // TargetMap parameter isn't valid. ErrCodeInvalidTargetMaps = "InvalidTargetMaps" // ErrCodeInvalidTypeNameException for service response error code // "InvalidTypeNameException". // // The parameter type name isn't valid. ErrCodeInvalidTypeNameException = "InvalidTypeNameException" // ErrCodeInvalidUpdate for service response error code // "InvalidUpdate". // // The update isn't valid. ErrCodeInvalidUpdate = "InvalidUpdate" // ErrCodeInvocationDoesNotExist for service response error code // "InvocationDoesNotExist". // // The command ID and managed node ID you specified didn't match any invocations. // Verify the command ID and the managed node ID and try again. ErrCodeInvocationDoesNotExist = "InvocationDoesNotExist" // ErrCodeItemContentMismatchException for service response error code // "ItemContentMismatchException". // // The inventory item has invalid content. ErrCodeItemContentMismatchException = "ItemContentMismatchException" // ErrCodeItemSizeLimitExceededException for service response error code // "ItemSizeLimitExceededException". // // The inventory item size has exceeded the size limit. ErrCodeItemSizeLimitExceededException = "ItemSizeLimitExceededException" // ErrCodeMaxDocumentSizeExceeded for service response error code // "MaxDocumentSizeExceeded". // // The size limit of a document is 64 KB. ErrCodeMaxDocumentSizeExceeded = "MaxDocumentSizeExceeded" // ErrCodeOpsItemAccessDeniedException for service response error code // "OpsItemAccessDeniedException". // // You don't have permission to view OpsItems in the specified account. Verify // that your account is configured either as a Systems Manager delegated administrator // or that you are logged into the Organizations management account. ErrCodeOpsItemAccessDeniedException = "OpsItemAccessDeniedException" // ErrCodeOpsItemAlreadyExistsException for service response error code // "OpsItemAlreadyExistsException". // // The OpsItem already exists. ErrCodeOpsItemAlreadyExistsException = "OpsItemAlreadyExistsException" // ErrCodeOpsItemConflictException for service response error code // "OpsItemConflictException". // // The specified OpsItem is in the process of being deleted. ErrCodeOpsItemConflictException = "OpsItemConflictException" // ErrCodeOpsItemInvalidParameterException for service response error code // "OpsItemInvalidParameterException". // // A specified parameter argument isn't valid. Verify the available arguments // and try again. ErrCodeOpsItemInvalidParameterException = "OpsItemInvalidParameterException" // ErrCodeOpsItemLimitExceededException for service response error code // "OpsItemLimitExceededException". // // The request caused OpsItems to exceed one or more quotas. ErrCodeOpsItemLimitExceededException = "OpsItemLimitExceededException" // ErrCodeOpsItemNotFoundException for service response error code // "OpsItemNotFoundException". // // The specified OpsItem ID doesn't exist. Verify the ID and try again. ErrCodeOpsItemNotFoundException = "OpsItemNotFoundException" // ErrCodeOpsItemRelatedItemAlreadyExistsException for service response error code // "OpsItemRelatedItemAlreadyExistsException". // // The Amazon Resource Name (ARN) is already associated with the OpsItem. ErrCodeOpsItemRelatedItemAlreadyExistsException = "OpsItemRelatedItemAlreadyExistsException" // ErrCodeOpsItemRelatedItemAssociationNotFoundException for service response error code // "OpsItemRelatedItemAssociationNotFoundException". // // The association wasn't found using the parameters you specified in the call. // Verify the information and try again. ErrCodeOpsItemRelatedItemAssociationNotFoundException = "OpsItemRelatedItemAssociationNotFoundException" // ErrCodeOpsMetadataAlreadyExistsException for service response error code // "OpsMetadataAlreadyExistsException". // // An OpsMetadata object already exists for the selected resource. ErrCodeOpsMetadataAlreadyExistsException = "OpsMetadataAlreadyExistsException" // ErrCodeOpsMetadataInvalidArgumentException for service response error code // "OpsMetadataInvalidArgumentException". // // One of the arguments passed is invalid. ErrCodeOpsMetadataInvalidArgumentException = "OpsMetadataInvalidArgumentException" // ErrCodeOpsMetadataKeyLimitExceededException for service response error code // "OpsMetadataKeyLimitExceededException". // // The OpsMetadata object exceeds the maximum number of OpsMetadata keys that // you can assign to an application in Application Manager. ErrCodeOpsMetadataKeyLimitExceededException = "OpsMetadataKeyLimitExceededException" // ErrCodeOpsMetadataLimitExceededException for service response error code // "OpsMetadataLimitExceededException". // // Your account reached the maximum number of OpsMetadata objects allowed by // Application Manager. The maximum is 200 OpsMetadata objects. Delete one or // more OpsMetadata object and try again. ErrCodeOpsMetadataLimitExceededException = "OpsMetadataLimitExceededException" // ErrCodeOpsMetadataNotFoundException for service response error code // "OpsMetadataNotFoundException". // // The OpsMetadata object doesn't exist. ErrCodeOpsMetadataNotFoundException = "OpsMetadataNotFoundException" // ErrCodeOpsMetadataTooManyUpdatesException for service response error code // "OpsMetadataTooManyUpdatesException". // // The system is processing too many concurrent updates. Wait a few moments // and try again. ErrCodeOpsMetadataTooManyUpdatesException = "OpsMetadataTooManyUpdatesException" // ErrCodeParameterAlreadyExists for service response error code // "ParameterAlreadyExists". // // The parameter already exists. You can't create duplicate parameters. ErrCodeParameterAlreadyExists = "ParameterAlreadyExists" // ErrCodeParameterLimitExceeded for service response error code // "ParameterLimitExceeded". // // You have exceeded the number of parameters for this Amazon Web Services account. // Delete one or more parameters and try again. ErrCodeParameterLimitExceeded = "ParameterLimitExceeded" // ErrCodeParameterMaxVersionLimitExceeded for service response error code // "ParameterMaxVersionLimitExceeded". // // Parameter Store retains the 100 most recently created versions of a parameter. // After this number of versions has been created, Parameter Store deletes the // oldest version when a new one is created. However, if the oldest version // has a label attached to it, Parameter Store won't delete the version and // instead presents this error message: // // An error occurred (ParameterMaxVersionLimitExceeded) when calling the PutParameter // operation: You attempted to create a new version of parameter-name by calling // the PutParameter API with the overwrite flag. Version version-number, the // oldest version, can't be deleted because it has a label associated with it. // Move the label to another version of the parameter, and try again. // // This safeguard is to prevent parameter versions with mission critical labels // assigned to them from being deleted. To continue creating new parameters, // first move the label from the oldest version of the parameter to a newer // one for use in your operations. For information about moving parameter labels, // see Move a parameter label (console) (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html#sysman-paramstore-labels-console-move) // or Move a parameter label (CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html#sysman-paramstore-labels-cli-move) // in the Amazon Web Services Systems Manager User Guide. ErrCodeParameterMaxVersionLimitExceeded = "ParameterMaxVersionLimitExceeded" // ErrCodeParameterNotFound for service response error code // "ParameterNotFound". // // The parameter couldn't be found. Verify the name and try again. ErrCodeParameterNotFound = "ParameterNotFound" // ErrCodeParameterPatternMismatchException for service response error code // "ParameterPatternMismatchException". // // The parameter name isn't valid. ErrCodeParameterPatternMismatchException = "ParameterPatternMismatchException" // ErrCodeParameterVersionLabelLimitExceeded for service response error code // "ParameterVersionLabelLimitExceeded". // // A parameter version can have a maximum of ten labels. ErrCodeParameterVersionLabelLimitExceeded = "ParameterVersionLabelLimitExceeded" // ErrCodeParameterVersionNotFound for service response error code // "ParameterVersionNotFound". // // The specified parameter version wasn't found. Verify the parameter name and // version, and try again. ErrCodeParameterVersionNotFound = "ParameterVersionNotFound" // ErrCodePoliciesLimitExceededException for service response error code // "PoliciesLimitExceededException". // // You specified more than the maximum number of allowed policies for the parameter. // The maximum is 10. ErrCodePoliciesLimitExceededException = "PoliciesLimitExceededException" // ErrCodeResourceDataSyncAlreadyExistsException for service response error code // "ResourceDataSyncAlreadyExistsException". // // A sync configuration with the same name already exists. ErrCodeResourceDataSyncAlreadyExistsException = "ResourceDataSyncAlreadyExistsException" // ErrCodeResourceDataSyncConflictException for service response error code // "ResourceDataSyncConflictException". // // Another UpdateResourceDataSync request is being processed. Wait a few minutes // and try again. ErrCodeResourceDataSyncConflictException = "ResourceDataSyncConflictException" // ErrCodeResourceDataSyncCountExceededException for service response error code // "ResourceDataSyncCountExceededException". // // You have exceeded the allowed maximum sync configurations. ErrCodeResourceDataSyncCountExceededException = "ResourceDataSyncCountExceededException" // ErrCodeResourceDataSyncInvalidConfigurationException for service response error code // "ResourceDataSyncInvalidConfigurationException". // // The specified sync configuration is invalid. ErrCodeResourceDataSyncInvalidConfigurationException = "ResourceDataSyncInvalidConfigurationException" // ErrCodeResourceDataSyncNotFoundException for service response error code // "ResourceDataSyncNotFoundException". // // The specified sync name wasn't found. ErrCodeResourceDataSyncNotFoundException = "ResourceDataSyncNotFoundException" // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // // Error returned if an attempt is made to delete a patch baseline that is registered // for a patch group. ErrCodeResourceInUseException = "ResourceInUseException" // ErrCodeResourceLimitExceededException for service response error code // "ResourceLimitExceededException". // // Error returned when the caller has exceeded the default resource quotas. // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager // service quotas (https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the Amazon Web Services General Reference. ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" // ErrCodeResourcePolicyConflictException for service response error code // "ResourcePolicyConflictException". // // The hash provided in the call doesn't match the stored hash. This exception // is thrown when trying to update an obsolete policy version or when multiple // requests to update a policy are sent. ErrCodeResourcePolicyConflictException = "ResourcePolicyConflictException" // ErrCodeResourcePolicyInvalidParameterException for service response error code // "ResourcePolicyInvalidParameterException". // // One or more parameters specified for the call aren't valid. Verify the parameters // and their values and try again. ErrCodeResourcePolicyInvalidParameterException = "ResourcePolicyInvalidParameterException" // ErrCodeResourcePolicyLimitExceededException for service response error code // "ResourcePolicyLimitExceededException". // // The PutResourcePolicy API action enforces two limits. A policy can't be greater // than 1024 bytes in size. And only one policy can be attached to OpsItemGroup. // Verify these limits and try again. ErrCodeResourcePolicyLimitExceededException = "ResourcePolicyLimitExceededException" // ErrCodeServiceSettingNotFound for service response error code // "ServiceSettingNotFound". // // The specified service setting wasn't found. Either the service name or the // setting hasn't been provisioned by the Amazon Web Services service team. ErrCodeServiceSettingNotFound = "ServiceSettingNotFound" // ErrCodeStatusUnchanged for service response error code // "StatusUnchanged". // // The updated status is the same as the current status. ErrCodeStatusUnchanged = "StatusUnchanged" // ErrCodeSubTypeCountLimitExceededException for service response error code // "SubTypeCountLimitExceededException". // // The sub-type count exceeded the limit for the inventory type. ErrCodeSubTypeCountLimitExceededException = "SubTypeCountLimitExceededException" // ErrCodeTargetInUseException for service response error code // "TargetInUseException". // // You specified the Safe option for the DeregisterTargetFromMaintenanceWindow // operation, but the target is still referenced in a task. ErrCodeTargetInUseException = "TargetInUseException" // ErrCodeTargetNotConnected for service response error code // "TargetNotConnected". // // The specified target managed node for the session isn't fully configured // for use with Session Manager. For more information, see Getting started with // Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) // in the Amazon Web Services Systems Manager User Guide. This error is also // returned if you attempt to start a session on a managed node that is located // in a different account or Region ErrCodeTargetNotConnected = "TargetNotConnected" // ErrCodeTooManyTagsError for service response error code // "TooManyTagsError". // // The Targets parameter includes too many tags. Remove one or more tags and // try the command again. ErrCodeTooManyTagsError = "TooManyTagsError" // ErrCodeTooManyUpdates for service response error code // "TooManyUpdates". // // There are concurrent updates for a resource that supports one update at a // time. ErrCodeTooManyUpdates = "TooManyUpdates" // ErrCodeTotalSizeLimitExceededException for service response error code // "TotalSizeLimitExceededException". // // The size of inventory data has exceeded the total size limit for the resource. ErrCodeTotalSizeLimitExceededException = "TotalSizeLimitExceededException" // ErrCodeUnsupportedCalendarException for service response error code // "UnsupportedCalendarException". // // The calendar entry contained in the specified SSM document isn't supported. ErrCodeUnsupportedCalendarException = "UnsupportedCalendarException" // ErrCodeUnsupportedFeatureRequiredException for service response error code // "UnsupportedFeatureRequiredException". // // Patching for applications released by Microsoft is only available on EC2 // instances and advanced instances. To patch applications released by Microsoft // on on-premises servers and VMs, you must enable advanced instances. For more // information, see Enabling the advanced-instances tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) // in the Amazon Web Services Systems Manager User Guide. ErrCodeUnsupportedFeatureRequiredException = "UnsupportedFeatureRequiredException" // ErrCodeUnsupportedInventoryItemContextException for service response error code // "UnsupportedInventoryItemContextException". // // The Context attribute that you specified for the InventoryItem isn't allowed // for this inventory type. You can only use the Context attribute with inventory // types like AWS:ComplianceItem. ErrCodeUnsupportedInventoryItemContextException = "UnsupportedInventoryItemContextException" // ErrCodeUnsupportedInventorySchemaVersionException for service response error code // "UnsupportedInventorySchemaVersionException". // // Inventory item type schema version has to match supported versions in the // service. Check output of GetInventorySchema to see the available schema version // for each type. ErrCodeUnsupportedInventorySchemaVersionException = "UnsupportedInventorySchemaVersionException" // ErrCodeUnsupportedOperatingSystem for service response error code // "UnsupportedOperatingSystem". // // The operating systems you specified isn't supported, or the operation isn't // supported for the operating system. ErrCodeUnsupportedOperatingSystem = "UnsupportedOperatingSystem" // ErrCodeUnsupportedParameterType for service response error code // "UnsupportedParameterType". // // The parameter type isn't supported. ErrCodeUnsupportedParameterType = "UnsupportedParameterType" // ErrCodeUnsupportedPlatformType for service response error code // "UnsupportedPlatformType". // // The document doesn't support the platform type of the given managed node // ID(s). For example, you sent an document for a Windows managed node to a // Linux node. ErrCodeUnsupportedPlatformType = "UnsupportedPlatformType" ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "AlreadyExistsException": newErrorAlreadyExistsException, "AssociatedInstances": newErrorAssociatedInstances, "AssociationAlreadyExists": newErrorAssociationAlreadyExists, "AssociationDoesNotExist": newErrorAssociationDoesNotExist, "AssociationExecutionDoesNotExist": newErrorAssociationExecutionDoesNotExist, "AssociationLimitExceeded": newErrorAssociationLimitExceeded, "AssociationVersionLimitExceeded": newErrorAssociationVersionLimitExceeded, "AutomationDefinitionNotApprovedException": newErrorAutomationDefinitionNotApprovedException, "AutomationDefinitionNotFoundException": newErrorAutomationDefinitionNotFoundException, "AutomationDefinitionVersionNotFoundException": newErrorAutomationDefinitionVersionNotFoundException, "AutomationExecutionLimitExceededException": newErrorAutomationExecutionLimitExceededException, "AutomationExecutionNotFoundException": newErrorAutomationExecutionNotFoundException, "AutomationStepNotFoundException": newErrorAutomationStepNotFoundException, "ComplianceTypeCountLimitExceededException": newErrorComplianceTypeCountLimitExceededException, "CustomSchemaCountLimitExceededException": newErrorCustomSchemaCountLimitExceededException, "DocumentAlreadyExists": newErrorDocumentAlreadyExists, "DocumentLimitExceeded": newErrorDocumentLimitExceeded, "DocumentPermissionLimit": newErrorDocumentPermissionLimit, "DocumentVersionLimitExceeded": newErrorDocumentVersionLimitExceeded, "DoesNotExistException": newErrorDoesNotExistException, "DuplicateDocumentContent": newErrorDuplicateDocumentContent, "DuplicateDocumentVersionName": newErrorDuplicateDocumentVersionName, "DuplicateInstanceId": newErrorDuplicateInstanceId, "FeatureNotAvailableException": newErrorFeatureNotAvailableException, "HierarchyLevelLimitExceededException": newErrorHierarchyLevelLimitExceededException, "HierarchyTypeMismatchException": newErrorHierarchyTypeMismatchException, "IdempotentParameterMismatch": newErrorIdempotentParameterMismatch, "IncompatiblePolicyException": newErrorIncompatiblePolicyException, "InternalServerError": newErrorInternalServerError, "InvalidActivation": newErrorInvalidActivation, "InvalidActivationId": newErrorInvalidActivationId, "InvalidAggregatorException": newErrorInvalidAggregatorException, "InvalidAllowedPatternException": newErrorInvalidAllowedPatternException, "InvalidAssociation": newErrorInvalidAssociation, "InvalidAssociationVersion": newErrorInvalidAssociationVersion, "InvalidAutomationExecutionParametersException": newErrorInvalidAutomationExecutionParametersException, "InvalidAutomationSignalException": newErrorInvalidAutomationSignalException, "InvalidAutomationStatusUpdateException": newErrorInvalidAutomationStatusUpdateException, "InvalidCommandId": newErrorInvalidCommandId, "InvalidDeleteInventoryParametersException": newErrorInvalidDeleteInventoryParametersException, "InvalidDeletionIdException": newErrorInvalidDeletionIdException, "InvalidDocument": newErrorInvalidDocument, "InvalidDocumentContent": newErrorInvalidDocumentContent, "InvalidDocumentOperation": newErrorInvalidDocumentOperation, "InvalidDocumentSchemaVersion": newErrorInvalidDocumentSchemaVersion, "InvalidDocumentType": newErrorInvalidDocumentType, "InvalidDocumentVersion": newErrorInvalidDocumentVersion, "InvalidFilter": newErrorInvalidFilter, "InvalidFilterKey": newErrorInvalidFilterKey, "InvalidFilterOption": newErrorInvalidFilterOption, "InvalidFilterValue": newErrorInvalidFilterValue, "InvalidInstanceId": newErrorInvalidInstanceId, "InvalidInstanceInformationFilterValue": newErrorInvalidInstanceInformationFilterValue, "InvalidInventoryGroupException": newErrorInvalidInventoryGroupException, "InvalidInventoryItemContextException": newErrorInvalidInventoryItemContextException, "InvalidInventoryRequestException": newErrorInvalidInventoryRequestException, "InvalidItemContentException": newErrorInvalidItemContentException, "InvalidKeyId": newErrorInvalidKeyId, "InvalidNextToken": newErrorInvalidNextToken, "InvalidNotificationConfig": newErrorInvalidNotificationConfig, "InvalidOptionException": newErrorInvalidOptionException, "InvalidOutputFolder": newErrorInvalidOutputFolder, "InvalidOutputLocation": newErrorInvalidOutputLocation, "InvalidParameters": newErrorInvalidParameters, "InvalidPermissionType": newErrorInvalidPermissionType, "InvalidPluginName": newErrorInvalidPluginName, "InvalidPolicyAttributeException": newErrorInvalidPolicyAttributeException, "InvalidPolicyTypeException": newErrorInvalidPolicyTypeException, "InvalidResourceId": newErrorInvalidResourceId, "InvalidResourceType": newErrorInvalidResourceType, "InvalidResultAttributeException": newErrorInvalidResultAttributeException, "InvalidRole": newErrorInvalidRole, "InvalidSchedule": newErrorInvalidSchedule, "InvalidTag": newErrorInvalidTag, "InvalidTarget": newErrorInvalidTarget, "InvalidTargetMaps": newErrorInvalidTargetMaps, "InvalidTypeNameException": newErrorInvalidTypeNameException, "InvalidUpdate": newErrorInvalidUpdate, "InvocationDoesNotExist": newErrorInvocationDoesNotExist, "ItemContentMismatchException": newErrorItemContentMismatchException, "ItemSizeLimitExceededException": newErrorItemSizeLimitExceededException, "MaxDocumentSizeExceeded": newErrorMaxDocumentSizeExceeded, "OpsItemAccessDeniedException": newErrorOpsItemAccessDeniedException, "OpsItemAlreadyExistsException": newErrorOpsItemAlreadyExistsException, "OpsItemConflictException": newErrorOpsItemConflictException, "OpsItemInvalidParameterException": newErrorOpsItemInvalidParameterException, "OpsItemLimitExceededException": newErrorOpsItemLimitExceededException, "OpsItemNotFoundException": newErrorOpsItemNotFoundException, "OpsItemRelatedItemAlreadyExistsException": newErrorOpsItemRelatedItemAlreadyExistsException, "OpsItemRelatedItemAssociationNotFoundException": newErrorOpsItemRelatedItemAssociationNotFoundException, "OpsMetadataAlreadyExistsException": newErrorOpsMetadataAlreadyExistsException, "OpsMetadataInvalidArgumentException": newErrorOpsMetadataInvalidArgumentException, "OpsMetadataKeyLimitExceededException": newErrorOpsMetadataKeyLimitExceededException, "OpsMetadataLimitExceededException": newErrorOpsMetadataLimitExceededException, "OpsMetadataNotFoundException": newErrorOpsMetadataNotFoundException, "OpsMetadataTooManyUpdatesException": newErrorOpsMetadataTooManyUpdatesException, "ParameterAlreadyExists": newErrorParameterAlreadyExists, "ParameterLimitExceeded": newErrorParameterLimitExceeded, "ParameterMaxVersionLimitExceeded": newErrorParameterMaxVersionLimitExceeded, "ParameterNotFound": newErrorParameterNotFound, "ParameterPatternMismatchException": newErrorParameterPatternMismatchException, "ParameterVersionLabelLimitExceeded": newErrorParameterVersionLabelLimitExceeded, "ParameterVersionNotFound": newErrorParameterVersionNotFound, "PoliciesLimitExceededException": newErrorPoliciesLimitExceededException, "ResourceDataSyncAlreadyExistsException": newErrorResourceDataSyncAlreadyExistsException, "ResourceDataSyncConflictException": newErrorResourceDataSyncConflictException, "ResourceDataSyncCountExceededException": newErrorResourceDataSyncCountExceededException, "ResourceDataSyncInvalidConfigurationException": newErrorResourceDataSyncInvalidConfigurationException, "ResourceDataSyncNotFoundException": newErrorResourceDataSyncNotFoundException, "ResourceInUseException": newErrorResourceInUseException, "ResourceLimitExceededException": newErrorResourceLimitExceededException, "ResourcePolicyConflictException": newErrorResourcePolicyConflictException, "ResourcePolicyInvalidParameterException": newErrorResourcePolicyInvalidParameterException, "ResourcePolicyLimitExceededException": newErrorResourcePolicyLimitExceededException, "ServiceSettingNotFound": newErrorServiceSettingNotFound, "StatusUnchanged": newErrorStatusUnchanged, "SubTypeCountLimitExceededException": newErrorSubTypeCountLimitExceededException, "TargetInUseException": newErrorTargetInUseException, "TargetNotConnected": newErrorTargetNotConnected, "TooManyTagsError": newErrorTooManyTagsError, "TooManyUpdates": newErrorTooManyUpdates, "TotalSizeLimitExceededException": newErrorTotalSizeLimitExceededException, "UnsupportedCalendarException": newErrorUnsupportedCalendarException, "UnsupportedFeatureRequiredException": newErrorUnsupportedFeatureRequiredException, "UnsupportedInventoryItemContextException": newErrorUnsupportedInventoryItemContextException, "UnsupportedInventorySchemaVersionException": newErrorUnsupportedInventorySchemaVersionException, "UnsupportedOperatingSystem": newErrorUnsupportedOperatingSystem, "UnsupportedParameterType": newErrorUnsupportedParameterType, "UnsupportedPlatformType": newErrorUnsupportedPlatformType, } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssm/service.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ssm import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) // SSM provides the API operation methods for making requests to // Amazon Simple Systems Manager (SSM). See this package's package overview docs // for details on the service. // // SSM methods are safe to use concurrently. It is not safe to // modify mutate any of the struct's properties though. type SSM 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 = "ssm" // Name of service. EndpointsID = ServiceName // ID to lookup a service endpoint with. ServiceID = "SSM" // ServiceID is a unique identifier of a specific service. ) // New creates a new instance of the SSM client with a session. // If additional configuration is needed for the client instance use the optional // aws.Config parameter to add your extra config. // // Example: // // mySession := session.Must(session.NewSession()) // // // Create a SSM client from just a session. // svc := ssm.New(mySession) // // // Create a SSM client with additional configuration // svc := ssm.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSM { c := p.ClientConfig(EndpointsID, cfgs...) if c.SigningNameDerived || len(c.SigningName) == 0 { c.SigningName = EndpointsID // No Fallback } return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) } // newClient creates, initializes and returns a new service client instance. func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *SSM { svc := &SSM{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: ServiceName, ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, PartitionID: partitionID, Endpoint: endpoint, APIVersion: "2014-11-06", ResolvedRegion: resolvedRegion, JSONVersion: "1.1", TargetPrefix: "AmazonSSM", }, 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( protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), ) // Run custom client initialization if present if initClient != nil { initClient(svc.Client) } return svc } // newRequest creates a new request for a SSM operation and runs any // custom request initialization. func (c *SSM) 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssm/waiters.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ssm import ( "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" ) // WaitUntilCommandExecuted uses the Amazon SSM API operation // GetCommandInvocation 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 *SSM) WaitUntilCommandExecuted(input *GetCommandInvocationInput) error { return c.WaitUntilCommandExecutedWithContext(aws.BackgroundContext(), input) } // WaitUntilCommandExecutedWithContext is an extended version of WaitUntilCommandExecuted. // 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 *SSM) WaitUntilCommandExecutedWithContext(ctx aws.Context, input *GetCommandInvocationInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilCommandExecuted", MaxAttempts: 20, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.RetryWaiterState, Matcher: request.PathWaiterMatch, Argument: "Status", Expected: "Pending", }, { State: request.RetryWaiterState, Matcher: request.PathWaiterMatch, Argument: "Status", Expected: "InProgress", }, { State: request.RetryWaiterState, Matcher: request.PathWaiterMatch, Argument: "Status", Expected: "Delayed", }, { State: request.SuccessWaiterState, Matcher: request.PathWaiterMatch, Argument: "Status", Expected: "Success", }, { State: request.FailureWaiterState, Matcher: request.PathWaiterMatch, Argument: "Status", Expected: "Cancelled", }, { State: request.FailureWaiterState, Matcher: request.PathWaiterMatch, Argument: "Status", Expected: "TimedOut", }, { State: request.FailureWaiterState, Matcher: request.PathWaiterMatch, Argument: "Status", Expected: "Failed", }, { State: request.FailureWaiterState, Matcher: request.PathWaiterMatch, Argument: "Status", Expected: "Cancelling", }, { State: request.RetryWaiterState, Matcher: request.ErrorWaiterMatch, Expected: "InvocationDoesNotExist", }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *GetCommandInvocationInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetCommandInvocationRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sso/api.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package sso import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/restjson" ) const opGetRoleCredentials = "GetRoleCredentials" // GetRoleCredentialsRequest generates a "aws/request.Request" representing the // client's request for the GetRoleCredentials operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetRoleCredentials for more information on using the GetRoleCredentials // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetRoleCredentialsRequest method. // req, resp := client.GetRoleCredentialsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *request.Request, output *GetRoleCredentialsOutput) { op := &request.Operation{ Name: opGetRoleCredentials, HTTPMethod: "GET", HTTPPath: "/federation/credentials", } if input == nil { input = &GetRoleCredentialsInput{} } output = &GetRoleCredentialsOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return } // GetRoleCredentials API operation for AWS Single Sign-On. // // Returns the STS short-term credentials for a given role name that is assigned // to the user. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Single Sign-On's // API operation GetRoleCredentials for usage and error information. // // Returned Error Types: // // - InvalidRequestException // Indicates that a problem occurred with the input to the request. For example, // a required parameter might be missing or out of range. // // - UnauthorizedException // Indicates that the request is not authorized. This can happen due to an invalid // access token in the request. // // - TooManyRequestsException // Indicates that the request is being made too frequently and is more than // what the server can handle. // // - ResourceNotFoundException // The specified resource doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials func (c *SSO) GetRoleCredentials(input *GetRoleCredentialsInput) (*GetRoleCredentialsOutput, error) { req, out := c.GetRoleCredentialsRequest(input) return out, req.Send() } // GetRoleCredentialsWithContext is the same as GetRoleCredentials with the addition of // the ability to pass a context and additional request options. // // See GetRoleCredentials for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSO) GetRoleCredentialsWithContext(ctx aws.Context, input *GetRoleCredentialsInput, opts ...request.Option) (*GetRoleCredentialsOutput, error) { req, out := c.GetRoleCredentialsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListAccountRoles = "ListAccountRoles" // ListAccountRolesRequest generates a "aws/request.Request" representing the // client's request for the ListAccountRoles operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListAccountRoles for more information on using the ListAccountRoles // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListAccountRolesRequest method. // req, resp := client.ListAccountRolesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *request.Request, output *ListAccountRolesOutput) { op := &request.Operation{ Name: opListAccountRoles, HTTPMethod: "GET", HTTPPath: "/assignment/roles", Paginator: &request.Paginator{ InputTokens: []string{"nextToken"}, OutputTokens: []string{"nextToken"}, LimitToken: "maxResults", TruncationToken: "", }, } if input == nil { input = &ListAccountRolesInput{} } output = &ListAccountRolesOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return } // ListAccountRoles API operation for AWS Single Sign-On. // // Lists all roles that are assigned to the user for a given AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Single Sign-On's // API operation ListAccountRoles for usage and error information. // // Returned Error Types: // // - InvalidRequestException // Indicates that a problem occurred with the input to the request. For example, // a required parameter might be missing or out of range. // // - UnauthorizedException // Indicates that the request is not authorized. This can happen due to an invalid // access token in the request. // // - TooManyRequestsException // Indicates that the request is being made too frequently and is more than // what the server can handle. // // - ResourceNotFoundException // The specified resource doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles func (c *SSO) ListAccountRoles(input *ListAccountRolesInput) (*ListAccountRolesOutput, error) { req, out := c.ListAccountRolesRequest(input) return out, req.Send() } // ListAccountRolesWithContext is the same as ListAccountRoles with the addition of // the ability to pass a context and additional request options. // // See ListAccountRoles for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSO) ListAccountRolesWithContext(ctx aws.Context, input *ListAccountRolesInput, opts ...request.Option) (*ListAccountRolesOutput, error) { req, out := c.ListAccountRolesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListAccountRolesPages iterates over the pages of a ListAccountRoles operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListAccountRoles method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // // // Example iterating over at most 3 pages of a ListAccountRoles operation. // pageNum := 0 // err := client.ListAccountRolesPages(params, // func(page *sso.ListAccountRolesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSO) ListAccountRolesPages(input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool) error { return c.ListAccountRolesPagesWithContext(aws.BackgroundContext(), input, fn) } // ListAccountRolesPagesWithContext same as ListAccountRolesPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSO) ListAccountRolesPagesWithContext(ctx aws.Context, input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListAccountRolesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListAccountRolesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListAccountRolesOutput), !p.HasNextPage()) { break } } return p.Err() } const opListAccounts = "ListAccounts" // ListAccountsRequest generates a "aws/request.Request" representing the // client's request for the ListAccounts operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListAccounts for more information on using the ListAccounts // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the ListAccountsRequest method. // req, resp := client.ListAccountsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) { op := &request.Operation{ Name: opListAccounts, HTTPMethod: "GET", HTTPPath: "/assignment/accounts", Paginator: &request.Paginator{ InputTokens: []string{"nextToken"}, OutputTokens: []string{"nextToken"}, LimitToken: "maxResults", TruncationToken: "", }, } if input == nil { input = &ListAccountsInput{} } output = &ListAccountsOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return } // ListAccounts API operation for AWS Single Sign-On. // // Lists all AWS accounts assigned to the user. These AWS accounts are assigned // by the administrator of the account. For more information, see Assign User // Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers) // in the IAM Identity Center User Guide. This operation returns a paginated // response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Single Sign-On's // API operation ListAccounts for usage and error information. // // Returned Error Types: // // - InvalidRequestException // Indicates that a problem occurred with the input to the request. For example, // a required parameter might be missing or out of range. // // - UnauthorizedException // Indicates that the request is not authorized. This can happen due to an invalid // access token in the request. // // - TooManyRequestsException // Indicates that the request is being made too frequently and is more than // what the server can handle. // // - ResourceNotFoundException // The specified resource doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts func (c *SSO) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) { req, out := c.ListAccountsRequest(input) return out, req.Send() } // ListAccountsWithContext is the same as ListAccounts with the addition of // the ability to pass a context and additional request options. // // See ListAccounts for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSO) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error) { req, out := c.ListAccountsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // ListAccountsPages iterates over the pages of a ListAccounts operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // // See ListAccounts method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // // // Example iterating over at most 3 pages of a ListAccounts operation. // pageNum := 0 // err := client.ListAccountsPages(params, // func(page *sso.ListAccountsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) func (c *SSO) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error { return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn) } // ListAccountsPagesWithContext same as ListAccountsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSO) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListAccountsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListAccountsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) { break } } return p.Err() } const opLogout = "Logout" // LogoutRequest generates a "aws/request.Request" representing the // client's request for the Logout operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See Logout for more information on using the Logout // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the LogoutRequest method. // req, resp := client.LogoutRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *LogoutOutput) { op := &request.Operation{ Name: opLogout, HTTPMethod: "POST", HTTPPath: "/logout", } if input == nil { input = &LogoutInput{} } output = &LogoutOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // Logout API operation for AWS Single Sign-On. // // Removes the locally stored SSO tokens from the client-side cache and sends // an API call to the IAM Identity Center service to invalidate the corresponding // server-side IAM Identity Center sign in session. // // If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM // Identity Center sign in session is used to obtain an IAM session, as specified // in the corresponding IAM Identity Center permission set. More specifically, // IAM Identity Center assumes an IAM role in the target account on behalf of // the user, and the corresponding temporary AWS credentials are returned to // the client. // // After user logout, any existing IAM role sessions that were created by using // IAM Identity Center permission sets continue based on the duration configured // in the permission set. For more information, see User authentications (https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html) // in the IAM Identity Center 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 Single Sign-On's // API operation Logout for usage and error information. // // Returned Error Types: // // - InvalidRequestException // Indicates that a problem occurred with the input to the request. For example, // a required parameter might be missing or out of range. // // - UnauthorizedException // Indicates that the request is not authorized. This can happen due to an invalid // access token in the request. // // - TooManyRequestsException // Indicates that the request is being made too frequently and is more than // what the server can handle. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout func (c *SSO) Logout(input *LogoutInput) (*LogoutOutput, error) { req, out := c.LogoutRequest(input) return out, req.Send() } // LogoutWithContext is the same as Logout with the addition of // the ability to pass a context and additional request options. // // See Logout for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSO) LogoutWithContext(ctx aws.Context, input *LogoutInput, opts ...request.Option) (*LogoutOutput, error) { req, out := c.LogoutRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // Provides information about your AWS account. type AccountInfo struct { _ struct{} `type:"structure"` // The identifier of the AWS account that is assigned to the user. AccountId *string `locationName:"accountId" type:"string"` // The display name of the AWS account that is assigned to the user. AccountName *string `locationName:"accountName" type:"string"` // The email address of the AWS account that is assigned to the user. EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AccountInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AccountInfo) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *AccountInfo) SetAccountId(v string) *AccountInfo { s.AccountId = &v return s } // SetAccountName sets the AccountName field's value. func (s *AccountInfo) SetAccountName(v string) *AccountInfo { s.AccountName = &v return s } // SetEmailAddress sets the EmailAddress field's value. func (s *AccountInfo) SetEmailAddress(v string) *AccountInfo { s.EmailAddress = &v return s } type GetRoleCredentialsInput struct { _ struct{} `type:"structure" nopayload:"true"` // The token issued by the CreateToken API call. For more information, see CreateToken // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) // in the IAM Identity Center OIDC API Reference Guide. // // AccessToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by GetRoleCredentialsInput's // String and GoString methods. // // AccessToken is a required field AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` // The identifier for the AWS account that is assigned to the user. // // AccountId is a required field AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"` // The friendly name of the role that is assigned to the user. // // RoleName is a required field RoleName *string `location:"querystring" locationName:"role_name" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetRoleCredentialsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetRoleCredentialsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetRoleCredentialsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetRoleCredentialsInput"} if s.AccessToken == nil { invalidParams.Add(request.NewErrParamRequired("AccessToken")) } if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } if s.RoleName == nil { invalidParams.Add(request.NewErrParamRequired("RoleName")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccessToken sets the AccessToken field's value. func (s *GetRoleCredentialsInput) SetAccessToken(v string) *GetRoleCredentialsInput { s.AccessToken = &v return s } // SetAccountId sets the AccountId field's value. func (s *GetRoleCredentialsInput) SetAccountId(v string) *GetRoleCredentialsInput { s.AccountId = &v return s } // SetRoleName sets the RoleName field's value. func (s *GetRoleCredentialsInput) SetRoleName(v string) *GetRoleCredentialsInput { s.RoleName = &v return s } type GetRoleCredentialsOutput struct { _ struct{} `type:"structure"` // The credentials for the role that is assigned to the user. RoleCredentials *RoleCredentials `locationName:"roleCredentials" type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetRoleCredentialsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetRoleCredentialsOutput) GoString() string { return s.String() } // SetRoleCredentials sets the RoleCredentials field's value. func (s *GetRoleCredentialsOutput) SetRoleCredentials(v *RoleCredentials) *GetRoleCredentialsOutput { s.RoleCredentials = v return s } // Indicates that a problem occurred with the input to the request. For example, // a required parameter might be missing or out of range. type InvalidRequestException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRequestException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRequestException) GoString() string { return s.String() } func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidRequestException) OrigErr() error { return nil } func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidRequestException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidRequestException) RequestID() string { return s.RespMetadata.RequestID } type ListAccountRolesInput struct { _ struct{} `type:"structure" nopayload:"true"` // The token issued by the CreateToken API call. For more information, see CreateToken // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) // in the IAM Identity Center OIDC API Reference Guide. // // AccessToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by ListAccountRolesInput's // String and GoString methods. // // AccessToken is a required field AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` // The identifier for the AWS account that is assigned to the user. // // AccountId is a required field AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"` // The number of items that clients can request per page. MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"` // The page token from the previous response output when you request subsequent // pages. NextToken *string `location:"querystring" locationName:"next_token" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAccountRolesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAccountRolesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListAccountRolesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListAccountRolesInput"} if s.AccessToken == nil { invalidParams.Add(request.NewErrParamRequired("AccessToken")) } if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccessToken sets the AccessToken field's value. func (s *ListAccountRolesInput) SetAccessToken(v string) *ListAccountRolesInput { s.AccessToken = &v return s } // SetAccountId sets the AccountId field's value. func (s *ListAccountRolesInput) SetAccountId(v string) *ListAccountRolesInput { s.AccountId = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListAccountRolesInput) SetMaxResults(v int64) *ListAccountRolesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListAccountRolesInput) SetNextToken(v string) *ListAccountRolesInput { s.NextToken = &v return s } type ListAccountRolesOutput struct { _ struct{} `type:"structure"` // The page token client that is used to retrieve the list of accounts. NextToken *string `locationName:"nextToken" type:"string"` // A paginated response with the list of roles and the next token if more results // are available. RoleList []*RoleInfo `locationName:"roleList" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAccountRolesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAccountRolesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. func (s *ListAccountRolesOutput) SetNextToken(v string) *ListAccountRolesOutput { s.NextToken = &v return s } // SetRoleList sets the RoleList field's value. func (s *ListAccountRolesOutput) SetRoleList(v []*RoleInfo) *ListAccountRolesOutput { s.RoleList = v return s } type ListAccountsInput struct { _ struct{} `type:"structure" nopayload:"true"` // The token issued by the CreateToken API call. For more information, see CreateToken // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) // in the IAM Identity Center OIDC API Reference Guide. // // AccessToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by ListAccountsInput's // String and GoString methods. // // AccessToken is a required field AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` // This is the number of items clients can request per page. MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"` // (Optional) When requesting subsequent pages, this is the page token from // the previous response output. NextToken *string `location:"querystring" locationName:"next_token" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAccountsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAccountsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ListAccountsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListAccountsInput"} if s.AccessToken == nil { invalidParams.Add(request.NewErrParamRequired("AccessToken")) } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccessToken sets the AccessToken field's value. func (s *ListAccountsInput) SetAccessToken(v string) *ListAccountsInput { s.AccessToken = &v return s } // SetMaxResults sets the MaxResults field's value. func (s *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput { s.NextToken = &v return s } type ListAccountsOutput struct { _ struct{} `type:"structure"` // A paginated response with the list of account information and the next token // if more results are available. AccountList []*AccountInfo `locationName:"accountList" type:"list"` // The page token client that is used to retrieve the list of accounts. NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAccountsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ListAccountsOutput) GoString() string { return s.String() } // SetAccountList sets the AccountList field's value. func (s *ListAccountsOutput) SetAccountList(v []*AccountInfo) *ListAccountsOutput { s.AccountList = v return s } // SetNextToken sets the NextToken field's value. func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput { s.NextToken = &v return s } type LogoutInput struct { _ struct{} `type:"structure" nopayload:"true"` // The token issued by the CreateToken API call. For more information, see CreateToken // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) // in the IAM Identity Center OIDC API Reference Guide. // // AccessToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by LogoutInput's // String and GoString methods. // // AccessToken is a required field AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LogoutInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LogoutInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *LogoutInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "LogoutInput"} if s.AccessToken == nil { invalidParams.Add(request.NewErrParamRequired("AccessToken")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccessToken sets the AccessToken field's value. func (s *LogoutInput) SetAccessToken(v string) *LogoutInput { s.AccessToken = &v return s } type LogoutOutput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LogoutOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s LogoutOutput) GoString() string { return s.String() } // The specified resource doesn't exist. type ResourceNotFoundException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceNotFoundException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ResourceNotFoundException) GoString() string { return s.String() } func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ResourceNotFoundException) OrigErr() error { return nil } func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *ResourceNotFoundException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ResourceNotFoundException) RequestID() string { return s.RespMetadata.RequestID } // Provides information about the role credentials that are assigned to the // user. type RoleCredentials struct { _ struct{} `type:"structure"` // The identifier used for the temporary security credentials. For more information, // see Using Temporary Security Credentials to Request Access to AWS Resources // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) // in the AWS IAM User Guide. AccessKeyId *string `locationName:"accessKeyId" type:"string"` // The date on which temporary security credentials expire. Expiration *int64 `locationName:"expiration" type:"long"` // The key that is used to sign the request. For more information, see Using // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) // in the AWS IAM User Guide. // // SecretAccessKey is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by RoleCredentials's // String and GoString methods. SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"` // The token used for temporary credentials. For more information, see Using // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) // in the AWS IAM User Guide. // // SessionToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by RoleCredentials's // String and GoString methods. SessionToken *string `locationName:"sessionToken" type:"string" sensitive:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RoleCredentials) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RoleCredentials) GoString() string { return s.String() } // SetAccessKeyId sets the AccessKeyId field's value. func (s *RoleCredentials) SetAccessKeyId(v string) *RoleCredentials { s.AccessKeyId = &v return s } // SetExpiration sets the Expiration field's value. func (s *RoleCredentials) SetExpiration(v int64) *RoleCredentials { s.Expiration = &v return s } // SetSecretAccessKey sets the SecretAccessKey field's value. func (s *RoleCredentials) SetSecretAccessKey(v string) *RoleCredentials { s.SecretAccessKey = &v return s } // SetSessionToken sets the SessionToken field's value. func (s *RoleCredentials) SetSessionToken(v string) *RoleCredentials { s.SessionToken = &v return s } // Provides information about the role that is assigned to the user. type RoleInfo struct { _ struct{} `type:"structure"` // The identifier of the AWS account assigned to the user. AccountId *string `locationName:"accountId" type:"string"` // The friendly name of the role that is assigned to the user. RoleName *string `locationName:"roleName" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RoleInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RoleInfo) GoString() string { return s.String() } // SetAccountId sets the AccountId field's value. func (s *RoleInfo) SetAccountId(v string) *RoleInfo { s.AccountId = &v return s } // SetRoleName sets the RoleName field's value. func (s *RoleInfo) SetRoleName(v string) *RoleInfo { s.RoleName = &v return s } // Indicates that the request is being made too frequently and is more than // what the server can handle. type TooManyRequestsException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TooManyRequestsException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s TooManyRequestsException) GoString() string { return s.String() } func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ RespMetadata: v, } } // Code returns the exception type name. func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *TooManyRequestsException) OrigErr() error { return nil } func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *TooManyRequestsException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *TooManyRequestsException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that the request is not authorized. This can happen due to an invalid // access token in the request. type UnauthorizedException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnauthorizedException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnauthorizedException) GoString() string { return s.String() } func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnauthorizedException) OrigErr() error { return nil } func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. func (s *UnauthorizedException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnauthorizedException) RequestID() string { return s.RespMetadata.RequestID } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sso/doc.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package sso provides the client and types for making API // requests to AWS Single Sign-On. // // AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web // service that makes it easy for you to assign user access to IAM Identity // Center resources such as the AWS access portal. Users can get AWS account // applications and roles assigned to them and get federated into the application. // // Although AWS Single Sign-On was renamed, the sso and identitystore API namespaces // will continue to retain their original name for backward compatibility purposes. // For more information, see IAM Identity Center rename (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed). // // This reference guide describes the IAM Identity Center Portal operations // that you can call programatically and includes detailed information on data // types and errors. // // AWS provides SDKs that consist of libraries and sample code for various programming // languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs // provide a convenient way to create programmatic access to IAM Identity Center // and other AWS services. For more information about the AWS SDKs, including // how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/). // // See https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10 for more information on this service. // // See sso package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/sso/ // // # Using the Client // // To contact AWS Single Sign-On with the SDK use the New function to create // a new service client. With that client you can make API requests to the service. // These clients are safe to use concurrently. // // See the SDK's documentation for more information on how to use the SDK. // https://docs.aws.amazon.com/sdk-for-go/api/ // // See aws.Config documentation for more information on configuring SDK clients. // https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config // // See the AWS Single Sign-On client SSO for more // information on creating client for this service. // https://docs.aws.amazon.com/sdk-for-go/api/service/sso/#New package sso ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sso/errors.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package sso import ( "github.com/aws/aws-sdk-go/private/protocol" ) const ( // ErrCodeInvalidRequestException for service response error code // "InvalidRequestException". // // Indicates that a problem occurred with the input to the request. For example, // a required parameter might be missing or out of range. ErrCodeInvalidRequestException = "InvalidRequestException" // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // // The specified resource doesn't exist. ErrCodeResourceNotFoundException = "ResourceNotFoundException" // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". // // Indicates that the request is being made too frequently and is more than // what the server can handle. ErrCodeTooManyRequestsException = "TooManyRequestsException" // ErrCodeUnauthorizedException for service response error code // "UnauthorizedException". // // Indicates that the request is not authorized. This can happen due to an invalid // access token in the request. ErrCodeUnauthorizedException = "UnauthorizedException" ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "InvalidRequestException": newErrorInvalidRequestException, "ResourceNotFoundException": newErrorResourceNotFoundException, "TooManyRequestsException": newErrorTooManyRequestsException, "UnauthorizedException": newErrorUnauthorizedException, } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sso/service.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package sso import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/restjson" ) // SSO provides the API operation methods for making requests to // AWS Single Sign-On. See this package's package overview docs // for details on the service. // // SSO methods are safe to use concurrently. It is not safe to // modify mutate any of the struct's properties though. type SSO struct { *client.Client } // Used for custom client initialization logic var initClient func(*client.Client) // Used for custom request initialization logic var initRequest func(*request.Request) // Service information constants const ( ServiceName = "SSO" // Name of service. EndpointsID = "portal.sso" // ID to lookup a service endpoint with. ServiceID = "SSO" // ServiceID is a unique identifier of a specific service. ) // New creates a new instance of the SSO client with a session. // If additional configuration is needed for the client instance use the optional // aws.Config parameter to add your extra config. // // Example: // // mySession := session.Must(session.NewSession()) // // // Create a SSO client from just a session. // svc := sso.New(mySession) // // // Create a SSO client with additional configuration // svc := sso.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSO { c := p.ClientConfig(EndpointsID, cfgs...) if c.SigningNameDerived || len(c.SigningName) == 0 { c.SigningName = "awsssoportal" } return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) } // newClient creates, initializes and returns a new service client instance. func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *SSO { svc := &SSO{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: ServiceName, ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, PartitionID: partitionID, Endpoint: endpoint, APIVersion: "2019-06-10", ResolvedRegion: resolvedRegion, }, handlers, ), } // Handlers svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed( protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), ) // Run custom client initialization if present if initClient != nil { initClient(svc.Client) } return svc } // newRequest creates a new request for a SSO operation and runs any // custom request initialization. func (c *SSO) newRequest(op *request.Operation, params, data interface{}) *request.Request { req := c.NewRequest(op, params, data) // Run custom request initialization if present if initRequest != nil { initRequest(req) } return req } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package ssoiface provides an interface to enable mocking the AWS Single Sign-On service client // for testing your code. // // It is important to note that this interface will have breaking changes // when the service model is updated and adds new API operations, paginators, // and waiters. package ssoiface import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/service/sso" ) // SSOAPI provides an interface to enable mocking the // sso.SSO service client's API operation, // paginators, and waiters. This make unit testing your code that calls out // to the SDK's service client's calls easier. // // The best way to use this interface is so the SDK's service client's calls // can be stubbed out for unit testing your code with the SDK without needing // to inject custom request handlers into the SDK's request pipeline. // // // myFunc uses an SDK service client to make a request to // // AWS Single Sign-On. // func myFunc(svc ssoiface.SSOAPI) bool { // // Make svc.GetRoleCredentials request // } // // func main() { // sess := session.New() // svc := sso.New(sess) // // myFunc(svc) // } // // In your _test.go file: // // // Define a mock struct to be used in your unit tests of myFunc. // type mockSSOClient struct { // ssoiface.SSOAPI // } // func (m *mockSSOClient) GetRoleCredentials(input *sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error) { // // mock response/functionality // } // // func TestMyFunc(t *testing.T) { // // Setup Test // mockSvc := &mockSSOClient{} // // myfunc(mockSvc) // // // Verify myFunc's functionality // } // // It is important to note that this interface will have breaking changes // when the service model is updated and adds new API operations, paginators, // and waiters. Its suggested to use the pattern above for testing, or using // tooling to generate mocks to satisfy the interfaces. type SSOAPI interface { GetRoleCredentials(*sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error) GetRoleCredentialsWithContext(aws.Context, *sso.GetRoleCredentialsInput, ...request.Option) (*sso.GetRoleCredentialsOutput, error) GetRoleCredentialsRequest(*sso.GetRoleCredentialsInput) (*request.Request, *sso.GetRoleCredentialsOutput) ListAccountRoles(*sso.ListAccountRolesInput) (*sso.ListAccountRolesOutput, error) ListAccountRolesWithContext(aws.Context, *sso.ListAccountRolesInput, ...request.Option) (*sso.ListAccountRolesOutput, error) ListAccountRolesRequest(*sso.ListAccountRolesInput) (*request.Request, *sso.ListAccountRolesOutput) ListAccountRolesPages(*sso.ListAccountRolesInput, func(*sso.ListAccountRolesOutput, bool) bool) error ListAccountRolesPagesWithContext(aws.Context, *sso.ListAccountRolesInput, func(*sso.ListAccountRolesOutput, bool) bool, ...request.Option) error ListAccounts(*sso.ListAccountsInput) (*sso.ListAccountsOutput, error) ListAccountsWithContext(aws.Context, *sso.ListAccountsInput, ...request.Option) (*sso.ListAccountsOutput, error) ListAccountsRequest(*sso.ListAccountsInput) (*request.Request, *sso.ListAccountsOutput) ListAccountsPages(*sso.ListAccountsInput, func(*sso.ListAccountsOutput, bool) bool) error ListAccountsPagesWithContext(aws.Context, *sso.ListAccountsInput, func(*sso.ListAccountsOutput, bool) bool, ...request.Option) error Logout(*sso.LogoutInput) (*sso.LogoutOutput, error) LogoutWithContext(aws.Context, *sso.LogoutInput, ...request.Option) (*sso.LogoutOutput, error) LogoutRequest(*sso.LogoutInput) (*request.Request, *sso.LogoutOutput) } var _ SSOAPI = (*sso.SSO)(nil) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssooidc/api.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ssooidc import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" ) const opCreateToken = "CreateToken" // CreateTokenRequest generates a "aws/request.Request" representing the // client's request for the CreateToken operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateToken for more information on using the CreateToken // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateTokenRequest method. // req, resp := client.CreateTokenRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateToken func (c *SSOOIDC) CreateTokenRequest(input *CreateTokenInput) (req *request.Request, output *CreateTokenOutput) { op := &request.Operation{ Name: opCreateToken, HTTPMethod: "POST", HTTPPath: "/token", } if input == nil { input = &CreateTokenInput{} } output = &CreateTokenOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return } // CreateToken API operation for AWS SSO OIDC. // // Creates and returns access and refresh tokens for clients that are authenticated // using client secrets. The access token can be used to fetch short-term credentials // for the assigned AWS accounts or to access application APIs using bearer // authentication. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS SSO OIDC's // API operation CreateToken for usage and error information. // // Returned Error Types: // // - InvalidRequestException // Indicates that something is wrong with the input to the request. For example, // a required parameter might be missing or out of range. // // - InvalidClientException // Indicates that the clientId or clientSecret in the request is invalid. For // example, this can occur when a client sends an incorrect clientId or an expired // clientSecret. // // - InvalidGrantException // Indicates that a request contains an invalid grant. This can occur if a client // makes a CreateToken request with an invalid grant type. // // - UnauthorizedClientException // Indicates that the client is not currently authorized to make the request. // This can happen when a clientId is not issued for a public client. // // - UnsupportedGrantTypeException // Indicates that the grant type in the request is not supported by the service. // // - InvalidScopeException // Indicates that the scope provided in the request is invalid. // // - AuthorizationPendingException // Indicates that a request to authorize a client with an access user session // token is pending. // // - SlowDownException // Indicates that the client is making the request too frequently and is more // than the service can handle. // // - AccessDeniedException // You do not have sufficient access to perform this action. // // - ExpiredTokenException // Indicates that the token issued by the service is expired and is no longer // valid. // // - InternalServerException // Indicates that an error from the service occurred while trying to process // a request. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateToken func (c *SSOOIDC) CreateToken(input *CreateTokenInput) (*CreateTokenOutput, error) { req, out := c.CreateTokenRequest(input) return out, req.Send() } // CreateTokenWithContext is the same as CreateToken with the addition of // the ability to pass a context and additional request options. // // See CreateToken for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSOOIDC) CreateTokenWithContext(ctx aws.Context, input *CreateTokenInput, opts ...request.Option) (*CreateTokenOutput, error) { req, out := c.CreateTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateTokenWithIAM = "CreateTokenWithIAM" // CreateTokenWithIAMRequest generates a "aws/request.Request" representing the // client's request for the CreateTokenWithIAM operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateTokenWithIAM for more information on using the CreateTokenWithIAM // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the CreateTokenWithIAMRequest method. // req, resp := client.CreateTokenWithIAMRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM func (c *SSOOIDC) CreateTokenWithIAMRequest(input *CreateTokenWithIAMInput) (req *request.Request, output *CreateTokenWithIAMOutput) { op := &request.Operation{ Name: opCreateTokenWithIAM, HTTPMethod: "POST", HTTPPath: "/token?aws_iam=t", } if input == nil { input = &CreateTokenWithIAMInput{} } output = &CreateTokenWithIAMOutput{} req = c.newRequest(op, input, output) return } // CreateTokenWithIAM API operation for AWS SSO OIDC. // // Creates and returns access and refresh tokens for clients and applications // that are authenticated using IAM entities. The access token can be used to // fetch short-term credentials for the assigned AWS accounts or to access application // APIs using bearer authentication. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS SSO OIDC's // API operation CreateTokenWithIAM for usage and error information. // // Returned Error Types: // // - InvalidRequestException // Indicates that something is wrong with the input to the request. For example, // a required parameter might be missing or out of range. // // - InvalidClientException // Indicates that the clientId or clientSecret in the request is invalid. For // example, this can occur when a client sends an incorrect clientId or an expired // clientSecret. // // - InvalidGrantException // Indicates that a request contains an invalid grant. This can occur if a client // makes a CreateToken request with an invalid grant type. // // - UnauthorizedClientException // Indicates that the client is not currently authorized to make the request. // This can happen when a clientId is not issued for a public client. // // - UnsupportedGrantTypeException // Indicates that the grant type in the request is not supported by the service. // // - InvalidScopeException // Indicates that the scope provided in the request is invalid. // // - AuthorizationPendingException // Indicates that a request to authorize a client with an access user session // token is pending. // // - SlowDownException // Indicates that the client is making the request too frequently and is more // than the service can handle. // // - AccessDeniedException // You do not have sufficient access to perform this action. // // - ExpiredTokenException // Indicates that the token issued by the service is expired and is no longer // valid. // // - InternalServerException // Indicates that an error from the service occurred while trying to process // a request. // // - InvalidRequestRegionException // Indicates that a token provided as input to the request was issued by and // is only usable by calling IAM Identity Center endpoints in another region. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM func (c *SSOOIDC) CreateTokenWithIAM(input *CreateTokenWithIAMInput) (*CreateTokenWithIAMOutput, error) { req, out := c.CreateTokenWithIAMRequest(input) return out, req.Send() } // CreateTokenWithIAMWithContext is the same as CreateTokenWithIAM with the addition of // the ability to pass a context and additional request options. // // See CreateTokenWithIAM for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSOOIDC) CreateTokenWithIAMWithContext(ctx aws.Context, input *CreateTokenWithIAMInput, opts ...request.Option) (*CreateTokenWithIAMOutput, error) { req, out := c.CreateTokenWithIAMRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opRegisterClient = "RegisterClient" // RegisterClientRequest generates a "aws/request.Request" representing the // client's request for the RegisterClient operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See RegisterClient for more information on using the RegisterClient // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the RegisterClientRequest method. // req, resp := client.RegisterClientRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient func (c *SSOOIDC) RegisterClientRequest(input *RegisterClientInput) (req *request.Request, output *RegisterClientOutput) { op := &request.Operation{ Name: opRegisterClient, HTTPMethod: "POST", HTTPPath: "/client/register", } if input == nil { input = &RegisterClientInput{} } output = &RegisterClientOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return } // RegisterClient API operation for AWS SSO OIDC. // // Registers a client with IAM Identity Center. This allows clients to initiate // device authorization. The output should be persisted for reuse through many // authentication requests. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS SSO OIDC's // API operation RegisterClient for usage and error information. // // Returned Error Types: // // - InvalidRequestException // Indicates that something is wrong with the input to the request. For example, // a required parameter might be missing or out of range. // // - InvalidScopeException // Indicates that the scope provided in the request is invalid. // // - InvalidClientMetadataException // Indicates that the client information sent in the request during registration // is invalid. // // - InternalServerException // Indicates that an error from the service occurred while trying to process // a request. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient func (c *SSOOIDC) RegisterClient(input *RegisterClientInput) (*RegisterClientOutput, error) { req, out := c.RegisterClientRequest(input) return out, req.Send() } // RegisterClientWithContext is the same as RegisterClient with the addition of // the ability to pass a context and additional request options. // // See RegisterClient for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSOOIDC) RegisterClientWithContext(ctx aws.Context, input *RegisterClientInput, opts ...request.Option) (*RegisterClientOutput, error) { req, out := c.RegisterClientRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opStartDeviceAuthorization = "StartDeviceAuthorization" // StartDeviceAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the StartDeviceAuthorization operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See StartDeviceAuthorization for more information on using the StartDeviceAuthorization // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the StartDeviceAuthorizationRequest method. // req, resp := client.StartDeviceAuthorizationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization func (c *SSOOIDC) StartDeviceAuthorizationRequest(input *StartDeviceAuthorizationInput) (req *request.Request, output *StartDeviceAuthorizationOutput) { op := &request.Operation{ Name: opStartDeviceAuthorization, HTTPMethod: "POST", HTTPPath: "/device_authorization", } if input == nil { input = &StartDeviceAuthorizationInput{} } output = &StartDeviceAuthorizationOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return } // StartDeviceAuthorization API operation for AWS SSO OIDC. // // Initiates device authorization by requesting a pair of verification codes // from the authorization 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 SSO OIDC's // API operation StartDeviceAuthorization for usage and error information. // // Returned Error Types: // // - InvalidRequestException // Indicates that something is wrong with the input to the request. For example, // a required parameter might be missing or out of range. // // - InvalidClientException // Indicates that the clientId or clientSecret in the request is invalid. For // example, this can occur when a client sends an incorrect clientId or an expired // clientSecret. // // - UnauthorizedClientException // Indicates that the client is not currently authorized to make the request. // This can happen when a clientId is not issued for a public client. // // - SlowDownException // Indicates that the client is making the request too frequently and is more // than the service can handle. // // - InternalServerException // Indicates that an error from the service occurred while trying to process // a request. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization func (c *SSOOIDC) StartDeviceAuthorization(input *StartDeviceAuthorizationInput) (*StartDeviceAuthorizationOutput, error) { req, out := c.StartDeviceAuthorizationRequest(input) return out, req.Send() } // StartDeviceAuthorizationWithContext is the same as StartDeviceAuthorization with the addition of // the ability to pass a context and additional request options. // // See StartDeviceAuthorization for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *SSOOIDC) StartDeviceAuthorizationWithContext(ctx aws.Context, input *StartDeviceAuthorizationInput, opts ...request.Option) (*StartDeviceAuthorizationOutput, error) { req, out := c.StartDeviceAuthorizationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // You do not have sufficient access to perform this action. type AccessDeniedException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be access_denied. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AccessDeniedException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AccessDeniedException) GoString() string { return s.String() } func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AccessDeniedException) OrigErr() error { return nil } func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *AccessDeniedException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AccessDeniedException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that a request to authorize a client with an access user session // token is pending. type AuthorizationPendingException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be authorization_pending. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AuthorizationPendingException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AuthorizationPendingException) GoString() string { return s.String() } func newErrorAuthorizationPendingException(v protocol.ResponseMetadata) error { return &AuthorizationPendingException{ RespMetadata: v, } } // Code returns the exception type name. func (s *AuthorizationPendingException) Code() string { return "AuthorizationPendingException" } // Message returns the exception's message. func (s *AuthorizationPendingException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *AuthorizationPendingException) OrigErr() error { return nil } func (s *AuthorizationPendingException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *AuthorizationPendingException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *AuthorizationPendingException) RequestID() string { return s.RespMetadata.RequestID } type CreateTokenInput struct { _ struct{} `type:"structure"` // The unique identifier string for the client or application. This value comes // from the result of the RegisterClient API. // // ClientId is a required field ClientId *string `locationName:"clientId" type:"string" required:"true"` // A secret string generated for the client. This value should come from the // persisted result of the RegisterClient API. // // ClientSecret is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenInput's // String and GoString methods. // // ClientSecret is a required field ClientSecret *string `locationName:"clientSecret" type:"string" required:"true" sensitive:"true"` // Used only when calling this API for the Authorization Code grant type. The // short-term code is used to identify this authorization request. This grant // type is currently unsupported for the CreateToken API. Code *string `locationName:"code" type:"string"` // Used only when calling this API for the Device Code grant type. This short-term // code is used to identify this authorization request. This comes from the // result of the StartDeviceAuthorization API. DeviceCode *string `locationName:"deviceCode" type:"string"` // Supports the following OAuth grant types: Device Code and Refresh Token. // Specify either of the following values, depending on the grant type that // you want: // // * Device Code - urn:ietf:params:oauth:grant-type:device_code // // * Refresh Token - refresh_token // // For information about how to obtain the device code, see the StartDeviceAuthorization // topic. // // GrantType is a required field GrantType *string `locationName:"grantType" type:"string" required:"true"` // Used only when calling this API for the Authorization Code grant type. This // value specifies the location of the client or application that has registered // to receive the authorization code. RedirectUri *string `locationName:"redirectUri" type:"string"` // Used only when calling this API for the Refresh Token grant type. This token // is used to refresh short-term tokens, such as the access token, that might // expire. // // For more information about the features and limitations of the current IAM // Identity Center OIDC implementation, see Considerations for Using this Guide // in the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html). // // RefreshToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenInput's // String and GoString methods. RefreshToken *string `locationName:"refreshToken" type:"string" sensitive:"true"` // The list of scopes for which authorization is requested. The access token // that is issued is limited to the scopes that are granted. If this value is // not specified, IAM Identity Center authorizes all scopes that are configured // for the client during the call to RegisterClient. Scope []*string `locationName:"scope" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTokenInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTokenInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateTokenInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateTokenInput"} if s.ClientId == nil { invalidParams.Add(request.NewErrParamRequired("ClientId")) } if s.ClientSecret == nil { invalidParams.Add(request.NewErrParamRequired("ClientSecret")) } if s.GrantType == nil { invalidParams.Add(request.NewErrParamRequired("GrantType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetClientId sets the ClientId field's value. func (s *CreateTokenInput) SetClientId(v string) *CreateTokenInput { s.ClientId = &v return s } // SetClientSecret sets the ClientSecret field's value. func (s *CreateTokenInput) SetClientSecret(v string) *CreateTokenInput { s.ClientSecret = &v return s } // SetCode sets the Code field's value. func (s *CreateTokenInput) SetCode(v string) *CreateTokenInput { s.Code = &v return s } // SetDeviceCode sets the DeviceCode field's value. func (s *CreateTokenInput) SetDeviceCode(v string) *CreateTokenInput { s.DeviceCode = &v return s } // SetGrantType sets the GrantType field's value. func (s *CreateTokenInput) SetGrantType(v string) *CreateTokenInput { s.GrantType = &v return s } // SetRedirectUri sets the RedirectUri field's value. func (s *CreateTokenInput) SetRedirectUri(v string) *CreateTokenInput { s.RedirectUri = &v return s } // SetRefreshToken sets the RefreshToken field's value. func (s *CreateTokenInput) SetRefreshToken(v string) *CreateTokenInput { s.RefreshToken = &v return s } // SetScope sets the Scope field's value. func (s *CreateTokenInput) SetScope(v []*string) *CreateTokenInput { s.Scope = v return s } type CreateTokenOutput struct { _ struct{} `type:"structure"` // A bearer token to access AWS accounts and applications assigned to a user. // // AccessToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenOutput's // String and GoString methods. AccessToken *string `locationName:"accessToken" type:"string" sensitive:"true"` // Indicates the time in seconds when an access token will expire. ExpiresIn *int64 `locationName:"expiresIn" type:"integer"` // The idToken is not implemented or supported. For more information about the // features and limitations of the current IAM Identity Center OIDC implementation, // see Considerations for Using this Guide in the IAM Identity Center OIDC API // Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html). // // A JSON Web Token (JWT) that identifies who is associated with the issued // access token. // // IdToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenOutput's // String and GoString methods. IdToken *string `locationName:"idToken" type:"string" sensitive:"true"` // A token that, if present, can be used to refresh a previously issued access // token that might have expired. // // For more information about the features and limitations of the current IAM // Identity Center OIDC implementation, see Considerations for Using this Guide // in the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html). // // RefreshToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenOutput's // String and GoString methods. RefreshToken *string `locationName:"refreshToken" type:"string" sensitive:"true"` // Used to notify the client that the returned token is an access token. The // supported token type is Bearer. TokenType *string `locationName:"tokenType" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTokenOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTokenOutput) GoString() string { return s.String() } // SetAccessToken sets the AccessToken field's value. func (s *CreateTokenOutput) SetAccessToken(v string) *CreateTokenOutput { s.AccessToken = &v return s } // SetExpiresIn sets the ExpiresIn field's value. func (s *CreateTokenOutput) SetExpiresIn(v int64) *CreateTokenOutput { s.ExpiresIn = &v return s } // SetIdToken sets the IdToken field's value. func (s *CreateTokenOutput) SetIdToken(v string) *CreateTokenOutput { s.IdToken = &v return s } // SetRefreshToken sets the RefreshToken field's value. func (s *CreateTokenOutput) SetRefreshToken(v string) *CreateTokenOutput { s.RefreshToken = &v return s } // SetTokenType sets the TokenType field's value. func (s *CreateTokenOutput) SetTokenType(v string) *CreateTokenOutput { s.TokenType = &v return s } type CreateTokenWithIAMInput struct { _ struct{} `type:"structure"` // Used only when calling this API for the JWT Bearer grant type. This value // specifies the JSON Web Token (JWT) issued by a trusted token issuer. To authorize // a trusted token issuer, configure the JWT Bearer GrantOptions for the application. // // Assertion is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenWithIAMInput's // String and GoString methods. Assertion *string `locationName:"assertion" type:"string" sensitive:"true"` // The unique identifier string for the client or application. This value is // an application ARN that has OAuth grants configured. // // ClientId is a required field ClientId *string `locationName:"clientId" type:"string" required:"true"` // Used only when calling this API for the Authorization Code grant type. This // short-term code is used to identify this authorization request. The code // is obtained through a redirect from IAM Identity Center to a redirect URI // persisted in the Authorization Code GrantOptions for the application. Code *string `locationName:"code" type:"string"` // Supports the following OAuth grant types: Authorization Code, Refresh Token, // JWT Bearer, and Token Exchange. Specify one of the following values, depending // on the grant type that you want: // // * Authorization Code - authorization_code // // * Refresh Token - refresh_token // // * JWT Bearer - urn:ietf:params:oauth:grant-type:jwt-bearer // // * Token Exchange - urn:ietf:params:oauth:grant-type:token-exchange // // GrantType is a required field GrantType *string `locationName:"grantType" type:"string" required:"true"` // Used only when calling this API for the Authorization Code grant type. This // value specifies the location of the client or application that has registered // to receive the authorization code. RedirectUri *string `locationName:"redirectUri" type:"string"` // Used only when calling this API for the Refresh Token grant type. This token // is used to refresh short-term tokens, such as the access token, that might // expire. // // For more information about the features and limitations of the current IAM // Identity Center OIDC implementation, see Considerations for Using this Guide // in the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html). // // RefreshToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenWithIAMInput's // String and GoString methods. RefreshToken *string `locationName:"refreshToken" type:"string" sensitive:"true"` // Used only when calling this API for the Token Exchange grant type. This value // specifies the type of token that the requester can receive. The following // values are supported: // // * Access Token - urn:ietf:params:oauth:token-type:access_token // // * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token RequestedTokenType *string `locationName:"requestedTokenType" type:"string"` // The list of scopes for which authorization is requested. The access token // that is issued is limited to the scopes that are granted. If the value is // not specified, IAM Identity Center authorizes all scopes configured for the // application, including the following default scopes: openid, aws, sts:identity_context. Scope []*string `locationName:"scope" type:"list"` // Used only when calling this API for the Token Exchange grant type. This value // specifies the subject of the exchange. The value of the subject token must // be an access token issued by IAM Identity Center to a different client or // application. The access token must have authorized scopes that indicate the // requested application as a target audience. // // SubjectToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenWithIAMInput's // String and GoString methods. SubjectToken *string `locationName:"subjectToken" type:"string" sensitive:"true"` // Used only when calling this API for the Token Exchange grant type. This value // specifies the type of token that is passed as the subject of the exchange. // The following value is supported: // // * Access Token - urn:ietf:params:oauth:token-type:access_token SubjectTokenType *string `locationName:"subjectTokenType" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTokenWithIAMInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTokenWithIAMInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateTokenWithIAMInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateTokenWithIAMInput"} if s.ClientId == nil { invalidParams.Add(request.NewErrParamRequired("ClientId")) } if s.GrantType == nil { invalidParams.Add(request.NewErrParamRequired("GrantType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAssertion sets the Assertion field's value. func (s *CreateTokenWithIAMInput) SetAssertion(v string) *CreateTokenWithIAMInput { s.Assertion = &v return s } // SetClientId sets the ClientId field's value. func (s *CreateTokenWithIAMInput) SetClientId(v string) *CreateTokenWithIAMInput { s.ClientId = &v return s } // SetCode sets the Code field's value. func (s *CreateTokenWithIAMInput) SetCode(v string) *CreateTokenWithIAMInput { s.Code = &v return s } // SetGrantType sets the GrantType field's value. func (s *CreateTokenWithIAMInput) SetGrantType(v string) *CreateTokenWithIAMInput { s.GrantType = &v return s } // SetRedirectUri sets the RedirectUri field's value. func (s *CreateTokenWithIAMInput) SetRedirectUri(v string) *CreateTokenWithIAMInput { s.RedirectUri = &v return s } // SetRefreshToken sets the RefreshToken field's value. func (s *CreateTokenWithIAMInput) SetRefreshToken(v string) *CreateTokenWithIAMInput { s.RefreshToken = &v return s } // SetRequestedTokenType sets the RequestedTokenType field's value. func (s *CreateTokenWithIAMInput) SetRequestedTokenType(v string) *CreateTokenWithIAMInput { s.RequestedTokenType = &v return s } // SetScope sets the Scope field's value. func (s *CreateTokenWithIAMInput) SetScope(v []*string) *CreateTokenWithIAMInput { s.Scope = v return s } // SetSubjectToken sets the SubjectToken field's value. func (s *CreateTokenWithIAMInput) SetSubjectToken(v string) *CreateTokenWithIAMInput { s.SubjectToken = &v return s } // SetSubjectTokenType sets the SubjectTokenType field's value. func (s *CreateTokenWithIAMInput) SetSubjectTokenType(v string) *CreateTokenWithIAMInput { s.SubjectTokenType = &v return s } type CreateTokenWithIAMOutput struct { _ struct{} `type:"structure"` // A bearer token to access AWS accounts and applications assigned to a user. // // AccessToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenWithIAMOutput's // String and GoString methods. AccessToken *string `locationName:"accessToken" type:"string" sensitive:"true"` // Indicates the time in seconds when an access token will expire. ExpiresIn *int64 `locationName:"expiresIn" type:"integer"` // A JSON Web Token (JWT) that identifies the user associated with the issued // access token. // // IdToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenWithIAMOutput's // String and GoString methods. IdToken *string `locationName:"idToken" type:"string" sensitive:"true"` // Indicates the type of tokens that are issued by IAM Identity Center. The // following values are supported: // // * Access Token - urn:ietf:params:oauth:token-type:access_token // // * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token IssuedTokenType *string `locationName:"issuedTokenType" type:"string"` // A token that, if present, can be used to refresh a previously issued access // token that might have expired. // // For more information about the features and limitations of the current IAM // Identity Center OIDC implementation, see Considerations for Using this Guide // in the IAM Identity Center OIDC API Reference (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html). // // RefreshToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CreateTokenWithIAMOutput's // String and GoString methods. RefreshToken *string `locationName:"refreshToken" type:"string" sensitive:"true"` // The list of scopes for which authorization is granted. The access token that // is issued is limited to the scopes that are granted. Scope []*string `locationName:"scope" type:"list"` // Used to notify the requester that the returned token is an access token. // The supported token type is Bearer. TokenType *string `locationName:"tokenType" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTokenWithIAMOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s CreateTokenWithIAMOutput) GoString() string { return s.String() } // SetAccessToken sets the AccessToken field's value. func (s *CreateTokenWithIAMOutput) SetAccessToken(v string) *CreateTokenWithIAMOutput { s.AccessToken = &v return s } // SetExpiresIn sets the ExpiresIn field's value. func (s *CreateTokenWithIAMOutput) SetExpiresIn(v int64) *CreateTokenWithIAMOutput { s.ExpiresIn = &v return s } // SetIdToken sets the IdToken field's value. func (s *CreateTokenWithIAMOutput) SetIdToken(v string) *CreateTokenWithIAMOutput { s.IdToken = &v return s } // SetIssuedTokenType sets the IssuedTokenType field's value. func (s *CreateTokenWithIAMOutput) SetIssuedTokenType(v string) *CreateTokenWithIAMOutput { s.IssuedTokenType = &v return s } // SetRefreshToken sets the RefreshToken field's value. func (s *CreateTokenWithIAMOutput) SetRefreshToken(v string) *CreateTokenWithIAMOutput { s.RefreshToken = &v return s } // SetScope sets the Scope field's value. func (s *CreateTokenWithIAMOutput) SetScope(v []*string) *CreateTokenWithIAMOutput { s.Scope = v return s } // SetTokenType sets the TokenType field's value. func (s *CreateTokenWithIAMOutput) SetTokenType(v string) *CreateTokenWithIAMOutput { s.TokenType = &v return s } // Indicates that the token issued by the service is expired and is no longer // valid. type ExpiredTokenException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be expired_token. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExpiredTokenException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ExpiredTokenException) GoString() string { return s.String() } func newErrorExpiredTokenException(v protocol.ResponseMetadata) error { return &ExpiredTokenException{ RespMetadata: v, } } // Code returns the exception type name. func (s *ExpiredTokenException) Code() string { return "ExpiredTokenException" } // Message returns the exception's message. func (s *ExpiredTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *ExpiredTokenException) OrigErr() error { return nil } func (s *ExpiredTokenException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *ExpiredTokenException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *ExpiredTokenException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that an error from the service occurred while trying to process // a request. type InternalServerException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be server_error. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InternalServerException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InternalServerException) GoString() string { return s.String() } func newErrorInternalServerException(v protocol.ResponseMetadata) error { return &InternalServerException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InternalServerException) Code() string { return "InternalServerException" } // Message returns the exception's message. func (s *InternalServerException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InternalServerException) OrigErr() error { return nil } func (s *InternalServerException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *InternalServerException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InternalServerException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that the clientId or clientSecret in the request is invalid. For // example, this can occur when a client sends an incorrect clientId or an expired // clientSecret. type InvalidClientException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be invalid_client. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidClientException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidClientException) GoString() string { return s.String() } func newErrorInvalidClientException(v protocol.ResponseMetadata) error { return &InvalidClientException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidClientException) Code() string { return "InvalidClientException" } // Message returns the exception's message. func (s *InvalidClientException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidClientException) OrigErr() error { return nil } func (s *InvalidClientException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidClientException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidClientException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that the client information sent in the request during registration // is invalid. type InvalidClientMetadataException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be invalid_client_metadata. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidClientMetadataException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidClientMetadataException) GoString() string { return s.String() } func newErrorInvalidClientMetadataException(v protocol.ResponseMetadata) error { return &InvalidClientMetadataException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidClientMetadataException) Code() string { return "InvalidClientMetadataException" } // Message returns the exception's message. func (s *InvalidClientMetadataException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidClientMetadataException) OrigErr() error { return nil } func (s *InvalidClientMetadataException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidClientMetadataException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidClientMetadataException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that a request contains an invalid grant. This can occur if a client // makes a CreateToken request with an invalid grant type. type InvalidGrantException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be invalid_grant. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidGrantException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidGrantException) GoString() string { return s.String() } func newErrorInvalidGrantException(v protocol.ResponseMetadata) error { return &InvalidGrantException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidGrantException) Code() string { return "InvalidGrantException" } // Message returns the exception's message. func (s *InvalidGrantException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidGrantException) OrigErr() error { return nil } func (s *InvalidGrantException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidGrantException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidGrantException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that something is wrong with the input to the request. For example, // a required parameter might be missing or out of range. type InvalidRequestException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be invalid_request. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRequestException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRequestException) GoString() string { return s.String() } func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidRequestException) OrigErr() error { return nil } func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidRequestException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidRequestException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that a token provided as input to the request was issued by and // is only usable by calling IAM Identity Center endpoints in another region. type InvalidRequestRegionException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Indicates the IAM Identity Center endpoint which the requester may call with // this token. Endpoint *string `locationName:"endpoint" type:"string"` // Single error code. For this exception the value will be invalid_request. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` // Indicates the region which the requester may call with this token. Region *string `locationName:"region" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRequestRegionException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidRequestRegionException) GoString() string { return s.String() } func newErrorInvalidRequestRegionException(v protocol.ResponseMetadata) error { return &InvalidRequestRegionException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidRequestRegionException) Code() string { return "InvalidRequestRegionException" } // Message returns the exception's message. func (s *InvalidRequestRegionException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidRequestRegionException) OrigErr() error { return nil } func (s *InvalidRequestRegionException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidRequestRegionException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidRequestRegionException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that the scope provided in the request is invalid. type InvalidScopeException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be invalid_scope. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidScopeException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s InvalidScopeException) GoString() string { return s.String() } func newErrorInvalidScopeException(v protocol.ResponseMetadata) error { return &InvalidScopeException{ RespMetadata: v, } } // Code returns the exception type name. func (s *InvalidScopeException) Code() string { return "InvalidScopeException" } // Message returns the exception's message. func (s *InvalidScopeException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *InvalidScopeException) OrigErr() error { return nil } func (s *InvalidScopeException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *InvalidScopeException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *InvalidScopeException) RequestID() string { return s.RespMetadata.RequestID } type RegisterClientInput struct { _ struct{} `type:"structure"` // The friendly name of the client. // // ClientName is a required field ClientName *string `locationName:"clientName" type:"string" required:"true"` // The type of client. The service supports only public as a client type. Anything // other than public will be rejected by the service. // // ClientType is a required field ClientType *string `locationName:"clientType" type:"string" required:"true"` // The list of scopes that are defined by the client. Upon authorization, this // list is used to restrict permissions when granting an access token. Scopes []*string `locationName:"scopes" type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterClientInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterClientInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *RegisterClientInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RegisterClientInput"} if s.ClientName == nil { invalidParams.Add(request.NewErrParamRequired("ClientName")) } if s.ClientType == nil { invalidParams.Add(request.NewErrParamRequired("ClientType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetClientName sets the ClientName field's value. func (s *RegisterClientInput) SetClientName(v string) *RegisterClientInput { s.ClientName = &v return s } // SetClientType sets the ClientType field's value. func (s *RegisterClientInput) SetClientType(v string) *RegisterClientInput { s.ClientType = &v return s } // SetScopes sets the Scopes field's value. func (s *RegisterClientInput) SetScopes(v []*string) *RegisterClientInput { s.Scopes = v return s } type RegisterClientOutput struct { _ struct{} `type:"structure"` // An endpoint that the client can use to request authorization. AuthorizationEndpoint *string `locationName:"authorizationEndpoint" type:"string"` // The unique identifier string for each client. This client uses this identifier // to get authenticated by the service in subsequent calls. ClientId *string `locationName:"clientId" type:"string"` // Indicates the time at which the clientId and clientSecret were issued. ClientIdIssuedAt *int64 `locationName:"clientIdIssuedAt" type:"long"` // A secret string generated for the client. The client will use this string // to get authenticated by the service in subsequent calls. // // ClientSecret is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by RegisterClientOutput's // String and GoString methods. ClientSecret *string `locationName:"clientSecret" type:"string" sensitive:"true"` // Indicates the time at which the clientId and clientSecret will become invalid. ClientSecretExpiresAt *int64 `locationName:"clientSecretExpiresAt" type:"long"` // An endpoint that the client can use to create tokens. TokenEndpoint *string `locationName:"tokenEndpoint" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterClientOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s RegisterClientOutput) GoString() string { return s.String() } // SetAuthorizationEndpoint sets the AuthorizationEndpoint field's value. func (s *RegisterClientOutput) SetAuthorizationEndpoint(v string) *RegisterClientOutput { s.AuthorizationEndpoint = &v return s } // SetClientId sets the ClientId field's value. func (s *RegisterClientOutput) SetClientId(v string) *RegisterClientOutput { s.ClientId = &v return s } // SetClientIdIssuedAt sets the ClientIdIssuedAt field's value. func (s *RegisterClientOutput) SetClientIdIssuedAt(v int64) *RegisterClientOutput { s.ClientIdIssuedAt = &v return s } // SetClientSecret sets the ClientSecret field's value. func (s *RegisterClientOutput) SetClientSecret(v string) *RegisterClientOutput { s.ClientSecret = &v return s } // SetClientSecretExpiresAt sets the ClientSecretExpiresAt field's value. func (s *RegisterClientOutput) SetClientSecretExpiresAt(v int64) *RegisterClientOutput { s.ClientSecretExpiresAt = &v return s } // SetTokenEndpoint sets the TokenEndpoint field's value. func (s *RegisterClientOutput) SetTokenEndpoint(v string) *RegisterClientOutput { s.TokenEndpoint = &v return s } // Indicates that the client is making the request too frequently and is more // than the service can handle. type SlowDownException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be slow_down. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SlowDownException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s SlowDownException) GoString() string { return s.String() } func newErrorSlowDownException(v protocol.ResponseMetadata) error { return &SlowDownException{ RespMetadata: v, } } // Code returns the exception type name. func (s *SlowDownException) Code() string { return "SlowDownException" } // Message returns the exception's message. func (s *SlowDownException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *SlowDownException) OrigErr() error { return nil } func (s *SlowDownException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *SlowDownException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *SlowDownException) RequestID() string { return s.RespMetadata.RequestID } type StartDeviceAuthorizationInput struct { _ struct{} `type:"structure"` // The unique identifier string for the client that is registered with IAM Identity // Center. This value should come from the persisted result of the RegisterClient // API operation. // // ClientId is a required field ClientId *string `locationName:"clientId" type:"string" required:"true"` // A secret string that is generated for the client. This value should come // from the persisted result of the RegisterClient API operation. // // ClientSecret is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by StartDeviceAuthorizationInput's // String and GoString methods. // // ClientSecret is a required field ClientSecret *string `locationName:"clientSecret" type:"string" required:"true" sensitive:"true"` // The URL for the Amazon Web Services access portal. For more information, // see Using the Amazon Web Services access portal (https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html) // in the IAM Identity Center User Guide. // // StartUrl is a required field StartUrl *string `locationName:"startUrl" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartDeviceAuthorizationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartDeviceAuthorizationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *StartDeviceAuthorizationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartDeviceAuthorizationInput"} if s.ClientId == nil { invalidParams.Add(request.NewErrParamRequired("ClientId")) } if s.ClientSecret == nil { invalidParams.Add(request.NewErrParamRequired("ClientSecret")) } if s.StartUrl == nil { invalidParams.Add(request.NewErrParamRequired("StartUrl")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetClientId sets the ClientId field's value. func (s *StartDeviceAuthorizationInput) SetClientId(v string) *StartDeviceAuthorizationInput { s.ClientId = &v return s } // SetClientSecret sets the ClientSecret field's value. func (s *StartDeviceAuthorizationInput) SetClientSecret(v string) *StartDeviceAuthorizationInput { s.ClientSecret = &v return s } // SetStartUrl sets the StartUrl field's value. func (s *StartDeviceAuthorizationInput) SetStartUrl(v string) *StartDeviceAuthorizationInput { s.StartUrl = &v return s } type StartDeviceAuthorizationOutput struct { _ struct{} `type:"structure"` // The short-lived code that is used by the device when polling for a session // token. DeviceCode *string `locationName:"deviceCode" type:"string"` // Indicates the number of seconds in which the verification code will become // invalid. ExpiresIn *int64 `locationName:"expiresIn" type:"integer"` // Indicates the number of seconds the client must wait between attempts when // polling for a session. Interval *int64 `locationName:"interval" type:"integer"` // A one-time user verification code. This is needed to authorize an in-use // device. UserCode *string `locationName:"userCode" type:"string"` // The URI of the verification page that takes the userCode to authorize the // device. VerificationUri *string `locationName:"verificationUri" type:"string"` // An alternate URL that the client can use to automatically launch a browser. // This process skips the manual step in which the user visits the verification // page and enters their code. VerificationUriComplete *string `locationName:"verificationUriComplete" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartDeviceAuthorizationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s StartDeviceAuthorizationOutput) GoString() string { return s.String() } // SetDeviceCode sets the DeviceCode field's value. func (s *StartDeviceAuthorizationOutput) SetDeviceCode(v string) *StartDeviceAuthorizationOutput { s.DeviceCode = &v return s } // SetExpiresIn sets the ExpiresIn field's value. func (s *StartDeviceAuthorizationOutput) SetExpiresIn(v int64) *StartDeviceAuthorizationOutput { s.ExpiresIn = &v return s } // SetInterval sets the Interval field's value. func (s *StartDeviceAuthorizationOutput) SetInterval(v int64) *StartDeviceAuthorizationOutput { s.Interval = &v return s } // SetUserCode sets the UserCode field's value. func (s *StartDeviceAuthorizationOutput) SetUserCode(v string) *StartDeviceAuthorizationOutput { s.UserCode = &v return s } // SetVerificationUri sets the VerificationUri field's value. func (s *StartDeviceAuthorizationOutput) SetVerificationUri(v string) *StartDeviceAuthorizationOutput { s.VerificationUri = &v return s } // SetVerificationUriComplete sets the VerificationUriComplete field's value. func (s *StartDeviceAuthorizationOutput) SetVerificationUriComplete(v string) *StartDeviceAuthorizationOutput { s.VerificationUriComplete = &v return s } // Indicates that the client is not currently authorized to make the request. // This can happen when a clientId is not issued for a public client. type UnauthorizedClientException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be unauthorized_client. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnauthorizedClientException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnauthorizedClientException) GoString() string { return s.String() } func newErrorUnauthorizedClientException(v protocol.ResponseMetadata) error { return &UnauthorizedClientException{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnauthorizedClientException) Code() string { return "UnauthorizedClientException" } // Message returns the exception's message. func (s *UnauthorizedClientException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnauthorizedClientException) OrigErr() error { return nil } func (s *UnauthorizedClientException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *UnauthorizedClientException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnauthorizedClientException) RequestID() string { return s.RespMetadata.RequestID } // Indicates that the grant type in the request is not supported by the service. type UnsupportedGrantTypeException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Single error code. For this exception the value will be unsupported_grant_type. Error_ *string `locationName:"error" type:"string"` // Human-readable text providing additional information, used to assist the // client developer in understanding the error that occurred. Error_description *string `locationName:"error_description" type:"string"` Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedGrantTypeException) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s UnsupportedGrantTypeException) GoString() string { return s.String() } func newErrorUnsupportedGrantTypeException(v protocol.ResponseMetadata) error { return &UnsupportedGrantTypeException{ RespMetadata: v, } } // Code returns the exception type name. func (s *UnsupportedGrantTypeException) Code() string { return "UnsupportedGrantTypeException" } // Message returns the exception's message. func (s *UnsupportedGrantTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" } // OrigErr always returns nil, satisfies awserr.Error interface. func (s *UnsupportedGrantTypeException) OrigErr() error { return nil } func (s *UnsupportedGrantTypeException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. func (s *UnsupportedGrantTypeException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. func (s *UnsupportedGrantTypeException) RequestID() string { return s.RespMetadata.RequestID } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssooidc/doc.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package ssooidc provides the client and types for making API // requests to AWS SSO OIDC. // // IAM Identity Center OpenID Connect (OIDC) is a web service that enables a // client (such as CLI or a native application) to register with IAM Identity // Center. The service also enables the client to fetch the user’s access // token upon successful authentication and authorization with IAM Identity // Center. // // IAM Identity Center uses the sso and identitystore API namespaces. // // # Considerations for Using This Guide // // Before you begin using this guide, we recommend that you first review the // following important information about how the IAM Identity Center OIDC service // works. // // - The IAM Identity Center OIDC service currently implements only the portions // of the OAuth 2.0 Device Authorization Grant standard (https://tools.ietf.org/html/rfc8628 // (https://tools.ietf.org/html/rfc8628)) that are necessary to enable single // sign-on authentication with the CLI. // // - With older versions of the CLI, the service only emits OIDC access tokens, // so to obtain a new token, users must explicitly re-authenticate. To access // the OIDC flow that supports token refresh and doesn’t require re-authentication, // update to the latest CLI version (1.27.10 for CLI V1 and 2.9.0 for CLI // V2) with support for OIDC token refresh and configurable IAM Identity // Center session durations. For more information, see Configure Amazon Web // Services access portal session duration (https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html). // // - The access tokens provided by this service grant access to all Amazon // Web Services account entitlements assigned to an IAM Identity Center user, // not just a particular application. // // - The documentation in this guide does not describe the mechanism to convert // the access token into Amazon Web Services Auth (“sigv4”) credentials // for use with IAM-protected Amazon Web Services service endpoints. For // more information, see GetRoleCredentials (https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html) // in the IAM Identity Center Portal API Reference Guide. // // For general information about IAM Identity Center, see What is IAM Identity // Center? (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) // in the IAM Identity Center User Guide. // // See https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10 for more information on this service. // // See ssooidc package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/ssooidc/ // // # Using the Client // // To contact AWS SSO OIDC 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 SSO OIDC client SSOOIDC for more // information on creating client for this service. // https://docs.aws.amazon.com/sdk-for-go/api/service/ssooidc/#New package ssooidc ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssooidc/errors.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ssooidc import ( "github.com/aws/aws-sdk-go/private/protocol" ) const ( // ErrCodeAccessDeniedException for service response error code // "AccessDeniedException". // // You do not have sufficient access to perform this action. ErrCodeAccessDeniedException = "AccessDeniedException" // ErrCodeAuthorizationPendingException for service response error code // "AuthorizationPendingException". // // Indicates that a request to authorize a client with an access user session // token is pending. ErrCodeAuthorizationPendingException = "AuthorizationPendingException" // ErrCodeExpiredTokenException for service response error code // "ExpiredTokenException". // // Indicates that the token issued by the service is expired and is no longer // valid. ErrCodeExpiredTokenException = "ExpiredTokenException" // ErrCodeInternalServerException for service response error code // "InternalServerException". // // Indicates that an error from the service occurred while trying to process // a request. ErrCodeInternalServerException = "InternalServerException" // ErrCodeInvalidClientException for service response error code // "InvalidClientException". // // Indicates that the clientId or clientSecret in the request is invalid. For // example, this can occur when a client sends an incorrect clientId or an expired // clientSecret. ErrCodeInvalidClientException = "InvalidClientException" // ErrCodeInvalidClientMetadataException for service response error code // "InvalidClientMetadataException". // // Indicates that the client information sent in the request during registration // is invalid. ErrCodeInvalidClientMetadataException = "InvalidClientMetadataException" // ErrCodeInvalidGrantException for service response error code // "InvalidGrantException". // // Indicates that a request contains an invalid grant. This can occur if a client // makes a CreateToken request with an invalid grant type. ErrCodeInvalidGrantException = "InvalidGrantException" // ErrCodeInvalidRequestException for service response error code // "InvalidRequestException". // // Indicates that something is wrong with the input to the request. For example, // a required parameter might be missing or out of range. ErrCodeInvalidRequestException = "InvalidRequestException" // ErrCodeInvalidRequestRegionException for service response error code // "InvalidRequestRegionException". // // Indicates that a token provided as input to the request was issued by and // is only usable by calling IAM Identity Center endpoints in another region. ErrCodeInvalidRequestRegionException = "InvalidRequestRegionException" // ErrCodeInvalidScopeException for service response error code // "InvalidScopeException". // // Indicates that the scope provided in the request is invalid. ErrCodeInvalidScopeException = "InvalidScopeException" // ErrCodeSlowDownException for service response error code // "SlowDownException". // // Indicates that the client is making the request too frequently and is more // than the service can handle. ErrCodeSlowDownException = "SlowDownException" // ErrCodeUnauthorizedClientException for service response error code // "UnauthorizedClientException". // // Indicates that the client is not currently authorized to make the request. // This can happen when a clientId is not issued for a public client. ErrCodeUnauthorizedClientException = "UnauthorizedClientException" // ErrCodeUnsupportedGrantTypeException for service response error code // "UnsupportedGrantTypeException". // // Indicates that the grant type in the request is not supported by the service. ErrCodeUnsupportedGrantTypeException = "UnsupportedGrantTypeException" ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "AccessDeniedException": newErrorAccessDeniedException, "AuthorizationPendingException": newErrorAuthorizationPendingException, "ExpiredTokenException": newErrorExpiredTokenException, "InternalServerException": newErrorInternalServerException, "InvalidClientException": newErrorInvalidClientException, "InvalidClientMetadataException": newErrorInvalidClientMetadataException, "InvalidGrantException": newErrorInvalidGrantException, "InvalidRequestException": newErrorInvalidRequestException, "InvalidRequestRegionException": newErrorInvalidRequestRegionException, "InvalidScopeException": newErrorInvalidScopeException, "SlowDownException": newErrorSlowDownException, "UnauthorizedClientException": newErrorUnauthorizedClientException, "UnsupportedGrantTypeException": newErrorUnsupportedGrantTypeException, } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/ssooidc/service.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ssooidc import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/signer/v4" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/restjson" ) // SSOOIDC provides the API operation methods for making requests to // AWS SSO OIDC. See this package's package overview docs // for details on the service. // // SSOOIDC methods are safe to use concurrently. It is not safe to // modify mutate any of the struct's properties though. type SSOOIDC struct { *client.Client } // Used for custom client initialization logic var initClient func(*client.Client) // Used for custom request initialization logic var initRequest func(*request.Request) // Service information constants const ( ServiceName = "SSO OIDC" // Name of service. EndpointsID = "oidc" // ID to lookup a service endpoint with. ServiceID = "SSO OIDC" // ServiceID is a unique identifier of a specific service. ) // New creates a new instance of the SSOOIDC client with a session. // If additional configuration is needed for the client instance use the optional // aws.Config parameter to add your extra config. // // Example: // // mySession := session.Must(session.NewSession()) // // // Create a SSOOIDC client from just a session. // svc := ssooidc.New(mySession) // // // Create a SSOOIDC client with additional configuration // svc := ssooidc.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSOOIDC { c := p.ClientConfig(EndpointsID, cfgs...) if c.SigningNameDerived || len(c.SigningName) == 0 { c.SigningName = "sso-oauth" } return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) } // newClient creates, initializes and returns a new service client instance. func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *SSOOIDC { svc := &SSOOIDC{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: ServiceName, ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, PartitionID: partitionID, Endpoint: endpoint, APIVersion: "2019-06-10", ResolvedRegion: resolvedRegion, }, handlers, ), } // Handlers svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed( protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), ) // Run custom client initialization if present if initClient != nil { initClient(svc.Client) } return svc } // newRequest creates a new request for a SSOOIDC operation and runs any // custom request initialization. func (c *SSOOIDC) 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sts/api.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package sts 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/credentials" "github.com/aws/aws-sdk-go/aws/request" ) const opAssumeRole = "AssumeRole" // AssumeRoleRequest generates a "aws/request.Request" representing the // client's request for the AssumeRole operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See AssumeRole for more information on using the AssumeRole // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the AssumeRoleRequest method. // req, resp := client.AssumeRoleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) { op := &request.Operation{ Name: opAssumeRole, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AssumeRoleInput{} } output = &AssumeRoleOutput{} req = c.newRequest(op, input, output) return } // AssumeRole API operation for AWS Security Token Service. // // Returns a set of temporary security credentials that you can use to access // Amazon Web Services resources. These temporary credentials consist of an // access key ID, a secret access key, and a security token. Typically, you // use AssumeRole within your account or for cross-account access. For a comparison // of AssumeRole with other API operations that produce temporary credentials, // see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) // and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // # Permissions // // The temporary security credentials created by AssumeRole can be used to make // API calls to any Amazon Web Services service with the following exception: // You cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken // API operations. // // (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policy Amazon // Resource Names (ARNs) to use as managed session policies. The plaintext that // you use for both inline and managed session policies can't exceed 2,048 characters. // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials // in subsequent Amazon Web Services API calls to access resources in the account // that owns the role. You cannot use session policies to grant more permissions // than those allowed by the identity-based policy of the role that is being // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // When you create a role, you create two policies: a role trust policy that // specifies who can assume the role, and a permissions policy that specifies // what can be done with the role. You specify the trusted principal that is // allowed to assume the role in the role trust policy. // // To assume a role from a different account, your Amazon Web Services account // must be trusted by the role. The trust relationship is defined in the role's // trust policy when the role is created. That trust policy states which accounts // are allowed to delegate that access to users in the account. // // A user who wants to access a role in a different account must also have permissions // that are delegated from the account administrator. The administrator must // attach a policy that allows the user to call AssumeRole for the ARN of the // role in the other account. // // To allow a user to assume a role in the same account, you can do either of // the following: // // - Attach a policy to the user that allows the user to call AssumeRole // (as long as the role's trust policy trusts the account). // // - Add the user as a principal directly in the role's trust policy. // // You can do either because the role’s trust policy acts as an IAM resource-based // policy. When a resource-based policy grants access to a principal in the // same account, no additional identity-based policy is required. For more information // about trust policies and resource-based policies, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) // in the IAM User Guide. // // # Tags // // (Optional) You can pass tag key-value pairs to your session. These tags are // called session tags. For more information about session tags, see Passing // Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // An administrator must grant you the permissions necessary to pass session // tags. The administrator can also create granular permissions to allow you // to pass only specific session tags. For more information, see Tutorial: Using // Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. // // You can set the session tags as transitive. Transitive tags persist during // role chaining. For more information, see Chaining Roles with Session Tags // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) // in the IAM User Guide. // // # Using MFA with AssumeRole // // (Optional) You can include multi-factor authentication (MFA) information // when you call AssumeRole. This is useful for cross-account scenarios to ensure // that the user that assumes the role has been authenticated with an Amazon // Web Services MFA device. In that scenario, the trust policy of the role being // assumed includes a condition that tests for MFA authentication. If the caller // does not include valid MFA information, the request to assume the role is // denied. The condition in a trust policy that tests for MFA authentication // might look like the following example. // // "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}} // // For more information, see Configuring MFA-Protected API Access (https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html) // in the IAM User Guide guide. // // To use MFA with AssumeRole, you pass values for the SerialNumber and TokenCode // parameters. The SerialNumber value identifies the user's hardware or virtual // MFA device. The TokenCode is the time-based one-time password (TOTP) that // the MFA device produces. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Security Token Service's // API operation AssumeRole for usage and error information. // // Returned Error Codes: // // - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" // The request was rejected because the policy document was malformed. The error // message describes the specific error. // // - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // The request was rejected because the total packed size of the session policies // and session tags combined was too large. An Amazon Web Services conversion // compresses the session policy document, session policy ARNs, and session // tags into a packed binary format that has a separate limit. The error message // indicates by percentage how close the policies and tags are to the upper // size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy // and session tag limits. For more information, see IAM and STS Entity Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // - ErrCodeRegionDisabledException "RegionDisabledException" // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating // and Deactivating Amazon Web Services STS in an Amazon Web Services Region // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // - ErrCodeExpiredTokenException "ExpiredTokenException" // The web identity token that was passed is expired or is not valid. Get a // new identity token from the identity provider and then retry the request. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) { req, out := c.AssumeRoleRequest(input) return out, req.Send() } // AssumeRoleWithContext is the same as AssumeRole with the addition of // the ability to pass a context and additional request options. // // See AssumeRole for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *STS) AssumeRoleWithContext(ctx aws.Context, input *AssumeRoleInput, opts ...request.Option) (*AssumeRoleOutput, error) { req, out := c.AssumeRoleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opAssumeRoleWithSAML = "AssumeRoleWithSAML" // AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithSAML operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See AssumeRoleWithSAML for more information on using the AssumeRoleWithSAML // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the AssumeRoleWithSAMLRequest method. // req, resp := client.AssumeRoleWithSAMLRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) { op := &request.Operation{ Name: opAssumeRoleWithSAML, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AssumeRoleWithSAMLInput{} } output = &AssumeRoleWithSAMLOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return } // AssumeRoleWithSAML API operation for AWS Security Token Service. // // Returns a set of temporary security credentials for users who have been authenticated // via a SAML authentication response. This operation provides a mechanism for // tying an enterprise identity store or directory to role-based Amazon Web // Services access without user-specific credentials or configuration. For a // comparison of AssumeRoleWithSAML with the other API operations that produce // temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) // and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // The temporary security credentials returned by this operation consist of // an access key ID, a secret access key, and a security token. Applications // can use these temporary security credentials to sign calls to Amazon Web // Services services. // // # Session Duration // // By default, the temporary security credentials created by AssumeRoleWithSAML // last for one hour. However, you can use the optional DurationSeconds parameter // to specify the duration of your session. Your role session lasts for the // duration that you specify, or until the time specified in the SAML authentication // response's SessionNotOnOrAfter value, whichever is shorter. You can provide // a DurationSeconds value from 900 seconds (15 minutes) up to the maximum session // duration setting for the role. This setting can have a value from 1 hour // to 12 hours. To learn how to view the maximum value for your role, see View // the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) // in the IAM User Guide. The maximum session duration limit applies when you // use the AssumeRole* API operations or the assume-role* CLI commands. However // the limit does not apply when you use those operations to create a console // URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) // in the IAM User Guide. // // Role chaining (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining) // limits your CLI or Amazon Web Services API role session to a maximum of one // hour. When you use the AssumeRole API operation to assume a role, you can // specify the duration of your role session with the DurationSeconds parameter. // You can specify a parameter value of up to 43200 seconds (12 hours), depending // on the maximum session duration setting for your role. However, if you assume // a role using role chaining and provide a DurationSeconds parameter value // greater than one hour, the operation fails. // // # Permissions // // The temporary security credentials created by AssumeRoleWithSAML can be used // to make API calls to any Amazon Web Services service with the following exception: // you cannot call the STS GetFederationToken or GetSessionToken API operations. // // (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policy Amazon // Resource Names (ARNs) to use as managed session policies. The plaintext that // you use for both inline and managed session policies can't exceed 2,048 characters. // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials // in subsequent Amazon Web Services API calls to access resources in the account // that owns the role. You cannot use session policies to grant more permissions // than those allowed by the identity-based policy of the role that is being // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // Calling AssumeRoleWithSAML does not require the use of Amazon Web Services // security credentials. The identity of the caller is validated by using keys // in the metadata document that is uploaded for the SAML provider entity for // your identity provider. // // Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs. // The entry includes the value in the NameID element of the SAML assertion. // We recommend that you use a NameIDType that is not associated with any personally // identifiable information (PII). For example, you could instead use the persistent // identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent). // // # Tags // // (Optional) You can configure your IdP to pass attributes into your SAML assertion // as session tags. Each session tag consists of a key name and an associated // value. For more information about session tags, see Passing Session Tags // in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You can pass up to 50 session tags. The plaintext session tag keys can’t // exceed 128 characters and the values can’t exceed 256 characters. For these // and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. // // You can pass a session tag with the same key as a tag that is attached to // the role. When you do, session tags override the role's tags with the same // key. // // An administrator must grant you the permissions necessary to pass session // tags. The administrator can also create granular permissions to allow you // to pass only specific session tags. For more information, see Tutorial: Using // Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. // // You can set the session tags as transitive. Transitive tags persist during // role chaining. For more information, see Chaining Roles with Session Tags // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) // in the IAM User Guide. // // # SAML Configuration // // Before your application can call AssumeRoleWithSAML, you must configure your // SAML identity provider (IdP) to issue the claims required by Amazon Web Services. // Additionally, you must use Identity and Access Management (IAM) to create // a SAML provider entity in your Amazon Web Services account that represents // your identity provider. You must also create an IAM role that specifies this // SAML provider in its trust policy. // // For more information, see the following resources: // // - About SAML 2.0-based Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) // in the IAM User Guide. // // - Creating SAML Identity Providers (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html) // in the IAM User Guide. // // - Configuring a Relying Party and Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html) // in the IAM User Guide. // // - Creating a Role for SAML 2.0 Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.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 Security Token Service's // API operation AssumeRoleWithSAML for usage and error information. // // Returned Error Codes: // // - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" // The request was rejected because the policy document was malformed. The error // message describes the specific error. // // - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // The request was rejected because the total packed size of the session policies // and session tags combined was too large. An Amazon Web Services conversion // compresses the session policy document, session policy ARNs, and session // tags into a packed binary format that has a separate limit. The error message // indicates by percentage how close the policies and tags are to the upper // size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy // and session tag limits. For more information, see IAM and STS Entity Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // - ErrCodeIDPRejectedClaimException "IDPRejectedClaim" // The identity provider (IdP) reported that authentication failed. This might // be because the claim is invalid. // // If this error is returned for the AssumeRoleWithWebIdentity operation, it // can also mean that the claim has expired or has been explicitly revoked. // // - ErrCodeInvalidIdentityTokenException "InvalidIdentityToken" // The web identity token that was passed could not be validated by Amazon Web // Services. Get a new identity token from the identity provider and then retry // the request. // // - ErrCodeExpiredTokenException "ExpiredTokenException" // The web identity token that was passed is expired or is not valid. Get a // new identity token from the identity provider and then retry the request. // // - ErrCodeRegionDisabledException "RegionDisabledException" // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating // and Deactivating Amazon Web Services STS in an Amazon Web Services Region // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) { req, out := c.AssumeRoleWithSAMLRequest(input) return out, req.Send() } // AssumeRoleWithSAMLWithContext is the same as AssumeRoleWithSAML with the addition of // the ability to pass a context and additional request options. // // See AssumeRoleWithSAML for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *STS) AssumeRoleWithSAMLWithContext(ctx aws.Context, input *AssumeRoleWithSAMLInput, opts ...request.Option) (*AssumeRoleWithSAMLOutput, error) { req, out := c.AssumeRoleWithSAMLRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity" // AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithWebIdentity operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See AssumeRoleWithWebIdentity for more information on using the AssumeRoleWithWebIdentity // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the AssumeRoleWithWebIdentityRequest method. // req, resp := client.AssumeRoleWithWebIdentityRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) { op := &request.Operation{ Name: opAssumeRoleWithWebIdentity, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AssumeRoleWithWebIdentityInput{} } output = &AssumeRoleWithWebIdentityOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials return } // AssumeRoleWithWebIdentity API operation for AWS Security Token Service. // // Returns a set of temporary security credentials for users who have been authenticated // in a mobile or web application with a web identity provider. Example providers // include the OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID // Connect-compatible identity provider such as Google or Amazon Cognito federated // identities (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html). // // For mobile applications, we recommend that you use Amazon Cognito. You can // use Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide // (http://aws.amazon.com/sdkforios/) and the Amazon Web Services SDK for Android // Developer Guide (http://aws.amazon.com/sdkforandroid/) to uniquely identify // a user. You can also supply the user with a consistent identity throughout // the lifetime of an application. // // To learn more about Amazon Cognito, see Amazon Cognito identity pools (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html) // in Amazon Cognito Developer Guide. // // Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web // Services security credentials. Therefore, you can distribute an application // (for example, on mobile devices) that requests temporary security credentials // without including long-term Amazon Web Services credentials in the application. // You also don't need to deploy server-based proxy services that use long-term // Amazon Web Services credentials. Instead, the identity of the caller is validated // by using a token from the web identity provider. For a comparison of AssumeRoleWithWebIdentity // with the other API operations that produce temporary credentials, see Requesting // Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) // and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // The temporary security credentials returned by this API consist of an access // key ID, a secret access key, and a security token. Applications can use these // temporary security credentials to sign calls to Amazon Web Services service // API operations. // // # Session Duration // // By default, the temporary security credentials created by AssumeRoleWithWebIdentity // last for one hour. However, you can use the optional DurationSeconds parameter // to specify the duration of your session. You can provide a value from 900 // seconds (15 minutes) up to the maximum session duration setting for the role. // This setting can have a value from 1 hour to 12 hours. To learn how to view // the maximum value for your role, see View the Maximum Session Duration Setting // for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) // in the IAM User Guide. The maximum session duration limit applies when you // use the AssumeRole* API operations or the assume-role* CLI commands. However // the limit does not apply when you use those operations to create a console // URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) // in the IAM User Guide. // // # Permissions // // The temporary security credentials created by AssumeRoleWithWebIdentity can // be used to make API calls to any Amazon Web Services service with the following // exception: you cannot call the STS GetFederationToken or GetSessionToken // API operations. // // (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policy Amazon // Resource Names (ARNs) to use as managed session policies. The plaintext that // you use for both inline and managed session policies can't exceed 2,048 characters. // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials // in subsequent Amazon Web Services API calls to access resources in the account // that owns the role. You cannot use session policies to grant more permissions // than those allowed by the identity-based policy of the role that is being // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // # Tags // // (Optional) You can configure your IdP to pass attributes into your web identity // token as session tags. Each session tag consists of a key name and an associated // value. For more information about session tags, see Passing Session Tags // in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You can pass up to 50 session tags. The plaintext session tag keys can’t // exceed 128 characters and the values can’t exceed 256 characters. For these // and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. // // You can pass a session tag with the same key as a tag that is attached to // the role. When you do, the session tag overrides the role tag with the same // key. // // An administrator must grant you the permissions necessary to pass session // tags. The administrator can also create granular permissions to allow you // to pass only specific session tags. For more information, see Tutorial: Using // Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. // // You can set the session tags as transitive. Transitive tags persist during // role chaining. For more information, see Chaining Roles with Session Tags // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) // in the IAM User Guide. // // # Identities // // Before your application can call AssumeRoleWithWebIdentity, you must have // an identity token from a supported identity provider and create a role that // the application can assume. The role that your application assumes must trust // the identity provider that is associated with the identity token. In other // words, the identity provider must be specified in the role's trust policy. // // Calling AssumeRoleWithWebIdentity can result in an entry in your CloudTrail // logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims) // of the provided web identity token. We recommend that you avoid using any // personally identifiable information (PII) in this field. For example, you // could instead use a GUID or a pairwise identifier, as suggested in the OIDC // specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes). // // For more information about how to use web identity federation and the AssumeRoleWithWebIdentity // API, see the following resources: // // - Using Web Identity Federation API Operations for Mobile Apps (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html) // and Federation Through a Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity). // // - Web Identity Federation Playground (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/). // Walk through the process of authenticating through Login with Amazon, // Facebook, or Google, getting temporary security credentials, and then // using those credentials to make a request to Amazon Web Services. // // - Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/) // and Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/). // These toolkits contain sample apps that show how to invoke the identity // providers. The toolkits then show how to use the information from these // providers to get and use temporary security credentials. // // - Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications). // This article discusses web identity federation and shows an example of // how to use web identity federation to get access to content in Amazon // S3. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Security Token Service's // API operation AssumeRoleWithWebIdentity for usage and error information. // // Returned Error Codes: // // - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" // The request was rejected because the policy document was malformed. The error // message describes the specific error. // // - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // The request was rejected because the total packed size of the session policies // and session tags combined was too large. An Amazon Web Services conversion // compresses the session policy document, session policy ARNs, and session // tags into a packed binary format that has a separate limit. The error message // indicates by percentage how close the policies and tags are to the upper // size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy // and session tag limits. For more information, see IAM and STS Entity Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // - ErrCodeIDPRejectedClaimException "IDPRejectedClaim" // The identity provider (IdP) reported that authentication failed. This might // be because the claim is invalid. // // If this error is returned for the AssumeRoleWithWebIdentity operation, it // can also mean that the claim has expired or has been explicitly revoked. // // - ErrCodeIDPCommunicationErrorException "IDPCommunicationError" // The request could not be fulfilled because the identity provider (IDP) that // was asked to verify the incoming identity token could not be reached. This // is often a transient error caused by network conditions. Retry the request // a limited number of times so that you don't exceed the request rate. If the // error persists, the identity provider might be down or not responding. // // - ErrCodeInvalidIdentityTokenException "InvalidIdentityToken" // The web identity token that was passed could not be validated by Amazon Web // Services. Get a new identity token from the identity provider and then retry // the request. // // - ErrCodeExpiredTokenException "ExpiredTokenException" // The web identity token that was passed is expired or is not valid. Get a // new identity token from the identity provider and then retry the request. // // - ErrCodeRegionDisabledException "RegionDisabledException" // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating // and Deactivating Amazon Web Services STS in an Amazon Web Services Region // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) { req, out := c.AssumeRoleWithWebIdentityRequest(input) return out, req.Send() } // AssumeRoleWithWebIdentityWithContext is the same as AssumeRoleWithWebIdentity with the addition of // the ability to pass a context and additional request options. // // See AssumeRoleWithWebIdentity for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *STS) AssumeRoleWithWebIdentityWithContext(ctx aws.Context, input *AssumeRoleWithWebIdentityInput, opts ...request.Option) (*AssumeRoleWithWebIdentityOutput, error) { req, out := c.AssumeRoleWithWebIdentityRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage" // DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the // client's request for the DecodeAuthorizationMessage operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DecodeAuthorizationMessage for more information on using the DecodeAuthorizationMessage // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the DecodeAuthorizationMessageRequest method. // req, resp := client.DecodeAuthorizationMessageRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) { op := &request.Operation{ Name: opDecodeAuthorizationMessage, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DecodeAuthorizationMessageInput{} } output = &DecodeAuthorizationMessageOutput{} req = c.newRequest(op, input, output) return } // DecodeAuthorizationMessage API operation for AWS Security Token Service. // // Decodes additional information about the authorization status of a request // from an encoded message returned in response to an Amazon Web Services request. // // For example, if a user is not authorized to perform an operation that he // or she has requested, the request returns a Client.UnauthorizedOperation // response (an HTTP 403 response). Some Amazon Web Services operations additionally // return an encoded message that can provide details about this authorization // failure. // // Only certain Amazon Web Services operations return an encoded authorization // message. The documentation for an individual operation indicates whether // that operation returns an encoded message in addition to returning an HTTP // code. // // The message is encoded because the details of the authorization status can // contain privileged information that the user who requested the operation // should not see. To decode an authorization status message, a user must be // granted permissions through an IAM policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) // to request the DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage) // action. // // The decoded message includes the following type of information: // // - Whether the request was denied due to an explicit deny or due to the // absence of an explicit allow. For more information, see Determining Whether // a Request is Allowed or Denied (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow) // in the IAM User Guide. // // - The principal who made the request. // // - The requested action. // // - The requested resource. // // - The values of condition keys in the context of the user's 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 Security Token Service's // API operation DecodeAuthorizationMessage for usage and error information. // // Returned Error Codes: // - ErrCodeInvalidAuthorizationMessageException "InvalidAuthorizationMessageException" // The error returned if the message passed to DecodeAuthorizationMessage was // invalid. This can happen if the token contains invalid characters, such as // linebreaks. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) { req, out := c.DecodeAuthorizationMessageRequest(input) return out, req.Send() } // DecodeAuthorizationMessageWithContext is the same as DecodeAuthorizationMessage with the addition of // the ability to pass a context and additional request options. // // See DecodeAuthorizationMessage for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *STS) DecodeAuthorizationMessageWithContext(ctx aws.Context, input *DecodeAuthorizationMessageInput, opts ...request.Option) (*DecodeAuthorizationMessageOutput, error) { req, out := c.DecodeAuthorizationMessageRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetAccessKeyInfo = "GetAccessKeyInfo" // GetAccessKeyInfoRequest generates a "aws/request.Request" representing the // client's request for the GetAccessKeyInfo operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetAccessKeyInfo for more information on using the GetAccessKeyInfo // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetAccessKeyInfoRequest method. // req, resp := client.GetAccessKeyInfoRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo func (c *STS) GetAccessKeyInfoRequest(input *GetAccessKeyInfoInput) (req *request.Request, output *GetAccessKeyInfoOutput) { op := &request.Operation{ Name: opGetAccessKeyInfo, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetAccessKeyInfoInput{} } output = &GetAccessKeyInfoOutput{} req = c.newRequest(op, input, output) return } // GetAccessKeyInfo API operation for AWS Security Token Service. // // Returns the account identifier for the specified access key ID. // // Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) // and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). // For more information about access keys, see Managing Access Keys for IAM // Users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) // in the IAM User Guide. // // When you pass an access key ID to this operation, it returns the ID of the // Amazon Web Services account to which the keys belong. Access key IDs beginning // with AKIA are long-term credentials for an IAM user or the Amazon Web Services // account root user. Access key IDs beginning with ASIA are temporary credentials // that are created using STS operations. If the account in the response belongs // to you, you can sign in as the root user and review your root user access // keys. Then, you can pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html) // to learn which IAM user owns the keys. To learn who requested the temporary // credentials for an ASIA access key, view the STS events in your CloudTrail // logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) // in the IAM User Guide. // // This operation does not indicate the state of the access key. The key might // be active, inactive, or deleted. Active keys might not have permissions to // perform an operation. Providing a deleted access key might return an error // that the key 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 // the error. // // See the AWS API reference guide for AWS Security Token Service's // API operation GetAccessKeyInfo for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo func (c *STS) GetAccessKeyInfo(input *GetAccessKeyInfoInput) (*GetAccessKeyInfoOutput, error) { req, out := c.GetAccessKeyInfoRequest(input) return out, req.Send() } // GetAccessKeyInfoWithContext is the same as GetAccessKeyInfo with the addition of // the ability to pass a context and additional request options. // // See GetAccessKeyInfo for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *STS) GetAccessKeyInfoWithContext(ctx aws.Context, input *GetAccessKeyInfoInput, opts ...request.Option) (*GetAccessKeyInfoOutput, error) { req, out := c.GetAccessKeyInfoRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetCallerIdentity = "GetCallerIdentity" // GetCallerIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCallerIdentity operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetCallerIdentity for more information on using the GetCallerIdentity // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetCallerIdentityRequest method. // req, resp := client.GetCallerIdentityRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) { op := &request.Operation{ Name: opGetCallerIdentity, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetCallerIdentityInput{} } output = &GetCallerIdentityOutput{} req = c.newRequest(op, input, output) return } // GetCallerIdentity API operation for AWS Security Token Service. // // Returns details about the IAM user or role whose credentials are used to // call the operation. // // No permissions are required to perform this operation. If an administrator // attaches a policy to your identity that explicitly denies access to the sts:GetCallerIdentity // action, you can still perform this operation. Permissions are not required // because the same information is returned when access is denied. To view an // example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice // (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa) // 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 Security Token Service's // API operation GetCallerIdentity for usage and error information. // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) { req, out := c.GetCallerIdentityRequest(input) return out, req.Send() } // GetCallerIdentityWithContext is the same as GetCallerIdentity with the addition of // the ability to pass a context and additional request options. // // See GetCallerIdentity for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *STS) GetCallerIdentityWithContext(ctx aws.Context, input *GetCallerIdentityInput, opts ...request.Option) (*GetCallerIdentityOutput, error) { req, out := c.GetCallerIdentityRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetFederationToken = "GetFederationToken" // GetFederationTokenRequest generates a "aws/request.Request" representing the // client's request for the GetFederationToken operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetFederationToken for more information on using the GetFederationToken // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetFederationTokenRequest method. // req, resp := client.GetFederationTokenRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) { op := &request.Operation{ Name: opGetFederationToken, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetFederationTokenInput{} } output = &GetFederationTokenOutput{} req = c.newRequest(op, input, output) return } // GetFederationToken API operation for AWS Security Token Service. // // Returns a set of temporary security credentials (consisting of an access // key ID, a secret access key, and a security token) for a user. A typical // use is in a proxy application that gets temporary security credentials on // behalf of distributed applications inside a corporate network. // // You must call the GetFederationToken operation using the long-term security // credentials of an IAM user. As a result, this call is appropriate in contexts // where those credentials can be safeguarded, usually in a server-based application. // For a comparison of GetFederationToken with the other API operations that // produce temporary credentials, see Requesting Temporary Security Credentials // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) // and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // Although it is possible to call GetFederationToken using the security credentials // of an Amazon Web Services account root user rather than an IAM user that // you create for the purpose of a proxy application, we do not recommend it. // For more information, see Safeguard your root user credentials and don't // use them for everyday tasks (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials) // in the IAM User Guide. // // You can create a mobile-based or browser-based app that can authenticate // users using a web identity provider like Login with Amazon, Facebook, Google, // or an OpenID Connect-compatible identity provider. In this case, we recommend // that you use Amazon Cognito (http://aws.amazon.com/cognito/) or AssumeRoleWithWebIdentity. // For more information, see Federation Through a Web-based Identity Provider // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity) // in the IAM User Guide. // // # Session duration // // The temporary credentials are valid for the specified duration, from 900 // seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default // session duration is 43,200 seconds (12 hours). Temporary credentials obtained // by using the root user credentials have a maximum duration of 3,600 seconds // (1 hour). // // # Permissions // // You can use the temporary credentials created by GetFederationToken in any // Amazon Web Services service with the following exceptions: // // - You cannot call any IAM operations using the CLI or the Amazon Web Services // API. This limitation does not apply to console sessions. // // - You cannot call any STS operations except GetCallerIdentity. // // You can use temporary credentials for single sign-on (SSO) to the console. // // You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policy Amazon // Resource Names (ARNs) to use as managed session policies. The plaintext that // you use for both inline and managed session policies can't exceed 2,048 characters. // // Though the session policy parameters are optional, if you do not pass a policy, // then the resulting federated user session has no permissions. When you pass // session policies, the session permissions are the intersection of the IAM // user policies and the session policies that you pass. This gives you a way // to further restrict the permissions for a federated user. You cannot use // session policies to grant more permissions than those that are defined in // the permissions policy of the IAM user. For more information, see Session // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. For information about using GetFederationToken to // create temporary security credentials, see GetFederationToken—Federation // Through a Custom Identity Broker (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken). // // You can use the credentials to access a resource that has a resource-based // policy. If that policy specifically references the federated user session // in the Principal element of the policy, the session has the permissions allowed // by the policy. These permissions are granted in addition to the permissions // granted by the session policies. // // # Tags // // (Optional) You can pass tag key-value pairs to your session. These are called // session tags. For more information about session tags, see Passing Session // Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You can create a mobile-based or browser-based app that can authenticate // users using a web identity provider like Login with Amazon, Facebook, Google, // or an OpenID Connect-compatible identity provider. In this case, we recommend // that you use Amazon Cognito (http://aws.amazon.com/cognito/) or AssumeRoleWithWebIdentity. // For more information, see Federation Through a Web-based Identity Provider // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity) // in the IAM User Guide. // // An administrator must grant you the permissions necessary to pass session // tags. The administrator can also create granular permissions to allow you // to pass only specific session tags. For more information, see Tutorial: Using // Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. // // Tag key–value pairs are not case sensitive, but case is preserved. This // means that you cannot have separate Department and department tag keys. Assume // that the user that you are federating has the Department=Marketing tag and // you pass the department=engineering session tag. Department and department // are not saved as separate tags, and the session tag passed in the request // takes precedence over the user tag. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Security Token Service's // API operation GetFederationToken for usage and error information. // // Returned Error Codes: // // - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" // The request was rejected because the policy document was malformed. The error // message describes the specific error. // // - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // The request was rejected because the total packed size of the session policies // and session tags combined was too large. An Amazon Web Services conversion // compresses the session policy document, session policy ARNs, and session // tags into a packed binary format that has a separate limit. The error message // indicates by percentage how close the policies and tags are to the upper // size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy // and session tag limits. For more information, see IAM and STS Entity Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // - ErrCodeRegionDisabledException "RegionDisabledException" // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating // and Deactivating Amazon Web Services STS in an Amazon Web Services Region // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) { req, out := c.GetFederationTokenRequest(input) return out, req.Send() } // GetFederationTokenWithContext is the same as GetFederationToken with the addition of // the ability to pass a context and additional request options. // // See GetFederationToken for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *STS) GetFederationTokenWithContext(ctx aws.Context, input *GetFederationTokenInput, opts ...request.Option) (*GetFederationTokenOutput, error) { req, out := c.GetFederationTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetSessionToken = "GetSessionToken" // GetSessionTokenRequest generates a "aws/request.Request" representing the // client's request for the GetSessionToken operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetSessionToken for more information on using the GetSessionToken // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // Example sending a request using the GetSessionTokenRequest method. // req, resp := client.GetSessionTokenRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) { op := &request.Operation{ Name: opGetSessionToken, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetSessionTokenInput{} } output = &GetSessionTokenOutput{} req = c.newRequest(op, input, output) return } // GetSessionToken API operation for AWS Security Token Service. // // Returns a set of temporary credentials for an Amazon Web Services account // or IAM user. The credentials consist of an access key ID, a secret access // key, and a security token. Typically, you use GetSessionToken if you want // to use MFA to protect programmatic calls to specific Amazon Web Services // API operations like Amazon EC2 StopInstances. // // MFA-enabled IAM users must call GetSessionToken and submit an MFA code that // is associated with their MFA device. Using the temporary security credentials // that the call returns, IAM users can then make programmatic calls to API // operations that require MFA authentication. An incorrect MFA code causes // the API to return an access denied error. For a comparison of GetSessionToken // with the other API operations that produce temporary credentials, see Requesting // Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) // and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // No permissions are required for users to perform this operation. The purpose // of the sts:GetSessionToken operation is to authenticate the user using MFA. // You cannot use policies to control authentication operations. For more information, // see Permissions for GetSessionToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html) // in the IAM User Guide. // // # Session Duration // // The GetSessionToken operation must be called by using the long-term Amazon // Web Services security credentials of an IAM user. Credentials that are created // by IAM users are valid for the duration that you specify. This duration can // range from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 // hours), with a default of 43,200 seconds (12 hours). Credentials based on // account credentials can range from 900 seconds (15 minutes) up to 3,600 seconds // (1 hour), with a default of 1 hour. // // # Permissions // // The temporary security credentials created by GetSessionToken can be used // to make API calls to any Amazon Web Services service with the following exceptions: // // - You cannot call any IAM API operations unless MFA authentication information // is included in the request. // // - You cannot call any STS API except AssumeRole or GetCallerIdentity. // // The credentials that GetSessionToken returns are based on permissions associated // with the IAM user whose credentials were used to call the operation. The // temporary credentials have the same permissions as the IAM user. // // Although it is possible to call GetSessionToken using the security credentials // of an Amazon Web Services account root user rather than an IAM user, we do // not recommend it. If GetSessionToken is called using root user credentials, // the temporary credentials have root user permissions. For more information, // see Safeguard your root user credentials and don't use them for everyday // tasks (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials) // in the IAM User Guide // // For more information about using GetSessionToken to create temporary credentials, // see Temporary Credentials for Users in Untrusted Environments (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken) // 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 Security Token Service's // API operation GetSessionToken for usage and error information. // // Returned Error Codes: // - ErrCodeRegionDisabledException "RegionDisabledException" // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating // and Deactivating Amazon Web Services STS in an Amazon Web Services Region // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) { req, out := c.GetSessionTokenRequest(input) return out, req.Send() } // GetSessionTokenWithContext is the same as GetSessionToken with the addition of // the ability to pass a context and additional request options. // // See GetSessionToken for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionTokenInput, opts ...request.Option) (*GetSessionTokenOutput, error) { req, out := c.GetSessionTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } type AssumeRoleInput struct { _ struct{} `type:"structure"` // The duration, in seconds, of the role session. The value specified can range // from 900 seconds (15 minutes) up to the maximum session duration set for // the role. The maximum session duration setting can have a value from 1 hour // to 12 hours. If you specify a value higher than this setting or the administrator // setting (whichever is lower), the operation fails. For example, if you specify // a session duration of 12 hours, but your administrator set the maximum session // duration to 6 hours, your operation fails. // // Role chaining limits your Amazon Web Services CLI or Amazon Web Services // API role session to a maximum of one hour. When you use the AssumeRole API // operation to assume a role, you can specify the duration of your role session // with the DurationSeconds parameter. You can specify a parameter value of // up to 43200 seconds (12 hours), depending on the maximum session duration // setting for your role. However, if you assume a role using role chaining // and provide a DurationSeconds parameter value greater than one hour, the // operation fails. To learn how to view the maximum value for your role, see // View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) // in the IAM User Guide. // // By default, the value is set to 3600 seconds. // // The DurationSeconds parameter is separate from the duration of a console // session that you might request using the returned credentials. The request // to the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` // A unique identifier that might be required when you assume a role in another // account. If the administrator of the account to which the role belongs provided // you with an external ID, then provide that value in the ExternalId parameter. // This value can be any string, such as a passphrase or account number. A cross-account // role is usually set up to trust everyone in an account. Therefore, the administrator // of the trusting account might send an external ID to the administrator of // the trusted account. That way, only someone with the ID can assume the role, // rather than everyone in the account. For more information about the external // ID, see How to Use an External ID When Granting Access to Your Amazon Web // Services Resources to a Third Party (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) // in the IAM User Guide. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@:/- ExternalId *string `min:"2" type:"string"` // An IAM policy in JSON format that you want to use as an inline session policy. // // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use // the role's temporary credentials in subsequent Amazon Web Services API calls // to access resources in the account that owns the role. You cannot use session // policies to grant more permissions than those allowed by the identity-based // policy of the role that is being assumed. For more information, see Session // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // The plaintext that you use for both inline and managed session policies can't // exceed 2,048 characters. The JSON policy characters can be any ASCII character // from the space character to the end of the valid character list (\u0020 through // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. Policy *string `min:"1" type:"string"` // The Amazon Resource Names (ARNs) of the IAM managed policies that you want // to use as managed session policies. The policies must exist in the same account // as the role. // // This parameter is optional. You can provide up to 10 managed policy ARNs. // However, the plaintext that you use for both inline and managed session policies // can't exceed 2,048 characters. For more information about ARNs, see Amazon // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials // in subsequent Amazon Web Services API calls to access resources in the account // that owns the role. You cannot use session policies to grant more permissions // than those allowed by the identity-based policy of the role that is being // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []*PolicyDescriptorType `type:"list"` // A list of previously acquired trusted context assertions in the format of // a JSON array. The trusted context assertion is signed and encrypted by Amazon // Web Services STS. // // The following is an example of a ProvidedContext value that includes a single // trusted context assertion and the ARN of the context provider from which // the trusted context assertion was generated. // // [{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}] ProvidedContexts []*ProvidedContext `type:"list"` // The Amazon Resource Name (ARN) of the role to assume. // // RoleArn is a required field RoleArn *string `min:"20" type:"string" required:"true"` // An identifier for the assumed role session. // // Use the role session name to uniquely identify a session when the same role // is assumed by different principals or for different reasons. In cross-account // scenarios, the role session name is visible to, and can be logged by the // account that owns the role. The role session name is also used in the ARN // of the assumed role principal. This means that subsequent cross-account API // requests that use the temporary security credentials will expose the role // session name to the external account in their CloudTrail logs. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@- // // RoleSessionName is a required field RoleSessionName *string `min:"2" type:"string" required:"true"` // The identification number of the MFA device that is associated with the user // who is making the AssumeRole call. Specify this value if the trust policy // of the role being assumed includes a condition that requires MFA authentication. // The value is either the serial number for a hardware device (such as GAHT12345678) // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@- SerialNumber *string `min:"9" type:"string"` // The source identity specified by the principal that is calling the AssumeRole // operation. // // You can require users to specify a source identity when they assume a role. // You do this by using the sts:SourceIdentity condition key in a role trust // policy. You can use source identity information in CloudTrail logs to determine // who took actions with a role. You can use the aws:SourceIdentity condition // key to further control access to Amazon Web Services resources based on the // value of source identity. For more information about using source identity, // see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) // in the IAM User Guide. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@-. You cannot // use a value that begins with the text aws:. This prefix is reserved for Amazon // Web Services internal use. SourceIdentity *string `min:"2" type:"string"` // A list of session tags that you want to pass. Each session tag consists of // a key name and an associated value. For more information about session tags, // see Tagging Amazon Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // This parameter is optional. You can pass up to 50 session tags. The plaintext // session tag keys can’t exceed 128 characters, and the values can’t exceed // 256 characters. For these and additional limits, see IAM and STS Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. // // You can pass a session tag with the same key as a tag that is already attached // to the role. When you do, session tags override a role tag with the same // key. // // Tag key–value pairs are not case sensitive, but case is preserved. This // means that you cannot have separate Department and department tag keys. Assume // that the role has the Department=Marketing tag and you pass the department=engineering // session tag. Department and department are not saved as separate tags, and // the session tag passed in the request takes precedence over the role tag. // // Additionally, if you used temporary credentials to perform this operation, // the new session inherits any transitive session tags from the calling session. // If you pass a session tag with the same key as an inherited tag, the operation // fails. To view the inherited tags for a session, see the CloudTrail logs. // For more information, see Viewing Session Tags in CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs) // in the IAM User Guide. Tags []*Tag `type:"list"` // The value provided by the MFA device, if the trust policy of the role being // assumed requires MFA. (In other words, if the policy includes a condition // that tests for MFA). If the role being assumed requires MFA and if the TokenCode // value is missing or expired, the AssumeRole call returns an "access denied" // error. // // The format for this parameter, as described by its regex pattern, is a sequence // of six numeric digits. TokenCode *string `min:"6" type:"string"` // A list of keys for session tags that you want to set as transitive. If you // set a tag key as transitive, the corresponding key and value passes to subsequent // sessions in a role chain. For more information, see Chaining Roles with Session // Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) // in the IAM User Guide. // // This parameter is optional. When you set session tags as transitive, the // session policy and session tags packed binary limit is not affected. // // If you choose not to specify a transitive tag key, then no tags are passed // from this session to any subsequent sessions. TransitiveTagKeys []*string `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssumeRoleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssumeRoleInput"} if s.DurationSeconds != nil && *s.DurationSeconds < 900 { invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) } if s.ExternalId != nil && len(*s.ExternalId) < 2 { invalidParams.Add(request.NewErrParamMinLen("ExternalId", 2)) } if s.Policy != nil && len(*s.Policy) < 1 { invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) } if s.RoleArn == nil { invalidParams.Add(request.NewErrParamRequired("RoleArn")) } if s.RoleArn != nil && len(*s.RoleArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) } if s.RoleSessionName == nil { invalidParams.Add(request.NewErrParamRequired("RoleSessionName")) } if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 { invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2)) } if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) } if s.SourceIdentity != nil && len(*s.SourceIdentity) < 2 { invalidParams.Add(request.NewErrParamMinLen("SourceIdentity", 2)) } if s.TokenCode != nil && len(*s.TokenCode) < 6 { invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6)) } if s.PolicyArns != nil { for i, v := range s.PolicyArns { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams)) } } } if s.ProvidedContexts != nil { for i, v := range s.ProvidedContexts { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProvidedContexts", i), 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 } // SetDurationSeconds sets the DurationSeconds field's value. func (s *AssumeRoleInput) SetDurationSeconds(v int64) *AssumeRoleInput { s.DurationSeconds = &v return s } // SetExternalId sets the ExternalId field's value. func (s *AssumeRoleInput) SetExternalId(v string) *AssumeRoleInput { s.ExternalId = &v return s } // SetPolicy sets the Policy field's value. func (s *AssumeRoleInput) SetPolicy(v string) *AssumeRoleInput { s.Policy = &v return s } // SetPolicyArns sets the PolicyArns field's value. func (s *AssumeRoleInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleInput { s.PolicyArns = v return s } // SetProvidedContexts sets the ProvidedContexts field's value. func (s *AssumeRoleInput) SetProvidedContexts(v []*ProvidedContext) *AssumeRoleInput { s.ProvidedContexts = v return s } // SetRoleArn sets the RoleArn field's value. func (s *AssumeRoleInput) SetRoleArn(v string) *AssumeRoleInput { s.RoleArn = &v return s } // SetRoleSessionName sets the RoleSessionName field's value. func (s *AssumeRoleInput) SetRoleSessionName(v string) *AssumeRoleInput { s.RoleSessionName = &v return s } // SetSerialNumber sets the SerialNumber field's value. func (s *AssumeRoleInput) SetSerialNumber(v string) *AssumeRoleInput { s.SerialNumber = &v return s } // SetSourceIdentity sets the SourceIdentity field's value. func (s *AssumeRoleInput) SetSourceIdentity(v string) *AssumeRoleInput { s.SourceIdentity = &v return s } // SetTags sets the Tags field's value. func (s *AssumeRoleInput) SetTags(v []*Tag) *AssumeRoleInput { s.Tags = v return s } // SetTokenCode sets the TokenCode field's value. func (s *AssumeRoleInput) SetTokenCode(v string) *AssumeRoleInput { s.TokenCode = &v return s } // SetTransitiveTagKeys sets the TransitiveTagKeys field's value. func (s *AssumeRoleInput) SetTransitiveTagKeys(v []*string) *AssumeRoleInput { s.TransitiveTagKeys = v return s } // Contains the response to a successful AssumeRole request, including temporary // Amazon Web Services credentials that can be used to make Amazon Web Services // requests. type AssumeRoleOutput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers // that you can use to refer to the resulting temporary security credentials. // For example, you can reference these credentials as a principal in a resource-based // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName // that you specified when you called AssumeRole. AssumedRoleUser *AssumedRoleUser `type:"structure"` // The temporary security credentials, which include an access key ID, a secret // access key, and a security (or session) token. // // The size of the security token that STS API operations return is not fixed. // We strongly recommend that you make no assumptions about the maximum size. Credentials *Credentials `type:"structure"` // A percentage value that indicates the packed size of the session policies // and session tags combined passed in the request. The request fails if the // packed size is greater than 100 percent, which means the policies and tags // exceeded the allowed space. PackedPolicySize *int64 `type:"integer"` // The source identity specified by the principal that is calling the AssumeRole // operation. // // You can require users to specify a source identity when they assume a role. // You do this by using the sts:SourceIdentity condition key in a role trust // policy. You can use source identity information in CloudTrail logs to determine // who took actions with a role. You can use the aws:SourceIdentity condition // key to further control access to Amazon Web Services resources based on the // value of source identity. For more information about using source identity, // see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) // in the IAM User Guide. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@- SourceIdentity *string `min:"2" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleOutput) GoString() string { return s.String() } // SetAssumedRoleUser sets the AssumedRoleUser field's value. func (s *AssumeRoleOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleOutput { s.AssumedRoleUser = v return s } // SetCredentials sets the Credentials field's value. func (s *AssumeRoleOutput) SetCredentials(v *Credentials) *AssumeRoleOutput { s.Credentials = v return s } // SetPackedPolicySize sets the PackedPolicySize field's value. func (s *AssumeRoleOutput) SetPackedPolicySize(v int64) *AssumeRoleOutput { s.PackedPolicySize = &v return s } // SetSourceIdentity sets the SourceIdentity field's value. func (s *AssumeRoleOutput) SetSourceIdentity(v string) *AssumeRoleOutput { s.SourceIdentity = &v return s } type AssumeRoleWithSAMLInput struct { _ struct{} `type:"structure"` // The duration, in seconds, of the role session. Your role session lasts for // the duration that you specify for the DurationSeconds parameter, or until // the time specified in the SAML authentication response's SessionNotOnOrAfter // value, whichever is shorter. You can provide a DurationSeconds value from // 900 seconds (15 minutes) up to the maximum session duration setting for the // role. This setting can have a value from 1 hour to 12 hours. If you specify // a value higher than this setting, the operation fails. For example, if you // specify a session duration of 12 hours, but your administrator set the maximum // session duration to 6 hours, your operation fails. To learn how to view the // maximum value for your role, see View the Maximum Session Duration Setting // for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) // in the IAM User Guide. // // By default, the value is set to 3600 seconds. // // The DurationSeconds parameter is separate from the duration of a console // session that you might request using the returned credentials. The request // to the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` // An IAM policy in JSON format that you want to use as an inline session policy. // // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use // the role's temporary credentials in subsequent Amazon Web Services API calls // to access resources in the account that owns the role. You cannot use session // policies to grant more permissions than those allowed by the identity-based // policy of the role that is being assumed. For more information, see Session // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // The plaintext that you use for both inline and managed session policies can't // exceed 2,048 characters. The JSON policy characters can be any ASCII character // from the space character to the end of the valid character list (\u0020 through // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. Policy *string `min:"1" type:"string"` // The Amazon Resource Names (ARNs) of the IAM managed policies that you want // to use as managed session policies. The policies must exist in the same account // as the role. // // This parameter is optional. You can provide up to 10 managed policy ARNs. // However, the plaintext that you use for both inline and managed session policies // can't exceed 2,048 characters. For more information about ARNs, see Amazon // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials // in subsequent Amazon Web Services API calls to access resources in the account // that owns the role. You cannot use session policies to grant more permissions // than those allowed by the identity-based policy of the role that is being // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []*PolicyDescriptorType `type:"list"` // The Amazon Resource Name (ARN) of the SAML provider in IAM that describes // the IdP. // // PrincipalArn is a required field PrincipalArn *string `min:"20" type:"string" required:"true"` // The Amazon Resource Name (ARN) of the role that the caller is assuming. // // RoleArn is a required field RoleArn *string `min:"20" type:"string" required:"true"` // The base64 encoded SAML authentication response provided by the IdP. // // For more information, see Configuring a Relying Party and Adding Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html) // in the IAM User Guide. // // SAMLAssertion is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by AssumeRoleWithSAMLInput's // String and GoString methods. // // SAMLAssertion is a required field SAMLAssertion *string `min:"4" type:"string" required:"true" sensitive:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleWithSAMLInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleWithSAMLInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssumeRoleWithSAMLInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithSAMLInput"} if s.DurationSeconds != nil && *s.DurationSeconds < 900 { invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) } if s.Policy != nil && len(*s.Policy) < 1 { invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) } if s.PrincipalArn == nil { invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) } if s.PrincipalArn != nil && len(*s.PrincipalArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("PrincipalArn", 20)) } if s.RoleArn == nil { invalidParams.Add(request.NewErrParamRequired("RoleArn")) } if s.RoleArn != nil && len(*s.RoleArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) } if s.SAMLAssertion == nil { invalidParams.Add(request.NewErrParamRequired("SAMLAssertion")) } if s.SAMLAssertion != nil && len(*s.SAMLAssertion) < 4 { invalidParams.Add(request.NewErrParamMinLen("SAMLAssertion", 4)) } if s.PolicyArns != nil { for i, v := range s.PolicyArns { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDurationSeconds sets the DurationSeconds field's value. func (s *AssumeRoleWithSAMLInput) SetDurationSeconds(v int64) *AssumeRoleWithSAMLInput { s.DurationSeconds = &v return s } // SetPolicy sets the Policy field's value. func (s *AssumeRoleWithSAMLInput) SetPolicy(v string) *AssumeRoleWithSAMLInput { s.Policy = &v return s } // SetPolicyArns sets the PolicyArns field's value. func (s *AssumeRoleWithSAMLInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleWithSAMLInput { s.PolicyArns = v return s } // SetPrincipalArn sets the PrincipalArn field's value. func (s *AssumeRoleWithSAMLInput) SetPrincipalArn(v string) *AssumeRoleWithSAMLInput { s.PrincipalArn = &v return s } // SetRoleArn sets the RoleArn field's value. func (s *AssumeRoleWithSAMLInput) SetRoleArn(v string) *AssumeRoleWithSAMLInput { s.RoleArn = &v return s } // SetSAMLAssertion sets the SAMLAssertion field's value. func (s *AssumeRoleWithSAMLInput) SetSAMLAssertion(v string) *AssumeRoleWithSAMLInput { s.SAMLAssertion = &v return s } // Contains the response to a successful AssumeRoleWithSAML request, including // temporary Amazon Web Services credentials that can be used to make Amazon // Web Services requests. type AssumeRoleWithSAMLOutput struct { _ struct{} `type:"structure"` // The identifiers for the temporary security credentials that the operation // returns. AssumedRoleUser *AssumedRoleUser `type:"structure"` // The value of the Recipient attribute of the SubjectConfirmationData element // of the SAML assertion. Audience *string `type:"string"` // The temporary security credentials, which include an access key ID, a secret // access key, and a security (or session) token. // // The size of the security token that STS API operations return is not fixed. // We strongly recommend that you make no assumptions about the maximum size. Credentials *Credentials `type:"structure"` // The value of the Issuer element of the SAML assertion. Issuer *string `type:"string"` // A hash value based on the concatenation of the following: // // * The Issuer response value. // // * The Amazon Web Services account ID. // // * The friendly name (the last part of the ARN) of the SAML provider in // IAM. // // The combination of NameQualifier and Subject can be used to uniquely identify // a user. // // The following pseudocode shows how the hash value is calculated: // // BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" // ) ) NameQualifier *string `type:"string"` // A percentage value that indicates the packed size of the session policies // and session tags combined passed in the request. The request fails if the // packed size is greater than 100 percent, which means the policies and tags // exceeded the allowed space. PackedPolicySize *int64 `type:"integer"` // The value in the SourceIdentity attribute in the SAML assertion. // // You can require users to set a source identity value when they assume a role. // You do this by using the sts:SourceIdentity condition key in a role trust // policy. That way, actions that are taken with the role are associated with // that user. After the source identity is set, the value cannot be changed. // It is present in the request for all actions that are taken by the role and // persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining) // sessions. You can configure your SAML identity provider to use an attribute // associated with your users, like user name or email, as the source identity // when calling AssumeRoleWithSAML. You do this by adding an attribute to the // SAML assertion. For more information about using source identity, see Monitor // and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) // in the IAM User Guide. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@- SourceIdentity *string `min:"2" type:"string"` // The value of the NameID element in the Subject element of the SAML assertion. Subject *string `type:"string"` // The format of the name ID, as defined by the Format attribute in the NameID // element of the SAML assertion. Typical examples of the format are transient // or persistent. // // If the format includes the prefix urn:oasis:names:tc:SAML:2.0:nameid-format, // that prefix is removed. For example, urn:oasis:names:tc:SAML:2.0:nameid-format:transient // is returned as transient. If the format includes any other prefix, the format // is returned with no modifications. SubjectType *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleWithSAMLOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleWithSAMLOutput) GoString() string { return s.String() } // SetAssumedRoleUser sets the AssumedRoleUser field's value. func (s *AssumeRoleWithSAMLOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleWithSAMLOutput { s.AssumedRoleUser = v return s } // SetAudience sets the Audience field's value. func (s *AssumeRoleWithSAMLOutput) SetAudience(v string) *AssumeRoleWithSAMLOutput { s.Audience = &v return s } // SetCredentials sets the Credentials field's value. func (s *AssumeRoleWithSAMLOutput) SetCredentials(v *Credentials) *AssumeRoleWithSAMLOutput { s.Credentials = v return s } // SetIssuer sets the Issuer field's value. func (s *AssumeRoleWithSAMLOutput) SetIssuer(v string) *AssumeRoleWithSAMLOutput { s.Issuer = &v return s } // SetNameQualifier sets the NameQualifier field's value. func (s *AssumeRoleWithSAMLOutput) SetNameQualifier(v string) *AssumeRoleWithSAMLOutput { s.NameQualifier = &v return s } // SetPackedPolicySize sets the PackedPolicySize field's value. func (s *AssumeRoleWithSAMLOutput) SetPackedPolicySize(v int64) *AssumeRoleWithSAMLOutput { s.PackedPolicySize = &v return s } // SetSourceIdentity sets the SourceIdentity field's value. func (s *AssumeRoleWithSAMLOutput) SetSourceIdentity(v string) *AssumeRoleWithSAMLOutput { s.SourceIdentity = &v return s } // SetSubject sets the Subject field's value. func (s *AssumeRoleWithSAMLOutput) SetSubject(v string) *AssumeRoleWithSAMLOutput { s.Subject = &v return s } // SetSubjectType sets the SubjectType field's value. func (s *AssumeRoleWithSAMLOutput) SetSubjectType(v string) *AssumeRoleWithSAMLOutput { s.SubjectType = &v return s } type AssumeRoleWithWebIdentityInput struct { _ struct{} `type:"structure"` // The duration, in seconds, of the role session. The value can range from 900 // seconds (15 minutes) up to the maximum session duration setting for the role. // This setting can have a value from 1 hour to 12 hours. If you specify a value // higher than this setting, the operation fails. For example, if you specify // a session duration of 12 hours, but your administrator set the maximum session // duration to 6 hours, your operation fails. To learn how to view the maximum // value for your role, see View the Maximum Session Duration Setting for a // Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) // in the IAM User Guide. // // By default, the value is set to 3600 seconds. // // The DurationSeconds parameter is separate from the duration of a console // session that you might request using the returned credentials. The request // to the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` // An IAM policy in JSON format that you want to use as an inline session policy. // // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use // the role's temporary credentials in subsequent Amazon Web Services API calls // to access resources in the account that owns the role. You cannot use session // policies to grant more permissions than those allowed by the identity-based // policy of the role that is being assumed. For more information, see Session // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // The plaintext that you use for both inline and managed session policies can't // exceed 2,048 characters. The JSON policy characters can be any ASCII character // from the space character to the end of the valid character list (\u0020 through // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. Policy *string `min:"1" type:"string"` // The Amazon Resource Names (ARNs) of the IAM managed policies that you want // to use as managed session policies. The policies must exist in the same account // as the role. // // This parameter is optional. You can provide up to 10 managed policy ARNs. // However, the plaintext that you use for both inline and managed session policies // can't exceed 2,048 characters. For more information about ARNs, see Amazon // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials // in subsequent Amazon Web Services API calls to access resources in the account // that owns the role. You cannot use session policies to grant more permissions // than those allowed by the identity-based policy of the role that is being // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []*PolicyDescriptorType `type:"list"` // The fully qualified host component of the domain name of the OAuth 2.0 identity // provider. Do not specify this value for an OpenID Connect identity provider. // // Currently www.amazon.com and graph.facebook.com are the only supported identity // providers for OAuth 2.0 access tokens. Do not include URL schemes and port // numbers. // // Do not specify this value for OpenID Connect ID tokens. ProviderId *string `min:"4" type:"string"` // The Amazon Resource Name (ARN) of the role that the caller is assuming. // // RoleArn is a required field RoleArn *string `min:"20" type:"string" required:"true"` // An identifier for the assumed role session. Typically, you pass the name // or identifier that is associated with the user who is using your application. // That way, the temporary security credentials that your application will use // are associated with that user. This session name is included as part of the // ARN and assumed role ID in the AssumedRoleUser response element. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@- // // RoleSessionName is a required field RoleSessionName *string `min:"2" type:"string" required:"true"` // The OAuth 2.0 access token or OpenID Connect ID token that is provided by // the identity provider. Your application must get this token by authenticating // the user who is using your application with a web identity provider before // the application makes an AssumeRoleWithWebIdentity call. Only tokens with // RSA algorithms (RS256) are supported. // // WebIdentityToken is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by AssumeRoleWithWebIdentityInput's // String and GoString methods. // // WebIdentityToken is a required field WebIdentityToken *string `min:"4" type:"string" required:"true" sensitive:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleWithWebIdentityInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleWithWebIdentityInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssumeRoleWithWebIdentityInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithWebIdentityInput"} if s.DurationSeconds != nil && *s.DurationSeconds < 900 { invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) } if s.Policy != nil && len(*s.Policy) < 1 { invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) } if s.ProviderId != nil && len(*s.ProviderId) < 4 { invalidParams.Add(request.NewErrParamMinLen("ProviderId", 4)) } if s.RoleArn == nil { invalidParams.Add(request.NewErrParamRequired("RoleArn")) } if s.RoleArn != nil && len(*s.RoleArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) } if s.RoleSessionName == nil { invalidParams.Add(request.NewErrParamRequired("RoleSessionName")) } if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 { invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2)) } if s.WebIdentityToken == nil { invalidParams.Add(request.NewErrParamRequired("WebIdentityToken")) } if s.WebIdentityToken != nil && len(*s.WebIdentityToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("WebIdentityToken", 4)) } if s.PolicyArns != nil { for i, v := range s.PolicyArns { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDurationSeconds sets the DurationSeconds field's value. func (s *AssumeRoleWithWebIdentityInput) SetDurationSeconds(v int64) *AssumeRoleWithWebIdentityInput { s.DurationSeconds = &v return s } // SetPolicy sets the Policy field's value. func (s *AssumeRoleWithWebIdentityInput) SetPolicy(v string) *AssumeRoleWithWebIdentityInput { s.Policy = &v return s } // SetPolicyArns sets the PolicyArns field's value. func (s *AssumeRoleWithWebIdentityInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleWithWebIdentityInput { s.PolicyArns = v return s } // SetProviderId sets the ProviderId field's value. func (s *AssumeRoleWithWebIdentityInput) SetProviderId(v string) *AssumeRoleWithWebIdentityInput { s.ProviderId = &v return s } // SetRoleArn sets the RoleArn field's value. func (s *AssumeRoleWithWebIdentityInput) SetRoleArn(v string) *AssumeRoleWithWebIdentityInput { s.RoleArn = &v return s } // SetRoleSessionName sets the RoleSessionName field's value. func (s *AssumeRoleWithWebIdentityInput) SetRoleSessionName(v string) *AssumeRoleWithWebIdentityInput { s.RoleSessionName = &v return s } // SetWebIdentityToken sets the WebIdentityToken field's value. func (s *AssumeRoleWithWebIdentityInput) SetWebIdentityToken(v string) *AssumeRoleWithWebIdentityInput { s.WebIdentityToken = &v return s } // Contains the response to a successful AssumeRoleWithWebIdentity request, // including temporary Amazon Web Services credentials that can be used to make // Amazon Web Services requests. type AssumeRoleWithWebIdentityOutput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers // that you can use to refer to the resulting temporary security credentials. // For example, you can reference these credentials as a principal in a resource-based // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName // that you specified when you called AssumeRole. AssumedRoleUser *AssumedRoleUser `type:"structure"` // The intended audience (also known as client ID) of the web identity token. // This is traditionally the client identifier issued to the application that // requested the web identity token. Audience *string `type:"string"` // The temporary security credentials, which include an access key ID, a secret // access key, and a security token. // // The size of the security token that STS API operations return is not fixed. // We strongly recommend that you make no assumptions about the maximum size. Credentials *Credentials `type:"structure"` // A percentage value that indicates the packed size of the session policies // and session tags combined passed in the request. The request fails if the // packed size is greater than 100 percent, which means the policies and tags // exceeded the allowed space. PackedPolicySize *int64 `type:"integer"` // The issuing authority of the web identity token presented. For OpenID Connect // ID tokens, this contains the value of the iss field. For OAuth 2.0 access // tokens, this contains the value of the ProviderId parameter that was passed // in the AssumeRoleWithWebIdentity request. Provider *string `type:"string"` // The value of the source identity that is returned in the JSON web token (JWT) // from the identity provider. // // You can require users to set a source identity value when they assume a role. // You do this by using the sts:SourceIdentity condition key in a role trust // policy. That way, actions that are taken with the role are associated with // that user. After the source identity is set, the value cannot be changed. // It is present in the request for all actions that are taken by the role and // persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining) // sessions. You can configure your identity provider to use an attribute associated // with your users, like user name or email, as the source identity when calling // AssumeRoleWithWebIdentity. You do this by adding a claim to the JSON web // token. To learn more about OIDC tokens and claims, see Using Tokens with // User Pools (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html) // in the Amazon Cognito Developer Guide. For more information about using source // identity, see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) // in the IAM User Guide. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@- SourceIdentity *string `min:"2" type:"string"` // The unique user identifier that is returned by the identity provider. This // identifier is associated with the WebIdentityToken that was submitted with // the AssumeRoleWithWebIdentity call. The identifier is typically unique to // the user and the application that acquired the WebIdentityToken (pairwise // identifier). For OpenID Connect ID tokens, this field contains the value // returned by the identity provider as the token's sub (Subject) claim. SubjectFromWebIdentityToken *string `min:"6" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleWithWebIdentityOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumeRoleWithWebIdentityOutput) GoString() string { return s.String() } // SetAssumedRoleUser sets the AssumedRoleUser field's value. func (s *AssumeRoleWithWebIdentityOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleWithWebIdentityOutput { s.AssumedRoleUser = v return s } // SetAudience sets the Audience field's value. func (s *AssumeRoleWithWebIdentityOutput) SetAudience(v string) *AssumeRoleWithWebIdentityOutput { s.Audience = &v return s } // SetCredentials sets the Credentials field's value. func (s *AssumeRoleWithWebIdentityOutput) SetCredentials(v *Credentials) *AssumeRoleWithWebIdentityOutput { s.Credentials = v return s } // SetPackedPolicySize sets the PackedPolicySize field's value. func (s *AssumeRoleWithWebIdentityOutput) SetPackedPolicySize(v int64) *AssumeRoleWithWebIdentityOutput { s.PackedPolicySize = &v return s } // SetProvider sets the Provider field's value. func (s *AssumeRoleWithWebIdentityOutput) SetProvider(v string) *AssumeRoleWithWebIdentityOutput { s.Provider = &v return s } // SetSourceIdentity sets the SourceIdentity field's value. func (s *AssumeRoleWithWebIdentityOutput) SetSourceIdentity(v string) *AssumeRoleWithWebIdentityOutput { s.SourceIdentity = &v return s } // SetSubjectFromWebIdentityToken sets the SubjectFromWebIdentityToken field's value. func (s *AssumeRoleWithWebIdentityOutput) SetSubjectFromWebIdentityToken(v string) *AssumeRoleWithWebIdentityOutput { s.SubjectFromWebIdentityToken = &v return s } // The identifiers for the temporary security credentials that the operation // returns. type AssumedRoleUser struct { _ struct{} `type:"structure"` // The ARN of the temporary security credentials that are returned from the // AssumeRole action. For more information about ARNs and how to use them in // policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) // in the IAM User Guide. // // Arn is a required field Arn *string `min:"20" type:"string" required:"true"` // A unique identifier that contains the role ID and the role session name of // the role that is being assumed. The role ID is generated by Amazon Web Services // when the role is created. // // AssumedRoleId is a required field AssumedRoleId *string `min:"2" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumedRoleUser) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s AssumedRoleUser) GoString() string { return s.String() } // SetArn sets the Arn field's value. func (s *AssumedRoleUser) SetArn(v string) *AssumedRoleUser { s.Arn = &v return s } // SetAssumedRoleId sets the AssumedRoleId field's value. func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser { s.AssumedRoleId = &v return s } // Amazon Web Services credentials for API authentication. type Credentials struct { _ struct{} `type:"structure"` // The access key ID that identifies the temporary security credentials. // // AccessKeyId is a required field AccessKeyId *string `min:"16" type:"string" required:"true"` // The date on which the current credentials expire. // // Expiration is a required field Expiration *time.Time `type:"timestamp" required:"true"` // The secret access key that can be used to sign requests. // // SecretAccessKey is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by Credentials's // String and GoString methods. // // SecretAccessKey is a required field SecretAccessKey *string `type:"string" required:"true" sensitive:"true"` // The token that users must pass to the service API to use the temporary credentials. // // SessionToken is a required field SessionToken *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Credentials) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Credentials) GoString() string { return s.String() } // SetAccessKeyId sets the AccessKeyId field's value. func (s *Credentials) SetAccessKeyId(v string) *Credentials { s.AccessKeyId = &v return s } // SetExpiration sets the Expiration field's value. func (s *Credentials) SetExpiration(v time.Time) *Credentials { s.Expiration = &v return s } // SetSecretAccessKey sets the SecretAccessKey field's value. func (s *Credentials) SetSecretAccessKey(v string) *Credentials { s.SecretAccessKey = &v return s } // SetSessionToken sets the SessionToken field's value. func (s *Credentials) SetSessionToken(v string) *Credentials { s.SessionToken = &v return s } type DecodeAuthorizationMessageInput struct { _ struct{} `type:"structure"` // The encoded message that was returned with the response. // // EncodedMessage is a required field EncodedMessage *string `min:"1" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DecodeAuthorizationMessageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DecodeAuthorizationMessageInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DecodeAuthorizationMessageInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DecodeAuthorizationMessageInput"} if s.EncodedMessage == nil { invalidParams.Add(request.NewErrParamRequired("EncodedMessage")) } if s.EncodedMessage != nil && len(*s.EncodedMessage) < 1 { invalidParams.Add(request.NewErrParamMinLen("EncodedMessage", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetEncodedMessage sets the EncodedMessage field's value. func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) *DecodeAuthorizationMessageInput { s.EncodedMessage = &v return s } // A document that contains additional information about the authorization status // of a request from an encoded message that is returned in response to an Amazon // Web Services request. type DecodeAuthorizationMessageOutput struct { _ struct{} `type:"structure"` // The API returns a response with the decoded message. DecodedMessage *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DecodeAuthorizationMessageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s DecodeAuthorizationMessageOutput) GoString() string { return s.String() } // SetDecodedMessage sets the DecodedMessage field's value. func (s *DecodeAuthorizationMessageOutput) SetDecodedMessage(v string) *DecodeAuthorizationMessageOutput { s.DecodedMessage = &v return s } // Identifiers for the federated user that is associated with the credentials. type FederatedUser struct { _ struct{} `type:"structure"` // The ARN that specifies the federated user that is associated with the credentials. // For more information about ARNs and how to use them in policies, see IAM // Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) // in the IAM User Guide. // // Arn is a required field Arn *string `min:"20" type:"string" required:"true"` // The string that identifies the federated user associated with the credentials, // similar to the unique ID of an IAM user. // // FederatedUserId is a required field FederatedUserId *string `min:"2" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FederatedUser) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s FederatedUser) GoString() string { return s.String() } // SetArn sets the Arn field's value. func (s *FederatedUser) SetArn(v string) *FederatedUser { s.Arn = &v return s } // SetFederatedUserId sets the FederatedUserId field's value. func (s *FederatedUser) SetFederatedUserId(v string) *FederatedUser { s.FederatedUserId = &v return s } type GetAccessKeyInfoInput struct { _ struct{} `type:"structure"` // The identifier of an access key. // // This parameter allows (through its regex pattern) a string of characters // that can consist of any upper- or lowercase letter or digit. // // AccessKeyId is a required field AccessKeyId *string `min:"16" type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetAccessKeyInfoInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetAccessKeyInfoInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetAccessKeyInfoInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetAccessKeyInfoInput"} if s.AccessKeyId == nil { invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) } if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAccessKeyId sets the AccessKeyId field's value. func (s *GetAccessKeyInfoInput) SetAccessKeyId(v string) *GetAccessKeyInfoInput { s.AccessKeyId = &v return s } type GetAccessKeyInfoOutput struct { _ struct{} `type:"structure"` // The number used to identify the Amazon Web Services account. Account *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetAccessKeyInfoOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetAccessKeyInfoOutput) GoString() string { return s.String() } // SetAccount sets the Account field's value. func (s *GetAccessKeyInfoOutput) SetAccount(v string) *GetAccessKeyInfoOutput { s.Account = &v return s } type GetCallerIdentityInput struct { _ struct{} `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCallerIdentityInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCallerIdentityInput) GoString() string { return s.String() } // Contains the response to a successful GetCallerIdentity request, including // information about the entity making the request. type GetCallerIdentityOutput struct { _ struct{} `type:"structure"` // The Amazon Web Services account ID number of the account that owns or contains // the calling entity. Account *string `type:"string"` // The Amazon Web Services ARN associated with the calling entity. Arn *string `min:"20" type:"string"` // The unique identifier of the calling entity. The exact value depends on the // type of entity that is making the call. The values returned are those listed // in the aws:userid column in the Principal table (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable) // found on the Policy Variables reference page in the IAM User Guide. UserId *string `type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCallerIdentityOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetCallerIdentityOutput) GoString() string { return s.String() } // SetAccount sets the Account field's value. func (s *GetCallerIdentityOutput) SetAccount(v string) *GetCallerIdentityOutput { s.Account = &v return s } // SetArn sets the Arn field's value. func (s *GetCallerIdentityOutput) SetArn(v string) *GetCallerIdentityOutput { s.Arn = &v return s } // SetUserId sets the UserId field's value. func (s *GetCallerIdentityOutput) SetUserId(v string) *GetCallerIdentityOutput { s.UserId = &v return s } type GetFederationTokenInput struct { _ struct{} `type:"structure"` // The duration, in seconds, that the session should last. Acceptable durations // for federation sessions range from 900 seconds (15 minutes) to 129,600 seconds // (36 hours), with 43,200 seconds (12 hours) as the default. Sessions obtained // using root user credentials are restricted to a maximum of 3,600 seconds // (one hour). If the specified duration is longer than one hour, the session // obtained by using root user credentials defaults to one hour. DurationSeconds *int64 `min:"900" type:"integer"` // The name of the federated user. The name is used as an identifier for the // temporary security credentials (such as Bob). For example, you can reference // the federated user name in a resource-based policy, such as in an Amazon // S3 bucket policy. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@- // // Name is a required field Name *string `min:"2" type:"string" required:"true"` // An IAM policy in JSON format that you want to use as an inline session policy. // // You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policy Amazon // Resource Names (ARNs) to use as managed session policies. // // This parameter is optional. However, if you do not pass any session policies, // then the resulting federated user session has no permissions. // // When you pass session policies, the session permissions are the intersection // of the IAM user policies and the session policies that you pass. This gives // you a way to further restrict the permissions for a federated user. You cannot // use session policies to grant more permissions than those that are defined // in the permissions policy of the IAM user. For more information, see Session // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // The resulting credentials can be used to access a resource that has a resource-based // policy. If that policy specifically references the federated user session // in the Principal element of the policy, the session has the permissions allowed // by the policy. These permissions are granted in addition to the permissions // that are granted by the session policies. // // The plaintext that you use for both inline and managed session policies can't // exceed 2,048 characters. The JSON policy characters can be any ASCII character // from the space character to the end of the valid character list (\u0020 through // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. Policy *string `min:"1" type:"string"` // The Amazon Resource Names (ARNs) of the IAM managed policies that you want // to use as a managed session policy. The policies must exist in the same account // as the IAM user that is requesting federated access. // // You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policy Amazon // Resource Names (ARNs) to use as managed session policies. The plaintext that // you use for both inline and managed session policies can't exceed 2,048 characters. // You can provide up to 10 managed policy ARNs. For more information about // ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. // // This parameter is optional. However, if you do not pass any session policies, // then the resulting federated user session has no permissions. // // When you pass session policies, the session permissions are the intersection // of the IAM user policies and the session policies that you pass. This gives // you a way to further restrict the permissions for a federated user. You cannot // use session policies to grant more permissions than those that are defined // in the permissions policy of the IAM user. For more information, see Session // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // The resulting credentials can be used to access a resource that has a resource-based // policy. If that policy specifically references the federated user session // in the Principal element of the policy, the session has the permissions allowed // by the policy. These permissions are granted in addition to the permissions // that are granted by the session policies. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. PolicyArns []*PolicyDescriptorType `type:"list"` // A list of session tags. Each session tag consists of a key name and an associated // value. For more information about session tags, see Passing Session Tags // in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // This parameter is optional. You can pass up to 50 session tags. The plaintext // session tag keys can’t exceed 128 characters and the values can’t exceed // 256 characters. For these and additional limits, see IAM and STS Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has // a separate limit. Your request can fail for this limit even if your plaintext // meets the other requirements. The PackedPolicySize response element indicates // by percentage how close the policies and tags for your request are to the // upper size limit. // // You can pass a session tag with the same key as a tag that is already attached // to the user you are federating. When you do, session tags override a user // tag with the same key. // // Tag key–value pairs are not case sensitive, but case is preserved. This // means that you cannot have separate Department and department tag keys. Assume // that the role has the Department=Marketing tag and you pass the department=engineering // session tag. Department and department are not saved as separate tags, and // the session tag passed in the request takes precedence over the role tag. Tags []*Tag `type:"list"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetFederationTokenInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetFederationTokenInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetFederationTokenInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetFederationTokenInput"} if s.DurationSeconds != nil && *s.DurationSeconds < 900 { invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 2 { invalidParams.Add(request.NewErrParamMinLen("Name", 2)) } if s.Policy != nil && len(*s.Policy) < 1 { invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) } if s.PolicyArns != nil { for i, v := range s.PolicyArns { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), 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 } // SetDurationSeconds sets the DurationSeconds field's value. func (s *GetFederationTokenInput) SetDurationSeconds(v int64) *GetFederationTokenInput { s.DurationSeconds = &v return s } // SetName sets the Name field's value. func (s *GetFederationTokenInput) SetName(v string) *GetFederationTokenInput { s.Name = &v return s } // SetPolicy sets the Policy field's value. func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTokenInput { s.Policy = &v return s } // SetPolicyArns sets the PolicyArns field's value. func (s *GetFederationTokenInput) SetPolicyArns(v []*PolicyDescriptorType) *GetFederationTokenInput { s.PolicyArns = v return s } // SetTags sets the Tags field's value. func (s *GetFederationTokenInput) SetTags(v []*Tag) *GetFederationTokenInput { s.Tags = v return s } // Contains the response to a successful GetFederationToken request, including // temporary Amazon Web Services credentials that can be used to make Amazon // Web Services requests. type GetFederationTokenOutput struct { _ struct{} `type:"structure"` // The temporary security credentials, which include an access key ID, a secret // access key, and a security (or session) token. // // The size of the security token that STS API operations return is not fixed. // We strongly recommend that you make no assumptions about the maximum size. Credentials *Credentials `type:"structure"` // Identifiers for the federated user associated with the credentials (such // as arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob). You // can use the federated user's ARN in your resource-based policies, such as // an Amazon S3 bucket policy. FederatedUser *FederatedUser `type:"structure"` // A percentage value that indicates the packed size of the session policies // and session tags combined passed in the request. The request fails if the // packed size is greater than 100 percent, which means the policies and tags // exceeded the allowed space. PackedPolicySize *int64 `type:"integer"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetFederationTokenOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetFederationTokenOutput) GoString() string { return s.String() } // SetCredentials sets the Credentials field's value. func (s *GetFederationTokenOutput) SetCredentials(v *Credentials) *GetFederationTokenOutput { s.Credentials = v return s } // SetFederatedUser sets the FederatedUser field's value. func (s *GetFederationTokenOutput) SetFederatedUser(v *FederatedUser) *GetFederationTokenOutput { s.FederatedUser = v return s } // SetPackedPolicySize sets the PackedPolicySize field's value. func (s *GetFederationTokenOutput) SetPackedPolicySize(v int64) *GetFederationTokenOutput { s.PackedPolicySize = &v return s } type GetSessionTokenInput struct { _ struct{} `type:"structure"` // The duration, in seconds, that the credentials should remain valid. Acceptable // durations for IAM user sessions range from 900 seconds (15 minutes) to 129,600 // seconds (36 hours), with 43,200 seconds (12 hours) as the default. Sessions // for Amazon Web Services account owners are restricted to a maximum of 3,600 // seconds (one hour). If the duration is longer than one hour, the session // for Amazon Web Services account owners defaults to one hour. DurationSeconds *int64 `min:"900" type:"integer"` // The identification number of the MFA device that is associated with the IAM // user who is making the GetSessionToken call. Specify this value if the IAM // user has a policy that requires MFA authentication. The value is either the // serial number for a hardware device (such as GAHT12345678) or an Amazon Resource // Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). // You can find the device for an IAM user by going to the Amazon Web Services // Management Console and viewing the user's security credentials. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can // also include underscores or any of the following characters: =,.@:/- SerialNumber *string `min:"9" type:"string"` // The value provided by the MFA device, if MFA is required. If any policy requires // the IAM user to submit an MFA code, specify this value. If MFA authentication // is required, the user must provide a code when requesting a set of temporary // security credentials. A user who fails to provide the code receives an "access // denied" response when requesting resources that require MFA authentication. // // The format for this parameter, as described by its regex pattern, is a sequence // of six numeric digits. TokenCode *string `min:"6" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetSessionTokenInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetSessionTokenInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *GetSessionTokenInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetSessionTokenInput"} if s.DurationSeconds != nil && *s.DurationSeconds < 900 { invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) } if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) } if s.TokenCode != nil && len(*s.TokenCode) < 6 { invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDurationSeconds sets the DurationSeconds field's value. func (s *GetSessionTokenInput) SetDurationSeconds(v int64) *GetSessionTokenInput { s.DurationSeconds = &v return s } // SetSerialNumber sets the SerialNumber field's value. func (s *GetSessionTokenInput) SetSerialNumber(v string) *GetSessionTokenInput { s.SerialNumber = &v return s } // SetTokenCode sets the TokenCode field's value. func (s *GetSessionTokenInput) SetTokenCode(v string) *GetSessionTokenInput { s.TokenCode = &v return s } // Contains the response to a successful GetSessionToken request, including // temporary Amazon Web Services credentials that can be used to make Amazon // Web Services requests. type GetSessionTokenOutput struct { _ struct{} `type:"structure"` // The temporary security credentials, which include an access key ID, a secret // access key, and a security (or session) token. // // The size of the security token that STS API operations return is not fixed. // We strongly recommend that you make no assumptions about the maximum size. Credentials *Credentials `type:"structure"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetSessionTokenOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s GetSessionTokenOutput) GoString() string { return s.String() } // SetCredentials sets the Credentials field's value. func (s *GetSessionTokenOutput) SetCredentials(v *Credentials) *GetSessionTokenOutput { s.Credentials = v return s } // A reference to the IAM managed policy that is passed as a session policy // for a role session or a federated user session. type PolicyDescriptorType struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the IAM managed policy to use as a session // policy for the role. For more information about ARNs, see Amazon Resource // Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // in the Amazon Web Services General Reference. Arn *string `locationName:"arn" min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PolicyDescriptorType) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s PolicyDescriptorType) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *PolicyDescriptorType) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PolicyDescriptorType"} 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 *PolicyDescriptorType) SetArn(v string) *PolicyDescriptorType { s.Arn = &v return s } // Contains information about the provided context. This includes the signed // and encrypted trusted context assertion and the context provider ARN from // which the trusted context assertion was generated. type ProvidedContext struct { _ struct{} `type:"structure"` // The signed and encrypted trusted context assertion generated by the context // provider. The trusted context assertion is signed and encrypted by Amazon // Web Services STS. ContextAssertion *string `min:"4" type:"string"` // The context provider ARN from which the trusted context assertion was generated. ProviderArn *string `min:"20" type:"string"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvidedContext) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s ProvidedContext) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ProvidedContext) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ProvidedContext"} if s.ContextAssertion != nil && len(*s.ContextAssertion) < 4 { invalidParams.Add(request.NewErrParamMinLen("ContextAssertion", 4)) } if s.ProviderArn != nil && len(*s.ProviderArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("ProviderArn", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetContextAssertion sets the ContextAssertion field's value. func (s *ProvidedContext) SetContextAssertion(v string) *ProvidedContext { s.ContextAssertion = &v return s } // SetProviderArn sets the ProviderArn field's value. func (s *ProvidedContext) SetProviderArn(v string) *ProvidedContext { s.ProviderArn = &v return s } // You can pass custom key-value pair attributes when you assume a role or federate // a user. These are called session tags. You can then use the session tags // to control access to resources. For more information, see Tagging Amazon // Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. type Tag struct { _ struct{} `type:"structure"` // The key for a session tag. // // You can pass up to 50 session tags. The plain text session tag keys can’t // exceed 128 characters. For these and additional limits, see IAM and STS Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` // The value for a session tag. // // You can pass up to 50 session tags. The plain text session tag values can’t // exceed 256 characters. For these and additional limits, see IAM and STS Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // // Value is a required field Value *string `type:"string" required:"true"` } // String returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". func (s Tag) String() string { return awsutil.Prettify(s) } // GoString returns the string representation. // // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go ================================================ package sts import "github.com/aws/aws-sdk-go/aws/request" func init() { initRequest = customizeRequest } func customizeRequest(r *request.Request) { r.RetryErrorCodes = append(r.RetryErrorCodes, ErrCodeIDPCommunicationErrorException) } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sts/doc.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package sts provides the client and types for making API // requests to AWS Security Token Service. // // Security Token Service (STS) enables you to request temporary, limited-privilege // credentials for users. This guide provides descriptions of the STS API. For // more information about using this service, see Temporary Security Credentials // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html). // // See https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 for more information on this service. // // See sts package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/sts/ // // # Using the Client // // To contact AWS Security Token Service 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 Security Token Service client STS for more // information on creating client for this service. // https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New package sts ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sts/errors.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package sts const ( // ErrCodeExpiredTokenException for service response error code // "ExpiredTokenException". // // The web identity token that was passed is expired or is not valid. Get a // new identity token from the identity provider and then retry the request. ErrCodeExpiredTokenException = "ExpiredTokenException" // ErrCodeIDPCommunicationErrorException for service response error code // "IDPCommunicationError". // // The request could not be fulfilled because the identity provider (IDP) that // was asked to verify the incoming identity token could not be reached. This // is often a transient error caused by network conditions. Retry the request // a limited number of times so that you don't exceed the request rate. If the // error persists, the identity provider might be down or not responding. ErrCodeIDPCommunicationErrorException = "IDPCommunicationError" // ErrCodeIDPRejectedClaimException for service response error code // "IDPRejectedClaim". // // The identity provider (IdP) reported that authentication failed. This might // be because the claim is invalid. // // If this error is returned for the AssumeRoleWithWebIdentity operation, it // can also mean that the claim has expired or has been explicitly revoked. ErrCodeIDPRejectedClaimException = "IDPRejectedClaim" // ErrCodeInvalidAuthorizationMessageException for service response error code // "InvalidAuthorizationMessageException". // // The error returned if the message passed to DecodeAuthorizationMessage was // invalid. This can happen if the token contains invalid characters, such as // linebreaks. ErrCodeInvalidAuthorizationMessageException = "InvalidAuthorizationMessageException" // ErrCodeInvalidIdentityTokenException for service response error code // "InvalidIdentityToken". // // The web identity token that was passed could not be validated by Amazon Web // Services. Get a new identity token from the identity provider and then retry // the request. ErrCodeInvalidIdentityTokenException = "InvalidIdentityToken" // ErrCodeMalformedPolicyDocumentException for service response error code // "MalformedPolicyDocument". // // The request was rejected because the policy document was malformed. The error // message describes the specific error. ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocument" // ErrCodePackedPolicyTooLargeException for service response error code // "PackedPolicyTooLarge". // // The request was rejected because the total packed size of the session policies // and session tags combined was too large. An Amazon Web Services conversion // compresses the session policy document, session policy ARNs, and session // tags into a packed binary format that has a separate limit. The error message // indicates by percentage how close the policies and tags are to the upper // size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy // and session tag limits. For more information, see IAM and STS Entity Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // in the IAM User Guide. ErrCodePackedPolicyTooLargeException = "PackedPolicyTooLarge" // ErrCodeRegionDisabledException for service response error code // "RegionDisabledException". // // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating // and Deactivating Amazon Web Services STS in an Amazon Web Services Region // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. ErrCodeRegionDisabledException = "RegionDisabledException" ) ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sts/service.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package sts 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/query" ) // STS provides the API operation methods for making requests to // AWS Security Token Service. See this package's package overview docs // for details on the service. // // STS methods are safe to use concurrently. It is not safe to // modify mutate any of the struct's properties though. type STS 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 = "sts" // Name of service. EndpointsID = ServiceName // ID to lookup a service endpoint with. ServiceID = "STS" // ServiceID is a unique identifier of a specific service. ) // New creates a new instance of the STS client with a session. // If additional configuration is needed for the client instance use the optional // aws.Config parameter to add your extra config. // // Example: // // mySession := session.Must(session.NewSession()) // // // Create a STS client from just a session. // svc := sts.New(mySession) // // // Create a STS client with additional configuration // svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS { c := p.ClientConfig(EndpointsID, cfgs...) if c.SigningNameDerived || len(c.SigningName) == 0 { c.SigningName = EndpointsID // No Fallback } return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) } // newClient creates, initializes and returns a new service client instance. func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *STS { svc := &STS{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: ServiceName, ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, PartitionID: partitionID, Endpoint: endpoint, APIVersion: "2011-06-15", ResolvedRegion: resolvedRegion, }, handlers, ), } // Handlers svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) svc.Handlers.Build.PushBackNamed(query.BuildHandler) svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) // Run custom client initialization if present if initClient != nil { initClient(svc.Client) } return svc } // newRequest creates a new request for a STS operation and runs any // custom request initialization. func (c *STS) 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 } ================================================ FILE: vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go ================================================ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package stsiface provides an interface to enable mocking the AWS Security Token Service service client // for testing your code. // // It is important to note that this interface will have breaking changes // when the service model is updated and adds new API operations, paginators, // and waiters. package stsiface import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/service/sts" ) // STSAPI provides an interface to enable mocking the // sts.STS service client's API operation, // paginators, and waiters. This make unit testing your code that calls out // to the SDK's service client's calls easier. // // The best way to use this interface is so the SDK's service client's calls // can be stubbed out for unit testing your code with the SDK without needing // to inject custom request handlers into the SDK's request pipeline. // // // myFunc uses an SDK service client to make a request to // // AWS Security Token Service. // func myFunc(svc stsiface.STSAPI) bool { // // Make svc.AssumeRole request // } // // func main() { // sess := session.New() // svc := sts.New(sess) // // myFunc(svc) // } // // In your _test.go file: // // // Define a mock struct to be used in your unit tests of myFunc. // type mockSTSClient struct { // stsiface.STSAPI // } // func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) { // // mock response/functionality // } // // func TestMyFunc(t *testing.T) { // // Setup Test // mockSvc := &mockSTSClient{} // // myfunc(mockSvc) // // // Verify myFunc's functionality // } // // It is important to note that this interface will have breaking changes // when the service model is updated and adds new API operations, paginators, // and waiters. Its suggested to use the pattern above for testing, or using // tooling to generate mocks to satisfy the interfaces. type STSAPI interface { AssumeRole(*sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error) AssumeRoleRequest(*sts.AssumeRoleInput) (*request.Request, *sts.AssumeRoleOutput) AssumeRoleWithSAML(*sts.AssumeRoleWithSAMLInput) (*sts.AssumeRoleWithSAMLOutput, error) AssumeRoleWithSAMLWithContext(aws.Context, *sts.AssumeRoleWithSAMLInput, ...request.Option) (*sts.AssumeRoleWithSAMLOutput, error) AssumeRoleWithSAMLRequest(*sts.AssumeRoleWithSAMLInput) (*request.Request, *sts.AssumeRoleWithSAMLOutput) AssumeRoleWithWebIdentity(*sts.AssumeRoleWithWebIdentityInput) (*sts.AssumeRoleWithWebIdentityOutput, error) AssumeRoleWithWebIdentityWithContext(aws.Context, *sts.AssumeRoleWithWebIdentityInput, ...request.Option) (*sts.AssumeRoleWithWebIdentityOutput, error) AssumeRoleWithWebIdentityRequest(*sts.AssumeRoleWithWebIdentityInput) (*request.Request, *sts.AssumeRoleWithWebIdentityOutput) DecodeAuthorizationMessage(*sts.DecodeAuthorizationMessageInput) (*sts.DecodeAuthorizationMessageOutput, error) DecodeAuthorizationMessageWithContext(aws.Context, *sts.DecodeAuthorizationMessageInput, ...request.Option) (*sts.DecodeAuthorizationMessageOutput, error) DecodeAuthorizationMessageRequest(*sts.DecodeAuthorizationMessageInput) (*request.Request, *sts.DecodeAuthorizationMessageOutput) GetAccessKeyInfo(*sts.GetAccessKeyInfoInput) (*sts.GetAccessKeyInfoOutput, error) GetAccessKeyInfoWithContext(aws.Context, *sts.GetAccessKeyInfoInput, ...request.Option) (*sts.GetAccessKeyInfoOutput, error) GetAccessKeyInfoRequest(*sts.GetAccessKeyInfoInput) (*request.Request, *sts.GetAccessKeyInfoOutput) GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error) GetCallerIdentityWithContext(aws.Context, *sts.GetCallerIdentityInput, ...request.Option) (*sts.GetCallerIdentityOutput, error) GetCallerIdentityRequest(*sts.GetCallerIdentityInput) (*request.Request, *sts.GetCallerIdentityOutput) GetFederationToken(*sts.GetFederationTokenInput) (*sts.GetFederationTokenOutput, error) GetFederationTokenWithContext(aws.Context, *sts.GetFederationTokenInput, ...request.Option) (*sts.GetFederationTokenOutput, error) GetFederationTokenRequest(*sts.GetFederationTokenInput) (*request.Request, *sts.GetFederationTokenOutput) GetSessionToken(*sts.GetSessionTokenInput) (*sts.GetSessionTokenOutput, error) GetSessionTokenWithContext(aws.Context, *sts.GetSessionTokenInput, ...request.Option) (*sts.GetSessionTokenOutput, error) GetSessionTokenRequest(*sts.GetSessionTokenInput) (*request.Request, *sts.GetSessionTokenOutput) } var _ STSAPI = (*sts.STS)(nil) ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/.gitignore ================================================ # Compiled Object files, Static and Dynamic libs (Shared Objects) *.o *.a *.so # Folders _obj _test # Architecture specific extensions/prefixes *.[568vq] [568vq].out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* _testmain.go *.exe ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/.travis.yml ================================================ language: go go: - 1.7 - 1.x - tip before_install: - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover script: - $HOME/gopath/bin/goveralls -service=travis-ci ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2014 Cenk Altı Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/README.md ================================================ # Exponential Backoff [![GoDoc][godoc image]][godoc] [![Build Status][travis image]][travis] [![Coverage Status][coveralls image]][coveralls] This is a Go port of the exponential backoff algorithm from [Google's HTTP Client Library for Java][google-http-java-client]. [Exponential backoff][exponential backoff wiki] is an algorithm that uses feedback to multiplicatively decrease the rate of some process, in order to gradually find an acceptable rate. The retries exponentially increase and stop increasing when a certain threshold is met. ## Usage Import path is `github.com/cenkalti/backoff/v3`. Please note the version part at the end. godoc.org does not support modules yet, so you can use https://godoc.org/gopkg.in/cenkalti/backoff.v3 to view the documentation. ## Contributing * I would like to keep this library as small as possible. * Please don't send a PR without opening an issue and discussing it first. * If proposed change is not a common use case, I will probably not accept it. [godoc]: https://godoc.org/github.com/cenkalti/backoff [godoc image]: https://godoc.org/github.com/cenkalti/backoff?status.png [travis]: https://travis-ci.org/cenkalti/backoff [travis image]: https://travis-ci.org/cenkalti/backoff.png?branch=master [coveralls]: https://coveralls.io/github/cenkalti/backoff?branch=master [coveralls image]: https://coveralls.io/repos/github/cenkalti/backoff/badge.svg?branch=master [google-http-java-client]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java [exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff [advanced example]: https://godoc.org/github.com/cenkalti/backoff#example_ ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/backoff.go ================================================ // Package backoff implements backoff algorithms for retrying operations. // // Use Retry function for retrying operations that may fail. // If Retry does not meet your needs, // copy/paste the function into your project and modify as you wish. // // There is also Ticker type similar to time.Ticker. // You can use it if you need to work with channels. // // See Examples section below for usage examples. package backoff import "time" // BackOff is a backoff policy for retrying an operation. type BackOff interface { // NextBackOff returns the duration to wait before retrying the operation, // or backoff. Stop to indicate that no more retries should be made. // // Example usage: // // duration := backoff.NextBackOff(); // if (duration == backoff.Stop) { // // Do not retry operation. // } else { // // Sleep for duration and retry operation. // } // NextBackOff() time.Duration // Reset to initial state. Reset() } // Stop indicates that no more retries should be made for use in NextBackOff(). const Stop time.Duration = -1 // ZeroBackOff is a fixed backoff policy whose backoff time is always zero, // meaning that the operation is retried immediately without waiting, indefinitely. type ZeroBackOff struct{} func (b *ZeroBackOff) Reset() {} func (b *ZeroBackOff) NextBackOff() time.Duration { return 0 } // StopBackOff is a fixed backoff policy that always returns backoff.Stop for // NextBackOff(), meaning that the operation should never be retried. type StopBackOff struct{} func (b *StopBackOff) Reset() {} func (b *StopBackOff) NextBackOff() time.Duration { return Stop } // ConstantBackOff is a backoff policy that always returns the same backoff delay. // This is in contrast to an exponential backoff policy, // which returns a delay that grows longer as you call NextBackOff() over and over again. type ConstantBackOff struct { Interval time.Duration } func (b *ConstantBackOff) Reset() {} func (b *ConstantBackOff) NextBackOff() time.Duration { return b.Interval } func NewConstantBackOff(d time.Duration) *ConstantBackOff { return &ConstantBackOff{Interval: d} } ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/context.go ================================================ package backoff import ( "context" "time" ) // BackOffContext is a backoff policy that stops retrying after the context // is canceled. type BackOffContext interface { // nolint: golint BackOff Context() context.Context } type backOffContext struct { BackOff ctx context.Context } // WithContext returns a BackOffContext with context ctx // // ctx must not be nil func WithContext(b BackOff, ctx context.Context) BackOffContext { // nolint: golint if ctx == nil { panic("nil context") } if b, ok := b.(*backOffContext); ok { return &backOffContext{ BackOff: b.BackOff, ctx: ctx, } } return &backOffContext{ BackOff: b, ctx: ctx, } } func getContext(b BackOff) context.Context { if cb, ok := b.(BackOffContext); ok { return cb.Context() } if tb, ok := b.(*backOffTries); ok { return getContext(tb.delegate) } return context.Background() } func (b *backOffContext) Context() context.Context { return b.ctx } func (b *backOffContext) NextBackOff() time.Duration { select { case <-b.ctx.Done(): return Stop default: } next := b.BackOff.NextBackOff() if deadline, ok := b.ctx.Deadline(); ok && deadline.Sub(time.Now()) < next { // nolint: gosimple return Stop } return next } ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/exponential.go ================================================ package backoff import ( "math/rand" "time" ) /* ExponentialBackOff is a backoff implementation that increases the backoff period for each retry attempt using a randomization function that grows exponentially. NextBackOff() is calculated using the following formula: randomized interval = RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor]) In other words NextBackOff() will range between the randomization factor percentage below and above the retry interval. For example, given the following parameters: RetryInterval = 2 RandomizationFactor = 0.5 Multiplier = 2 the actual backoff period used in the next retry attempt will range between 1 and 3 seconds, multiplied by the exponential, that is, between 2 and 6 seconds. Note: MaxInterval caps the RetryInterval and not the randomized interval. If the time elapsed since an ExponentialBackOff instance is created goes past the MaxElapsedTime, then the method NextBackOff() starts returning backoff.Stop. The elapsed time can be reset by calling Reset(). Example: Given the following default arguments, for 10 tries the sequence will be, and assuming we go over the MaxElapsedTime on the 10th try: Request # RetryInterval (seconds) Randomized Interval (seconds) 1 0.5 [0.25, 0.75] 2 0.75 [0.375, 1.125] 3 1.125 [0.562, 1.687] 4 1.687 [0.8435, 2.53] 5 2.53 [1.265, 3.795] 6 3.795 [1.897, 5.692] 7 5.692 [2.846, 8.538] 8 8.538 [4.269, 12.807] 9 12.807 [6.403, 19.210] 10 19.210 backoff.Stop Note: Implementation is not thread-safe. */ type ExponentialBackOff struct { InitialInterval time.Duration RandomizationFactor float64 Multiplier float64 MaxInterval time.Duration // After MaxElapsedTime the ExponentialBackOff stops. // It never stops if MaxElapsedTime == 0. MaxElapsedTime time.Duration Clock Clock currentInterval time.Duration startTime time.Time } // Clock is an interface that returns current time for BackOff. type Clock interface { Now() time.Time } // Default values for ExponentialBackOff. const ( DefaultInitialInterval = 500 * time.Millisecond DefaultRandomizationFactor = 0.5 DefaultMultiplier = 1.5 DefaultMaxInterval = 60 * time.Second DefaultMaxElapsedTime = 15 * time.Minute ) // NewExponentialBackOff creates an instance of ExponentialBackOff using default values. func NewExponentialBackOff() *ExponentialBackOff { b := &ExponentialBackOff{ InitialInterval: DefaultInitialInterval, RandomizationFactor: DefaultRandomizationFactor, Multiplier: DefaultMultiplier, MaxInterval: DefaultMaxInterval, MaxElapsedTime: DefaultMaxElapsedTime, Clock: SystemClock, } b.Reset() return b } type systemClock struct{} func (t systemClock) Now() time.Time { return time.Now() } // SystemClock implements Clock interface that uses time.Now(). var SystemClock = systemClock{} // Reset the interval back to the initial retry interval and restarts the timer. // Reset must be called before using b. func (b *ExponentialBackOff) Reset() { b.currentInterval = b.InitialInterval b.startTime = b.Clock.Now() } // NextBackOff calculates the next backoff interval using the formula: // Randomized interval = RetryInterval * (1 ± RandomizationFactor) func (b *ExponentialBackOff) NextBackOff() time.Duration { // Make sure we have not gone over the maximum elapsed time. if b.MaxElapsedTime != 0 && b.GetElapsedTime() > b.MaxElapsedTime { return Stop } defer b.incrementCurrentInterval() return getRandomValueFromInterval(b.RandomizationFactor, rand.Float64(), b.currentInterval) } // GetElapsedTime returns the elapsed time since an ExponentialBackOff instance // is created and is reset when Reset() is called. // // The elapsed time is computed using time.Now().UnixNano(). It is // safe to call even while the backoff policy is used by a running // ticker. func (b *ExponentialBackOff) GetElapsedTime() time.Duration { return b.Clock.Now().Sub(b.startTime) } // Increments the current interval by multiplying it with the multiplier. func (b *ExponentialBackOff) incrementCurrentInterval() { // Check for overflow, if overflow is detected set the current interval to the max interval. if float64(b.currentInterval) >= float64(b.MaxInterval)/b.Multiplier { b.currentInterval = b.MaxInterval } else { b.currentInterval = time.Duration(float64(b.currentInterval) * b.Multiplier) } } // Returns a random value from the following interval: // [randomizationFactor * currentInterval, randomizationFactor * currentInterval]. func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration { var delta = randomizationFactor * float64(currentInterval) var minInterval = float64(currentInterval) - delta var maxInterval = float64(currentInterval) + delta // Get a random value from the range [minInterval, maxInterval]. // The formula used below has a +1 because if the minInterval is 1 and the maxInterval is 3 then // we want a 33% chance for selecting either 1, 2 or 3. return time.Duration(minInterval + (random * (maxInterval - minInterval + 1))) } ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/retry.go ================================================ package backoff import "time" // An Operation is executing by Retry() or RetryNotify(). // The operation will be retried using a backoff policy if it returns an error. type Operation func() error // Notify is a notify-on-error function. It receives an operation error and // backoff delay if the operation failed (with an error). // // NOTE that if the backoff policy stated to stop retrying, // the notify function isn't called. type Notify func(error, time.Duration) // Retry the operation o until it does not return error or BackOff stops. // o is guaranteed to be run at least once. // // If o returns a *PermanentError, the operation is not retried, and the // wrapped error is returned. // // Retry sleeps the goroutine for the duration returned by BackOff after a // failed operation returns. func Retry(o Operation, b BackOff) error { return RetryNotify(o, b, nil) } // RetryNotify calls notify function with the error and wait duration // for each failed attempt before sleep. func RetryNotify(operation Operation, b BackOff, notify Notify) error { return RetryNotifyWithTimer(operation, b, notify, nil) } // RetryNotifyWithTimer calls notify function with the error and wait duration using the given Timer // for each failed attempt before sleep. // A default timer that uses system timer is used when nil is passed. func RetryNotifyWithTimer(operation Operation, b BackOff, notify Notify, t Timer) error { var err error var next time.Duration if t == nil { t = &defaultTimer{} } defer func() { t.Stop() }() ctx := getContext(b) b.Reset() for { if err = operation(); err == nil { return nil } if permanent, ok := err.(*PermanentError); ok { return permanent.Err } if next = b.NextBackOff(); next == Stop { return err } if notify != nil { notify(err, next) } t.Start(next) select { case <-ctx.Done(): return ctx.Err() case <-t.C(): } } } // PermanentError signals that the operation should not be retried. type PermanentError struct { Err error } func (e *PermanentError) Error() string { return e.Err.Error() } func (e *PermanentError) Unwrap() error { return e.Err } // Permanent wraps the given err in a *PermanentError. func Permanent(err error) *PermanentError { return &PermanentError{ Err: err, } } ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/ticker.go ================================================ package backoff import ( "context" "sync" "time" ) // Ticker holds a channel that delivers `ticks' of a clock at times reported by a BackOff. // // Ticks will continue to arrive when the previous operation is still running, // so operations that take a while to fail could run in quick succession. type Ticker struct { C <-chan time.Time c chan time.Time b BackOff ctx context.Context timer Timer stop chan struct{} stopOnce sync.Once } // NewTicker returns a new Ticker containing a channel that will send // the time at times specified by the BackOff argument. Ticker is // guaranteed to tick at least once. The channel is closed when Stop // method is called or BackOff stops. It is not safe to manipulate the // provided backoff policy (notably calling NextBackOff or Reset) // while the ticker is running. func NewTicker(b BackOff) *Ticker { return NewTickerWithTimer(b, &defaultTimer{}) } // NewTickerWithTimer returns a new Ticker with a custom timer. // A default timer that uses system timer is used when nil is passed. func NewTickerWithTimer(b BackOff, timer Timer) *Ticker { c := make(chan time.Time) t := &Ticker{ C: c, c: c, b: b, ctx: getContext(b), timer: timer, stop: make(chan struct{}), } t.b.Reset() go t.run() return t } // Stop turns off a ticker. After Stop, no more ticks will be sent. func (t *Ticker) Stop() { t.stopOnce.Do(func() { close(t.stop) }) } func (t *Ticker) run() { c := t.c defer close(c) // Ticker is guaranteed to tick at least once. afterC := t.send(time.Now()) for { if afterC == nil { return } select { case tick := <-afterC: afterC = t.send(tick) case <-t.stop: t.c = nil // Prevent future ticks from being sent to the channel. return case <-t.ctx.Done(): return } } } func (t *Ticker) send(tick time.Time) <-chan time.Time { select { case t.c <- tick: case <-t.stop: return nil } next := t.b.NextBackOff() if next == Stop { t.Stop() return nil } t.timer.Start(next) return t.timer.C() } ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/timer.go ================================================ package backoff import "time" type Timer interface { Start(duration time.Duration) Stop() C() <-chan time.Time } // defaultTimer implements Timer interface using time.Timer type defaultTimer struct { timer *time.Timer } // C returns the timers channel which receives the current time when the timer fires. func (t *defaultTimer) C() <-chan time.Time { return t.timer.C } // Start starts the timer to fire after the given duration func (t *defaultTimer) Start(duration time.Duration) { if t.timer == nil { t.timer = time.NewTimer(duration) } else { t.timer.Reset(duration) } } // Stop is called when the timer is not used anymore and resources may be freed. func (t *defaultTimer) Stop() { if t.timer != nil { t.timer.Stop() } } ================================================ FILE: vendor/github.com/cenkalti/backoff/v3/tries.go ================================================ package backoff import "time" /* WithMaxRetries creates a wrapper around another BackOff, which will return Stop if NextBackOff() has been called too many times since the last time Reset() was called Note: Implementation is not thread-safe. */ func WithMaxRetries(b BackOff, max uint64) BackOff { return &backOffTries{delegate: b, maxTries: max} } type backOffTries struct { delegate BackOff maxTries uint64 numTries uint64 } func (b *backOffTries) NextBackOff() time.Duration { if b.maxTries > 0 { if b.maxTries <= b.numTries { return Stop } b.numTries++ } return b.delegate.NextBackOff() } func (b *backOffTries) Reset() { b.numTries = 0 b.delegate.Reset() } ================================================ FILE: vendor/github.com/coreos/go-semver/LICENSE ================================================ 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: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) 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 (d) 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. ================================================ FILE: vendor/github.com/coreos/go-semver/NOTICE ================================================ CoreOS Project Copyright 2018 CoreOS, Inc This product includes software developed at CoreOS, Inc. (http://www.coreos.com/). ================================================ FILE: vendor/github.com/coreos/go-semver/semver/semver.go ================================================ // Copyright 2013-2015 CoreOS, Inc. // // 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. // Semantic Versions http://semver.org package semver import ( "bytes" "errors" "fmt" "regexp" "strconv" "strings" ) type Version struct { Major int64 Minor int64 Patch int64 PreRelease PreRelease Metadata string } type PreRelease string func splitOff(input *string, delim string) (val string) { parts := strings.SplitN(*input, delim, 2) if len(parts) == 2 { *input = parts[0] val = parts[1] } return val } func New(version string) *Version { return Must(NewVersion(version)) } func NewVersion(version string) (*Version, error) { v := Version{} if err := v.Set(version); err != nil { return nil, err } return &v, nil } // Must is a helper for wrapping NewVersion and will panic if err is not nil. func Must(v *Version, err error) *Version { if err != nil { panic(err) } return v } // Set parses and updates v from the given version string. Implements flag.Value func (v *Version) Set(version string) error { metadata := splitOff(&version, "+") preRelease := PreRelease(splitOff(&version, "-")) dotParts := strings.SplitN(version, ".", 3) if len(dotParts) != 3 { return fmt.Errorf("%s is not in dotted-tri format", version) } if err := validateIdentifier(string(preRelease)); err != nil { return fmt.Errorf("failed to validate pre-release: %v", err) } if err := validateIdentifier(metadata); err != nil { return fmt.Errorf("failed to validate metadata: %v", err) } parsed := make([]int64, 3) for i, v := range dotParts[:3] { val, err := strconv.ParseInt(v, 10, 64) parsed[i] = val if err != nil { return err } } v.Metadata = metadata v.PreRelease = preRelease v.Major = parsed[0] v.Minor = parsed[1] v.Patch = parsed[2] return nil } func (v Version) String() string { var buffer bytes.Buffer fmt.Fprintf(&buffer, "%d.%d.%d", v.Major, v.Minor, v.Patch) if v.PreRelease != "" { fmt.Fprintf(&buffer, "-%s", v.PreRelease) } if v.Metadata != "" { fmt.Fprintf(&buffer, "+%s", v.Metadata) } return buffer.String() } func (v *Version) UnmarshalYAML(unmarshal func(interface{}) error) error { var data string if err := unmarshal(&data); err != nil { return err } return v.Set(data) } func (v Version) MarshalJSON() ([]byte, error) { return []byte(`"` + v.String() + `"`), nil } func (v *Version) UnmarshalJSON(data []byte) error { l := len(data) if l == 0 || string(data) == `""` { return nil } if l < 2 || data[0] != '"' || data[l-1] != '"' { return errors.New("invalid semver string") } return v.Set(string(data[1 : l-1])) } // Compare tests if v is less than, equal to, or greater than versionB, // returning -1, 0, or +1 respectively. func (v Version) Compare(versionB Version) int { if cmp := recursiveCompare(v.Slice(), versionB.Slice()); cmp != 0 { return cmp } return preReleaseCompare(v, versionB) } // Equal tests if v is equal to versionB. func (v Version) Equal(versionB Version) bool { return v.Compare(versionB) == 0 } // LessThan tests if v is less than versionB. func (v Version) LessThan(versionB Version) bool { return v.Compare(versionB) < 0 } // Slice converts the comparable parts of the semver into a slice of integers. func (v Version) Slice() []int64 { return []int64{v.Major, v.Minor, v.Patch} } func (p PreRelease) Slice() []string { preRelease := string(p) return strings.Split(preRelease, ".") } func preReleaseCompare(versionA Version, versionB Version) int { a := versionA.PreRelease b := versionB.PreRelease /* Handle the case where if two versions are otherwise equal it is the * one without a PreRelease that is greater */ if len(a) == 0 && (len(b) > 0) { return 1 } else if len(b) == 0 && (len(a) > 0) { return -1 } // If there is a prerelease, check and compare each part. return recursivePreReleaseCompare(a.Slice(), b.Slice()) } func recursiveCompare(versionA []int64, versionB []int64) int { if len(versionA) == 0 { return 0 } a := versionA[0] b := versionB[0] if a > b { return 1 } else if a < b { return -1 } return recursiveCompare(versionA[1:], versionB[1:]) } func recursivePreReleaseCompare(versionA []string, versionB []string) int { // A larger set of pre-release fields has a higher precedence than a smaller set, // if all of the preceding identifiers are equal. if len(versionA) == 0 { if len(versionB) > 0 { return -1 } return 0 } else if len(versionB) == 0 { // We're longer than versionB so return 1. return 1 } a := versionA[0] b := versionB[0] aInt := false bInt := false aI, err := strconv.Atoi(versionA[0]) if err == nil { aInt = true } bI, err := strconv.Atoi(versionB[0]) if err == nil { bInt = true } // Numeric identifiers always have lower precedence than non-numeric identifiers. if aInt && !bInt { return -1 } else if !aInt && bInt { return 1 } // Handle Integer Comparison if aInt && bInt { if aI > bI { return 1 } else if aI < bI { return -1 } } // Handle String Comparison if a > b { return 1 } else if a < b { return -1 } return recursivePreReleaseCompare(versionA[1:], versionB[1:]) } // BumpMajor increments the Major field by 1 and resets all other fields to their default values func (v *Version) BumpMajor() { v.Major += 1 v.Minor = 0 v.Patch = 0 v.PreRelease = PreRelease("") v.Metadata = "" } // BumpMinor increments the Minor field by 1 and resets all other fields to their default values func (v *Version) BumpMinor() { v.Minor += 1 v.Patch = 0 v.PreRelease = PreRelease("") v.Metadata = "" } // BumpPatch increments the Patch field by 1 and resets all other fields to their default values func (v *Version) BumpPatch() { v.Patch += 1 v.PreRelease = PreRelease("") v.Metadata = "" } // validateIdentifier makes sure the provided identifier satisfies semver spec func validateIdentifier(id string) error { if id != "" && !reIdentifier.MatchString(id) { return fmt.Errorf("%s is not a valid semver identifier", id) } return nil } // reIdentifier is a regular expression used to check that pre-release and metadata // identifiers satisfy the spec requirements var reIdentifier = regexp.MustCompile(`^[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*$`) ================================================ FILE: vendor/github.com/coreos/go-semver/semver/sort.go ================================================ // Copyright 2013-2015 CoreOS, Inc. // // 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 semver import ( "sort" ) type Versions []*Version func (s Versions) Len() int { return len(s) } func (s Versions) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s Versions) Less(i, j int) bool { return s[i].LessThan(*s[j]) } // Sort sorts the given slice of Version func Sort(versions []*Version) { sort.Sort(Versions(versions)) } ================================================ FILE: vendor/github.com/coreos/go-systemd/v22/LICENSE ================================================ 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. ================================================ FILE: vendor/github.com/coreos/go-systemd/v22/NOTICE ================================================ CoreOS Project Copyright 2018 CoreOS, Inc This product includes software developed at CoreOS, Inc. (http://www.coreos.com/). ================================================ FILE: vendor/github.com/coreos/go-systemd/v22/journal/journal.go ================================================ // Copyright 2015 CoreOS, Inc. // // 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 journal provides write bindings to the local systemd journal. // It is implemented in pure Go and connects to the journal directly over its // unix socket. // // To read from the journal, see the "sdjournal" package, which wraps the // sd-journal a C API. // // http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html package journal import ( "fmt" ) // Priority of a journal message type Priority int const ( PriEmerg Priority = iota PriAlert PriCrit PriErr PriWarning PriNotice PriInfo PriDebug ) // Print prints a message to the local systemd journal using Send(). func Print(priority Priority, format string, a ...interface{}) error { return Send(fmt.Sprintf(format, a...), priority, nil) } ================================================ FILE: vendor/github.com/coreos/go-systemd/v22/journal/journal_unix.go ================================================ // Copyright 2015 CoreOS, Inc. // // 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. //go:build !windows // +build !windows // Package journal provides write bindings to the local systemd journal. // It is implemented in pure Go and connects to the journal directly over its // unix socket. // // To read from the journal, see the "sdjournal" package, which wraps the // sd-journal a C API. // // http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html package journal import ( "bytes" "encoding/binary" "errors" "fmt" "io" "io/ioutil" "net" "os" "strconv" "strings" "sync" "sync/atomic" "syscall" "unsafe" ) var ( // This can be overridden at build-time: // https://github.com/golang/go/wiki/GcToolchainTricks#including-build-information-in-the-executable journalSocket = "/run/systemd/journal/socket" // unixConnPtr atomically holds the local unconnected Unix-domain socket. // Concrete safe pointer type: *net.UnixConn unixConnPtr unsafe.Pointer // onceConn ensures that unixConnPtr is initialized exactly once. onceConn sync.Once ) // Enabled checks whether the local systemd journal is available for logging. func Enabled() bool { if c := getOrInitConn(); c == nil { return false } conn, err := net.Dial("unixgram", journalSocket) if err != nil { return false } defer conn.Close() return true } // StderrIsJournalStream returns whether the process stderr is connected // to the Journal's stream transport. // // This can be used for automatic protocol upgrading described in [Journal Native Protocol]. // // Returns true if JOURNAL_STREAM environment variable is present, // and stderr's device and inode numbers match it. // // Error is returned if unexpected error occurs: e.g. if JOURNAL_STREAM environment variable // is present, but malformed, fstat syscall fails, etc. // // [Journal Native Protocol]: https://systemd.io/JOURNAL_NATIVE_PROTOCOL/#automatic-protocol-upgrading func StderrIsJournalStream() (bool, error) { return fdIsJournalStream(syscall.Stderr) } // StdoutIsJournalStream returns whether the process stdout is connected // to the Journal's stream transport. // // Returns true if JOURNAL_STREAM environment variable is present, // and stdout's device and inode numbers match it. // // Error is returned if unexpected error occurs: e.g. if JOURNAL_STREAM environment variable // is present, but malformed, fstat syscall fails, etc. // // Most users should probably use [StderrIsJournalStream]. func StdoutIsJournalStream() (bool, error) { return fdIsJournalStream(syscall.Stdout) } func fdIsJournalStream(fd int) (bool, error) { journalStream := os.Getenv("JOURNAL_STREAM") if journalStream == "" { return false, nil } var expectedStat syscall.Stat_t _, err := fmt.Sscanf(journalStream, "%d:%d", &expectedStat.Dev, &expectedStat.Ino) if err != nil { return false, fmt.Errorf("failed to parse JOURNAL_STREAM=%q: %v", journalStream, err) } var stat syscall.Stat_t err = syscall.Fstat(fd, &stat) if err != nil { return false, err } match := stat.Dev == expectedStat.Dev && stat.Ino == expectedStat.Ino return match, nil } // Send a message to the local systemd journal. vars is a map of journald // fields to values. Fields must be composed of uppercase letters, numbers, // and underscores, but must not start with an underscore. Within these // restrictions, any arbitrary field name may be used. Some names have special // significance: see the journalctl documentation // (http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html) // for more details. vars may be nil. func Send(message string, priority Priority, vars map[string]string) error { conn := getOrInitConn() if conn == nil { return errors.New("could not initialize socket to journald") } socketAddr := &net.UnixAddr{ Name: journalSocket, Net: "unixgram", } data := new(bytes.Buffer) appendVariable(data, "PRIORITY", strconv.Itoa(int(priority))) appendVariable(data, "MESSAGE", message) for k, v := range vars { appendVariable(data, k, v) } _, _, err := conn.WriteMsgUnix(data.Bytes(), nil, socketAddr) if err == nil { return nil } if !isSocketSpaceError(err) { return err } // Large log entry, send it via tempfile and ancillary-fd. file, err := tempFd() if err != nil { return err } defer file.Close() _, err = io.Copy(file, data) if err != nil { return err } rights := syscall.UnixRights(int(file.Fd())) _, _, err = conn.WriteMsgUnix([]byte{}, rights, socketAddr) if err != nil { return err } return nil } // getOrInitConn attempts to get the global `unixConnPtr` socket, initializing if necessary func getOrInitConn() *net.UnixConn { conn := (*net.UnixConn)(atomic.LoadPointer(&unixConnPtr)) if conn != nil { return conn } onceConn.Do(initConn) return (*net.UnixConn)(atomic.LoadPointer(&unixConnPtr)) } func appendVariable(w io.Writer, name, value string) { if err := validVarName(name); err != nil { fmt.Fprintf(os.Stderr, "variable name %s contains invalid character, ignoring\n", name) } if strings.ContainsRune(value, '\n') { /* When the value contains a newline, we write: * - the variable name, followed by a newline * - the size (in 64bit little endian format) * - the data, followed by a newline */ fmt.Fprintln(w, name) binary.Write(w, binary.LittleEndian, uint64(len(value))) fmt.Fprintln(w, value) } else { /* just write the variable and value all on one line */ fmt.Fprintf(w, "%s=%s\n", name, value) } } // validVarName validates a variable name to make sure journald will accept it. // The variable name must be in uppercase and consist only of characters, // numbers and underscores, and may not begin with an underscore: // https://www.freedesktop.org/software/systemd/man/sd_journal_print.html func validVarName(name string) error { if name == "" { return errors.New("Empty variable name") } else if name[0] == '_' { return errors.New("Variable name begins with an underscore") } for _, c := range name { if !(('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_') { return errors.New("Variable name contains invalid characters") } } return nil } // isSocketSpaceError checks whether the error is signaling // an "overlarge message" condition. func isSocketSpaceError(err error) bool { opErr, ok := err.(*net.OpError) if !ok || opErr == nil { return false } sysErr, ok := opErr.Err.(*os.SyscallError) if !ok || sysErr == nil { return false } return sysErr.Err == syscall.EMSGSIZE || sysErr.Err == syscall.ENOBUFS } // tempFd creates a temporary, unlinked file under `/dev/shm`. func tempFd() (*os.File, error) { file, err := ioutil.TempFile("/dev/shm/", "journal.XXXXX") if err != nil { return nil, err } err = syscall.Unlink(file.Name()) if err != nil { return nil, err } return file, nil } // initConn initializes the global `unixConnPtr` socket. // It is automatically called when needed. func initConn() { autobind, err := net.ResolveUnixAddr("unixgram", "") if err != nil { return } sock, err := net.ListenUnixgram("unixgram", autobind) if err != nil { return } atomic.StorePointer(&unixConnPtr, unsafe.Pointer(sock)) } ================================================ FILE: vendor/github.com/coreos/go-systemd/v22/journal/journal_windows.go ================================================ // Copyright 2015 CoreOS, Inc. // // 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 journal provides write bindings to the local systemd journal. // It is implemented in pure Go and connects to the journal directly over its // unix socket. // // To read from the journal, see the "sdjournal" package, which wraps the // sd-journal a C API. // // http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html package journal import ( "errors" ) func Enabled() bool { return false } func Send(message string, priority Priority, vars map[string]string) error { return errors.New("could not initialize socket to journald") } func StderrIsJournalStream() (bool, error) { return false, nil } func StdoutIsJournalStream() (bool, error) { return false, nil } ================================================ FILE: vendor/github.com/fatih/color/LICENSE.md ================================================ The MIT License (MIT) Copyright (c) 2013 Fatih Arslan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: vendor/github.com/fatih/color/README.md ================================================ # color [![](https://github.com/fatih/color/workflows/build/badge.svg)](https://github.com/fatih/color/actions) [![PkgGoDev](https://pkg.go.dev/badge/github.com/fatih/color)](https://pkg.go.dev/github.com/fatih/color) Color lets you use colorized outputs in terms of [ANSI Escape Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It has support for Windows too! The API can be used in several ways, pick one that suits you. ![Color](https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg) ## Install ```bash go get github.com/fatih/color ``` ## Examples ### Standard colors ```go // Print with default helper functions color.Cyan("Prints text in cyan.") // A newline will be appended automatically color.Blue("Prints %s in blue.", "text") // These are using the default foreground colors color.Red("We have red") color.Magenta("And many others ..") ``` ### Mix and reuse colors ```go // Create a new color object c := color.New(color.FgCyan).Add(color.Underline) c.Println("Prints cyan text with an underline.") // Or just add them to New() d := color.New(color.FgCyan, color.Bold) d.Printf("This prints bold cyan %s\n", "too!.") // Mix up foreground and background colors, create new mixes! red := color.New(color.FgRed) boldRed := red.Add(color.Bold) boldRed.Println("This will print text in bold red.") whiteBackground := red.Add(color.BgWhite) whiteBackground.Println("Red text with white background.") ``` ### Use your own output (io.Writer) ```go // Use your own io.Writer output color.New(color.FgBlue).Fprintln(myWriter, "blue color!") blue := color.New(color.FgBlue) blue.Fprint(writer, "This will print text in blue.") ``` ### Custom print functions (PrintFunc) ```go // Create a custom print function for convenience red := color.New(color.FgRed).PrintfFunc() red("Warning") red("Error: %s", err) // Mix up multiple attributes notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() notice("Don't forget this...") ``` ### Custom fprint functions (FprintFunc) ```go blue := color.New(color.FgBlue).FprintfFunc() blue(myWriter, "important notice: %s", stars) // Mix up with multiple attributes success := color.New(color.Bold, color.FgGreen).FprintlnFunc() success(myWriter, "Don't forget this...") ``` ### Insert into noncolor strings (SprintFunc) ```go // Create SprintXxx functions to mix strings with other non-colorized strings: yellow := color.New(color.FgYellow).SprintFunc() red := color.New(color.FgRed).SprintFunc() fmt.Printf("This is a %s and this is %s.\n", yellow("warning"), red("error")) info := color.New(color.FgWhite, color.BgGreen).SprintFunc() fmt.Printf("This %s rocks!\n", info("package")) // Use helper functions fmt.Println("This", color.RedString("warning"), "should be not neglected.") fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.") // Windows supported too! Just don't forget to change the output to color.Output fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) ``` ### Plug into existing code ```go // Use handy standard colors color.Set(color.FgYellow) fmt.Println("Existing text will now be in yellow") fmt.Printf("This one %s\n", "too") color.Unset() // Don't forget to unset // You can mix up parameters color.Set(color.FgMagenta, color.Bold) defer color.Unset() // Use it in your function fmt.Println("All text will now be bold magenta.") ``` ### Disable/Enable color There might be a case where you want to explicitly disable/enable color output. the `go-isatty` package will automatically disable color output for non-tty output streams (for example if the output were piped directly to `less`). The `color` package also disables color output if the [`NO_COLOR`](https://no-color.org) environment variable is set to a non-empty string. `Color` has support to disable/enable colors programmatically both globally and for single color definitions. For example suppose you have a CLI app and a `-no-color` bool flag. You can easily disable the color output with: ```go var flagNoColor = flag.Bool("no-color", false, "Disable color output") if *flagNoColor { color.NoColor = true // disables colorized output } ``` It also has support for single color definitions (local). You can disable/enable color output on the fly: ```go c := color.New(color.FgCyan) c.Println("Prints cyan text") c.DisableColor() c.Println("This is printed without any color") c.EnableColor() c.Println("This prints again cyan...") ``` ## GitHub Actions To output color in GitHub Actions (or other CI systems that support ANSI colors), make sure to set `color.NoColor = false` so that it bypasses the check for non-tty output streams. ## Todo * Save/Return previous values * Evaluate fmt.Formatter interface ## Credits * [Fatih Arslan](https://github.com/fatih) * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable) ## License The MIT License (MIT) - see [`LICENSE.md`](https://github.com/fatih/color/blob/master/LICENSE.md) for more details ================================================ FILE: vendor/github.com/fatih/color/color.go ================================================ package color import ( "fmt" "io" "os" "strconv" "strings" "sync" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" ) var ( // NoColor defines if the output is colorized or not. It's dynamically set to // false or true based on the stdout's file descriptor referring to a terminal // or not. It's also set to true if the NO_COLOR environment variable is // set (regardless of its value). This is a global option and affects all // colors. For more control over each color block use the methods // DisableColor() individually. NoColor = noColorIsSet() || os.Getenv("TERM") == "dumb" || (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) // Output defines the standard output of the print functions. By default, // os.Stdout is used. Output = colorable.NewColorableStdout() // Error defines a color supporting writer for os.Stderr. Error = colorable.NewColorableStderr() // colorsCache is used to reduce the count of created Color objects and // allows to reuse already created objects with required Attribute. colorsCache = make(map[Attribute]*Color) colorsCacheMu sync.Mutex // protects colorsCache ) // noColorIsSet returns true if the environment variable NO_COLOR is set to a non-empty string. func noColorIsSet() bool { return os.Getenv("NO_COLOR") != "" } // Color defines a custom color object which is defined by SGR parameters. type Color struct { params []Attribute noColor *bool } // Attribute defines a single SGR Code type Attribute int const escape = "\x1b" // Base attributes const ( Reset Attribute = iota Bold Faint Italic Underline BlinkSlow BlinkRapid ReverseVideo Concealed CrossedOut ) const ( ResetBold Attribute = iota + 22 ResetItalic ResetUnderline ResetBlinking _ ResetReversed ResetConcealed ResetCrossedOut ) var mapResetAttributes map[Attribute]Attribute = map[Attribute]Attribute{ Bold: ResetBold, Faint: ResetBold, Italic: ResetItalic, Underline: ResetUnderline, BlinkSlow: ResetBlinking, BlinkRapid: ResetBlinking, ReverseVideo: ResetReversed, Concealed: ResetConcealed, CrossedOut: ResetCrossedOut, } // Foreground text colors const ( FgBlack Attribute = iota + 30 FgRed FgGreen FgYellow FgBlue FgMagenta FgCyan FgWhite ) // Foreground Hi-Intensity text colors const ( FgHiBlack Attribute = iota + 90 FgHiRed FgHiGreen FgHiYellow FgHiBlue FgHiMagenta FgHiCyan FgHiWhite ) // Background text colors const ( BgBlack Attribute = iota + 40 BgRed BgGreen BgYellow BgBlue BgMagenta BgCyan BgWhite ) // Background Hi-Intensity text colors const ( BgHiBlack Attribute = iota + 100 BgHiRed BgHiGreen BgHiYellow BgHiBlue BgHiMagenta BgHiCyan BgHiWhite ) // New returns a newly created color object. func New(value ...Attribute) *Color { c := &Color{ params: make([]Attribute, 0), } if noColorIsSet() { c.noColor = boolPtr(true) } c.Add(value...) return c } // Set sets the given parameters immediately. It will change the color of // output with the given SGR parameters until color.Unset() is called. func Set(p ...Attribute) *Color { c := New(p...) c.Set() return c } // Unset resets all escape attributes and clears the output. Usually should // be called after Set(). func Unset() { if NoColor { return } fmt.Fprintf(Output, "%s[%dm", escape, Reset) } // Set sets the SGR sequence. func (c *Color) Set() *Color { if c.isNoColorSet() { return c } fmt.Fprint(Output, c.format()) return c } func (c *Color) unset() { if c.isNoColorSet() { return } Unset() } // SetWriter is used to set the SGR sequence with the given io.Writer. This is // a low-level function, and users should use the higher-level functions, such // as color.Fprint, color.Print, etc. func (c *Color) SetWriter(w io.Writer) *Color { if c.isNoColorSet() { return c } fmt.Fprint(w, c.format()) return c } // UnsetWriter resets all escape attributes and clears the output with the give // io.Writer. Usually should be called after SetWriter(). func (c *Color) UnsetWriter(w io.Writer) { if c.isNoColorSet() { return } if NoColor { return } fmt.Fprintf(w, "%s[%dm", escape, Reset) } // Add is used to chain SGR parameters. Use as many as parameters to combine // and create custom color objects. Example: Add(color.FgRed, color.Underline). func (c *Color) Add(value ...Attribute) *Color { c.params = append(c.params, value...) return c } // Fprint formats using the default formats for its operands and writes to w. // Spaces are added between operands when neither is a string. // It returns the number of bytes written and any write error encountered. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) { c.SetWriter(w) defer c.UnsetWriter(w) return fmt.Fprint(w, a...) } // Print formats using the default formats for its operands and writes to // standard output. Spaces are added between operands when neither is a // string. It returns the number of bytes written and any write error // encountered. This is the standard fmt.Print() method wrapped with the given // color. func (c *Color) Print(a ...interface{}) (n int, err error) { c.Set() defer c.unset() return fmt.Fprint(Output, a...) } // Fprintf formats according to a format specifier and writes to w. // It returns the number of bytes written and any write error encountered. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { c.SetWriter(w) defer c.UnsetWriter(w) return fmt.Fprintf(w, format, a...) } // Printf formats according to a format specifier and writes to standard output. // It returns the number of bytes written and any write error encountered. // This is the standard fmt.Printf() method wrapped with the given color. func (c *Color) Printf(format string, a ...interface{}) (n int, err error) { c.Set() defer c.unset() return fmt.Fprintf(Output, format, a...) } // Fprintln formats using the default formats for its operands and writes to w. // Spaces are always added between operands and a newline is appended. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprintln(w, c.wrap(fmt.Sprint(a...))) } // Println formats using the default formats for its operands and writes to // standard output. Spaces are always added between operands and a newline is // appended. It returns the number of bytes written and any write error // encountered. This is the standard fmt.Print() method wrapped with the given // color. func (c *Color) Println(a ...interface{}) (n int, err error) { return fmt.Fprintln(Output, c.wrap(fmt.Sprint(a...))) } // Sprint is just like Print, but returns a string instead of printing it. func (c *Color) Sprint(a ...interface{}) string { return c.wrap(fmt.Sprint(a...)) } // Sprintln is just like Println, but returns a string instead of printing it. func (c *Color) Sprintln(a ...interface{}) string { return fmt.Sprintln(c.Sprint(a...)) } // Sprintf is just like Printf, but returns a string instead of printing it. func (c *Color) Sprintf(format string, a ...interface{}) string { return c.wrap(fmt.Sprintf(format, a...)) } // FprintFunc returns a new function that prints the passed arguments as // colorized with color.Fprint(). func (c *Color) FprintFunc() func(w io.Writer, a ...interface{}) { return func(w io.Writer, a ...interface{}) { c.Fprint(w, a...) } } // PrintFunc returns a new function that prints the passed arguments as // colorized with color.Print(). func (c *Color) PrintFunc() func(a ...interface{}) { return func(a ...interface{}) { c.Print(a...) } } // FprintfFunc returns a new function that prints the passed arguments as // colorized with color.Fprintf(). func (c *Color) FprintfFunc() func(w io.Writer, format string, a ...interface{}) { return func(w io.Writer, format string, a ...interface{}) { c.Fprintf(w, format, a...) } } // PrintfFunc returns a new function that prints the passed arguments as // colorized with color.Printf(). func (c *Color) PrintfFunc() func(format string, a ...interface{}) { return func(format string, a ...interface{}) { c.Printf(format, a...) } } // FprintlnFunc returns a new function that prints the passed arguments as // colorized with color.Fprintln(). func (c *Color) FprintlnFunc() func(w io.Writer, a ...interface{}) { return func(w io.Writer, a ...interface{}) { c.Fprintln(w, a...) } } // PrintlnFunc returns a new function that prints the passed arguments as // colorized with color.Println(). func (c *Color) PrintlnFunc() func(a ...interface{}) { return func(a ...interface{}) { c.Println(a...) } } // SprintFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprint(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output, example: // // put := New(FgYellow).SprintFunc() // fmt.Fprintf(color.Output, "This is a %s", put("warning")) func (c *Color) SprintFunc() func(a ...interface{}) string { return func(a ...interface{}) string { return c.wrap(fmt.Sprint(a...)) } } // SprintfFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprintf(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output. func (c *Color) SprintfFunc() func(format string, a ...interface{}) string { return func(format string, a ...interface{}) string { return c.wrap(fmt.Sprintf(format, a...)) } } // SprintlnFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprintln(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output. func (c *Color) SprintlnFunc() func(a ...interface{}) string { return func(a ...interface{}) string { return fmt.Sprintln(c.Sprint(a...)) } } // sequence returns a formatted SGR sequence to be plugged into a "\x1b[...m" // an example output might be: "1;36" -> bold cyan func (c *Color) sequence() string { format := make([]string, len(c.params)) for i, v := range c.params { format[i] = strconv.Itoa(int(v)) } return strings.Join(format, ";") } // wrap wraps the s string with the colors attributes. The string is ready to // be printed. func (c *Color) wrap(s string) string { if c.isNoColorSet() { return s } return c.format() + s + c.unformat() } func (c *Color) format() string { return fmt.Sprintf("%s[%sm", escape, c.sequence()) } func (c *Color) unformat() string { //return fmt.Sprintf("%s[%dm", escape, Reset) //for each element in sequence let's use the speficic reset escape, ou the generic one if not found format := make([]string, len(c.params)) for i, v := range c.params { format[i] = strconv.Itoa(int(Reset)) ra, ok := mapResetAttributes[v] if ok { format[i] = strconv.Itoa(int(ra)) } } return fmt.Sprintf("%s[%sm", escape, strings.Join(format, ";")) } // DisableColor disables the color output. Useful to not change any existing // code and still being able to output. Can be used for flags like // "--no-color". To enable back use EnableColor() method. func (c *Color) DisableColor() { c.noColor = boolPtr(true) } // EnableColor enables the color output. Use it in conjunction with // DisableColor(). Otherwise, this method has no side effects. func (c *Color) EnableColor() { c.noColor = boolPtr(false) } func (c *Color) isNoColorSet() bool { // check first if we have user set action if c.noColor != nil { return *c.noColor } // if not return the global option, which is disabled by default return NoColor } // Equals returns a boolean value indicating whether two colors are equal. func (c *Color) Equals(c2 *Color) bool { if c == nil && c2 == nil { return true } if c == nil || c2 == nil { return false } if len(c.params) != len(c2.params) { return false } for _, attr := range c.params { if !c2.attrExists(attr) { return false } } return true } func (c *Color) attrExists(a Attribute) bool { for _, attr := range c.params { if attr == a { return true } } return false } func boolPtr(v bool) *bool { return &v } func getCachedColor(p Attribute) *Color { colorsCacheMu.Lock() defer colorsCacheMu.Unlock() c, ok := colorsCache[p] if !ok { c = New(p) colorsCache[p] = c } return c } func colorPrint(format string, p Attribute, a ...interface{}) { c := getCachedColor(p) if !strings.HasSuffix(format, "\n") { format += "\n" } if len(a) == 0 { c.Print(format) } else { c.Printf(format, a...) } } func colorString(format string, p Attribute, a ...interface{}) string { c := getCachedColor(p) if len(a) == 0 { return c.SprintFunc()(format) } return c.SprintfFunc()(format, a...) } // Black is a convenient helper function to print with black foreground. A // newline is appended to format by default. func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) } // Red is a convenient helper function to print with red foreground. A // newline is appended to format by default. func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) } // Green is a convenient helper function to print with green foreground. A // newline is appended to format by default. func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) } // Yellow is a convenient helper function to print with yellow foreground. // A newline is appended to format by default. func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) } // Blue is a convenient helper function to print with blue foreground. A // newline is appended to format by default. func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) } // Magenta is a convenient helper function to print with magenta foreground. // A newline is appended to format by default. func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) } // Cyan is a convenient helper function to print with cyan foreground. A // newline is appended to format by default. func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) } // White is a convenient helper function to print with white foreground. A // newline is appended to format by default. func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) } // BlackString is a convenient helper function to return a string with black // foreground. func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) } // RedString is a convenient helper function to return a string with red // foreground. func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) } // GreenString is a convenient helper function to return a string with green // foreground. func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) } // YellowString is a convenient helper function to return a string with yellow // foreground. func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) } // BlueString is a convenient helper function to return a string with blue // foreground. func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) } // MagentaString is a convenient helper function to return a string with magenta // foreground. func MagentaString(format string, a ...interface{}) string { return colorString(format, FgMagenta, a...) } // CyanString is a convenient helper function to return a string with cyan // foreground. func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) } // WhiteString is a convenient helper function to return a string with white // foreground. func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) } // HiBlack is a convenient helper function to print with hi-intensity black foreground. A // newline is appended to format by default. func HiBlack(format string, a ...interface{}) { colorPrint(format, FgHiBlack, a...) } // HiRed is a convenient helper function to print with hi-intensity red foreground. A // newline is appended to format by default. func HiRed(format string, a ...interface{}) { colorPrint(format, FgHiRed, a...) } // HiGreen is a convenient helper function to print with hi-intensity green foreground. A // newline is appended to format by default. func HiGreen(format string, a ...interface{}) { colorPrint(format, FgHiGreen, a...) } // HiYellow is a convenient helper function to print with hi-intensity yellow foreground. // A newline is appended to format by default. func HiYellow(format string, a ...interface{}) { colorPrint(format, FgHiYellow, a...) } // HiBlue is a convenient helper function to print with hi-intensity blue foreground. A // newline is appended to format by default. func HiBlue(format string, a ...interface{}) { colorPrint(format, FgHiBlue, a...) } // HiMagenta is a convenient helper function to print with hi-intensity magenta foreground. // A newline is appended to format by default. func HiMagenta(format string, a ...interface{}) { colorPrint(format, FgHiMagenta, a...) } // HiCyan is a convenient helper function to print with hi-intensity cyan foreground. A // newline is appended to format by default. func HiCyan(format string, a ...interface{}) { colorPrint(format, FgHiCyan, a...) } // HiWhite is a convenient helper function to print with hi-intensity white foreground. A // newline is appended to format by default. func HiWhite(format string, a ...interface{}) { colorPrint(format, FgHiWhite, a...) } // HiBlackString is a convenient helper function to return a string with hi-intensity black // foreground. func HiBlackString(format string, a ...interface{}) string { return colorString(format, FgHiBlack, a...) } // HiRedString is a convenient helper function to return a string with hi-intensity red // foreground. func HiRedString(format string, a ...interface{}) string { return colorString(format, FgHiRed, a...) } // HiGreenString is a convenient helper function to return a string with hi-intensity green // foreground. func HiGreenString(format string, a ...interface{}) string { return colorString(format, FgHiGreen, a...) } // HiYellowString is a convenient helper function to return a string with hi-intensity yellow // foreground. func HiYellowString(format string, a ...interface{}) string { return colorString(format, FgHiYellow, a...) } // HiBlueString is a convenient helper function to return a string with hi-intensity blue // foreground. func HiBlueString(format string, a ...interface{}) string { return colorString(format, FgHiBlue, a...) } // HiMagentaString is a convenient helper function to return a string with hi-intensity magenta // foreground. func HiMagentaString(format string, a ...interface{}) string { return colorString(format, FgHiMagenta, a...) } // HiCyanString is a convenient helper function to return a string with hi-intensity cyan // foreground. func HiCyanString(format string, a ...interface{}) string { return colorString(format, FgHiCyan, a...) } // HiWhiteString is a convenient helper function to return a string with hi-intensity white // foreground. func HiWhiteString(format string, a ...interface{}) string { return colorString(format, FgHiWhite, a...) } ================================================ FILE: vendor/github.com/fatih/color/color_windows.go ================================================ package color import ( "os" "golang.org/x/sys/windows" ) func init() { // Opt-in for ansi color support for current process. // https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences var outMode uint32 out := windows.Handle(os.Stdout.Fd()) if err := windows.GetConsoleMode(out, &outMode); err != nil { return } outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING _ = windows.SetConsoleMode(out, outMode) } ================================================ FILE: vendor/github.com/fatih/color/doc.go ================================================ /* Package color is an ANSI color package to output colorized or SGR defined output to the standard output. The API can be used in several way, pick one that suits you. Use simple and default helper functions with predefined foreground colors: color.Cyan("Prints text in cyan.") // a newline will be appended automatically color.Blue("Prints %s in blue.", "text") // More default foreground colors.. color.Red("We have red") color.Yellow("Yellow color too!") color.Magenta("And many others ..") // Hi-intensity colors color.HiGreen("Bright green color.") color.HiBlack("Bright black means gray..") color.HiWhite("Shiny white color!") However, there are times when custom color mixes are required. Below are some examples to create custom color objects and use the print functions of each separate color object. // Create a new color object c := color.New(color.FgCyan).Add(color.Underline) c.Println("Prints cyan text with an underline.") // Or just add them to New() d := color.New(color.FgCyan, color.Bold) d.Printf("This prints bold cyan %s\n", "too!.") // Mix up foreground and background colors, create new mixes! red := color.New(color.FgRed) boldRed := red.Add(color.Bold) boldRed.Println("This will print text in bold red.") whiteBackground := red.Add(color.BgWhite) whiteBackground.Println("Red text with White background.") // Use your own io.Writer output color.New(color.FgBlue).Fprintln(myWriter, "blue color!") blue := color.New(color.FgBlue) blue.Fprint(myWriter, "This will print text in blue.") You can create PrintXxx functions to simplify even more: // Create a custom print function for convenient red := color.New(color.FgRed).PrintfFunc() red("warning") red("error: %s", err) // Mix up multiple attributes notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() notice("don't forget this...") You can also FprintXxx functions to pass your own io.Writer: blue := color.New(FgBlue).FprintfFunc() blue(myWriter, "important notice: %s", stars) // Mix up with multiple attributes success := color.New(color.Bold, color.FgGreen).FprintlnFunc() success(myWriter, don't forget this...") Or create SprintXxx functions to mix strings with other non-colorized strings: yellow := New(FgYellow).SprintFunc() red := New(FgRed).SprintFunc() fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error")) info := New(FgWhite, BgGreen).SprintFunc() fmt.Printf("this %s rocks!\n", info("package")) Windows support is enabled by default. All Print functions work as intended. However, only for color.SprintXXX functions, user should use fmt.FprintXXX and set the output to color.Output: fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) info := New(FgWhite, BgGreen).SprintFunc() fmt.Fprintf(color.Output, "this %s rocks!\n", info("package")) Using with existing code is possible. Just use the Set() method to set the standard output to the given parameters. That way a rewrite of an existing code is not required. // Use handy standard colors. color.Set(color.FgYellow) fmt.Println("Existing text will be now in Yellow") fmt.Printf("This one %s\n", "too") color.Unset() // don't forget to unset // You can mix up parameters color.Set(color.FgMagenta, color.Bold) defer color.Unset() // use it in your function fmt.Println("All text will be now bold magenta.") There might be a case where you want to disable color output (for example to pipe the standard output of your app to somewhere else). `Color` has support to disable colors both globally and for single color definition. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: var flagNoColor = flag.Bool("no-color", false, "Disable color output") if *flagNoColor { color.NoColor = true // disables colorized output } You can also disable the color by setting the NO_COLOR environment variable to any value. It also has support for single color definitions (local). You can disable/enable color output on the fly: c := color.New(color.FgCyan) c.Println("Prints cyan text") c.DisableColor() c.Println("This is printed without any color") c.EnableColor() c.Println("This prints again cyan...") */ package color ================================================ FILE: vendor/github.com/fsnotify/fsnotify/.cirrus.yml ================================================ freebsd_task: name: 'FreeBSD' freebsd_instance: image_family: freebsd-13-2 install_script: - pkg update -f - pkg install -y go test_script: # run tests as user "cirrus" instead of root - pw useradd cirrus -m - chown -R cirrus:cirrus . - FSNOTIFY_BUFFER=4096 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... - sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... ================================================ FILE: vendor/github.com/fsnotify/fsnotify/.editorconfig ================================================ root = true [*.go] indent_style = tab indent_size = 4 insert_final_newline = true [*.{yml,yaml}] indent_style = space indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true ================================================ FILE: vendor/github.com/fsnotify/fsnotify/.gitattributes ================================================ go.sum linguist-generated ================================================ FILE: vendor/github.com/fsnotify/fsnotify/.gitignore ================================================ # go test -c output *.test *.test.exe # Output of go build ./cmd/fsnotify /fsnotify /fsnotify.exe ================================================ FILE: vendor/github.com/fsnotify/fsnotify/.mailmap ================================================ Chris Howey Nathan Youngman <4566+nathany@users.noreply.github.com> ================================================ FILE: vendor/github.com/fsnotify/fsnotify/CHANGELOG.md ================================================ # Changelog Unreleased ---------- Nothing yet. 1.7.0 - 2023-10-22 ------------------ This version of fsnotify needs Go 1.17. ### Additions - illumos: add FEN backend to support illumos and Solaris. ([#371]) - all: add `NewBufferedWatcher()` to use a buffered channel, which can be useful in cases where you can't control the kernel buffer and receive a large number of events in bursts. ([#550], [#572]) - all: add `AddWith()`, which is identical to `Add()` but allows passing options. ([#521]) - windows: allow setting the ReadDirectoryChangesW() buffer size with `fsnotify.WithBufferSize()`; the default of 64K is the highest value that works on all platforms and is enough for most purposes, but in some cases a highest buffer is needed. ([#521]) ### Changes and fixes - inotify: remove watcher if a watched path is renamed ([#518]) After a rename the reported name wasn't updated, or even an empty string. Inotify doesn't provide any good facilities to update it, so just remove the watcher. This is already how it worked on kqueue and FEN. On Windows this does work, and remains working. - windows: don't listen for file attribute changes ([#520]) File attribute changes are sent as `FILE_ACTION_MODIFIED` by the Windows API, with no way to see if they're a file write or attribute change, so would show up as a fsnotify.Write event. This is never useful, and could result in many spurious Write events. - windows: return `ErrEventOverflow` if the buffer is full ([#525]) Before it would merely return "short read", making it hard to detect this error. - kqueue: make sure events for all files are delivered properly when removing a watched directory ([#526]) Previously they would get sent with `""` (empty string) or `"."` as the path name. - kqueue: don't emit spurious Create events for symbolic links ([#524]) The link would get resolved but kqueue would "forget" it already saw the link itself, resulting on a Create for every Write event for the directory. - all: return `ErrClosed` on `Add()` when the watcher is closed ([#516]) - other: add `Watcher.Errors` and `Watcher.Events` to the no-op `Watcher` in `backend_other.go`, making it easier to use on unsupported platforms such as WASM, AIX, etc. ([#528]) - other: use the `backend_other.go` no-op if the `appengine` build tag is set; Google AppEngine forbids usage of the unsafe package so the inotify backend won't compile there. [#371]: https://github.com/fsnotify/fsnotify/pull/371 [#516]: https://github.com/fsnotify/fsnotify/pull/516 [#518]: https://github.com/fsnotify/fsnotify/pull/518 [#520]: https://github.com/fsnotify/fsnotify/pull/520 [#521]: https://github.com/fsnotify/fsnotify/pull/521 [#524]: https://github.com/fsnotify/fsnotify/pull/524 [#525]: https://github.com/fsnotify/fsnotify/pull/525 [#526]: https://github.com/fsnotify/fsnotify/pull/526 [#528]: https://github.com/fsnotify/fsnotify/pull/528 [#537]: https://github.com/fsnotify/fsnotify/pull/537 [#550]: https://github.com/fsnotify/fsnotify/pull/550 [#572]: https://github.com/fsnotify/fsnotify/pull/572 1.6.0 - 2022-10-13 ------------------ This version of fsnotify needs Go 1.16 (this was already the case since 1.5.1, but not documented). It also increases the minimum Linux version to 2.6.32. ### Additions - all: add `Event.Has()` and `Op.Has()` ([#477]) This makes checking events a lot easier; for example: if event.Op&Write == Write && !(event.Op&Remove == Remove) { } Becomes: if event.Has(Write) && !event.Has(Remove) { } - all: add cmd/fsnotify ([#463]) A command-line utility for testing and some examples. ### Changes and fixes - inotify: don't ignore events for files that don't exist ([#260], [#470]) Previously the inotify watcher would call `os.Lstat()` to check if a file still exists before emitting events. This was inconsistent with other platforms and resulted in inconsistent event reporting (e.g. when a file is quickly removed and re-created), and generally a source of confusion. It was added in 2013 to fix a memory leak that no longer exists. - all: return `ErrNonExistentWatch` when `Remove()` is called on a path that's not watched ([#460]) - inotify: replace epoll() with non-blocking inotify ([#434]) Non-blocking inotify was not generally available at the time this library was written in 2014, but now it is. As a result, the minimum Linux version is bumped from 2.6.27 to 2.6.32. This hugely simplifies the code and is faster. - kqueue: don't check for events every 100ms ([#480]) The watcher would wake up every 100ms, even when there was nothing to do. Now it waits until there is something to do. - macos: retry opening files on EINTR ([#475]) - kqueue: skip unreadable files ([#479]) kqueue requires a file descriptor for every file in a directory; this would fail if a file was unreadable by the current user. Now these files are simply skipped. - windows: fix renaming a watched directory if the parent is also watched ([#370]) - windows: increase buffer size from 4K to 64K ([#485]) - windows: close file handle on Remove() ([#288]) - kqueue: put pathname in the error if watching a file fails ([#471]) - inotify, windows: calling Close() more than once could race ([#465]) - kqueue: improve Close() performance ([#233]) - all: various documentation additions and clarifications. [#233]: https://github.com/fsnotify/fsnotify/pull/233 [#260]: https://github.com/fsnotify/fsnotify/pull/260 [#288]: https://github.com/fsnotify/fsnotify/pull/288 [#370]: https://github.com/fsnotify/fsnotify/pull/370 [#434]: https://github.com/fsnotify/fsnotify/pull/434 [#460]: https://github.com/fsnotify/fsnotify/pull/460 [#463]: https://github.com/fsnotify/fsnotify/pull/463 [#465]: https://github.com/fsnotify/fsnotify/pull/465 [#470]: https://github.com/fsnotify/fsnotify/pull/470 [#471]: https://github.com/fsnotify/fsnotify/pull/471 [#475]: https://github.com/fsnotify/fsnotify/pull/475 [#477]: https://github.com/fsnotify/fsnotify/pull/477 [#479]: https://github.com/fsnotify/fsnotify/pull/479 [#480]: https://github.com/fsnotify/fsnotify/pull/480 [#485]: https://github.com/fsnotify/fsnotify/pull/485 ## [1.5.4] - 2022-04-25 * Windows: add missing defer to `Watcher.WatchList` [#447](https://github.com/fsnotify/fsnotify/pull/447) * go.mod: use latest x/sys [#444](https://github.com/fsnotify/fsnotify/pull/444) * Fix compilation for OpenBSD [#443](https://github.com/fsnotify/fsnotify/pull/443) ## [1.5.3] - 2022-04-22 * This version is retracted. An incorrect branch is published accidentally [#445](https://github.com/fsnotify/fsnotify/issues/445) ## [1.5.2] - 2022-04-21 * Add a feature to return the directories and files that are being monitored [#374](https://github.com/fsnotify/fsnotify/pull/374) * Fix potential crash on windows if `raw.FileNameLength` exceeds `syscall.MAX_PATH` [#361](https://github.com/fsnotify/fsnotify/pull/361) * Allow build on unsupported GOOS [#424](https://github.com/fsnotify/fsnotify/pull/424) * Don't set `poller.fd` twice in `newFdPoller` [#406](https://github.com/fsnotify/fsnotify/pull/406) * fix go vet warnings: call to `(*T).Fatalf` from a non-test goroutine [#416](https://github.com/fsnotify/fsnotify/pull/416) ## [1.5.1] - 2021-08-24 * Revert Add AddRaw to not follow symlinks [#394](https://github.com/fsnotify/fsnotify/pull/394) ## [1.5.0] - 2021-08-20 * Go: Increase minimum required version to Go 1.12 [#381](https://github.com/fsnotify/fsnotify/pull/381) * Feature: Add AddRaw method which does not follow symlinks when adding a watch [#289](https://github.com/fsnotify/fsnotify/pull/298) * Windows: Follow symlinks by default like on all other systems [#289](https://github.com/fsnotify/fsnotify/pull/289) * CI: Use GitHub Actions for CI and cover go 1.12-1.17 [#378](https://github.com/fsnotify/fsnotify/pull/378) [#381](https://github.com/fsnotify/fsnotify/pull/381) [#385](https://github.com/fsnotify/fsnotify/pull/385) * Go 1.14+: Fix unsafe pointer conversion [#325](https://github.com/fsnotify/fsnotify/pull/325) ## [1.4.9] - 2020-03-11 * Move example usage to the readme #329. This may resolve #328. ## [1.4.8] - 2020-03-10 * CI: test more go versions (@nathany 1d13583d846ea9d66dcabbfefbfb9d8e6fb05216) * Tests: Queued inotify events could have been read by the test before max_queued_events was hit (@matthias-stone #265) * Tests: t.Fatalf -> t.Errorf in go routines (@gdey #266) * CI: Less verbosity (@nathany #267) * Tests: Darwin: Exchangedata is deprecated on 10.13 (@nathany #267) * Tests: Check if channels are closed in the example (@alexeykazakov #244) * CI: Only run golint on latest version of go and fix issues (@cpuguy83 #284) * CI: Add windows to travis matrix (@cpuguy83 #284) * Docs: Remover appveyor badge (@nathany 11844c0959f6fff69ba325d097fce35bd85a8e93) * Linux: create epoll and pipe fds with close-on-exec (@JohannesEbke #219) * Linux: open files with close-on-exec (@linxiulei #273) * Docs: Plan to support fanotify (@nathany ab058b44498e8b7566a799372a39d150d9ea0119 ) * Project: Add go.mod (@nathany #309) * Project: Revise editor config (@nathany #309) * Project: Update copyright for 2019 (@nathany #309) * CI: Drop go1.8 from CI matrix (@nathany #309) * Docs: Updating the FAQ section for supportability with NFS & FUSE filesystems (@Pratik32 4bf2d1fec78374803a39307bfb8d340688f4f28e ) ## [1.4.7] - 2018-01-09 * BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine) * Tests: Fix missing verb on format string (thanks @rchiossi) * Linux: Fix deadlock in Remove (thanks @aarondl) * Linux: Watch.Add improvements (avoid race, fix consistency, reduce garbage) (thanks @twpayne) * Docs: Moved FAQ into the README (thanks @vahe) * Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich) * Docs: replace references to OS X with macOS ## [1.4.2] - 2016-10-10 * Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack) ## [1.4.1] - 2016-10-04 * Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack) ## [1.4.0] - 2016-10-01 * add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie) ## [1.3.1] - 2016-06-28 * Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) ## [1.3.0] - 2016-04-19 * Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) ## [1.2.10] - 2016-03-02 * Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) ## [1.2.9] - 2016-01-13 kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep) ## [1.2.8] - 2015-12-17 * kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test) * inotify: fix race in test * enable race detection for continuous integration (Linux, Mac, Windows) ## [1.2.5] - 2015-10-17 * inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki) * inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken) * kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie) * kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion) ## [1.2.1] - 2015-10-14 * kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx) ## [1.2.0] - 2015-02-08 * inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD) * inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD) * kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59) ## [1.1.1] - 2015-02-05 * inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD) ## [1.1.0] - 2014-12-12 * kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43) * add low-level functions * only need to store flags on directories * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13) * done can be an unbuffered channel * remove calls to os.NewSyscallError * More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher) * kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48) * kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) ## [1.0.4] - 2014-09-07 * kqueue: add dragonfly to the build tags. * Rename source code files, rearrange code so exported APIs are at the top. * Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang) ## [1.0.3] - 2014-08-19 * [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36) ## [1.0.2] - 2014-08-17 * [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) * [Fix] Make ./path and path equivalent. (thanks @zhsso) ## [1.0.0] - 2014-08-15 * [API] Remove AddWatch on Windows, use Add. * Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30) * Minor updates based on feedback from golint. ## dev / 2014-07-09 * Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify). * Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno) ## dev / 2014-07-04 * kqueue: fix incorrect mutex used in Close() * Update example to demonstrate usage of Op. ## dev / 2014-06-28 * [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4) * Fix for String() method on Event (thanks Alex Brainman) * Don't build on Plan 9 or Solaris (thanks @4ad) ## dev / 2014-06-21 * Events channel of type Event rather than *Event. * [internal] use syscall constants directly for inotify and kqueue. * [internal] kqueue: rename events to kevents and fileEvent to event. ## dev / 2014-06-19 * Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally). * [internal] remove cookie from Event struct (unused). * [internal] Event struct has the same definition across every OS. * [internal] remove internal watch and removeWatch methods. ## dev / 2014-06-12 * [API] Renamed Watch() to Add() and RemoveWatch() to Remove(). * [API] Pluralized channel names: Events and Errors. * [API] Renamed FileEvent struct to Event. * [API] Op constants replace methods like IsCreate(). ## dev / 2014-06-12 * Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) ## dev / 2014-05-23 * [API] Remove current implementation of WatchFlags. * current implementation doesn't take advantage of OS for efficiency * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes * no tests for the current implementation * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195) ## [0.9.3] - 2014-12-31 * kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) ## [0.9.2] - 2014-08-17 * [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) ## [0.9.1] - 2014-06-12 * Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) ## [0.9.0] - 2014-01-17 * IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany) * [Fix] kqueue: fix deadlock [#77][] (thanks @cespare) * [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library. ## [0.8.12] - 2013-11-13 * [API] Remove FD_SET and friends from Linux adapter ## [0.8.11] - 2013-11-02 * [Doc] Add Changelog [#72][] (thanks @nathany) * [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond) ## [0.8.10] - 2013-10-19 * [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott) * [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer) * [Doc] specify OS-specific limits in README (thanks @debrando) ## [0.8.9] - 2013-09-08 * [Doc] Contributing (thanks @nathany) * [Doc] update package path in example code [#63][] (thanks @paulhammond) * [Doc] GoCI badge in README (Linux only) [#60][] * [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany) ## [0.8.8] - 2013-06-17 * [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie) ## [0.8.7] - 2013-06-03 * [API] Make syscall flags internal * [Fix] inotify: ignore event changes * [Fix] race in symlink test [#45][] (reported by @srid) * [Fix] tests on Windows * lower case error messages ## [0.8.6] - 2013-05-23 * kqueue: Use EVT_ONLY flag on Darwin * [Doc] Update README with full example ## [0.8.5] - 2013-05-09 * [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg) ## [0.8.4] - 2013-04-07 * [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz) ## [0.8.3] - 2013-03-13 * [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin) * [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin) ## [0.8.2] - 2013-02-07 * [Doc] add Authors * [Fix] fix data races for map access [#29][] (thanks @fsouza) ## [0.8.1] - 2013-01-09 * [Fix] Windows path separators * [Doc] BSD License ## [0.8.0] - 2012-11-09 * kqueue: directory watching improvements (thanks @vmirage) * inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto) * [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr) ## [0.7.4] - 2012-10-09 * [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji) * [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig) * [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig) * [Fix] kqueue: modify after recreation of file ## [0.7.3] - 2012-09-27 * [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage) * [Fix] kqueue: no longer get duplicate CREATE events ## [0.7.2] - 2012-09-01 * kqueue: events for created directories ## [0.7.1] - 2012-07-14 * [Fix] for renaming files ## [0.7.0] - 2012-07-02 * [Feature] FSNotify flags * [Fix] inotify: Added file name back to event path ## [0.6.0] - 2012-06-06 * kqueue: watch files after directory created (thanks @tmc) ## [0.5.1] - 2012-05-22 * [Fix] inotify: remove all watches before Close() ## [0.5.0] - 2012-05-03 * [API] kqueue: return errors during watch instead of sending over channel * kqueue: match symlink behavior on Linux * inotify: add `DELETE_SELF` (requested by @taralx) * [Fix] kqueue: handle EINTR (reported by @robfig) * [Doc] Godoc example [#1][] (thanks @davecheney) ## [0.4.0] - 2012-03-30 * Go 1 released: build with go tool * [Feature] Windows support using winfsnotify * Windows does not have attribute change notifications * Roll attribute notifications into IsModify ## [0.3.0] - 2012-02-19 * kqueue: add files when watch directory ## [0.2.0] - 2011-12-30 * update to latest Go weekly code ## [0.1.0] - 2011-10-19 * kqueue: add watch on file creation to match inotify * kqueue: create file event * inotify: ignore `IN_IGNORED` events * event String() * linux: common FileEvent functions * initial commit [#79]: https://github.com/howeyc/fsnotify/pull/79 [#77]: https://github.com/howeyc/fsnotify/pull/77 [#72]: https://github.com/howeyc/fsnotify/issues/72 [#71]: https://github.com/howeyc/fsnotify/issues/71 [#70]: https://github.com/howeyc/fsnotify/issues/70 [#63]: https://github.com/howeyc/fsnotify/issues/63 [#62]: https://github.com/howeyc/fsnotify/issues/62 [#60]: https://github.com/howeyc/fsnotify/issues/60 [#59]: https://github.com/howeyc/fsnotify/issues/59 [#49]: https://github.com/howeyc/fsnotify/issues/49 [#45]: https://github.com/howeyc/fsnotify/issues/45 [#40]: https://github.com/howeyc/fsnotify/issues/40 [#36]: https://github.com/howeyc/fsnotify/issues/36 [#33]: https://github.com/howeyc/fsnotify/issues/33 [#29]: https://github.com/howeyc/fsnotify/issues/29 [#25]: https://github.com/howeyc/fsnotify/issues/25 [#24]: https://github.com/howeyc/fsnotify/issues/24 [#21]: https://github.com/howeyc/fsnotify/issues/21 ================================================ FILE: vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md ================================================ Thank you for your interest in contributing to fsnotify! We try to review and merge PRs in a reasonable timeframe, but please be aware that: - To avoid "wasted" work, please discus changes on the issue tracker first. You can just send PRs, but they may end up being rejected for one reason or the other. - fsnotify is a cross-platform library, and changes must work reasonably well on all supported platforms. - Changes will need to be compatible; old code should still compile, and the runtime behaviour can't change in ways that are likely to lead to problems for users. Testing ------- Just `go test ./...` runs all the tests; the CI runs this on all supported platforms. Testing different platforms locally can be done with something like [goon] or [Vagrant], but this isn't super-easy to set up at the moment. Use the `-short` flag to make the "stress test" run faster. [goon]: https://github.com/arp242/goon [Vagrant]: https://www.vagrantup.com/ [integration_test.go]: /integration_test.go ================================================ FILE: vendor/github.com/fsnotify/fsnotify/LICENSE ================================================ Copyright © 2012 The Go Authors. All rights reserved. Copyright © fsnotify Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: vendor/github.com/fsnotify/fsnotify/README.md ================================================ fsnotify is a Go library to provide cross-platform filesystem notifications on Windows, Linux, macOS, BSD, and illumos. Go 1.17 or newer is required; the full documentation is at https://pkg.go.dev/github.com/fsnotify/fsnotify --- Platform support: | Backend | OS | Status | | :-------------------- | :--------- | :------------------------------------------------------------------------ | | inotify | Linux | Supported | | kqueue | BSD, macOS | Supported | | ReadDirectoryChangesW | Windows | Supported | | FEN | illumos | Supported | | fanotify | Linux 5.9+ | [Not yet](https://github.com/fsnotify/fsnotify/issues/114) | | AHAFS | AIX | [aix branch]; experimental due to lack of maintainer and test environment | | FSEvents | macOS | [Needs support in x/sys/unix][fsevents] | | USN Journals | Windows | [Needs support in x/sys/windows][usn] | | Polling | *All* | [Not yet](https://github.com/fsnotify/fsnotify/issues/9) | Linux and illumos should include Android and Solaris, but these are currently untested. [fsevents]: https://github.com/fsnotify/fsnotify/issues/11#issuecomment-1279133120 [usn]: https://github.com/fsnotify/fsnotify/issues/53#issuecomment-1279829847 [aix branch]: https://github.com/fsnotify/fsnotify/issues/353#issuecomment-1284590129 Usage ----- A basic example: ```go package main import ( "log" "github.com/fsnotify/fsnotify" ) func main() { // Create new watcher. watcher, err := fsnotify.NewWatcher() if err != nil { log.Fatal(err) } defer watcher.Close() // Start listening for events. go func() { for { select { case event, ok := <-watcher.Events: if !ok { return } log.Println("event:", event) if event.Has(fsnotify.Write) { log.Println("modified file:", event.Name) } case err, ok := <-watcher.Errors: if !ok { return } log.Println("error:", err) } } }() // Add a path. err = watcher.Add("/tmp") if err != nil { log.Fatal(err) } // Block main goroutine forever. <-make(chan struct{}) } ``` Some more examples can be found in [cmd/fsnotify](cmd/fsnotify), which can be run with: % go run ./cmd/fsnotify Further detailed documentation can be found in godoc: https://pkg.go.dev/github.com/fsnotify/fsnotify FAQ --- ### Will a file still be watched when it's moved to another directory? No, not unless you are watching the location it was moved to. ### Are subdirectories watched? No, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap: [#18]). [#18]: https://github.com/fsnotify/fsnotify/issues/18 ### Do I have to watch the Error and Event channels in a goroutine? Yes. You can read both channels in the same goroutine using `select` (you don't need a separate goroutine for both channels; see the example). ### Why don't notifications work with NFS, SMB, FUSE, /proc, or /sys? fsnotify requires support from underlying OS to work. The current NFS and SMB protocols does not provide network level support for file notifications, and neither do the /proc and /sys virtual filesystems. This could be fixed with a polling watcher ([#9]), but it's not yet implemented. [#9]: https://github.com/fsnotify/fsnotify/issues/9 ### Why do I get many Chmod events? Some programs may generate a lot of attribute changes; for example Spotlight on macOS, anti-virus programs, backup applications, and some others are known to do this. As a rule, it's typically best to ignore Chmod events. They're often not useful, and tend to cause problems. Spotlight indexing on macOS can result in multiple events (see [#15]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11]). [#11]: https://github.com/fsnotify/fsnotify/issues/11 [#15]: https://github.com/fsnotify/fsnotify/issues/15 ### Watching a file doesn't work well Watching individual files (rather than directories) is generally not recommended as many programs (especially editors) update files atomically: it will write to a temporary file which is then moved to to destination, overwriting the original (or some variant thereof). The watcher on the original file is now lost, as that no longer exists. The upshot of this is that a power failure or crash won't leave a half-written file. Watch the parent directory and use `Event.Name` to filter out files you're not interested in. There is an example of this in `cmd/fsnotify/file.go`. Platform-specific notes ----------------------- ### Linux When a file is removed a REMOVE event won't be emitted until all file descriptors are closed; it will emit a CHMOD instead: fp := os.Open("file") os.Remove("file") // CHMOD fp.Close() // REMOVE This is the event that inotify sends, so not much can be changed about this. The `fs.inotify.max_user_watches` sysctl variable specifies the upper limit for the number of watches per user, and `fs.inotify.max_user_instances` specifies the maximum number of inotify instances per user. Every Watcher you create is an "instance", and every path you add is a "watch". These are also exposed in `/proc` as `/proc/sys/fs/inotify/max_user_watches` and `/proc/sys/fs/inotify/max_user_instances` To increase them you can use `sysctl` or write the value to proc file: # The default values on Linux 5.18 sysctl fs.inotify.max_user_watches=124983 sysctl fs.inotify.max_user_instances=128 To make the changes persist on reboot edit `/etc/sysctl.conf` or `/usr/lib/sysctl.d/50-default.conf` (details differ per Linux distro; check your distro's documentation): fs.inotify.max_user_watches=124983 fs.inotify.max_user_instances=128 Reaching the limit will result in a "no space left on device" or "too many open files" error. ### kqueue (macOS, all BSD systems) kqueue requires opening a file descriptor for every file that's being watched; so if you're watching a directory with five files then that's six file descriptors. You will run in to your system's "max open files" limit faster on these platforms. The sysctl variables `kern.maxfiles` and `kern.maxfilesperproc` can be used to control the maximum number of open files. ================================================ FILE: vendor/github.com/fsnotify/fsnotify/backend_fen.go ================================================ //go:build solaris // +build solaris // Note: the documentation on the Watcher type and methods is generated from // mkdoc.zsh package fsnotify import ( "errors" "fmt" "os" "path/filepath" "sync" "golang.org/x/sys/unix" ) // Watcher watches a set of paths, delivering events on a channel. // // A watcher should not be copied (e.g. pass it by pointer, rather than by // value). // // # Linux notes // // When a file is removed a Remove event won't be emitted until all file // descriptors are closed, and deletes will always emit a Chmod. For example: // // fp := os.Open("file") // os.Remove("file") // Triggers Chmod // fp.Close() // Triggers Remove // // This is the event that inotify sends, so not much can be changed about this. // // The fs.inotify.max_user_watches sysctl variable specifies the upper limit // for the number of watches per user, and fs.inotify.max_user_instances // specifies the maximum number of inotify instances per user. Every Watcher you // create is an "instance", and every path you add is a "watch". // // These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and // /proc/sys/fs/inotify/max_user_instances // // To increase them you can use sysctl or write the value to the /proc file: // // # Default values on Linux 5.18 // sysctl fs.inotify.max_user_watches=124983 // sysctl fs.inotify.max_user_instances=128 // // To make the changes persist on reboot edit /etc/sysctl.conf or // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check // your distro's documentation): // // fs.inotify.max_user_watches=124983 // fs.inotify.max_user_instances=128 // // Reaching the limit will result in a "no space left on device" or "too many open // files" error. // // # kqueue notes (macOS, BSD) // // kqueue requires opening a file descriptor for every file that's being watched; // so if you're watching a directory with five files then that's six file // descriptors. You will run in to your system's "max open files" limit faster on // these platforms. // // The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to // control the maximum number of open files, as well as /etc/login.conf on BSD // systems. // // # Windows notes // // Paths can be added as "C:\path\to\dir", but forward slashes // ("C:/path/to/dir") will also work. // // When a watched directory is removed it will always send an event for the // directory itself, but may not send events for all files in that directory. // Sometimes it will send events for all times, sometimes it will send no // events, and often only for some files. // // The default ReadDirectoryChangesW() buffer size is 64K, which is the largest // value that is guaranteed to work with SMB filesystems. If you have many // events in quick succession this may not be enough, and you will have to use // [WithBufferSize] to increase the value. type Watcher struct { // Events sends the filesystem change events. // // fsnotify can send the following events; a "path" here can refer to a // file, directory, symbolic link, or special file like a FIFO. // // fsnotify.Create A new path was created; this may be followed by one // or more Write events if data also gets written to a // file. // // fsnotify.Remove A path was removed. // // fsnotify.Rename A path was renamed. A rename is always sent with the // old path as Event.Name, and a Create event will be // sent with the new name. Renames are only sent for // paths that are currently watched; e.g. moving an // unmonitored file into a monitored directory will // show up as just a Create. Similarly, renaming a file // to outside a monitored directory will show up as // only a Rename. // // fsnotify.Write A file or named pipe was written to. A Truncate will // also trigger a Write. A single "write action" // initiated by the user may show up as one or multiple // writes, depending on when the system syncs things to // disk. For example when compiling a large Go program // you may get hundreds of Write events, and you may // want to wait until you've stopped receiving them // (see the dedup example in cmd/fsnotify). // // Some systems may send Write event for directories // when the directory content changes. // // fsnotify.Chmod Attributes were changed. On Linux this is also sent // when a file is removed (or more accurately, when a // link to an inode is removed). On kqueue it's sent // when a file is truncated. On Windows it's never // sent. Events chan Event // Errors sends any errors. // // ErrEventOverflow is used to indicate there are too many events: // // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. // - kqueue, fen: Not used. Errors chan error mu sync.Mutex port *unix.EventPort done chan struct{} // Channel for sending a "quit message" to the reader goroutine dirs map[string]struct{} // Explicitly watched directories watches map[string]struct{} // Explicitly watched non-directories } // NewWatcher creates a new Watcher. func NewWatcher() (*Watcher, error) { return NewBufferedWatcher(0) } // NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events // channel. // // The main use case for this is situations with a very large number of events // where the kernel buffer size can't be increased (e.g. due to lack of // permissions). An unbuffered Watcher will perform better for almost all use // cases, and whenever possible you will be better off increasing the kernel // buffers instead of adding a large userspace buffer. func NewBufferedWatcher(sz uint) (*Watcher, error) { w := &Watcher{ Events: make(chan Event, sz), Errors: make(chan error), dirs: make(map[string]struct{}), watches: make(map[string]struct{}), done: make(chan struct{}), } var err error w.port, err = unix.NewEventPort() if err != nil { return nil, fmt.Errorf("fsnotify.NewWatcher: %w", err) } go w.readEvents() return w, nil } // sendEvent attempts to send an event to the user, returning true if the event // was put in the channel successfully and false if the watcher has been closed. func (w *Watcher) sendEvent(name string, op Op) (sent bool) { select { case w.Events <- Event{Name: name, Op: op}: return true case <-w.done: return false } } // sendError attempts to send an error to the user, returning true if the error // was put in the channel successfully and false if the watcher has been closed. func (w *Watcher) sendError(err error) (sent bool) { select { case w.Errors <- err: return true case <-w.done: return false } } func (w *Watcher) isClosed() bool { select { case <-w.done: return true default: return false } } // Close removes all watches and closes the Events channel. func (w *Watcher) Close() error { // Take the lock used by associateFile to prevent lingering events from // being processed after the close w.mu.Lock() defer w.mu.Unlock() if w.isClosed() { return nil } close(w.done) return w.port.Close() } // Add starts monitoring the path for changes. // // A path can only be watched once; watching it more than once is a no-op and will // not return an error. Paths that do not yet exist on the filesystem cannot be // watched. // // A watch will be automatically removed if the watched path is deleted or // renamed. The exception is the Windows backend, which doesn't remove the // watcher on renames. // // Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special // filesystems (/proc, /sys, etc.) generally don't work. // // Returns [ErrClosed] if [Watcher.Close] was called. // // See [Watcher.AddWith] for a version that allows adding options. // // # Watching directories // // All files in a directory are monitored, including new files that are created // after the watcher is started. Subdirectories are not watched (i.e. it's // non-recursive). // // # Watching files // // Watching individual files (rather than directories) is generally not // recommended as many programs (especially editors) update files atomically: it // will write to a temporary file which is then moved to to destination, // overwriting the original (or some variant thereof). The watcher on the // original file is now lost, as that no longer exists. // // The upshot of this is that a power failure or crash won't leave a // half-written file. // // Watch the parent directory and use Event.Name to filter out files you're not // interested in. There is an example of this in cmd/fsnotify/file.go. func (w *Watcher) Add(name string) error { return w.AddWith(name) } // AddWith is like [Watcher.Add], but allows adding options. When using Add() // the defaults described below are used. // // Possible options are: // // - [WithBufferSize] sets the buffer size for the Windows backend; no-op on // other platforms. The default is 64K (65536 bytes). func (w *Watcher) AddWith(name string, opts ...addOpt) error { if w.isClosed() { return ErrClosed } if w.port.PathIsWatched(name) { return nil } _ = getOptions(opts...) // Currently we resolve symlinks that were explicitly requested to be // watched. Otherwise we would use LStat here. stat, err := os.Stat(name) if err != nil { return err } // Associate all files in the directory. if stat.IsDir() { err := w.handleDirectory(name, stat, true, w.associateFile) if err != nil { return err } w.mu.Lock() w.dirs[name] = struct{}{} w.mu.Unlock() return nil } err = w.associateFile(name, stat, true) if err != nil { return err } w.mu.Lock() w.watches[name] = struct{}{} w.mu.Unlock() return nil } // Remove stops monitoring the path for changes. // // Directories are always removed non-recursively. For example, if you added // /tmp/dir and /tmp/dir/subdir then you will need to remove both. // // Removing a path that has not yet been added returns [ErrNonExistentWatch]. // // Returns nil if [Watcher.Close] was called. func (w *Watcher) Remove(name string) error { if w.isClosed() { return nil } if !w.port.PathIsWatched(name) { return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) } // The user has expressed an intent. Immediately remove this name from // whichever watch list it might be in. If it's not in there the delete // doesn't cause harm. w.mu.Lock() delete(w.watches, name) delete(w.dirs, name) w.mu.Unlock() stat, err := os.Stat(name) if err != nil { return err } // Remove associations for every file in the directory. if stat.IsDir() { err := w.handleDirectory(name, stat, false, w.dissociateFile) if err != nil { return err } return nil } err = w.port.DissociatePath(name) if err != nil { return err } return nil } // readEvents contains the main loop that runs in a goroutine watching for events. func (w *Watcher) readEvents() { // If this function returns, the watcher has been closed and we can close // these channels defer func() { close(w.Errors) close(w.Events) }() pevents := make([]unix.PortEvent, 8) for { count, err := w.port.Get(pevents, 1, nil) if err != nil && err != unix.ETIME { // Interrupted system call (count should be 0) ignore and continue if errors.Is(err, unix.EINTR) && count == 0 { continue } // Get failed because we called w.Close() if errors.Is(err, unix.EBADF) && w.isClosed() { return } // There was an error not caused by calling w.Close() if !w.sendError(err) { return } } p := pevents[:count] for _, pevent := range p { if pevent.Source != unix.PORT_SOURCE_FILE { // Event from unexpected source received; should never happen. if !w.sendError(errors.New("Event from unexpected source received")) { return } continue } err = w.handleEvent(&pevent) if err != nil { if !w.sendError(err) { return } } } } } func (w *Watcher) handleDirectory(path string, stat os.FileInfo, follow bool, handler func(string, os.FileInfo, bool) error) error { files, err := os.ReadDir(path) if err != nil { return err } // Handle all children of the directory. for _, entry := range files { finfo, err := entry.Info() if err != nil { return err } err = handler(filepath.Join(path, finfo.Name()), finfo, false) if err != nil { return err } } // And finally handle the directory itself. return handler(path, stat, follow) } // handleEvent might need to emit more than one fsnotify event if the events // bitmap matches more than one event type (e.g. the file was both modified and // had the attributes changed between when the association was created and the // when event was returned) func (w *Watcher) handleEvent(event *unix.PortEvent) error { var ( events = event.Events path = event.Path fmode = event.Cookie.(os.FileMode) reRegister = true ) w.mu.Lock() _, watchedDir := w.dirs[path] _, watchedPath := w.watches[path] w.mu.Unlock() isWatched := watchedDir || watchedPath if events&unix.FILE_DELETE != 0 { if !w.sendEvent(path, Remove) { return nil } reRegister = false } if events&unix.FILE_RENAME_FROM != 0 { if !w.sendEvent(path, Rename) { return nil } // Don't keep watching the new file name reRegister = false } if events&unix.FILE_RENAME_TO != 0 { // We don't report a Rename event for this case, because Rename events // are interpreted as referring to the _old_ name of the file, and in // this case the event would refer to the new name of the file. This // type of rename event is not supported by fsnotify. // inotify reports a Remove event in this case, so we simulate this // here. if !w.sendEvent(path, Remove) { return nil } // Don't keep watching the file that was removed reRegister = false } // The file is gone, nothing left to do. if !reRegister { if watchedDir { w.mu.Lock() delete(w.dirs, path) w.mu.Unlock() } if watchedPath { w.mu.Lock() delete(w.watches, path) w.mu.Unlock() } return nil } // If we didn't get a deletion the file still exists and we're going to have // to watch it again. Let's Stat it now so that we can compare permissions // and have what we need to continue watching the file stat, err := os.Lstat(path) if err != nil { // This is unexpected, but we should still emit an event. This happens // most often on "rm -r" of a subdirectory inside a watched directory We // get a modify event of something happening inside, but by the time we // get here, the sudirectory is already gone. Clearly we were watching // this path but now it is gone. Let's tell the user that it was // removed. if !w.sendEvent(path, Remove) { return nil } // Suppress extra write events on removed directories; they are not // informative and can be confusing. return nil } // resolve symlinks that were explicitly watched as we would have at Add() // time. this helps suppress spurious Chmod events on watched symlinks if isWatched { stat, err = os.Stat(path) if err != nil { // The symlink still exists, but the target is gone. Report the // Remove similar to above. if !w.sendEvent(path, Remove) { return nil } // Don't return the error } } if events&unix.FILE_MODIFIED != 0 { if fmode.IsDir() { if watchedDir { if err := w.updateDirectory(path); err != nil { return err } } else { if !w.sendEvent(path, Write) { return nil } } } else { if !w.sendEvent(path, Write) { return nil } } } if events&unix.FILE_ATTRIB != 0 && stat != nil { // Only send Chmod if perms changed if stat.Mode().Perm() != fmode.Perm() { if !w.sendEvent(path, Chmod) { return nil } } } if stat != nil { // If we get here, it means we've hit an event above that requires us to // continue watching the file or directory return w.associateFile(path, stat, isWatched) } return nil } func (w *Watcher) updateDirectory(path string) error { // The directory was modified, so we must find unwatched entities and watch // them. If something was removed from the directory, nothing will happen, // as everything else should still be watched. files, err := os.ReadDir(path) if err != nil { return err } for _, entry := range files { path := filepath.Join(path, entry.Name()) if w.port.PathIsWatched(path) { continue } finfo, err := entry.Info() if err != nil { return err } err = w.associateFile(path, finfo, false) if err != nil { if !w.sendError(err) { return nil } } if !w.sendEvent(path, Create) { return nil } } return nil } func (w *Watcher) associateFile(path string, stat os.FileInfo, follow bool) error { if w.isClosed() { return ErrClosed } // This is primarily protecting the call to AssociatePath but it is // important and intentional that the call to PathIsWatched is also // protected by this mutex. Without this mutex, AssociatePath has been seen // to error out that the path is already associated. w.mu.Lock() defer w.mu.Unlock() if w.port.PathIsWatched(path) { // Remove the old association in favor of this one If we get ENOENT, // then while the x/sys/unix wrapper still thought that this path was // associated, the underlying event port did not. This call will have // cleared up that discrepancy. The most likely cause is that the event // has fired but we haven't processed it yet. err := w.port.DissociatePath(path) if err != nil && err != unix.ENOENT { return err } } // FILE_NOFOLLOW means we watch symlinks themselves rather than their // targets. events := unix.FILE_MODIFIED | unix.FILE_ATTRIB | unix.FILE_NOFOLLOW if follow { // We *DO* follow symlinks for explicitly watched entries. events = unix.FILE_MODIFIED | unix.FILE_ATTRIB } return w.port.AssociatePath(path, stat, events, stat.Mode()) } func (w *Watcher) dissociateFile(path string, stat os.FileInfo, unused bool) error { if !w.port.PathIsWatched(path) { return nil } return w.port.DissociatePath(path) } // WatchList returns all paths explicitly added with [Watcher.Add] (and are not // yet removed). // // Returns nil if [Watcher.Close] was called. func (w *Watcher) WatchList() []string { if w.isClosed() { return nil } w.mu.Lock() defer w.mu.Unlock() entries := make([]string, 0, len(w.watches)+len(w.dirs)) for pathname := range w.dirs { entries = append(entries, pathname) } for pathname := range w.watches { entries = append(entries, pathname) } return entries } ================================================ FILE: vendor/github.com/fsnotify/fsnotify/backend_inotify.go ================================================ //go:build linux && !appengine // +build linux,!appengine // Note: the documentation on the Watcher type and methods is generated from // mkdoc.zsh package fsnotify import ( "errors" "fmt" "io" "os" "path/filepath" "strings" "sync" "unsafe" "golang.org/x/sys/unix" ) // Watcher watches a set of paths, delivering events on a channel. // // A watcher should not be copied (e.g. pass it by pointer, rather than by // value). // // # Linux notes // // When a file is removed a Remove event won't be emitted until all file // descriptors are closed, and deletes will always emit a Chmod. For example: // // fp := os.Open("file") // os.Remove("file") // Triggers Chmod // fp.Close() // Triggers Remove // // This is the event that inotify sends, so not much can be changed about this. // // The fs.inotify.max_user_watches sysctl variable specifies the upper limit // for the number of watches per user, and fs.inotify.max_user_instances // specifies the maximum number of inotify instances per user. Every Watcher you // create is an "instance", and every path you add is a "watch". // // These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and // /proc/sys/fs/inotify/max_user_instances // // To increase them you can use sysctl or write the value to the /proc file: // // # Default values on Linux 5.18 // sysctl fs.inotify.max_user_watches=124983 // sysctl fs.inotify.max_user_instances=128 // // To make the changes persist on reboot edit /etc/sysctl.conf or // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check // your distro's documentation): // // fs.inotify.max_user_watches=124983 // fs.inotify.max_user_instances=128 // // Reaching the limit will result in a "no space left on device" or "too many open // files" error. // // # kqueue notes (macOS, BSD) // // kqueue requires opening a file descriptor for every file that's being watched; // so if you're watching a directory with five files then that's six file // descriptors. You will run in to your system's "max open files" limit faster on // these platforms. // // The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to // control the maximum number of open files, as well as /etc/login.conf on BSD // systems. // // # Windows notes // // Paths can be added as "C:\path\to\dir", but forward slashes // ("C:/path/to/dir") will also work. // // When a watched directory is removed it will always send an event for the // directory itself, but may not send events for all files in that directory. // Sometimes it will send events for all times, sometimes it will send no // events, and often only for some files. // // The default ReadDirectoryChangesW() buffer size is 64K, which is the largest // value that is guaranteed to work with SMB filesystems. If you have many // events in quick succession this may not be enough, and you will have to use // [WithBufferSize] to increase the value. type Watcher struct { // Events sends the filesystem change events. // // fsnotify can send the following events; a "path" here can refer to a // file, directory, symbolic link, or special file like a FIFO. // // fsnotify.Create A new path was created; this may be followed by one // or more Write events if data also gets written to a // file. // // fsnotify.Remove A path was removed. // // fsnotify.Rename A path was renamed. A rename is always sent with the // old path as Event.Name, and a Create event will be // sent with the new name. Renames are only sent for // paths that are currently watched; e.g. moving an // unmonitored file into a monitored directory will // show up as just a Create. Similarly, renaming a file // to outside a monitored directory will show up as // only a Rename. // // fsnotify.Write A file or named pipe was written to. A Truncate will // also trigger a Write. A single "write action" // initiated by the user may show up as one or multiple // writes, depending on when the system syncs things to // disk. For example when compiling a large Go program // you may get hundreds of Write events, and you may // want to wait until you've stopped receiving them // (see the dedup example in cmd/fsnotify). // // Some systems may send Write event for directories // when the directory content changes. // // fsnotify.Chmod Attributes were changed. On Linux this is also sent // when a file is removed (or more accurately, when a // link to an inode is removed). On kqueue it's sent // when a file is truncated. On Windows it's never // sent. Events chan Event // Errors sends any errors. // // ErrEventOverflow is used to indicate there are too many events: // // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. // - kqueue, fen: Not used. Errors chan error // Store fd here as os.File.Read() will no longer return on close after // calling Fd(). See: https://github.com/golang/go/issues/26439 fd int inotifyFile *os.File watches *watches done chan struct{} // Channel for sending a "quit message" to the reader goroutine closeMu sync.Mutex doneResp chan struct{} // Channel to respond to Close } type ( watches struct { mu sync.RWMutex wd map[uint32]*watch // wd → watch path map[string]uint32 // pathname → wd } watch struct { wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall) flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags) path string // Watch path. } ) func newWatches() *watches { return &watches{ wd: make(map[uint32]*watch), path: make(map[string]uint32), } } func (w *watches) len() int { w.mu.RLock() defer w.mu.RUnlock() return len(w.wd) } func (w *watches) add(ww *watch) { w.mu.Lock() defer w.mu.Unlock() w.wd[ww.wd] = ww w.path[ww.path] = ww.wd } func (w *watches) remove(wd uint32) { w.mu.Lock() defer w.mu.Unlock() delete(w.path, w.wd[wd].path) delete(w.wd, wd) } func (w *watches) removePath(path string) (uint32, bool) { w.mu.Lock() defer w.mu.Unlock() wd, ok := w.path[path] if !ok { return 0, false } delete(w.path, path) delete(w.wd, wd) return wd, true } func (w *watches) byPath(path string) *watch { w.mu.RLock() defer w.mu.RUnlock() return w.wd[w.path[path]] } func (w *watches) byWd(wd uint32) *watch { w.mu.RLock() defer w.mu.RUnlock() return w.wd[wd] } func (w *watches) updatePath(path string, f func(*watch) (*watch, error)) error { w.mu.Lock() defer w.mu.Unlock() var existing *watch wd, ok := w.path[path] if ok { existing = w.wd[wd] } upd, err := f(existing) if err != nil { return err } if upd != nil { w.wd[upd.wd] = upd w.path[upd.path] = upd.wd if upd.wd != wd { delete(w.wd, wd) } } return nil } // NewWatcher creates a new Watcher. func NewWatcher() (*Watcher, error) { return NewBufferedWatcher(0) } // NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events // channel. // // The main use case for this is situations with a very large number of events // where the kernel buffer size can't be increased (e.g. due to lack of // permissions). An unbuffered Watcher will perform better for almost all use // cases, and whenever possible you will be better off increasing the kernel // buffers instead of adding a large userspace buffer. func NewBufferedWatcher(sz uint) (*Watcher, error) { // Need to set nonblocking mode for SetDeadline to work, otherwise blocking // I/O operations won't terminate on close. fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC | unix.IN_NONBLOCK) if fd == -1 { return nil, errno } w := &Watcher{ fd: fd, inotifyFile: os.NewFile(uintptr(fd), ""), watches: newWatches(), Events: make(chan Event, sz), Errors: make(chan error), done: make(chan struct{}), doneResp: make(chan struct{}), } go w.readEvents() return w, nil } // Returns true if the event was sent, or false if watcher is closed. func (w *Watcher) sendEvent(e Event) bool { select { case w.Events <- e: return true case <-w.done: return false } } // Returns true if the error was sent, or false if watcher is closed. func (w *Watcher) sendError(err error) bool { select { case w.Errors <- err: return true case <-w.done: return false } } func (w *Watcher) isClosed() bool { select { case <-w.done: return true default: return false } } // Close removes all watches and closes the Events channel. func (w *Watcher) Close() error { w.closeMu.Lock() if w.isClosed() { w.closeMu.Unlock() return nil } close(w.done) w.closeMu.Unlock() // Causes any blocking reads to return with an error, provided the file // still supports deadline operations. err := w.inotifyFile.Close() if err != nil { return err } // Wait for goroutine to close <-w.doneResp return nil } // Add starts monitoring the path for changes. // // A path can only be watched once; watching it more than once is a no-op and will // not return an error. Paths that do not yet exist on the filesystem cannot be // watched. // // A watch will be automatically removed if the watched path is deleted or // renamed. The exception is the Windows backend, which doesn't remove the // watcher on renames. // // Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special // filesystems (/proc, /sys, etc.) generally don't work. // // Returns [ErrClosed] if [Watcher.Close] was called. // // See [Watcher.AddWith] for a version that allows adding options. // // # Watching directories // // All files in a directory are monitored, including new files that are created // after the watcher is started. Subdirectories are not watched (i.e. it's // non-recursive). // // # Watching files // // Watching individual files (rather than directories) is generally not // recommended as many programs (especially editors) update files atomically: it // will write to a temporary file which is then moved to to destination, // overwriting the original (or some variant thereof). The watcher on the // original file is now lost, as that no longer exists. // // The upshot of this is that a power failure or crash won't leave a // half-written file. // // Watch the parent directory and use Event.Name to filter out files you're not // interested in. There is an example of this in cmd/fsnotify/file.go. func (w *Watcher) Add(name string) error { return w.AddWith(name) } // AddWith is like [Watcher.Add], but allows adding options. When using Add() // the defaults described below are used. // // Possible options are: // // - [WithBufferSize] sets the buffer size for the Windows backend; no-op on // other platforms. The default is 64K (65536 bytes). func (w *Watcher) AddWith(name string, opts ...addOpt) error { if w.isClosed() { return ErrClosed } name = filepath.Clean(name) _ = getOptions(opts...) var flags uint32 = unix.IN_MOVED_TO | unix.IN_MOVED_FROM | unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY | unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF return w.watches.updatePath(name, func(existing *watch) (*watch, error) { if existing != nil { flags |= existing.flags | unix.IN_MASK_ADD } wd, err := unix.InotifyAddWatch(w.fd, name, flags) if wd == -1 { return nil, err } if existing == nil { return &watch{ wd: uint32(wd), path: name, flags: flags, }, nil } existing.wd = uint32(wd) existing.flags = flags return existing, nil }) } // Remove stops monitoring the path for changes. // // Directories are always removed non-recursively. For example, if you added // /tmp/dir and /tmp/dir/subdir then you will need to remove both. // // Removing a path that has not yet been added returns [ErrNonExistentWatch]. // // Returns nil if [Watcher.Close] was called. func (w *Watcher) Remove(name string) error { if w.isClosed() { return nil } return w.remove(filepath.Clean(name)) } func (w *Watcher) remove(name string) error { wd, ok := w.watches.removePath(name) if !ok { return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) } success, errno := unix.InotifyRmWatch(w.fd, wd) if success == -1 { // TODO: Perhaps it's not helpful to return an error here in every case; // The only two possible errors are: // // - EBADF, which happens when w.fd is not a valid file descriptor // of any kind. // - EINVAL, which is when fd is not an inotify descriptor or wd // is not a valid watch descriptor. Watch descriptors are // invalidated when they are removed explicitly or implicitly; // explicitly by inotify_rm_watch, implicitly when the file they // are watching is deleted. return errno } return nil } // WatchList returns all paths explicitly added with [Watcher.Add] (and are not // yet removed). // // Returns nil if [Watcher.Close] was called. func (w *Watcher) WatchList() []string { if w.isClosed() { return nil } entries := make([]string, 0, w.watches.len()) w.watches.mu.RLock() for pathname := range w.watches.path { entries = append(entries, pathname) } w.watches.mu.RUnlock() return entries } // readEvents reads from the inotify file descriptor, converts the // received events into Event objects and sends them via the Events channel func (w *Watcher) readEvents() { defer func() { close(w.doneResp) close(w.Errors) close(w.Events) }() var ( buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events errno error // Syscall errno ) for { // See if we have been closed. if w.isClosed() { return } n, err := w.inotifyFile.Read(buf[:]) switch { case errors.Unwrap(err) == os.ErrClosed: return case err != nil: if !w.sendError(err) { return } continue } if n < unix.SizeofInotifyEvent { var err error if n == 0 { err = io.EOF // If EOF is received. This should really never happen. } else if n < 0 { err = errno // If an error occurred while reading. } else { err = errors.New("notify: short read in readEvents()") // Read was too short. } if !w.sendError(err) { return } continue } var offset uint32 // We don't know how many events we just read into the buffer // While the offset points to at least one whole event... for offset <= uint32(n-unix.SizeofInotifyEvent) { var ( // Point "raw" to the event in the buffer raw = (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset])) mask = uint32(raw.Mask) nameLen = uint32(raw.Len) ) if mask&unix.IN_Q_OVERFLOW != 0 { if !w.sendError(ErrEventOverflow) { return } } // If the event happened to the watched directory or the watched file, the kernel // doesn't append the filename to the event, but we would like to always fill the // the "Name" field with a valid filename. We retrieve the path of the watch from // the "paths" map. watch := w.watches.byWd(uint32(raw.Wd)) // inotify will automatically remove the watch on deletes; just need // to clean our state here. if watch != nil && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF { w.watches.remove(watch.wd) } // We can't really update the state when a watched path is moved; // only IN_MOVE_SELF is sent and not IN_MOVED_{FROM,TO}. So remove // the watch. if watch != nil && mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF { err := w.remove(watch.path) if err != nil && !errors.Is(err, ErrNonExistentWatch) { if !w.sendError(err) { return } } } var name string if watch != nil { name = watch.path } if nameLen > 0 { // Point "bytes" at the first byte of the filename bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen] // The filename is padded with NULL bytes. TrimRight() gets rid of those. name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") } event := w.newEvent(name, mask) // Send the events that are not ignored on the events channel if mask&unix.IN_IGNORED == 0 { if !w.sendEvent(event) { return } } // Move to the next event in the buffer offset += unix.SizeofInotifyEvent + nameLen } } } // newEvent returns an platform-independent Event based on an inotify mask. func (w *Watcher) newEvent(name string, mask uint32) Event { e := Event{Name: name} if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { e.Op |= Create } if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE { e.Op |= Remove } if mask&unix.IN_MODIFY == unix.IN_MODIFY { e.Op |= Write } if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { e.Op |= Rename } if mask&unix.IN_ATTRIB == unix.IN_ATTRIB { e.Op |= Chmod } return e } ================================================ FILE: vendor/github.com/fsnotify/fsnotify/backend_kqueue.go ================================================ //go:build freebsd || openbsd || netbsd || dragonfly || darwin // +build freebsd openbsd netbsd dragonfly darwin // Note: the documentation on the Watcher type and methods is generated from // mkdoc.zsh package fsnotify import ( "errors" "fmt" "os" "path/filepath" "sync" "golang.org/x/sys/unix" ) // Watcher watches a set of paths, delivering events on a channel. // // A watcher should not be copied (e.g. pass it by pointer, rather than by // value). // // # Linux notes // // When a file is removed a Remove event won't be emitted until all file // descriptors are closed, and deletes will always emit a Chmod. For example: // // fp := os.Open("file") // os.Remove("file") // Triggers Chmod // fp.Close() // Triggers Remove // // This is the event that inotify sends, so not much can be changed about this. // // The fs.inotify.max_user_watches sysctl variable specifies the upper limit // for the number of watches per user, and fs.inotify.max_user_instances // specifies the maximum number of inotify instances per user. Every Watcher you // create is an "instance", and every path you add is a "watch". // // These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and // /proc/sys/fs/inotify/max_user_instances // // To increase them you can use sysctl or write the value to the /proc file: // // # Default values on Linux 5.18 // sysctl fs.inotify.max_user_watches=124983 // sysctl fs.inotify.max_user_instances=128 // // To make the changes persist on reboot edit /etc/sysctl.conf or // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check // your distro's documentation): // // fs.inotify.max_user_watches=124983 // fs.inotify.max_user_instances=128 // // Reaching the limit will result in a "no space left on device" or "too many open // files" error. // // # kqueue notes (macOS, BSD) // // kqueue requires opening a file descriptor for every file that's being watched; // so if you're watching a directory with five files then that's six file // descriptors. You will run in to your system's "max open files" limit faster on // these platforms. // // The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to // control the maximum number of open files, as well as /etc/login.conf on BSD // systems. // // # Windows notes // // Paths can be added as "C:\path\to\dir", but forward slashes // ("C:/path/to/dir") will also work. // // When a watched directory is removed it will always send an event for the // directory itself, but may not send events for all files in that directory. // Sometimes it will send events for all times, sometimes it will send no // events, and often only for some files. // // The default ReadDirectoryChangesW() buffer size is 64K, which is the largest // value that is guaranteed to work with SMB filesystems. If you have many // events in quick succession this may not be enough, and you will have to use // [WithBufferSize] to increase the value. type Watcher struct { // Events sends the filesystem change events. // // fsnotify can send the following events; a "path" here can refer to a // file, directory, symbolic link, or special file like a FIFO. // // fsnotify.Create A new path was created; this may be followed by one // or more Write events if data also gets written to a // file. // // fsnotify.Remove A path was removed. // // fsnotify.Rename A path was renamed. A rename is always sent with the // old path as Event.Name, and a Create event will be // sent with the new name. Renames are only sent for // paths that are currently watched; e.g. moving an // unmonitored file into a monitored directory will // show up as just a Create. Similarly, renaming a file // to outside a monitored directory will show up as // only a Rename. // // fsnotify.Write A file or named pipe was written to. A Truncate will // also trigger a Write. A single "write action" // initiated by the user may show up as one or multiple // writes, depending on when the system syncs things to // disk. For example when compiling a large Go program // you may get hundreds of Write events, and you may // want to wait until you've stopped receiving them // (see the dedup example in cmd/fsnotify). // // Some systems may send Write event for directories // when the directory content changes. // // fsnotify.Chmod Attributes were changed. On Linux this is also sent // when a file is removed (or more accurately, when a // link to an inode is removed). On kqueue it's sent // when a file is truncated. On Windows it's never // sent. Events chan Event // Errors sends any errors. // // ErrEventOverflow is used to indicate there are too many events: // // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. // - kqueue, fen: Not used. Errors chan error done chan struct{} kq int // File descriptor (as returned by the kqueue() syscall). closepipe [2]int // Pipe used for closing. mu sync.Mutex // Protects access to watcher data watches map[string]int // Watched file descriptors (key: path). watchesByDir map[string]map[int]struct{} // Watched file descriptors indexed by the parent directory (key: dirname(path)). userWatches map[string]struct{} // Watches added with Watcher.Add() dirFlags map[string]uint32 // Watched directories to fflags used in kqueue. paths map[int]pathInfo // File descriptors to path names for processing kqueue events. fileExists map[string]struct{} // Keep track of if we know this file exists (to stop duplicate create events). isClosed bool // Set to true when Close() is first called } type pathInfo struct { name string isDir bool } // NewWatcher creates a new Watcher. func NewWatcher() (*Watcher, error) { return NewBufferedWatcher(0) } // NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events // channel. // // The main use case for this is situations with a very large number of events // where the kernel buffer size can't be increased (e.g. due to lack of // permissions). An unbuffered Watcher will perform better for almost all use // cases, and whenever possible you will be better off increasing the kernel // buffers instead of adding a large userspace buffer. func NewBufferedWatcher(sz uint) (*Watcher, error) { kq, closepipe, err := newKqueue() if err != nil { return nil, err } w := &Watcher{ kq: kq, closepipe: closepipe, watches: make(map[string]int), watchesByDir: make(map[string]map[int]struct{}), dirFlags: make(map[string]uint32), paths: make(map[int]pathInfo), fileExists: make(map[string]struct{}), userWatches: make(map[string]struct{}), Events: make(chan Event, sz), Errors: make(chan error), done: make(chan struct{}), } go w.readEvents() return w, nil } // newKqueue creates a new kernel event queue and returns a descriptor. // // This registers a new event on closepipe, which will trigger an event when // it's closed. This way we can use kevent() without timeout/polling; without // the closepipe, it would block forever and we wouldn't be able to stop it at // all. func newKqueue() (kq int, closepipe [2]int, err error) { kq, err = unix.Kqueue() if kq == -1 { return kq, closepipe, err } // Register the close pipe. err = unix.Pipe(closepipe[:]) if err != nil { unix.Close(kq) return kq, closepipe, err } // Register changes to listen on the closepipe. changes := make([]unix.Kevent_t, 1) // SetKevent converts int to the platform-specific types. unix.SetKevent(&changes[0], closepipe[0], unix.EVFILT_READ, unix.EV_ADD|unix.EV_ENABLE|unix.EV_ONESHOT) ok, err := unix.Kevent(kq, changes, nil, nil) if ok == -1 { unix.Close(kq) unix.Close(closepipe[0]) unix.Close(closepipe[1]) return kq, closepipe, err } return kq, closepipe, nil } // Returns true if the event was sent, or false if watcher is closed. func (w *Watcher) sendEvent(e Event) bool { select { case w.Events <- e: return true case <-w.done: return false } } // Returns true if the error was sent, or false if watcher is closed. func (w *Watcher) sendError(err error) bool { select { case w.Errors <- err: return true case <-w.done: return false } } // Close removes all watches and closes the Events channel. func (w *Watcher) Close() error { w.mu.Lock() if w.isClosed { w.mu.Unlock() return nil } w.isClosed = true // copy paths to remove while locked pathsToRemove := make([]string, 0, len(w.watches)) for name := range w.watches { pathsToRemove = append(pathsToRemove, name) } w.mu.Unlock() // Unlock before calling Remove, which also locks for _, name := range pathsToRemove { w.Remove(name) } // Send "quit" message to the reader goroutine. unix.Close(w.closepipe[1]) close(w.done) return nil } // Add starts monitoring the path for changes. // // A path can only be watched once; watching it more than once is a no-op and will // not return an error. Paths that do not yet exist on the filesystem cannot be // watched. // // A watch will be automatically removed if the watched path is deleted or // renamed. The exception is the Windows backend, which doesn't remove the // watcher on renames. // // Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special // filesystems (/proc, /sys, etc.) generally don't work. // // Returns [ErrClosed] if [Watcher.Close] was called. // // See [Watcher.AddWith] for a version that allows adding options. // // # Watching directories // // All files in a directory are monitored, including new files that are created // after the watcher is started. Subdirectories are not watched (i.e. it's // non-recursive). // // # Watching files // // Watching individual files (rather than directories) is generally not // recommended as many programs (especially editors) update files atomically: it // will write to a temporary file which is then moved to to destination, // overwriting the original (or some variant thereof). The watcher on the // original file is now lost, as that no longer exists. // // The upshot of this is that a power failure or crash won't leave a // half-written file. // // Watch the parent directory and use Event.Name to filter out files you're not // interested in. There is an example of this in cmd/fsnotify/file.go. func (w *Watcher) Add(name string) error { return w.AddWith(name) } // AddWith is like [Watcher.Add], but allows adding options. When using Add() // the defaults described below are used. // // Possible options are: // // - [WithBufferSize] sets the buffer size for the Windows backend; no-op on // other platforms. The default is 64K (65536 bytes). func (w *Watcher) AddWith(name string, opts ...addOpt) error { _ = getOptions(opts...) w.mu.Lock() w.userWatches[name] = struct{}{} w.mu.Unlock() _, err := w.addWatch(name, noteAllEvents) return err } // Remove stops monitoring the path for changes. // // Directories are always removed non-recursively. For example, if you added // /tmp/dir and /tmp/dir/subdir then you will need to remove both. // // Removing a path that has not yet been added returns [ErrNonExistentWatch]. // // Returns nil if [Watcher.Close] was called. func (w *Watcher) Remove(name string) error { return w.remove(name, true) } func (w *Watcher) remove(name string, unwatchFiles bool) error { name = filepath.Clean(name) w.mu.Lock() if w.isClosed { w.mu.Unlock() return nil } watchfd, ok := w.watches[name] w.mu.Unlock() if !ok { return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) } err := w.register([]int{watchfd}, unix.EV_DELETE, 0) if err != nil { return err } unix.Close(watchfd) w.mu.Lock() isDir := w.paths[watchfd].isDir delete(w.watches, name) delete(w.userWatches, name) parentName := filepath.Dir(name) delete(w.watchesByDir[parentName], watchfd) if len(w.watchesByDir[parentName]) == 0 { delete(w.watchesByDir, parentName) } delete(w.paths, watchfd) delete(w.dirFlags, name) delete(w.fileExists, name) w.mu.Unlock() // Find all watched paths that are in this directory that are not external. if unwatchFiles && isDir { var pathsToRemove []string w.mu.Lock() for fd := range w.watchesByDir[name] { path := w.paths[fd] if _, ok := w.userWatches[path.name]; !ok { pathsToRemove = append(pathsToRemove, path.name) } } w.mu.Unlock() for _, name := range pathsToRemove { // Since these are internal, not much sense in propagating error to // the user, as that will just confuse them with an error about a // path they did not explicitly watch themselves. w.Remove(name) } } return nil } // WatchList returns all paths explicitly added with [Watcher.Add] (and are not // yet removed). // // Returns nil if [Watcher.Close] was called. func (w *Watcher) WatchList() []string { w.mu.Lock() defer w.mu.Unlock() if w.isClosed { return nil } entries := make([]string, 0, len(w.userWatches)) for pathname := range w.userWatches { entries = append(entries, pathname) } return entries } // Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE) const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME // addWatch adds name to the watched file set; the flags are interpreted as // described in kevent(2). // // Returns the real path to the file which was added, with symlinks resolved. func (w *Watcher) addWatch(name string, flags uint32) (string, error) { var isDir bool name = filepath.Clean(name) w.mu.Lock() if w.isClosed { w.mu.Unlock() return "", ErrClosed } watchfd, alreadyWatching := w.watches[name] // We already have a watch, but we can still override flags. if alreadyWatching { isDir = w.paths[watchfd].isDir } w.mu.Unlock() if !alreadyWatching { fi, err := os.Lstat(name) if err != nil { return "", err } // Don't watch sockets or named pipes if (fi.Mode()&os.ModeSocket == os.ModeSocket) || (fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe) { return "", nil } // Follow Symlinks. if fi.Mode()&os.ModeSymlink == os.ModeSymlink { link, err := os.Readlink(name) if err != nil { // Return nil because Linux can add unresolvable symlinks to the // watch list without problems, so maintain consistency with // that. There will be no file events for broken symlinks. // TODO: more specific check; returns os.PathError; ENOENT? return "", nil } w.mu.Lock() _, alreadyWatching = w.watches[link] w.mu.Unlock() if alreadyWatching { // Add to watches so we don't get spurious Create events later // on when we diff the directories. w.watches[name] = 0 w.fileExists[name] = struct{}{} return link, nil } name = link fi, err = os.Lstat(name) if err != nil { return "", nil } } // Retry on EINTR; open() can return EINTR in practice on macOS. // See #354, and Go issues 11180 and 39237. for { watchfd, err = unix.Open(name, openMode, 0) if err == nil { break } if errors.Is(err, unix.EINTR) { continue } return "", err } isDir = fi.IsDir() } err := w.register([]int{watchfd}, unix.EV_ADD|unix.EV_CLEAR|unix.EV_ENABLE, flags) if err != nil { unix.Close(watchfd) return "", err } if !alreadyWatching { w.mu.Lock() parentName := filepath.Dir(name) w.watches[name] = watchfd watchesByDir, ok := w.watchesByDir[parentName] if !ok { watchesByDir = make(map[int]struct{}, 1) w.watchesByDir[parentName] = watchesByDir } watchesByDir[watchfd] = struct{}{} w.paths[watchfd] = pathInfo{name: name, isDir: isDir} w.mu.Unlock() } if isDir { // Watch the directory if it has not been watched before, or if it was // watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles) w.mu.Lock() watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE && (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE) // Store flags so this watch can be updated later w.dirFlags[name] = flags w.mu.Unlock() if watchDir { if err := w.watchDirectoryFiles(name); err != nil { return "", err } } } return name, nil } // readEvents reads from kqueue and converts the received kevents into // Event values that it sends down the Events channel. func (w *Watcher) readEvents() { defer func() { close(w.Events) close(w.Errors) _ = unix.Close(w.kq) unix.Close(w.closepipe[0]) }() eventBuffer := make([]unix.Kevent_t, 10) for closed := false; !closed; { kevents, err := w.read(eventBuffer) // EINTR is okay, the syscall was interrupted before timeout expired. if err != nil && err != unix.EINTR { if !w.sendError(fmt.Errorf("fsnotify.readEvents: %w", err)) { closed = true } continue } // Flush the events we received to the Events channel for _, kevent := range kevents { var ( watchfd = int(kevent.Ident) mask = uint32(kevent.Fflags) ) // Shut down the loop when the pipe is closed, but only after all // other events have been processed. if watchfd == w.closepipe[0] { closed = true continue } w.mu.Lock() path := w.paths[watchfd] w.mu.Unlock() event := w.newEvent(path.name, mask) if event.Has(Rename) || event.Has(Remove) { w.remove(event.Name, false) w.mu.Lock() delete(w.fileExists, event.Name) w.mu.Unlock() } if path.isDir && event.Has(Write) && !event.Has(Remove) { w.sendDirectoryChangeEvents(event.Name) } else { if !w.sendEvent(event) { closed = true continue } } if event.Has(Remove) { // Look for a file that may have overwritten this; for example, // mv f1 f2 will delete f2, then create f2. if path.isDir { fileDir := filepath.Clean(event.Name) w.mu.Lock() _, found := w.watches[fileDir] w.mu.Unlock() if found { err := w.sendDirectoryChangeEvents(fileDir) if err != nil { if !w.sendError(err) { closed = true } } } } else { filePath := filepath.Clean(event.Name) if fi, err := os.Lstat(filePath); err == nil { err := w.sendFileCreatedEventIfNew(filePath, fi) if err != nil { if !w.sendError(err) { closed = true } } } } } } } } // newEvent returns an platform-independent Event based on kqueue Fflags. func (w *Watcher) newEvent(name string, mask uint32) Event { e := Event{Name: name} if mask&unix.NOTE_DELETE == unix.NOTE_DELETE { e.Op |= Remove } if mask&unix.NOTE_WRITE == unix.NOTE_WRITE { e.Op |= Write } if mask&unix.NOTE_RENAME == unix.NOTE_RENAME { e.Op |= Rename } if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB { e.Op |= Chmod } // No point sending a write and delete event at the same time: if it's gone, // then it's gone. if e.Op.Has(Write) && e.Op.Has(Remove) { e.Op &^= Write } return e } // watchDirectoryFiles to mimic inotify when adding a watch on a directory func (w *Watcher) watchDirectoryFiles(dirPath string) error { // Get all files files, err := os.ReadDir(dirPath) if err != nil { return err } for _, f := range files { path := filepath.Join(dirPath, f.Name()) fi, err := f.Info() if err != nil { return fmt.Errorf("%q: %w", path, err) } cleanPath, err := w.internalWatch(path, fi) if err != nil { // No permission to read the file; that's not a problem: just skip. // But do add it to w.fileExists to prevent it from being picked up // as a "new" file later (it still shows up in the directory // listing). switch { case errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM): cleanPath = filepath.Clean(path) default: return fmt.Errorf("%q: %w", path, err) } } w.mu.Lock() w.fileExists[cleanPath] = struct{}{} w.mu.Unlock() } return nil } // Search the directory for new files and send an event for them. // // This functionality is to have the BSD watcher match the inotify, which sends // a create event for files created in a watched directory. func (w *Watcher) sendDirectoryChangeEvents(dir string) error { files, err := os.ReadDir(dir) if err != nil { // Directory no longer exists: we can ignore this safely. kqueue will // still give us the correct events. if errors.Is(err, os.ErrNotExist) { return nil } return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) } for _, f := range files { fi, err := f.Info() if err != nil { return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) } err = w.sendFileCreatedEventIfNew(filepath.Join(dir, fi.Name()), fi) if err != nil { // Don't need to send an error if this file isn't readable. if errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM) { return nil } return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) } } return nil } // sendFileCreatedEvent sends a create event if the file isn't already being tracked. func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fi os.FileInfo) (err error) { w.mu.Lock() _, doesExist := w.fileExists[filePath] w.mu.Unlock() if !doesExist { if !w.sendEvent(Event{Name: filePath, Op: Create}) { return } } // like watchDirectoryFiles (but without doing another ReadDir) filePath, err = w.internalWatch(filePath, fi) if err != nil { return err } w.mu.Lock() w.fileExists[filePath] = struct{}{} w.mu.Unlock() return nil } func (w *Watcher) internalWatch(name string, fi os.FileInfo) (string, error) { if fi.IsDir() { // mimic Linux providing delete events for subdirectories, but preserve // the flags used if currently watching subdirectory w.mu.Lock() flags := w.dirFlags[name] w.mu.Unlock() flags |= unix.NOTE_DELETE | unix.NOTE_RENAME return w.addWatch(name, flags) } // watch file to mimic Linux inotify return w.addWatch(name, noteAllEvents) } // Register events with the queue. func (w *Watcher) register(fds []int, flags int, fflags uint32) error { changes := make([]unix.Kevent_t, len(fds)) for i, fd := range fds { // SetKevent converts int to the platform-specific types. unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags) changes[i].Fflags = fflags } // Register the events. success, err := unix.Kevent(w.kq, changes, nil, nil) if success == -1 { return err } return nil } // read retrieves pending events, or waits until an event occurs. func (w *Watcher) read(events []unix.Kevent_t) ([]unix.Kevent_t, error) { n, err := unix.Kevent(w.kq, nil, events, nil) if err != nil { return nil, err } return events[0:n], nil } ================================================ FILE: vendor/github.com/fsnotify/fsnotify/backend_other.go ================================================ //go:build appengine || (!darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows) // +build appengine !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows // Note: the documentation on the Watcher type and methods is generated from // mkdoc.zsh package fsnotify import "errors" // Watcher watches a set of paths, delivering events on a channel. // // A watcher should not be copied (e.g. pass it by pointer, rather than by // value). // // # Linux notes // // When a file is removed a Remove event won't be emitted until all file // descriptors are closed, and deletes will always emit a Chmod. For example: // // fp := os.Open("file") // os.Remove("file") // Triggers Chmod // fp.Close() // Triggers Remove // // This is the event that inotify sends, so not much can be changed about this. // // The fs.inotify.max_user_watches sysctl variable specifies the upper limit // for the number of watches per user, and fs.inotify.max_user_instances // specifies the maximum number of inotify instances per user. Every Watcher you // create is an "instance", and every path you add is a "watch". // // These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and // /proc/sys/fs/inotify/max_user_instances // // To increase them you can use sysctl or write the value to the /proc file: // // # Default values on Linux 5.18 // sysctl fs.inotify.max_user_watches=124983 // sysctl fs.inotify.max_user_instances=128 // // To make the changes persist on reboot edit /etc/sysctl.conf or // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check // your distro's documentation): // // fs.inotify.max_user_watches=124983 // fs.inotify.max_user_instances=128 // // Reaching the limit will result in a "no space left on device" or "too many open // files" error. // // # kqueue notes (macOS, BSD) // // kqueue requires opening a file descriptor for every file that's being watched; // so if you're watching a directory with five files then that's six file // descriptors. You will run in to your system's "max open files" limit faster on // these platforms. // // The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to // control the maximum number of open files, as well as /etc/login.conf on BSD // systems. // // # Windows notes // // Paths can be added as "C:\path\to\dir", but forward slashes // ("C:/path/to/dir") will also work. // // When a watched directory is removed it will always send an event for the // directory itself, but may not send events for all files in that directory. // Sometimes it will send events for all times, sometimes it will send no // events, and often only for some files. // // The default ReadDirectoryChangesW() buffer size is 64K, which is the largest // value that is guaranteed to work with SMB filesystems. If you have many // events in quick succession this may not be enough, and you will have to use // [WithBufferSize] to increase the value. type Watcher struct { // Events sends the filesystem change events. // // fsnotify can send the following events; a "path" here can refer to a // file, directory, symbolic link, or special file like a FIFO. // // fsnotify.Create A new path was created; this may be followed by one // or more Write events if data also gets written to a // file. // // fsnotify.Remove A path was removed. // // fsnotify.Rename A path was renamed. A rename is always sent with the // old path as Event.Name, and a Create event will be // sent with the new name. Renames are only sent for // paths that are currently watched; e.g. moving an // unmonitored file into a monitored directory will // show up as just a Create. Similarly, renaming a file // to outside a monitored directory will show up as // only a Rename. // // fsnotify.Write A file or named pipe was written to. A Truncate will // also trigger a Write. A single "write action" // initiated by the user may show up as one or multiple // writes, depending on when the system syncs things to // disk. For example when compiling a large Go program // you may get hundreds of Write events, and you may // want to wait until you've stopped receiving them // (see the dedup example in cmd/fsnotify). // // Some systems may send Write event for directories // when the directory content changes. // // fsnotify.Chmod Attributes were changed. On Linux this is also sent // when a file is removed (or more accurately, when a // link to an inode is removed). On kqueue it's sent // when a file is truncated. On Windows it's never // sent. Events chan Event // Errors sends any errors. // // ErrEventOverflow is used to indicate there are too many events: // // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. // - kqueue, fen: Not used. Errors chan error } // NewWatcher creates a new Watcher. func NewWatcher() (*Watcher, error) { return nil, errors.New("fsnotify not supported on the current platform") } // NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events // channel. // // The main use case for this is situations with a very large number of events // where the kernel buffer size can't be increased (e.g. due to lack of // permissions). An unbuffered Watcher will perform better for almost all use // cases, and whenever possible you will be better off increasing the kernel // buffers instead of adding a large userspace buffer. func NewBufferedWatcher(sz uint) (*Watcher, error) { return NewWatcher() } // Close removes all watches and closes the Events channel. func (w *Watcher) Close() error { return nil } // WatchList returns all paths explicitly added with [Watcher.Add] (and are not // yet removed). // // Returns nil if [Watcher.Close] was called. func (w *Watcher) WatchList() []string { return nil } // Add starts monitoring the path for changes. // // A path can only be watched once; watching it more than once is a no-op and will // not return an error. Paths that do not yet exist on the filesystem cannot be // watched. // // A watch will be automatically removed if the watched path is deleted or // renamed. The exception is the Windows backend, which doesn't remove the // watcher on renames. // // Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special // filesystems (/proc, /sys, etc.) generally don't work. // // Returns [ErrClosed] if [Watcher.Close] was called. // // See [Watcher.AddWith] for a version that allows adding options. // // # Watching directories // // All files in a directory are monitored, including new files that are created // after the watcher is started. Subdirectories are not watched (i.e. it's // non-recursive). // // # Watching files // // Watching individual files (rather than directories) is generally not // recommended as many programs (especially editors) update files atomically: it // will write to a temporary file which is then moved to to destination, // overwriting the original (or some variant thereof). The watcher on the // original file is now lost, as that no longer exists. // // The upshot of this is that a power failure or crash won't leave a // half-written file. // // Watch the parent directory and use Event.Name to filter out files you're not // interested in. There is an example of this in cmd/fsnotify/file.go. func (w *Watcher) Add(name string) error { return nil } // AddWith is like [Watcher.Add], but allows adding options. When using Add() // the defaults described below are used. // // Possible options are: // // - [WithBufferSize] sets the buffer size for the Windows backend; no-op on // other platforms. The default is 64K (65536 bytes). func (w *Watcher) AddWith(name string, opts ...addOpt) error { return nil } // Remove stops monitoring the path for changes. // // Directories are always removed non-recursively. For example, if you added // /tmp/dir and /tmp/dir/subdir then you will need to remove both. // // Removing a path that has not yet been added returns [ErrNonExistentWatch]. // // Returns nil if [Watcher.Close] was called. func (w *Watcher) Remove(name string) error { return nil } ================================================ FILE: vendor/github.com/fsnotify/fsnotify/backend_windows.go ================================================ //go:build windows // +build windows // Windows backend based on ReadDirectoryChangesW() // // https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw // // Note: the documentation on the Watcher type and methods is generated from // mkdoc.zsh package fsnotify import ( "errors" "fmt" "os" "path/filepath" "reflect" "runtime" "strings" "sync" "unsafe" "golang.org/x/sys/windows" ) // Watcher watches a set of paths, delivering events on a channel. // // A watcher should not be copied (e.g. pass it by pointer, rather than by // value). // // # Linux notes // // When a file is removed a Remove event won't be emitted until all file // descriptors are closed, and deletes will always emit a Chmod. For example: // // fp := os.Open("file") // os.Remove("file") // Triggers Chmod // fp.Close() // Triggers Remove // // This is the event that inotify sends, so not much can be changed about this. // // The fs.inotify.max_user_watches sysctl variable specifies the upper limit // for the number of watches per user, and fs.inotify.max_user_instances // specifies the maximum number of inotify instances per user. Every Watcher you // create is an "instance", and every path you add is a "watch". // // These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and // /proc/sys/fs/inotify/max_user_instances // // To increase them you can use sysctl or write the value to the /proc file: // // # Default values on Linux 5.18 // sysctl fs.inotify.max_user_watches=124983 // sysctl fs.inotify.max_user_instances=128 // // To make the changes persist on reboot edit /etc/sysctl.conf or // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check // your distro's documentation): // // fs.inotify.max_user_watches=124983 // fs.inotify.max_user_instances=128 // // Reaching the limit will result in a "no space left on device" or "too many open // files" error. // // # kqueue notes (macOS, BSD) // // kqueue requires opening a file descriptor for every file that's being watched; // so if you're watching a directory with five files then that's six file // descriptors. You will run in to your system's "max open files" limit faster on // these platforms. // // The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to // control the maximum number of open files, as well as /etc/login.conf on BSD // systems. // // # Windows notes // // Paths can be added as "C:\path\to\dir", but forward slashes // ("C:/path/to/dir") will also work. // // When a watched directory is removed it will always send an event for the // directory itself, but may not send events for all files in that directory. // Sometimes it will send events for all times, sometimes it will send no // events, and often only for some files. // // The default ReadDirectoryChangesW() buffer size is 64K, which is the largest // value that is guaranteed to work with SMB filesystems. If you have many // events in quick succession this may not be enough, and you will have to use // [WithBufferSize] to increase the value. type Watcher struct { // Events sends the filesystem change events. // // fsnotify can send the following events; a "path" here can refer to a // file, directory, symbolic link, or special file like a FIFO. // // fsnotify.Create A new path was created; this may be followed by one // or more Write events if data also gets written to a // file. // // fsnotify.Remove A path was removed. // // fsnotify.Rename A path was renamed. A rename is always sent with the // old path as Event.Name, and a Create event will be // sent with the new name. Renames are only sent for // paths that are currently watched; e.g. moving an // unmonitored file into a monitored directory will // show up as just a Create. Similarly, renaming a file // to outside a monitored directory will show up as // only a Rename. // // fsnotify.Write A file or named pipe was written to. A Truncate will // also trigger a Write. A single "write action" // initiated by the user may show up as one or multiple // writes, depending on when the system syncs things to // disk. For example when compiling a large Go program // you may get hundreds of Write events, and you may // want to wait until you've stopped receiving them // (see the dedup example in cmd/fsnotify). // // Some systems may send Write event for directories // when the directory content changes. // // fsnotify.Chmod Attributes were changed. On Linux this is also sent // when a file is removed (or more accurately, when a // link to an inode is removed). On kqueue it's sent // when a file is truncated. On Windows it's never // sent. Events chan Event // Errors sends any errors. // // ErrEventOverflow is used to indicate there are too many events: // // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. // - kqueue, fen: Not used. Errors chan error port windows.Handle // Handle to completion port input chan *input // Inputs to the reader are sent on this channel quit chan chan<- error mu sync.Mutex // Protects access to watches, closed watches watchMap // Map of watches (key: i-number) closed bool // Set to true when Close() is first called } // NewWatcher creates a new Watcher. func NewWatcher() (*Watcher, error) { return NewBufferedWatcher(50) } // NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events // channel. // // The main use case for this is situations with a very large number of events // where the kernel buffer size can't be increased (e.g. due to lack of // permissions). An unbuffered Watcher will perform better for almost all use // cases, and whenever possible you will be better off increasing the kernel // buffers instead of adding a large userspace buffer. func NewBufferedWatcher(sz uint) (*Watcher, error) { port, err := windows.CreateIoCompletionPort(windows.InvalidHandle, 0, 0, 0) if err != nil { return nil, os.NewSyscallError("CreateIoCompletionPort", err) } w := &Watcher{ port: port, watches: make(watchMap), input: make(chan *input, 1), Events: make(chan Event, sz), Errors: make(chan error), quit: make(chan chan<- error, 1), } go w.readEvents() return w, nil } func (w *Watcher) isClosed() bool { w.mu.Lock() defer w.mu.Unlock() return w.closed } func (w *Watcher) sendEvent(name string, mask uint64) bool { if mask == 0 { return false } event := w.newEvent(name, uint32(mask)) select { case ch := <-w.quit: w.quit <- ch case w.Events <- event: } return true } // Returns true if the error was sent, or false if watcher is closed. func (w *Watcher) sendError(err error) bool { select { case w.Errors <- err: return true case <-w.quit: } return false } // Close removes all watches and closes the Events channel. func (w *Watcher) Close() error { if w.isClosed() { return nil } w.mu.Lock() w.closed = true w.mu.Unlock() // Send "quit" message to the reader goroutine ch := make(chan error) w.quit <- ch if err := w.wakeupReader(); err != nil { return err } return <-ch } // Add starts monitoring the path for changes. // // A path can only be watched once; watching it more than once is a no-op and will // not return an error. Paths that do not yet exist on the filesystem cannot be // watched. // // A watch will be automatically removed if the watched path is deleted or // renamed. The exception is the Windows backend, which doesn't remove the // watcher on renames. // // Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special // filesystems (/proc, /sys, etc.) generally don't work. // // Returns [ErrClosed] if [Watcher.Close] was called. // // See [Watcher.AddWith] for a version that allows adding options. // // # Watching directories // // All files in a directory are monitored, including new files that are created // after the watcher is started. Subdirectories are not watched (i.e. it's // non-recursive). // // # Watching files // // Watching individual files (rather than directories) is generally not // recommended as many programs (especially editors) update files atomically: it // will write to a temporary file which is then moved to to destination, // overwriting the original (or some variant thereof). The watcher on the // original file is now lost, as that no longer exists. // // The upshot of this is that a power failure or crash won't leave a // half-written file. // // Watch the parent directory and use Event.Name to filter out files you're not // interested in. There is an example of this in cmd/fsnotify/file.go. func (w *Watcher) Add(name string) error { return w.AddWith(name) } // AddWith is like [Watcher.Add], but allows adding options. When using Add() // the defaults described below are used. // // Possible options are: // // - [WithBufferSize] sets the buffer size for the Windows backend; no-op on // other platforms. The default is 64K (65536 bytes). func (w *Watcher) AddWith(name string, opts ...addOpt) error { if w.isClosed() { return ErrClosed } with := getOptions(opts...) if with.bufsize < 4096 { return fmt.Errorf("fsnotify.WithBufferSize: buffer size cannot be smaller than 4096 bytes") } in := &input{ op: opAddWatch, path: filepath.Clean(name), flags: sysFSALLEVENTS, reply: make(chan error), bufsize: with.bufsize, } w.input <- in if err := w.wakeupReader(); err != nil { return err } return <-in.reply } // Remove stops monitoring the path for changes. // // Directories are always removed non-recursively. For example, if you added // /tmp/dir and /tmp/dir/subdir then you will need to remove both. // // Removing a path that has not yet been added returns [ErrNonExistentWatch]. // // Returns nil if [Watcher.Close] was called. func (w *Watcher) Remove(name string) error { if w.isClosed() { return nil } in := &input{ op: opRemoveWatch, path: filepath.Clean(name), reply: make(chan error), } w.input <- in if err := w.wakeupReader(); err != nil { return err } return <-in.reply } // WatchList returns all paths explicitly added with [Watcher.Add] (and are not // yet removed). // // Returns nil if [Watcher.Close] was called. func (w *Watcher) WatchList() []string { if w.isClosed() { return nil } w.mu.Lock() defer w.mu.Unlock() entries := make([]string, 0, len(w.watches)) for _, entry := range w.watches { for _, watchEntry := range entry { entries = append(entries, watchEntry.path) } } return entries } // These options are from the old golang.org/x/exp/winfsnotify, where you could // add various options to the watch. This has long since been removed. // // The "sys" in the name is misleading as they're not part of any "system". // // This should all be removed at some point, and just use windows.FILE_NOTIFY_* const ( sysFSALLEVENTS = 0xfff sysFSCREATE = 0x100 sysFSDELETE = 0x200 sysFSDELETESELF = 0x400 sysFSMODIFY = 0x2 sysFSMOVE = 0xc0 sysFSMOVEDFROM = 0x40 sysFSMOVEDTO = 0x80 sysFSMOVESELF = 0x800 sysFSIGNORED = 0x8000 ) func (w *Watcher) newEvent(name string, mask uint32) Event { e := Event{Name: name} if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO { e.Op |= Create } if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF { e.Op |= Remove } if mask&sysFSMODIFY == sysFSMODIFY { e.Op |= Write } if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM { e.Op |= Rename } return e } const ( opAddWatch = iota opRemoveWatch ) const ( provisional uint64 = 1 << (32 + iota) ) type input struct { op int path string flags uint32 bufsize int reply chan error } type inode struct { handle windows.Handle volume uint32 index uint64 } type watch struct { ov windows.Overlapped ino *inode // i-number recurse bool // Recursive watch? path string // Directory path mask uint64 // Directory itself is being watched with these notify flags names map[string]uint64 // Map of names being watched and their notify flags rename string // Remembers the old name while renaming a file buf []byte // buffer, allocated later } type ( indexMap map[uint64]*watch watchMap map[uint32]indexMap ) func (w *Watcher) wakeupReader() error { err := windows.PostQueuedCompletionStatus(w.port, 0, 0, nil) if err != nil { return os.NewSyscallError("PostQueuedCompletionStatus", err) } return nil } func (w *Watcher) getDir(pathname string) (dir string, err error) { attr, err := windows.GetFileAttributes(windows.StringToUTF16Ptr(pathname)) if err != nil { return "", os.NewSyscallError("GetFileAttributes", err) } if attr&windows.FILE_ATTRIBUTE_DIRECTORY != 0 { dir = pathname } else { dir, _ = filepath.Split(pathname) dir = filepath.Clean(dir) } return } func (w *Watcher) getIno(path string) (ino *inode, err error) { h, err := windows.CreateFile(windows.StringToUTF16Ptr(path), windows.FILE_LIST_DIRECTORY, windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, nil, windows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS|windows.FILE_FLAG_OVERLAPPED, 0) if err != nil { return nil, os.NewSyscallError("CreateFile", err) } var fi windows.ByHandleFileInformation err = windows.GetFileInformationByHandle(h, &fi) if err != nil { windows.CloseHandle(h) return nil, os.NewSyscallError("GetFileInformationByHandle", err) } ino = &inode{ handle: h, volume: fi.VolumeSerialNumber, index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow), } return ino, nil } // Must run within the I/O thread. func (m watchMap) get(ino *inode) *watch { if i := m[ino.volume]; i != nil { return i[ino.index] } return nil } // Must run within the I/O thread. func (m watchMap) set(ino *inode, watch *watch) { i := m[ino.volume] if i == nil { i = make(indexMap) m[ino.volume] = i } i[ino.index] = watch } // Must run within the I/O thread. func (w *Watcher) addWatch(pathname string, flags uint64, bufsize int) error { //pathname, recurse := recursivePath(pathname) recurse := false dir, err := w.getDir(pathname) if err != nil { return err } ino, err := w.getIno(dir) if err != nil { return err } w.mu.Lock() watchEntry := w.watches.get(ino) w.mu.Unlock() if watchEntry == nil { _, err := windows.CreateIoCompletionPort(ino.handle, w.port, 0, 0) if err != nil { windows.CloseHandle(ino.handle) return os.NewSyscallError("CreateIoCompletionPort", err) } watchEntry = &watch{ ino: ino, path: dir, names: make(map[string]uint64), recurse: recurse, buf: make([]byte, bufsize), } w.mu.Lock() w.watches.set(ino, watchEntry) w.mu.Unlock() flags |= provisional } else { windows.CloseHandle(ino.handle) } if pathname == dir { watchEntry.mask |= flags } else { watchEntry.names[filepath.Base(pathname)] |= flags } err = w.startRead(watchEntry) if err != nil { return err } if pathname == dir { watchEntry.mask &= ^provisional } else { watchEntry.names[filepath.Base(pathname)] &= ^provisional } return nil } // Must run within the I/O thread. func (w *Watcher) remWatch(pathname string) error { pathname, recurse := recursivePath(pathname) dir, err := w.getDir(pathname) if err != nil { return err } ino, err := w.getIno(dir) if err != nil { return err } w.mu.Lock() watch := w.watches.get(ino) w.mu.Unlock() if recurse && !watch.recurse { return fmt.Errorf("can't use \\... with non-recursive watch %q", pathname) } err = windows.CloseHandle(ino.handle) if err != nil { w.sendError(os.NewSyscallError("CloseHandle", err)) } if watch == nil { return fmt.Errorf("%w: %s", ErrNonExistentWatch, pathname) } if pathname == dir { w.sendEvent(watch.path, watch.mask&sysFSIGNORED) watch.mask = 0 } else { name := filepath.Base(pathname) w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED) delete(watch.names, name) } return w.startRead(watch) } // Must run within the I/O thread. func (w *Watcher) deleteWatch(watch *watch) { for name, mask := range watch.names { if mask&provisional == 0 { w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED) } delete(watch.names, name) } if watch.mask != 0 { if watch.mask&provisional == 0 { w.sendEvent(watch.path, watch.mask&sysFSIGNORED) } watch.mask = 0 } } // Must run within the I/O thread. func (w *Watcher) startRead(watch *watch) error { err := windows.CancelIo(watch.ino.handle) if err != nil { w.sendError(os.NewSyscallError("CancelIo", err)) w.deleteWatch(watch) } mask := w.toWindowsFlags(watch.mask) for _, m := range watch.names { mask |= w.toWindowsFlags(m) } if mask == 0 { err := windows.CloseHandle(watch.ino.handle) if err != nil { w.sendError(os.NewSyscallError("CloseHandle", err)) } w.mu.Lock() delete(w.watches[watch.ino.volume], watch.ino.index) w.mu.Unlock() return nil } // We need to pass the array, rather than the slice. hdr := (*reflect.SliceHeader)(unsafe.Pointer(&watch.buf)) rdErr := windows.ReadDirectoryChanges(watch.ino.handle, (*byte)(unsafe.Pointer(hdr.Data)), uint32(hdr.Len), watch.recurse, mask, nil, &watch.ov, 0) if rdErr != nil { err := os.NewSyscallError("ReadDirectoryChanges", rdErr) if rdErr == windows.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 { // Watched directory was probably removed w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) err = nil } w.deleteWatch(watch) w.startRead(watch) return err } return nil } // readEvents reads from the I/O completion port, converts the // received events into Event objects and sends them via the Events channel. // Entry point to the I/O thread. func (w *Watcher) readEvents() { var ( n uint32 key uintptr ov *windows.Overlapped ) runtime.LockOSThread() for { // This error is handled after the watch == nil check below. qErr := windows.GetQueuedCompletionStatus(w.port, &n, &key, &ov, windows.INFINITE) watch := (*watch)(unsafe.Pointer(ov)) if watch == nil { select { case ch := <-w.quit: w.mu.Lock() var indexes []indexMap for _, index := range w.watches { indexes = append(indexes, index) } w.mu.Unlock() for _, index := range indexes { for _, watch := range index { w.deleteWatch(watch) w.startRead(watch) } } err := windows.CloseHandle(w.port) if err != nil { err = os.NewSyscallError("CloseHandle", err) } close(w.Events) close(w.Errors) ch <- err return case in := <-w.input: switch in.op { case opAddWatch: in.reply <- w.addWatch(in.path, uint64(in.flags), in.bufsize) case opRemoveWatch: in.reply <- w.remWatch(in.path) } default: } continue } switch qErr { case nil: // No error case windows.ERROR_MORE_DATA: if watch == nil { w.sendError(errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer")) } else { // The i/o succeeded but the buffer is full. // In theory we should be building up a full packet. // In practice we can get away with just carrying on. n = uint32(unsafe.Sizeof(watch.buf)) } case windows.ERROR_ACCESS_DENIED: // Watched directory was probably removed w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) w.deleteWatch(watch) w.startRead(watch) continue case windows.ERROR_OPERATION_ABORTED: // CancelIo was called on this handle continue default: w.sendError(os.NewSyscallError("GetQueuedCompletionPort", qErr)) continue } var offset uint32 for { if n == 0 { w.sendError(ErrEventOverflow) break } // Point "raw" to the event in the buffer raw := (*windows.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset])) // Create a buf that is the size of the path name size := int(raw.FileNameLength / 2) var buf []uint16 // TODO: Use unsafe.Slice in Go 1.17; https://stackoverflow.com/questions/51187973 sh := (*reflect.SliceHeader)(unsafe.Pointer(&buf)) sh.Data = uintptr(unsafe.Pointer(&raw.FileName)) sh.Len = size sh.Cap = size name := windows.UTF16ToString(buf) fullname := filepath.Join(watch.path, name) var mask uint64 switch raw.Action { case windows.FILE_ACTION_REMOVED: mask = sysFSDELETESELF case windows.FILE_ACTION_MODIFIED: mask = sysFSMODIFY case windows.FILE_ACTION_RENAMED_OLD_NAME: watch.rename = name case windows.FILE_ACTION_RENAMED_NEW_NAME: // Update saved path of all sub-watches. old := filepath.Join(watch.path, watch.rename) w.mu.Lock() for _, watchMap := range w.watches { for _, ww := range watchMap { if strings.HasPrefix(ww.path, old) { ww.path = filepath.Join(fullname, strings.TrimPrefix(ww.path, old)) } } } w.mu.Unlock() if watch.names[watch.rename] != 0 { watch.names[name] |= watch.names[watch.rename] delete(watch.names, watch.rename) mask = sysFSMOVESELF } } sendNameEvent := func() { w.sendEvent(fullname, watch.names[name]&mask) } if raw.Action != windows.FILE_ACTION_RENAMED_NEW_NAME { sendNameEvent() } if raw.Action == windows.FILE_ACTION_REMOVED { w.sendEvent(fullname, watch.names[name]&sysFSIGNORED) delete(watch.names, name) } w.sendEvent(fullname, watch.mask&w.toFSnotifyFlags(raw.Action)) if raw.Action == windows.FILE_ACTION_RENAMED_NEW_NAME { fullname = filepath.Join(watch.path, watch.rename) sendNameEvent() } // Move to the next event in the buffer if raw.NextEntryOffset == 0 { break } offset += raw.NextEntryOffset // Error! if offset >= n { //lint:ignore ST1005 Windows should be capitalized w.sendError(errors.New( "Windows system assumed buffer larger than it is, events have likely been missed")) break } } if err := w.startRead(watch); err != nil { w.sendError(err) } } } func (w *Watcher) toWindowsFlags(mask uint64) uint32 { var m uint32 if mask&sysFSMODIFY != 0 { m |= windows.FILE_NOTIFY_CHANGE_LAST_WRITE } if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 { m |= windows.FILE_NOTIFY_CHANGE_FILE_NAME | windows.FILE_NOTIFY_CHANGE_DIR_NAME } return m } func (w *Watcher) toFSnotifyFlags(action uint32) uint64 { switch action { case windows.FILE_ACTION_ADDED: return sysFSCREATE case windows.FILE_ACTION_REMOVED: return sysFSDELETE case windows.FILE_ACTION_MODIFIED: return sysFSMODIFY case windows.FILE_ACTION_RENAMED_OLD_NAME: return sysFSMOVEDFROM case windows.FILE_ACTION_RENAMED_NEW_NAME: return sysFSMOVEDTO } return 0 } ================================================ FILE: vendor/github.com/fsnotify/fsnotify/fsnotify.go ================================================ // Package fsnotify provides a cross-platform interface for file system // notifications. // // Currently supported systems: // // Linux 2.6.32+ via inotify // BSD, macOS via kqueue // Windows via ReadDirectoryChangesW // illumos via FEN package fsnotify import ( "errors" "fmt" "path/filepath" "strings" ) // Event represents a file system notification. type Event struct { // Path to the file or directory. // // Paths are relative to the input; for example with Add("dir") the Name // will be set to "dir/file" if you create that file, but if you use // Add("/path/to/dir") it will be "/path/to/dir/file". Name string // File operation that triggered the event. // // This is a bitmask and some systems may send multiple operations at once. // Use the Event.Has() method instead of comparing with ==. Op Op } // Op describes a set of file operations. type Op uint32 // The operations fsnotify can trigger; see the documentation on [Watcher] for a // full description, and check them with [Event.Has]. const ( // A new pathname was created. Create Op = 1 << iota // The pathname was written to; this does *not* mean the write has finished, // and a write can be followed by more writes. Write // The path was removed; any watches on it will be removed. Some "remove" // operations may trigger a Rename if the file is actually moved (for // example "remove to trash" is often a rename). Remove // The path was renamed to something else; any watched on it will be // removed. Rename // File attributes were changed. // // It's generally not recommended to take action on this event, as it may // get triggered very frequently by some software. For example, Spotlight // indexing on macOS, anti-virus software, backup software, etc. Chmod ) // Common errors that can be reported. var ( ErrNonExistentWatch = errors.New("fsnotify: can't remove non-existent watch") ErrEventOverflow = errors.New("fsnotify: queue or buffer overflow") ErrClosed = errors.New("fsnotify: watcher already closed") ) func (o Op) String() string { var b strings.Builder if o.Has(Create) { b.WriteString("|CREATE") } if o.Has(Remove) { b.WriteString("|REMOVE") } if o.Has(Write) { b.WriteString("|WRITE") } if o.Has(Rename) { b.WriteString("|RENAME") } if o.Has(Chmod) { b.WriteString("|CHMOD") } if b.Len() == 0 { return "[no events]" } return b.String()[1:] } // Has reports if this operation has the given operation. func (o Op) Has(h Op) bool { return o&h != 0 } // Has reports if this event has the given operation. func (e Event) Has(op Op) bool { return e.Op.Has(op) } // String returns a string representation of the event with their path. func (e Event) String() string { return fmt.Sprintf("%-13s %q", e.Op.String(), e.Name) } type ( addOpt func(opt *withOpts) withOpts struct { bufsize int } ) var defaultOpts = withOpts{ bufsize: 65536, // 64K } func getOptions(opts ...addOpt) withOpts { with := defaultOpts for _, o := range opts { o(&with) } return with } // WithBufferSize sets the [ReadDirectoryChangesW] buffer size. // // This only has effect on Windows systems, and is a no-op for other backends. // // The default value is 64K (65536 bytes) which is the highest value that works // on all filesystems and should be enough for most applications, but if you // have a large burst of events it may not be enough. You can increase it if // you're hitting "queue or buffer overflow" errors ([ErrEventOverflow]). // // [ReadDirectoryChangesW]: https://learn.microsoft.com/en-gb/windows/win32/api/winbase/nf-winbase-readdirectorychangesw func WithBufferSize(bytes int) addOpt { return func(opt *withOpts) { opt.bufsize = bytes } } // Check if this path is recursive (ends with "/..." or "\..."), and return the // path with the /... stripped. func recursivePath(path string) (string, bool) { if filepath.Base(path) == "..." { return filepath.Dir(path), true } return path, false } ================================================ FILE: vendor/github.com/fsnotify/fsnotify/mkdoc.zsh ================================================ #!/usr/bin/env zsh [ "${ZSH_VERSION:-}" = "" ] && echo >&2 "Only works with zsh" && exit 1 setopt err_exit no_unset pipefail extended_glob # Simple script to update the godoc comments on all watchers so you don't need # to update the same comment 5 times. watcher=$(</tmp/x print -r -- $cmt >>/tmp/x tail -n+$(( end + 1 )) $file >>/tmp/x mv /tmp/x $file done } set-cmt '^type Watcher struct ' $watcher set-cmt '^func NewWatcher(' $new set-cmt '^func NewBufferedWatcher(' $newbuffered set-cmt '^func (w \*Watcher) Add(' $add set-cmt '^func (w \*Watcher) AddWith(' $addwith set-cmt '^func (w \*Watcher) Remove(' $remove set-cmt '^func (w \*Watcher) Close(' $close set-cmt '^func (w \*Watcher) WatchList(' $watchlist set-cmt '^[[:space:]]*Events *chan Event$' $events set-cmt '^[[:space:]]*Errors *chan error$' $errors ================================================ FILE: vendor/github.com/fsnotify/fsnotify/system_bsd.go ================================================ //go:build freebsd || openbsd || netbsd || dragonfly // +build freebsd openbsd netbsd dragonfly package fsnotify import "golang.org/x/sys/unix" const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC ================================================ FILE: vendor/github.com/fsnotify/fsnotify/system_darwin.go ================================================ //go:build darwin // +build darwin package fsnotify import "golang.org/x/sys/unix" // note: this constant is not defined on BSD const openMode = unix.O_EVTONLY | unix.O_CLOEXEC ================================================ FILE: vendor/github.com/garyburd/redigo/LICENSE ================================================ 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: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) 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 (d) 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. ================================================ FILE: vendor/github.com/garyburd/redigo/internal/commandinfo.go ================================================ // Copyright 2014 Gary Burd // // 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 internal // import "github.com/garyburd/redigo/internal" import ( "strings" ) const ( WatchState = 1 << iota MultiState SubscribeState MonitorState ) type CommandInfo struct { Set, Clear int } var commandInfos = map[string]CommandInfo{ "WATCH": {Set: WatchState}, "UNWATCH": {Clear: WatchState}, "MULTI": {Set: MultiState}, "EXEC": {Clear: WatchState | MultiState}, "DISCARD": {Clear: WatchState | MultiState}, "PSUBSCRIBE": {Set: SubscribeState}, "SUBSCRIBE": {Set: SubscribeState}, "MONITOR": {Set: MonitorState}, } func init() { for n, ci := range commandInfos { commandInfos[strings.ToLower(n)] = ci } } func LookupCommandInfo(commandName string) CommandInfo { if ci, ok := commandInfos[commandName]; ok { return ci } return commandInfos[strings.ToUpper(commandName)] } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/conn.go ================================================ // Copyright 2012 Gary Burd // // 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 redis import ( "bufio" "bytes" "crypto/tls" "errors" "fmt" "io" "net" "net/url" "regexp" "strconv" "sync" "time" ) var ( _ ConnWithTimeout = (*conn)(nil) ) // conn is the low-level implementation of Conn type conn struct { // Shared mu sync.Mutex pending int err error conn net.Conn // Read readTimeout time.Duration br *bufio.Reader // Write writeTimeout time.Duration bw *bufio.Writer // Scratch space for formatting argument length. // '*' or '$', length, "\r\n" lenScratch [32]byte // Scratch space for formatting integers and floats. numScratch [40]byte } // DialTimeout acts like Dial but takes timeouts for establishing the // connection to the server, writing a command and reading a reply. // // Deprecated: This package is replaced by github.com/gomodule/redigo/redis. func DialTimeout(network, address string, connectTimeout, readTimeout, writeTimeout time.Duration) (Conn, error) { return Dial(network, address, DialConnectTimeout(connectTimeout), DialReadTimeout(readTimeout), DialWriteTimeout(writeTimeout)) } // DialOption specifies an option for dialing a Redis server. type DialOption struct { f func(*dialOptions) } type dialOptions struct { readTimeout time.Duration writeTimeout time.Duration dialer *net.Dialer dial func(network, addr string) (net.Conn, error) db int password string useTLS bool skipVerify bool tlsConfig *tls.Config } // DialReadTimeout specifies the timeout for reading a single command reply. func DialReadTimeout(d time.Duration) DialOption { return DialOption{func(do *dialOptions) { do.readTimeout = d }} } // DialWriteTimeout specifies the timeout for writing a single command. func DialWriteTimeout(d time.Duration) DialOption { return DialOption{func(do *dialOptions) { do.writeTimeout = d }} } // DialConnectTimeout specifies the timeout for connecting to the Redis server when // no DialNetDial option is specified. func DialConnectTimeout(d time.Duration) DialOption { return DialOption{func(do *dialOptions) { do.dialer.Timeout = d }} } // DialKeepAlive specifies the keep-alive period for TCP connections to the Redis server // when no DialNetDial option is specified. // If zero, keep-alives are not enabled. If no DialKeepAlive option is specified then // the default of 5 minutes is used to ensure that half-closed TCP sessions are detected. func DialKeepAlive(d time.Duration) DialOption { return DialOption{func(do *dialOptions) { do.dialer.KeepAlive = d }} } // DialNetDial specifies a custom dial function for creating TCP // connections, otherwise a net.Dialer customized via the other options is used. // DialNetDial overrides DialConnectTimeout and DialKeepAlive. func DialNetDial(dial func(network, addr string) (net.Conn, error)) DialOption { return DialOption{func(do *dialOptions) { do.dial = dial }} } // DialDatabase specifies the database to select when dialing a connection. func DialDatabase(db int) DialOption { return DialOption{func(do *dialOptions) { do.db = db }} } // DialPassword specifies the password to use when connecting to // the Redis server. func DialPassword(password string) DialOption { return DialOption{func(do *dialOptions) { do.password = password }} } // DialTLSConfig specifies the config to use when a TLS connection is dialed. // Has no effect when not dialing a TLS connection. func DialTLSConfig(c *tls.Config) DialOption { return DialOption{func(do *dialOptions) { do.tlsConfig = c }} } // DialTLSSkipVerify disables server name verification when connecting over // TLS. Has no effect when not dialing a TLS connection. func DialTLSSkipVerify(skip bool) DialOption { return DialOption{func(do *dialOptions) { do.skipVerify = skip }} } // DialUseTLS specifies whether TLS should be used when connecting to the // server. This option is ignore by DialURL. func DialUseTLS(useTLS bool) DialOption { return DialOption{func(do *dialOptions) { do.useTLS = useTLS }} } // Dial connects to the Redis server at the given network and // address using the specified options. // // Deprecated: This package is replaced by github.com/gomodule/redigo/redis. func Dial(network, address string, options ...DialOption) (Conn, error) { do := dialOptions{ dialer: &net.Dialer{ KeepAlive: time.Minute * 5, }, } for _, option := range options { option.f(&do) } if do.dial == nil { do.dial = do.dialer.Dial } netConn, err := do.dial(network, address) if err != nil { return nil, err } if do.useTLS { var tlsConfig *tls.Config if do.tlsConfig == nil { tlsConfig = &tls.Config{InsecureSkipVerify: do.skipVerify} } else { tlsConfig = cloneTLSConfig(do.tlsConfig) } if tlsConfig.ServerName == "" { host, _, err := net.SplitHostPort(address) if err != nil { netConn.Close() return nil, err } tlsConfig.ServerName = host } tlsConn := tls.Client(netConn, tlsConfig) if err := tlsConn.Handshake(); err != nil { netConn.Close() return nil, err } netConn = tlsConn } c := &conn{ conn: netConn, bw: bufio.NewWriter(netConn), br: bufio.NewReader(netConn), readTimeout: do.readTimeout, writeTimeout: do.writeTimeout, } if do.password != "" { if _, err := c.Do("AUTH", do.password); err != nil { netConn.Close() return nil, err } } if do.db != 0 { if _, err := c.Do("SELECT", do.db); err != nil { netConn.Close() return nil, err } } return c, nil } var pathDBRegexp = regexp.MustCompile(`/(\d*)\z`) // DialURL connects to a Redis server at the given URL using the Redis // URI scheme. URLs should follow the draft IANA specification for the // scheme (https://www.iana.org/assignments/uri-schemes/prov/redis). // // Deprecated: This package is replaced by github.com/gomodule/redigo/redis. func DialURL(rawurl string, options ...DialOption) (Conn, error) { u, err := url.Parse(rawurl) if err != nil { return nil, err } if u.Scheme != "redis" && u.Scheme != "rediss" { return nil, fmt.Errorf("invalid redis URL scheme: %s", u.Scheme) } // As per the IANA draft spec, the host defaults to localhost and // the port defaults to 6379. host, port, err := net.SplitHostPort(u.Host) if err != nil { // assume port is missing host = u.Host port = "6379" } if host == "" { host = "localhost" } address := net.JoinHostPort(host, port) if u.User != nil { password, isSet := u.User.Password() if isSet { options = append(options, DialPassword(password)) } } match := pathDBRegexp.FindStringSubmatch(u.Path) if len(match) == 2 { db := 0 if len(match[1]) > 0 { db, err = strconv.Atoi(match[1]) if err != nil { return nil, fmt.Errorf("invalid database: %s", u.Path[1:]) } } if db != 0 { options = append(options, DialDatabase(db)) } } else if u.Path != "" { return nil, fmt.Errorf("invalid database: %s", u.Path[1:]) } options = append(options, DialUseTLS(u.Scheme == "rediss")) return Dial("tcp", address, options...) } // NewConn returns a new Redigo connection for the given net connection. // // Deprecated: This package is replaced by github.com/gomodule/redigo/redis. func NewConn(netConn net.Conn, readTimeout, writeTimeout time.Duration) Conn { return &conn{ conn: netConn, bw: bufio.NewWriter(netConn), br: bufio.NewReader(netConn), readTimeout: readTimeout, writeTimeout: writeTimeout, } } func (c *conn) Close() error { c.mu.Lock() err := c.err if c.err == nil { c.err = errors.New("redigo: closed") err = c.conn.Close() } c.mu.Unlock() return err } func (c *conn) fatal(err error) error { c.mu.Lock() if c.err == nil { c.err = err // Close connection to force errors on subsequent calls and to unblock // other reader or writer. c.conn.Close() } c.mu.Unlock() return err } func (c *conn) Err() error { c.mu.Lock() err := c.err c.mu.Unlock() return err } func (c *conn) writeLen(prefix byte, n int) error { c.lenScratch[len(c.lenScratch)-1] = '\n' c.lenScratch[len(c.lenScratch)-2] = '\r' i := len(c.lenScratch) - 3 for { c.lenScratch[i] = byte('0' + n%10) i -= 1 n = n / 10 if n == 0 { break } } c.lenScratch[i] = prefix _, err := c.bw.Write(c.lenScratch[i:]) return err } func (c *conn) writeString(s string) error { c.writeLen('$', len(s)) c.bw.WriteString(s) _, err := c.bw.WriteString("\r\n") return err } func (c *conn) writeBytes(p []byte) error { c.writeLen('$', len(p)) c.bw.Write(p) _, err := c.bw.WriteString("\r\n") return err } func (c *conn) writeInt64(n int64) error { return c.writeBytes(strconv.AppendInt(c.numScratch[:0], n, 10)) } func (c *conn) writeFloat64(n float64) error { return c.writeBytes(strconv.AppendFloat(c.numScratch[:0], n, 'g', -1, 64)) } func (c *conn) writeCommand(cmd string, args []interface{}) error { c.writeLen('*', 1+len(args)) if err := c.writeString(cmd); err != nil { return err } for _, arg := range args { if err := c.writeArg(arg, true); err != nil { return err } } return nil } func (c *conn) writeArg(arg interface{}, argumentTypeOK bool) (err error) { switch arg := arg.(type) { case string: return c.writeString(arg) case []byte: return c.writeBytes(arg) case int: return c.writeInt64(int64(arg)) case int64: return c.writeInt64(arg) case float64: return c.writeFloat64(arg) case bool: if arg { return c.writeString("1") } else { return c.writeString("0") } case nil: return c.writeString("") case Argument: if argumentTypeOK { return c.writeArg(arg.RedisArg(), false) } // See comment in default clause below. var buf bytes.Buffer fmt.Fprint(&buf, arg) return c.writeBytes(buf.Bytes()) default: // This default clause is intended to handle builtin numeric types. // The function should return an error for other types, but this is not // done for compatibility with previous versions of the package. var buf bytes.Buffer fmt.Fprint(&buf, arg) return c.writeBytes(buf.Bytes()) } } type protocolError string func (pe protocolError) Error() string { return fmt.Sprintf("redigo: %s (possible server error or unsupported concurrent read by application)", string(pe)) } func (c *conn) readLine() ([]byte, error) { p, err := c.br.ReadSlice('\n') if err == bufio.ErrBufferFull { return nil, protocolError("long response line") } if err != nil { return nil, err } i := len(p) - 2 if i < 0 || p[i] != '\r' { return nil, protocolError("bad response line terminator") } return p[:i], nil } // parseLen parses bulk string and array lengths. func parseLen(p []byte) (int, error) { if len(p) == 0 { return -1, protocolError("malformed length") } if p[0] == '-' && len(p) == 2 && p[1] == '1' { // handle $-1 and $-1 null replies. return -1, nil } var n int for _, b := range p { n *= 10 if b < '0' || b > '9' { return -1, protocolError("illegal bytes in length") } n += int(b - '0') } return n, nil } // parseInt parses an integer reply. func parseInt(p []byte) (interface{}, error) { if len(p) == 0 { return 0, protocolError("malformed integer") } var negate bool if p[0] == '-' { negate = true p = p[1:] if len(p) == 0 { return 0, protocolError("malformed integer") } } var n int64 for _, b := range p { n *= 10 if b < '0' || b > '9' { return 0, protocolError("illegal bytes in length") } n += int64(b - '0') } if negate { n = -n } return n, nil } var ( okReply interface{} = "OK" pongReply interface{} = "PONG" ) func (c *conn) readReply() (interface{}, error) { line, err := c.readLine() if err != nil { return nil, err } if len(line) == 0 { return nil, protocolError("short response line") } switch line[0] { case '+': switch { case len(line) == 3 && line[1] == 'O' && line[2] == 'K': // Avoid allocation for frequent "+OK" response. return okReply, nil case len(line) == 5 && line[1] == 'P' && line[2] == 'O' && line[3] == 'N' && line[4] == 'G': // Avoid allocation in PING command benchmarks :) return pongReply, nil default: return string(line[1:]), nil } case '-': return Error(string(line[1:])), nil case ':': return parseInt(line[1:]) case '$': n, err := parseLen(line[1:]) if n < 0 || err != nil { return nil, err } p := make([]byte, n) _, err = io.ReadFull(c.br, p) if err != nil { return nil, err } if line, err := c.readLine(); err != nil { return nil, err } else if len(line) != 0 { return nil, protocolError("bad bulk string format") } return p, nil case '*': n, err := parseLen(line[1:]) if n < 0 || err != nil { return nil, err } r := make([]interface{}, n) for i := range r { r[i], err = c.readReply() if err != nil { return nil, err } } return r, nil } return nil, protocolError("unexpected response line") } func (c *conn) Send(cmd string, args ...interface{}) error { c.mu.Lock() c.pending += 1 c.mu.Unlock() if c.writeTimeout != 0 { c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout)) } if err := c.writeCommand(cmd, args); err != nil { return c.fatal(err) } return nil } func (c *conn) Flush() error { if c.writeTimeout != 0 { c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout)) } if err := c.bw.Flush(); err != nil { return c.fatal(err) } return nil } func (c *conn) Receive() (interface{}, error) { return c.ReceiveWithTimeout(c.readTimeout) } func (c *conn) ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error) { var deadline time.Time if timeout != 0 { deadline = time.Now().Add(timeout) } c.conn.SetReadDeadline(deadline) if reply, err = c.readReply(); err != nil { return nil, c.fatal(err) } // When using pub/sub, the number of receives can be greater than the // number of sends. To enable normal use of the connection after // unsubscribing from all channels, we do not decrement pending to a // negative value. // // The pending field is decremented after the reply is read to handle the // case where Receive is called before Send. c.mu.Lock() if c.pending > 0 { c.pending -= 1 } c.mu.Unlock() if err, ok := reply.(Error); ok { return nil, err } return } func (c *conn) Do(cmd string, args ...interface{}) (interface{}, error) { return c.DoWithTimeout(c.readTimeout, cmd, args...) } func (c *conn) DoWithTimeout(readTimeout time.Duration, cmd string, args ...interface{}) (interface{}, error) { c.mu.Lock() pending := c.pending c.pending = 0 c.mu.Unlock() if cmd == "" && pending == 0 { return nil, nil } if c.writeTimeout != 0 { c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout)) } if cmd != "" { if err := c.writeCommand(cmd, args); err != nil { return nil, c.fatal(err) } } if err := c.bw.Flush(); err != nil { return nil, c.fatal(err) } var deadline time.Time if readTimeout != 0 { deadline = time.Now().Add(readTimeout) } c.conn.SetReadDeadline(deadline) if cmd == "" { reply := make([]interface{}, pending) for i := range reply { r, e := c.readReply() if e != nil { return nil, c.fatal(e) } reply[i] = r } return reply, nil } var err error var reply interface{} for i := 0; i <= pending; i++ { var e error if reply, e = c.readReply(); e != nil { return nil, c.fatal(e) } if e, ok := reply.(Error); ok && err == nil { err = e } } return reply, err } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/doc.go ================================================ // Copyright 2012 Gary Burd // // 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 redis is a client for the Redis database. // // The Redigo FAQ (https://github.com/garyburd/redigo/wiki/FAQ) contains more // documentation about this package. // // # Connections // // The Conn interface is the primary interface for working with Redis. // Applications create connections by calling the Dial, DialWithTimeout or // NewConn functions. In the future, functions will be added for creating // sharded and other types of connections. // // The application must call the connection Close method when the application // is done with the connection. // // # Executing Commands // // The Conn interface has a generic method for executing Redis commands: // // Do(commandName string, args ...interface{}) (reply interface{}, err error) // // The Redis command reference (http://redis.io/commands) lists the available // commands. An example of using the Redis APPEND command is: // // n, err := conn.Do("APPEND", "key", "value") // // The Do method converts command arguments to bulk strings for transmission // to the server as follows: // // Go Type Conversion // []byte Sent as is // string Sent as is // int, int64 strconv.FormatInt(v) // float64 strconv.FormatFloat(v, 'g', -1, 64) // bool true -> "1", false -> "0" // nil "" // all other types fmt.Fprint(w, v) // // Redis command reply types are represented using the following Go types: // // Redis type Go type // error redis.Error // integer int64 // simple string string // bulk string []byte or nil if value not present. // array []interface{} or nil if value not present. // // Use type assertions or the reply helper functions to convert from // interface{} to the specific Go type for the command result. // // # Pipelining // // Connections support pipelining using the Send, Flush and Receive methods. // // Send(commandName string, args ...interface{}) error // Flush() error // Receive() (reply interface{}, err error) // // Send writes the command to the connection's output buffer. Flush flushes the // connection's output buffer to the server. Receive reads a single reply from // the server. The following example shows a simple pipeline. // // c.Send("SET", "foo", "bar") // c.Send("GET", "foo") // c.Flush() // c.Receive() // reply from SET // v, err = c.Receive() // reply from GET // // The Do method combines the functionality of the Send, Flush and Receive // methods. The Do method starts by writing the command and flushing the output // buffer. Next, the Do method receives all pending replies including the reply // for the command just sent by Do. If any of the received replies is an error, // then Do returns the error. If there are no errors, then Do returns the last // reply. If the command argument to the Do method is "", then the Do method // will flush the output buffer and receive pending replies without sending a // command. // // Use the Send and Do methods to implement pipelined transactions. // // c.Send("MULTI") // c.Send("INCR", "foo") // c.Send("INCR", "bar") // r, err := c.Do("EXEC") // fmt.Println(r) // prints [1, 1] // // # Concurrency // // Connections support one concurrent caller to the Receive method and one // concurrent caller to the Send and Flush methods. No other concurrency is // supported including concurrent calls to the Do method. // // For full concurrent access to Redis, use the thread-safe Pool to get, use // and release a connection from within a goroutine. Connections returned from // a Pool have the concurrency restrictions described in the previous // paragraph. // // # Publish and Subscribe // // Use the Send, Flush and Receive methods to implement Pub/Sub subscribers. // // c.Send("SUBSCRIBE", "example") // c.Flush() // for { // reply, err := c.Receive() // if err != nil { // return err // } // // process pushed message // } // // The PubSubConn type wraps a Conn with convenience methods for implementing // subscribers. The Subscribe, PSubscribe, Unsubscribe and PUnsubscribe methods // send and flush a subscription management command. The receive method // converts a pushed message to convenient types for use in a type switch. // // psc := redis.PubSubConn{Conn: c} // psc.Subscribe("example") // for { // switch v := psc.Receive().(type) { // case redis.Message: // fmt.Printf("%s: message: %s\n", v.Channel, v.Data) // case redis.Subscription: // fmt.Printf("%s: %s %d\n", v.Channel, v.Kind, v.Count) // case error: // return v // } // } // // # Reply Helpers // // The Bool, Int, Bytes, String, Strings and Values functions convert a reply // to a value of a specific type. To allow convenient wrapping of calls to the // connection Do and Receive methods, the functions take a second argument of // type error. If the error is non-nil, then the helper function returns the // error. If the error is nil, the function converts the reply to the specified // type: // // exists, err := redis.Bool(c.Do("EXISTS", "foo")) // if err != nil { // // handle error return from c.Do or type conversion error. // } // // The Scan function converts elements of a array reply to Go types: // // var value1 int // var value2 string // reply, err := redis.Values(c.Do("MGET", "key1", "key2")) // if err != nil { // // handle error // } // if _, err := redis.Scan(reply, &value1, &value2); err != nil { // // handle error // } // // # Errors // // Connection methods return error replies from the server as type redis.Error. // // Call the connection Err() method to determine if the connection encountered // non-recoverable error such as a network error or protocol parsing error. If // Err() returns a non-nil value, then the connection is not usable and should // be closed. package redis // import "github.com/garyburd/redigo/redis" ================================================ FILE: vendor/github.com/garyburd/redigo/redis/go16.go ================================================ //go:build !go1.7 // +build !go1.7 package redis import "crypto/tls" func cloneTLSConfig(cfg *tls.Config) *tls.Config { return &tls.Config{ Rand: cfg.Rand, Time: cfg.Time, Certificates: cfg.Certificates, NameToCertificate: cfg.NameToCertificate, GetCertificate: cfg.GetCertificate, RootCAs: cfg.RootCAs, NextProtos: cfg.NextProtos, ServerName: cfg.ServerName, ClientAuth: cfg.ClientAuth, ClientCAs: cfg.ClientCAs, InsecureSkipVerify: cfg.InsecureSkipVerify, CipherSuites: cfg.CipherSuites, PreferServerCipherSuites: cfg.PreferServerCipherSuites, ClientSessionCache: cfg.ClientSessionCache, MinVersion: cfg.MinVersion, MaxVersion: cfg.MaxVersion, CurvePreferences: cfg.CurvePreferences, } } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/go17.go ================================================ //go:build go1.7 && !go1.8 // +build go1.7,!go1.8 package redis import "crypto/tls" func cloneTLSConfig(cfg *tls.Config) *tls.Config { return &tls.Config{ Rand: cfg.Rand, Time: cfg.Time, Certificates: cfg.Certificates, NameToCertificate: cfg.NameToCertificate, GetCertificate: cfg.GetCertificate, RootCAs: cfg.RootCAs, NextProtos: cfg.NextProtos, ServerName: cfg.ServerName, ClientAuth: cfg.ClientAuth, ClientCAs: cfg.ClientCAs, InsecureSkipVerify: cfg.InsecureSkipVerify, CipherSuites: cfg.CipherSuites, PreferServerCipherSuites: cfg.PreferServerCipherSuites, ClientSessionCache: cfg.ClientSessionCache, MinVersion: cfg.MinVersion, MaxVersion: cfg.MaxVersion, CurvePreferences: cfg.CurvePreferences, DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled, Renegotiation: cfg.Renegotiation, } } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/go18.go ================================================ //go:build go1.8 // +build go1.8 package redis import "crypto/tls" func cloneTLSConfig(cfg *tls.Config) *tls.Config { return cfg.Clone() } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/log.go ================================================ // Copyright 2012 Gary Burd // // 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 redis import ( "bytes" "fmt" "log" "time" ) var ( _ ConnWithTimeout = (*loggingConn)(nil) ) // NewLoggingConn returns a logging wrapper around a connection. func NewLoggingConn(conn Conn, logger *log.Logger, prefix string) Conn { if prefix != "" { prefix = prefix + "." } return &loggingConn{conn, logger, prefix} } type loggingConn struct { Conn logger *log.Logger prefix string } func (c *loggingConn) Close() error { err := c.Conn.Close() var buf bytes.Buffer fmt.Fprintf(&buf, "%sClose() -> (%v)", c.prefix, err) c.logger.Output(2, buf.String()) return err } func (c *loggingConn) printValue(buf *bytes.Buffer, v interface{}) { const chop = 32 switch v := v.(type) { case []byte: if len(v) > chop { fmt.Fprintf(buf, "%q...", v[:chop]) } else { fmt.Fprintf(buf, "%q", v) } case string: if len(v) > chop { fmt.Fprintf(buf, "%q...", v[:chop]) } else { fmt.Fprintf(buf, "%q", v) } case []interface{}: if len(v) == 0 { buf.WriteString("[]") } else { sep := "[" fin := "]" if len(v) > chop { v = v[:chop] fin = "...]" } for _, vv := range v { buf.WriteString(sep) c.printValue(buf, vv) sep = ", " } buf.WriteString(fin) } default: fmt.Fprint(buf, v) } } func (c *loggingConn) print(method, commandName string, args []interface{}, reply interface{}, err error) { var buf bytes.Buffer fmt.Fprintf(&buf, "%s%s(", c.prefix, method) if method != "Receive" { buf.WriteString(commandName) for _, arg := range args { buf.WriteString(", ") c.printValue(&buf, arg) } } buf.WriteString(") -> (") if method != "Send" { c.printValue(&buf, reply) buf.WriteString(", ") } fmt.Fprintf(&buf, "%v)", err) c.logger.Output(3, buf.String()) } func (c *loggingConn) Do(commandName string, args ...interface{}) (interface{}, error) { reply, err := c.Conn.Do(commandName, args...) c.print("Do", commandName, args, reply, err) return reply, err } func (c *loggingConn) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error) { reply, err := DoWithTimeout(c.Conn, timeout, commandName, args...) c.print("DoWithTimeout", commandName, args, reply, err) return reply, err } func (c *loggingConn) Send(commandName string, args ...interface{}) error { err := c.Conn.Send(commandName, args...) c.print("Send", commandName, args, nil, err) return err } func (c *loggingConn) Receive() (interface{}, error) { reply, err := c.Conn.Receive() c.print("Receive", "", nil, reply, err) return reply, err } func (c *loggingConn) ReceiveWithTimeout(timeout time.Duration) (interface{}, error) { reply, err := ReceiveWithTimeout(c.Conn, timeout) c.print("ReceiveWithTimeout", "", nil, reply, err) return reply, err } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/pool.go ================================================ // Copyright 2012 Gary Burd // // 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 redis import ( "bytes" "crypto/rand" "crypto/sha1" "errors" "io" "strconv" "sync" "sync/atomic" "time" "github.com/garyburd/redigo/internal" ) var ( _ ConnWithTimeout = (*activeConn)(nil) _ ConnWithTimeout = (*errorConn)(nil) ) var nowFunc = time.Now // for testing // ErrPoolExhausted is returned from a pool connection method (Do, Send, // Receive, Flush, Err) when the maximum number of database connections in the // pool has been reached. var ErrPoolExhausted = errors.New("redigo: connection pool exhausted") var ( errPoolClosed = errors.New("redigo: connection pool closed") errConnClosed = errors.New("redigo: connection closed") ) // Pool maintains a pool of connections. The application calls the Get method // to get a connection from the pool and the connection's Close method to // return the connection's resources to the pool. // // The following example shows how to use a pool in a web application. The // application creates a pool at application startup and makes it available to // request handlers using a package level variable. The pool configuration used // here is an example, not a recommendation. // // func newPool(addr string) *redis.Pool { // return &redis.Pool{ // MaxIdle: 3, // IdleTimeout: 240 * time.Second, // Dial: func () (redis.Conn, error) { return redis.Dial("tcp", addr) }, // } // } // // var ( // pool *redis.Pool // redisServer = flag.String("redisServer", ":6379", "") // ) // // func main() { // flag.Parse() // pool = newPool(*redisServer) // ... // } // // A request handler gets a connection from the pool and closes the connection // when the handler is done: // // func serveHome(w http.ResponseWriter, r *http.Request) { // conn := pool.Get() // defer conn.Close() // ... // } // // Use the Dial function to authenticate connections with the AUTH command or // select a database with the SELECT command: // // pool := &redis.Pool{ // // Other pool configuration not shown in this example. // Dial: func () (redis.Conn, error) { // c, err := redis.Dial("tcp", server) // if err != nil { // return nil, err // } // if _, err := c.Do("AUTH", password); err != nil { // c.Close() // return nil, err // } // if _, err := c.Do("SELECT", db); err != nil { // c.Close() // return nil, err // } // return c, nil // }, // } // // Use the TestOnBorrow function to check the health of an idle connection // before the connection is returned to the application. This example PINGs // connections that have been idle more than a minute: // // pool := &redis.Pool{ // // Other pool configuration not shown in this example. // TestOnBorrow: func(c redis.Conn, t time.Time) error { // if time.Since(t) < time.Minute { // return nil // } // _, err := c.Do("PING") // return err // }, // } type Pool struct { // Dial is an application supplied function for creating and configuring a // connection. // // The connection returned from Dial must not be in a special state // (subscribed to pubsub channel, transaction started, ...). Dial func() (Conn, error) // TestOnBorrow is an optional application supplied function for checking // the health of an idle connection before the connection is used again by // the application. Argument t is the time that the connection was returned // to the pool. If the function returns an error, then the connection is // closed. TestOnBorrow func(c Conn, t time.Time) error // Maximum number of idle connections in the pool. MaxIdle int // Maximum number of connections allocated by the pool at a given time. // When zero, there is no limit on the number of connections in the pool. MaxActive int // Close connections after remaining idle for this duration. If the value // is zero, then idle connections are not closed. Applications should set // the timeout to a value less than the server's timeout. IdleTimeout time.Duration // If Wait is true and the pool is at the MaxActive limit, then Get() waits // for a connection to be returned to the pool before returning. Wait bool // Close connections older than this duration. If the value is zero, then // the pool does not close connections based on age. MaxConnLifetime time.Duration chInitialized uint32 // set to 1 when field ch is initialized mu sync.Mutex // mu protects the following fields closed bool // set to true when the pool is closed. active int // the number of open connections in the pool ch chan struct{} // limits open connections when p.Wait is true idle idleList // idle connections } // NewPool creates a new pool. // // Deprecated: Initialize the Pool directory as shown in the example. func NewPool(newFn func() (Conn, error), maxIdle int) *Pool { return &Pool{Dial: newFn, MaxIdle: maxIdle} } // Get gets a connection. The application must close the returned connection. // This method always returns a valid connection so that applications can defer // error handling to the first use of the connection. If there is an error // getting an underlying connection, then the connection Err, Do, Send, Flush // and Receive methods return that error. func (p *Pool) Get() Conn { pc, err := p.get(nil) if err != nil { return errorConn{err} } return &activeConn{p: p, pc: pc} } // PoolStats contains pool statistics. type PoolStats struct { // ActiveCount is the number of connections in the pool. The count includes // idle connections and connections in use. ActiveCount int // IdleCount is the number of idle connections in the pool. IdleCount int } // Stats returns pool's statistics. func (p *Pool) Stats() PoolStats { p.mu.Lock() stats := PoolStats{ ActiveCount: p.active, IdleCount: p.idle.count, } p.mu.Unlock() return stats } // ActiveCount returns the number of connections in the pool. The count // includes idle connections and connections in use. func (p *Pool) ActiveCount() int { p.mu.Lock() active := p.active p.mu.Unlock() return active } // IdleCount returns the number of idle connections in the pool. func (p *Pool) IdleCount() int { p.mu.Lock() idle := p.idle.count p.mu.Unlock() return idle } // Close releases the resources used by the pool. func (p *Pool) Close() error { p.mu.Lock() if p.closed { p.mu.Unlock() return nil } p.closed = true p.active -= p.idle.count pc := p.idle.front p.idle.count = 0 p.idle.front, p.idle.back = nil, nil if p.ch != nil { close(p.ch) } p.mu.Unlock() for ; pc != nil; pc = pc.next { pc.c.Close() } return nil } func (p *Pool) lazyInit() { // Fast path. if atomic.LoadUint32(&p.chInitialized) == 1 { return } // Slow path. p.mu.Lock() if p.chInitialized == 0 { p.ch = make(chan struct{}, p.MaxActive) if p.closed { close(p.ch) } else { for i := 0; i < p.MaxActive; i++ { p.ch <- struct{}{} } } atomic.StoreUint32(&p.chInitialized, 1) } p.mu.Unlock() } // get prunes stale connections and returns a connection from the idle list or // creates a new connection. func (p *Pool) get(ctx interface { Done() <-chan struct{} Err() error }) (*poolConn, error) { // Handle limit for p.Wait == true. if p.Wait && p.MaxActive > 0 { p.lazyInit() if ctx == nil { <-p.ch } else { select { case <-p.ch: case <-ctx.Done(): return nil, ctx.Err() } } } p.mu.Lock() // Prune stale connections at the back of the idle list. if p.IdleTimeout > 0 { n := p.idle.count for i := 0; i < n && p.idle.back != nil && p.idle.back.t.Add(p.IdleTimeout).Before(nowFunc()); i++ { pc := p.idle.back p.idle.popBack() p.mu.Unlock() pc.c.Close() p.mu.Lock() p.active-- } } // Get idle connection from the front of idle list. for p.idle.front != nil { pc := p.idle.front p.idle.popFront() p.mu.Unlock() if (p.TestOnBorrow == nil || p.TestOnBorrow(pc.c, pc.t) == nil) && (p.MaxConnLifetime == 0 || nowFunc().Sub(pc.created) < p.MaxConnLifetime) { return pc, nil } pc.c.Close() p.mu.Lock() p.active-- } // Check for pool closed before dialing a new connection. if p.closed { p.mu.Unlock() return nil, errors.New("redigo: get on closed pool") } // Handle limit for p.Wait == false. if !p.Wait && p.MaxActive > 0 && p.active >= p.MaxActive { p.mu.Unlock() return nil, ErrPoolExhausted } p.active++ p.mu.Unlock() c, err := p.Dial() if err != nil { c = nil p.mu.Lock() p.active-- if p.ch != nil && !p.closed { p.ch <- struct{}{} } p.mu.Unlock() } return &poolConn{c: c, created: nowFunc()}, err } func (p *Pool) put(pc *poolConn, forceClose bool) error { p.mu.Lock() if !p.closed && !forceClose { pc.t = nowFunc() p.idle.pushFront(pc) if p.idle.count > p.MaxIdle { pc = p.idle.back p.idle.popBack() } else { pc = nil } } if pc != nil { p.mu.Unlock() pc.c.Close() p.mu.Lock() p.active-- } if p.ch != nil && !p.closed { p.ch <- struct{}{} } p.mu.Unlock() return nil } type activeConn struct { p *Pool pc *poolConn state int } var ( sentinel []byte sentinelOnce sync.Once ) func initSentinel() { p := make([]byte, 64) if _, err := rand.Read(p); err == nil { sentinel = p } else { h := sha1.New() io.WriteString(h, "Oops, rand failed. Use time instead.") io.WriteString(h, strconv.FormatInt(time.Now().UnixNano(), 10)) sentinel = h.Sum(nil) } } func (ac *activeConn) Close() error { pc := ac.pc if pc == nil { return nil } ac.pc = nil if ac.state&internal.MultiState != 0 { pc.c.Send("DISCARD") ac.state &^= (internal.MultiState | internal.WatchState) } else if ac.state&internal.WatchState != 0 { pc.c.Send("UNWATCH") ac.state &^= internal.WatchState } if ac.state&internal.SubscribeState != 0 { pc.c.Send("UNSUBSCRIBE") pc.c.Send("PUNSUBSCRIBE") // To detect the end of the message stream, ask the server to echo // a sentinel value and read until we see that value. sentinelOnce.Do(initSentinel) pc.c.Send("ECHO", sentinel) pc.c.Flush() for { p, err := pc.c.Receive() if err != nil { break } if p, ok := p.([]byte); ok && bytes.Equal(p, sentinel) { ac.state &^= internal.SubscribeState break } } } pc.c.Do("") ac.p.put(pc, ac.state != 0 || pc.c.Err() != nil) return nil } func (ac *activeConn) Err() error { pc := ac.pc if pc == nil { return errConnClosed } return pc.c.Err() } func (ac *activeConn) Do(commandName string, args ...interface{}) (reply interface{}, err error) { pc := ac.pc if pc == nil { return nil, errConnClosed } ci := internal.LookupCommandInfo(commandName) ac.state = (ac.state | ci.Set) &^ ci.Clear return pc.c.Do(commandName, args...) } func (ac *activeConn) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (reply interface{}, err error) { pc := ac.pc if pc == nil { return nil, errConnClosed } cwt, ok := pc.c.(ConnWithTimeout) if !ok { return nil, errTimeoutNotSupported } ci := internal.LookupCommandInfo(commandName) ac.state = (ac.state | ci.Set) &^ ci.Clear return cwt.DoWithTimeout(timeout, commandName, args...) } func (ac *activeConn) Send(commandName string, args ...interface{}) error { pc := ac.pc if pc == nil { return errConnClosed } ci := internal.LookupCommandInfo(commandName) ac.state = (ac.state | ci.Set) &^ ci.Clear return pc.c.Send(commandName, args...) } func (ac *activeConn) Flush() error { pc := ac.pc if pc == nil { return errConnClosed } return pc.c.Flush() } func (ac *activeConn) Receive() (reply interface{}, err error) { pc := ac.pc if pc == nil { return nil, errConnClosed } return pc.c.Receive() } func (ac *activeConn) ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error) { pc := ac.pc if pc == nil { return nil, errConnClosed } cwt, ok := pc.c.(ConnWithTimeout) if !ok { return nil, errTimeoutNotSupported } return cwt.ReceiveWithTimeout(timeout) } type errorConn struct{ err error } func (ec errorConn) Do(string, ...interface{}) (interface{}, error) { return nil, ec.err } func (ec errorConn) DoWithTimeout(time.Duration, string, ...interface{}) (interface{}, error) { return nil, ec.err } func (ec errorConn) Send(string, ...interface{}) error { return ec.err } func (ec errorConn) Err() error { return ec.err } func (ec errorConn) Close() error { return nil } func (ec errorConn) Flush() error { return ec.err } func (ec errorConn) Receive() (interface{}, error) { return nil, ec.err } func (ec errorConn) ReceiveWithTimeout(time.Duration) (interface{}, error) { return nil, ec.err } type idleList struct { count int front, back *poolConn } type poolConn struct { c Conn t time.Time created time.Time next, prev *poolConn } func (l *idleList) pushFront(pc *poolConn) { pc.next = l.front pc.prev = nil if l.count == 0 { l.back = pc } else { l.front.prev = pc } l.front = pc l.count++ return } func (l *idleList) popFront() { pc := l.front l.count-- if l.count == 0 { l.front, l.back = nil, nil } else { pc.next.prev = nil l.front = pc.next } pc.next, pc.prev = nil, nil } func (l *idleList) popBack() { pc := l.back l.count-- if l.count == 0 { l.front, l.back = nil, nil } else { pc.prev.next = nil l.back = pc.prev } pc.next, pc.prev = nil, nil } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/pool17.go ================================================ // Copyright 2018 Gary Burd // // 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. //go:build go1.7 // +build go1.7 package redis import "context" // GetContext gets a connection using the provided context. // // The provided Context must be non-nil. If the context expires before the // connection is complete, an error is returned. Any expiration on the context // will not affect the returned connection. // // If the function completes without error, then the application must close the // returned connection. func (p *Pool) GetContext(ctx context.Context) (Conn, error) { pc, err := p.get(ctx) if err != nil { return errorConn{err}, err } return &activeConn{p: p, pc: pc}, nil } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/pubsub.go ================================================ // Copyright 2012 Gary Burd // // 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 redis import ( "errors" "time" ) // Subscription represents a subscribe or unsubscribe notification. type Subscription struct { // Kind is "subscribe", "unsubscribe", "psubscribe" or "punsubscribe" Kind string // The channel that was changed. Channel string // The current number of subscriptions for connection. Count int } // Message represents a message notification. type Message struct { // The originating channel. Channel string // The message data. Data []byte } // PMessage represents a pmessage notification. type PMessage struct { // The matched pattern. Pattern string // The originating channel. Channel string // The message data. Data []byte } // Pong represents a pubsub pong notification. type Pong struct { Data string } // PubSubConn wraps a Conn with convenience methods for subscribers. type PubSubConn struct { Conn Conn } // Close closes the connection. func (c PubSubConn) Close() error { return c.Conn.Close() } // Subscribe subscribes the connection to the specified channels. func (c PubSubConn) Subscribe(channel ...interface{}) error { c.Conn.Send("SUBSCRIBE", channel...) return c.Conn.Flush() } // PSubscribe subscribes the connection to the given patterns. func (c PubSubConn) PSubscribe(channel ...interface{}) error { c.Conn.Send("PSUBSCRIBE", channel...) return c.Conn.Flush() } // Unsubscribe unsubscribes the connection from the given channels, or from all // of them if none is given. func (c PubSubConn) Unsubscribe(channel ...interface{}) error { c.Conn.Send("UNSUBSCRIBE", channel...) return c.Conn.Flush() } // PUnsubscribe unsubscribes the connection from the given patterns, or from all // of them if none is given. func (c PubSubConn) PUnsubscribe(channel ...interface{}) error { c.Conn.Send("PUNSUBSCRIBE", channel...) return c.Conn.Flush() } // Ping sends a PING to the server with the specified data. // // The connection must be subscribed to at least one channel or pattern when // calling this method. func (c PubSubConn) Ping(data string) error { c.Conn.Send("PING", data) return c.Conn.Flush() } // Receive returns a pushed message as a Subscription, Message, PMessage, Pong // or error. The return value is intended to be used directly in a type switch // as illustrated in the PubSubConn example. func (c PubSubConn) Receive() interface{} { return c.receiveInternal(c.Conn.Receive()) } // ReceiveWithTimeout is like Receive, but it allows the application to // override the connection's default timeout. func (c PubSubConn) ReceiveWithTimeout(timeout time.Duration) interface{} { return c.receiveInternal(ReceiveWithTimeout(c.Conn, timeout)) } func (c PubSubConn) receiveInternal(replyArg interface{}, errArg error) interface{} { reply, err := Values(replyArg, errArg) if err != nil { return err } var kind string reply, err = Scan(reply, &kind) if err != nil { return err } switch kind { case "message": var m Message if _, err := Scan(reply, &m.Channel, &m.Data); err != nil { return err } return m case "pmessage": var pm PMessage if _, err := Scan(reply, &pm.Pattern, &pm.Channel, &pm.Data); err != nil { return err } return pm case "subscribe", "psubscribe", "unsubscribe", "punsubscribe": s := Subscription{Kind: kind} if _, err := Scan(reply, &s.Channel, &s.Count); err != nil { return err } return s case "pong": var p Pong if _, err := Scan(reply, &p.Data); err != nil { return err } return p } return errors.New("redigo: unknown pubsub notification") } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/redis.go ================================================ // Copyright 2012 Gary Burd // // 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 redis import ( "errors" "time" ) // Error represents an error returned in a command reply. type Error string func (err Error) Error() string { return string(err) } // Conn represents a connection to a Redis server. // // Deprecated: This package is replaced by github.com/gomodule/redigo/redis. type Conn interface { // Close closes the connection. Close() error // Err returns a non-nil value when the connection is not usable. Err() error // Do sends a command to the server and returns the received reply. Do(commandName string, args ...interface{}) (reply interface{}, err error) // Send writes the command to the client's output buffer. Send(commandName string, args ...interface{}) error // Flush flushes the output buffer to the Redis server. Flush() error // Receive receives a single reply from the Redis server Receive() (reply interface{}, err error) } // Argument is the interface implemented by an object which wants to control how // the object is converted to Redis bulk strings. type Argument interface { // RedisArg returns a value to be encoded as a bulk string per the // conversions listed in the section 'Executing Commands'. // Implementations should typically return a []byte or string. RedisArg() interface{} } // Scanner is implemented by an object which wants to control its value is // interpreted when read from Redis. type Scanner interface { // RedisScan assigns a value from a Redis value. The argument src is one of // the reply types listed in the section `Executing Commands`. // // An error should be returned if the value cannot be stored without // loss of information. RedisScan(src interface{}) error } // ConnWithTimeout is an optional interface that allows the caller to override // a connection's default read timeout. This interface is useful for executing // the BLPOP, BRPOP, BRPOPLPUSH, XREAD and other commands that block at the // server. // // A connection's default read timeout is set with the DialReadTimeout dial // option. Applications should rely on the default timeout for commands that do // not block at the server. // // All of the Conn implementations in this package satisfy the ConnWithTimeout // interface. // // Use the DoWithTimeout and ReceiveWithTimeout helper functions to simplify // use of this interface. type ConnWithTimeout interface { Conn // Do sends a command to the server and returns the received reply. // The timeout overrides the read timeout set when dialing the // connection. DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (reply interface{}, err error) // Receive receives a single reply from the Redis server. The timeout // overrides the read timeout set when dialing the connection. ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error) } var errTimeoutNotSupported = errors.New("redis: connection does not support ConnWithTimeout") // DoWithTimeout executes a Redis command with the specified read timeout. If // the connection does not satisfy the ConnWithTimeout interface, then an error // is returned. func DoWithTimeout(c Conn, timeout time.Duration, cmd string, args ...interface{}) (interface{}, error) { cwt, ok := c.(ConnWithTimeout) if !ok { return nil, errTimeoutNotSupported } return cwt.DoWithTimeout(timeout, cmd, args...) } // ReceiveWithTimeout receives a reply with the specified read timeout. If the // connection does not satisfy the ConnWithTimeout interface, then an error is // returned. func ReceiveWithTimeout(c Conn, timeout time.Duration) (interface{}, error) { cwt, ok := c.(ConnWithTimeout) if !ok { return nil, errTimeoutNotSupported } return cwt.ReceiveWithTimeout(timeout) } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/reply.go ================================================ // Copyright 2012 Gary Burd // // 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 redis import ( "errors" "fmt" "strconv" ) // ErrNil indicates that a reply value is nil. var ErrNil = errors.New("redigo: nil returned") // Int is a helper that converts a command reply to an integer. If err is not // equal to nil, then Int returns 0, err. Otherwise, Int converts the // reply to an int as follows: // // Reply type Result // integer int(reply), nil // bulk string parsed reply, nil // nil 0, ErrNil // other 0, error func Int(reply interface{}, err error) (int, error) { if err != nil { return 0, err } switch reply := reply.(type) { case int64: x := int(reply) if int64(x) != reply { return 0, strconv.ErrRange } return x, nil case []byte: n, err := strconv.ParseInt(string(reply), 10, 0) return int(n), err case nil: return 0, ErrNil case Error: return 0, reply } return 0, fmt.Errorf("redigo: unexpected type for Int, got type %T", reply) } // Int64 is a helper that converts a command reply to 64 bit integer. If err is // not equal to nil, then Int returns 0, err. Otherwise, Int64 converts the // reply to an int64 as follows: // // Reply type Result // integer reply, nil // bulk string parsed reply, nil // nil 0, ErrNil // other 0, error func Int64(reply interface{}, err error) (int64, error) { if err != nil { return 0, err } switch reply := reply.(type) { case int64: return reply, nil case []byte: n, err := strconv.ParseInt(string(reply), 10, 64) return n, err case nil: return 0, ErrNil case Error: return 0, reply } return 0, fmt.Errorf("redigo: unexpected type for Int64, got type %T", reply) } var errNegativeInt = errors.New("redigo: unexpected value for Uint64") // Uint64 is a helper that converts a command reply to 64 bit integer. If err is // not equal to nil, then Int returns 0, err. Otherwise, Int64 converts the // reply to an int64 as follows: // // Reply type Result // integer reply, nil // bulk string parsed reply, nil // nil 0, ErrNil // other 0, error func Uint64(reply interface{}, err error) (uint64, error) { if err != nil { return 0, err } switch reply := reply.(type) { case int64: if reply < 0 { return 0, errNegativeInt } return uint64(reply), nil case []byte: n, err := strconv.ParseUint(string(reply), 10, 64) return n, err case nil: return 0, ErrNil case Error: return 0, reply } return 0, fmt.Errorf("redigo: unexpected type for Uint64, got type %T", reply) } // Float64 is a helper that converts a command reply to 64 bit float. If err is // not equal to nil, then Float64 returns 0, err. Otherwise, Float64 converts // the reply to an int as follows: // // Reply type Result // bulk string parsed reply, nil // nil 0, ErrNil // other 0, error func Float64(reply interface{}, err error) (float64, error) { if err != nil { return 0, err } switch reply := reply.(type) { case []byte: n, err := strconv.ParseFloat(string(reply), 64) return n, err case nil: return 0, ErrNil case Error: return 0, reply } return 0, fmt.Errorf("redigo: unexpected type for Float64, got type %T", reply) } // String is a helper that converts a command reply to a string. If err is not // equal to nil, then String returns "", err. Otherwise String converts the // reply to a string as follows: // // Reply type Result // bulk string string(reply), nil // simple string reply, nil // nil "", ErrNil // other "", error func String(reply interface{}, err error) (string, error) { if err != nil { return "", err } switch reply := reply.(type) { case []byte: return string(reply), nil case string: return reply, nil case nil: return "", ErrNil case Error: return "", reply } return "", fmt.Errorf("redigo: unexpected type for String, got type %T", reply) } // Bytes is a helper that converts a command reply to a slice of bytes. If err // is not equal to nil, then Bytes returns nil, err. Otherwise Bytes converts // the reply to a slice of bytes as follows: // // Reply type Result // bulk string reply, nil // simple string []byte(reply), nil // nil nil, ErrNil // other nil, error func Bytes(reply interface{}, err error) ([]byte, error) { if err != nil { return nil, err } switch reply := reply.(type) { case []byte: return reply, nil case string: return []byte(reply), nil case nil: return nil, ErrNil case Error: return nil, reply } return nil, fmt.Errorf("redigo: unexpected type for Bytes, got type %T", reply) } // Bool is a helper that converts a command reply to a boolean. If err is not // equal to nil, then Bool returns false, err. Otherwise Bool converts the // reply to boolean as follows: // // Reply type Result // integer value != 0, nil // bulk string strconv.ParseBool(reply) // nil false, ErrNil // other false, error func Bool(reply interface{}, err error) (bool, error) { if err != nil { return false, err } switch reply := reply.(type) { case int64: return reply != 0, nil case []byte: return strconv.ParseBool(string(reply)) case nil: return false, ErrNil case Error: return false, reply } return false, fmt.Errorf("redigo: unexpected type for Bool, got type %T", reply) } // MultiBulk is a helper that converts an array command reply to a []interface{}. // // Deprecated: Use Values instead. func MultiBulk(reply interface{}, err error) ([]interface{}, error) { return Values(reply, err) } // Values is a helper that converts an array command reply to a []interface{}. // If err is not equal to nil, then Values returns nil, err. Otherwise, Values // converts the reply as follows: // // Reply type Result // array reply, nil // nil nil, ErrNil // other nil, error func Values(reply interface{}, err error) ([]interface{}, error) { if err != nil { return nil, err } switch reply := reply.(type) { case []interface{}: return reply, nil case nil: return nil, ErrNil case Error: return nil, reply } return nil, fmt.Errorf("redigo: unexpected type for Values, got type %T", reply) } func sliceHelper(reply interface{}, err error, name string, makeSlice func(int), assign func(int, interface{}) error) error { if err != nil { return err } switch reply := reply.(type) { case []interface{}: makeSlice(len(reply)) for i := range reply { if reply[i] == nil { continue } if err := assign(i, reply[i]); err != nil { return err } } return nil case nil: return ErrNil case Error: return reply } return fmt.Errorf("redigo: unexpected type for %s, got type %T", name, reply) } // Float64s is a helper that converts an array command reply to a []float64. If // err is not equal to nil, then Float64s returns nil, err. Nil array items are // converted to 0 in the output slice. Floats64 returns an error if an array // item is not a bulk string or nil. func Float64s(reply interface{}, err error) ([]float64, error) { var result []float64 err = sliceHelper(reply, err, "Float64s", func(n int) { result = make([]float64, n) }, func(i int, v interface{}) error { p, ok := v.([]byte) if !ok { return fmt.Errorf("redigo: unexpected element type for Floats64, got type %T", v) } f, err := strconv.ParseFloat(string(p), 64) result[i] = f return err }) return result, err } // Strings is a helper that converts an array command reply to a []string. If // err is not equal to nil, then Strings returns nil, err. Nil array items are // converted to "" in the output slice. Strings returns an error if an array // item is not a bulk string or nil. func Strings(reply interface{}, err error) ([]string, error) { var result []string err = sliceHelper(reply, err, "Strings", func(n int) { result = make([]string, n) }, func(i int, v interface{}) error { switch v := v.(type) { case string: result[i] = v return nil case []byte: result[i] = string(v) return nil default: return fmt.Errorf("redigo: unexpected element type for Strings, got type %T", v) } }) return result, err } // ByteSlices is a helper that converts an array command reply to a [][]byte. // If err is not equal to nil, then ByteSlices returns nil, err. Nil array // items are stay nil. ByteSlices returns an error if an array item is not a // bulk string or nil. func ByteSlices(reply interface{}, err error) ([][]byte, error) { var result [][]byte err = sliceHelper(reply, err, "ByteSlices", func(n int) { result = make([][]byte, n) }, func(i int, v interface{}) error { p, ok := v.([]byte) if !ok { return fmt.Errorf("redigo: unexpected element type for ByteSlices, got type %T", v) } result[i] = p return nil }) return result, err } // Int64s is a helper that converts an array command reply to a []int64. // If err is not equal to nil, then Int64s returns nil, err. Nil array // items are stay nil. Int64s returns an error if an array item is not a // bulk string or nil. func Int64s(reply interface{}, err error) ([]int64, error) { var result []int64 err = sliceHelper(reply, err, "Int64s", func(n int) { result = make([]int64, n) }, func(i int, v interface{}) error { switch v := v.(type) { case int64: result[i] = v return nil case []byte: n, err := strconv.ParseInt(string(v), 10, 64) result[i] = n return err default: return fmt.Errorf("redigo: unexpected element type for Int64s, got type %T", v) } }) return result, err } // Ints is a helper that converts an array command reply to a []in. // If err is not equal to nil, then Ints returns nil, err. Nil array // items are stay nil. Ints returns an error if an array item is not a // bulk string or nil. func Ints(reply interface{}, err error) ([]int, error) { var result []int err = sliceHelper(reply, err, "Ints", func(n int) { result = make([]int, n) }, func(i int, v interface{}) error { switch v := v.(type) { case int64: n := int(v) if int64(n) != v { return strconv.ErrRange } result[i] = n return nil case []byte: n, err := strconv.Atoi(string(v)) result[i] = n return err default: return fmt.Errorf("redigo: unexpected element type for Ints, got type %T", v) } }) return result, err } // StringMap is a helper that converts an array of strings (alternating key, value) // into a map[string]string. The HGETALL and CONFIG GET commands return replies in this format. // Requires an even number of values in result. func StringMap(result interface{}, err error) (map[string]string, error) { values, err := Values(result, err) if err != nil { return nil, err } if len(values)%2 != 0 { return nil, errors.New("redigo: StringMap expects even number of values result") } m := make(map[string]string, len(values)/2) for i := 0; i < len(values); i += 2 { key, okKey := values[i].([]byte) value, okValue := values[i+1].([]byte) if !okKey || !okValue { return nil, errors.New("redigo: StringMap key not a bulk string value") } m[string(key)] = string(value) } return m, nil } // IntMap is a helper that converts an array of strings (alternating key, value) // into a map[string]int. The HGETALL commands return replies in this format. // Requires an even number of values in result. func IntMap(result interface{}, err error) (map[string]int, error) { values, err := Values(result, err) if err != nil { return nil, err } if len(values)%2 != 0 { return nil, errors.New("redigo: IntMap expects even number of values result") } m := make(map[string]int, len(values)/2) for i := 0; i < len(values); i += 2 { key, ok := values[i].([]byte) if !ok { return nil, errors.New("redigo: IntMap key not a bulk string value") } value, err := Int(values[i+1], nil) if err != nil { return nil, err } m[string(key)] = value } return m, nil } // Int64Map is a helper that converts an array of strings (alternating key, value) // into a map[string]int64. The HGETALL commands return replies in this format. // Requires an even number of values in result. func Int64Map(result interface{}, err error) (map[string]int64, error) { values, err := Values(result, err) if err != nil { return nil, err } if len(values)%2 != 0 { return nil, errors.New("redigo: Int64Map expects even number of values result") } m := make(map[string]int64, len(values)/2) for i := 0; i < len(values); i += 2 { key, ok := values[i].([]byte) if !ok { return nil, errors.New("redigo: Int64Map key not a bulk string value") } value, err := Int64(values[i+1], nil) if err != nil { return nil, err } m[string(key)] = value } return m, nil } // Positions is a helper that converts an array of positions (lat, long) // into a [][2]float64. The GEOPOS command returns replies in this format. func Positions(result interface{}, err error) ([]*[2]float64, error) { values, err := Values(result, err) if err != nil { return nil, err } positions := make([]*[2]float64, len(values)) for i := range values { if values[i] == nil { continue } p, ok := values[i].([]interface{}) if !ok { return nil, fmt.Errorf("redigo: unexpected element type for interface slice, got type %T", values[i]) } if len(p) != 2 { return nil, fmt.Errorf("redigo: unexpected number of values for a member position, got %d", len(p)) } lat, err := Float64(p[0], nil) if err != nil { return nil, err } long, err := Float64(p[1], nil) if err != nil { return nil, err } positions[i] = &[2]float64{lat, long} } return positions, nil } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/scan.go ================================================ // Copyright 2012 Gary Burd // // 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 redis import ( "errors" "fmt" "reflect" "strconv" "strings" "sync" ) func ensureLen(d reflect.Value, n int) { if n > d.Cap() { d.Set(reflect.MakeSlice(d.Type(), n, n)) } else { d.SetLen(n) } } func cannotConvert(d reflect.Value, s interface{}) error { var sname string switch s.(type) { case string: sname = "Redis simple string" case Error: sname = "Redis error" case int64: sname = "Redis integer" case []byte: sname = "Redis bulk string" case []interface{}: sname = "Redis array" default: sname = reflect.TypeOf(s).String() } return fmt.Errorf("cannot convert from %s to %s", sname, d.Type()) } func convertAssignBulkString(d reflect.Value, s []byte) (err error) { switch d.Type().Kind() { case reflect.Float32, reflect.Float64: var x float64 x, err = strconv.ParseFloat(string(s), d.Type().Bits()) d.SetFloat(x) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: var x int64 x, err = strconv.ParseInt(string(s), 10, d.Type().Bits()) d.SetInt(x) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: var x uint64 x, err = strconv.ParseUint(string(s), 10, d.Type().Bits()) d.SetUint(x) case reflect.Bool: var x bool x, err = strconv.ParseBool(string(s)) d.SetBool(x) case reflect.String: d.SetString(string(s)) case reflect.Slice: if d.Type().Elem().Kind() != reflect.Uint8 { err = cannotConvert(d, s) } else { d.SetBytes(s) } default: err = cannotConvert(d, s) } return } func convertAssignInt(d reflect.Value, s int64) (err error) { switch d.Type().Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: d.SetInt(s) if d.Int() != s { err = strconv.ErrRange d.SetInt(0) } case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: if s < 0 { err = strconv.ErrRange } else { x := uint64(s) d.SetUint(x) if d.Uint() != x { err = strconv.ErrRange d.SetUint(0) } } case reflect.Bool: d.SetBool(s != 0) default: err = cannotConvert(d, s) } return } func convertAssignValue(d reflect.Value, s interface{}) (err error) { if d.Kind() != reflect.Ptr { if d.CanAddr() { d2 := d.Addr() if d2.CanInterface() { if scanner, ok := d2.Interface().(Scanner); ok { return scanner.RedisScan(s) } } } } else if d.CanInterface() { // Already a reflect.Ptr if d.IsNil() { d.Set(reflect.New(d.Type().Elem())) } if scanner, ok := d.Interface().(Scanner); ok { return scanner.RedisScan(s) } } switch s := s.(type) { case []byte: err = convertAssignBulkString(d, s) case int64: err = convertAssignInt(d, s) default: err = cannotConvert(d, s) } return err } func convertAssignArray(d reflect.Value, s []interface{}) error { if d.Type().Kind() != reflect.Slice { return cannotConvert(d, s) } ensureLen(d, len(s)) for i := 0; i < len(s); i++ { if err := convertAssignValue(d.Index(i), s[i]); err != nil { return err } } return nil } func convertAssign(d interface{}, s interface{}) (err error) { if scanner, ok := d.(Scanner); ok { return scanner.RedisScan(s) } // Handle the most common destination types using type switches and // fall back to reflection for all other types. switch s := s.(type) { case nil: // ignore case []byte: switch d := d.(type) { case *string: *d = string(s) case *int: *d, err = strconv.Atoi(string(s)) case *bool: *d, err = strconv.ParseBool(string(s)) case *[]byte: *d = s case *interface{}: *d = s case nil: // skip value default: if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr { err = cannotConvert(d, s) } else { err = convertAssignBulkString(d.Elem(), s) } } case int64: switch d := d.(type) { case *int: x := int(s) if int64(x) != s { err = strconv.ErrRange x = 0 } *d = x case *bool: *d = s != 0 case *interface{}: *d = s case nil: // skip value default: if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr { err = cannotConvert(d, s) } else { err = convertAssignInt(d.Elem(), s) } } case string: switch d := d.(type) { case *string: *d = s case *interface{}: *d = s case nil: // skip value default: err = cannotConvert(reflect.ValueOf(d), s) } case []interface{}: switch d := d.(type) { case *[]interface{}: *d = s case *interface{}: *d = s case nil: // skip value default: if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr { err = cannotConvert(d, s) } else { err = convertAssignArray(d.Elem(), s) } } case Error: err = s default: err = cannotConvert(reflect.ValueOf(d), s) } return } // Scan copies from src to the values pointed at by dest. // // Scan uses RedisScan if available otherwise: // // The values pointed at by dest must be an integer, float, boolean, string, // []byte, interface{} or slices of these types. Scan uses the standard strconv // package to convert bulk strings to numeric and boolean types. // // If a dest value is nil, then the corresponding src value is skipped. // // If a src element is nil, then the corresponding dest value is not modified. // // To enable easy use of Scan in a loop, Scan returns the slice of src // following the copied values. func Scan(src []interface{}, dest ...interface{}) ([]interface{}, error) { if len(src) < len(dest) { return nil, errors.New("redigo.Scan: array short") } var err error for i, d := range dest { err = convertAssign(d, src[i]) if err != nil { err = fmt.Errorf("redigo.Scan: cannot assign to dest %d: %v", i, err) break } } return src[len(dest):], err } type fieldSpec struct { name string index []int omitEmpty bool } type structSpec struct { m map[string]*fieldSpec l []*fieldSpec } func (ss *structSpec) fieldSpec(name []byte) *fieldSpec { return ss.m[string(name)] } func compileStructSpec(t reflect.Type, depth map[string]int, index []int, ss *structSpec) { for i := 0; i < t.NumField(); i++ { f := t.Field(i) switch { case f.PkgPath != "" && !f.Anonymous: // Ignore unexported fields. case f.Anonymous: // TODO: Handle pointers. Requires change to decoder and // protection against infinite recursion. if f.Type.Kind() == reflect.Struct { compileStructSpec(f.Type, depth, append(index, i), ss) } default: fs := &fieldSpec{name: f.Name} tag := f.Tag.Get("redis") p := strings.Split(tag, ",") if len(p) > 0 { if p[0] == "-" { continue } if len(p[0]) > 0 { fs.name = p[0] } for _, s := range p[1:] { switch s { case "omitempty": fs.omitEmpty = true default: panic(fmt.Errorf("redigo: unknown field tag %s for type %s", s, t.Name())) } } } d, found := depth[fs.name] if !found { d = 1 << 30 } switch { case len(index) == d: // At same depth, remove from result. delete(ss.m, fs.name) j := 0 for i := 0; i < len(ss.l); i++ { if fs.name != ss.l[i].name { ss.l[j] = ss.l[i] j += 1 } } ss.l = ss.l[:j] case len(index) < d: fs.index = make([]int, len(index)+1) copy(fs.index, index) fs.index[len(index)] = i depth[fs.name] = len(index) ss.m[fs.name] = fs ss.l = append(ss.l, fs) } } } } var ( structSpecMutex sync.RWMutex structSpecCache = make(map[reflect.Type]*structSpec) defaultFieldSpec = &fieldSpec{} ) func structSpecForType(t reflect.Type) *structSpec { structSpecMutex.RLock() ss, found := structSpecCache[t] structSpecMutex.RUnlock() if found { return ss } structSpecMutex.Lock() defer structSpecMutex.Unlock() ss, found = structSpecCache[t] if found { return ss } ss = &structSpec{m: make(map[string]*fieldSpec)} compileStructSpec(t, make(map[string]int), nil, ss) structSpecCache[t] = ss return ss } var errScanStructValue = errors.New("redigo.ScanStruct: value must be non-nil pointer to a struct") // ScanStruct scans alternating names and values from src to a struct. The // HGETALL and CONFIG GET commands return replies in this format. // // ScanStruct uses exported field names to match values in the response. Use // 'redis' field tag to override the name: // // Field int `redis:"myName"` // // Fields with the tag redis:"-" are ignored. // // Each field uses RedisScan if available otherwise: // Integer, float, boolean, string and []byte fields are supported. Scan uses the // standard strconv package to convert bulk string values to numeric and // boolean types. // // If a src element is nil, then the corresponding field is not modified. func ScanStruct(src []interface{}, dest interface{}) error { d := reflect.ValueOf(dest) if d.Kind() != reflect.Ptr || d.IsNil() { return errScanStructValue } d = d.Elem() if d.Kind() != reflect.Struct { return errScanStructValue } ss := structSpecForType(d.Type()) if len(src)%2 != 0 { return errors.New("redigo.ScanStruct: number of values not a multiple of 2") } for i := 0; i < len(src); i += 2 { s := src[i+1] if s == nil { continue } name, ok := src[i].([]byte) if !ok { return fmt.Errorf("redigo.ScanStruct: key %d not a bulk string value", i) } fs := ss.fieldSpec(name) if fs == nil { continue } if err := convertAssignValue(d.FieldByIndex(fs.index), s); err != nil { return fmt.Errorf("redigo.ScanStruct: cannot assign field %s: %v", fs.name, err) } } return nil } var ( errScanSliceValue = errors.New("redigo.ScanSlice: dest must be non-nil pointer to a struct") ) // ScanSlice scans src to the slice pointed to by dest. The elements the dest // slice must be integer, float, boolean, string, struct or pointer to struct // values. // // Struct fields must be integer, float, boolean or string values. All struct // fields are used unless a subset is specified using fieldNames. func ScanSlice(src []interface{}, dest interface{}, fieldNames ...string) error { d := reflect.ValueOf(dest) if d.Kind() != reflect.Ptr || d.IsNil() { return errScanSliceValue } d = d.Elem() if d.Kind() != reflect.Slice { return errScanSliceValue } isPtr := false t := d.Type().Elem() if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct { isPtr = true t = t.Elem() } if t.Kind() != reflect.Struct { ensureLen(d, len(src)) for i, s := range src { if s == nil { continue } if err := convertAssignValue(d.Index(i), s); err != nil { return fmt.Errorf("redigo.ScanSlice: cannot assign element %d: %v", i, err) } } return nil } ss := structSpecForType(t) fss := ss.l if len(fieldNames) > 0 { fss = make([]*fieldSpec, len(fieldNames)) for i, name := range fieldNames { fss[i] = ss.m[name] if fss[i] == nil { return fmt.Errorf("redigo.ScanSlice: ScanSlice bad field name %s", name) } } } if len(fss) == 0 { return errors.New("redigo.ScanSlice: no struct fields") } n := len(src) / len(fss) if n*len(fss) != len(src) { return errors.New("redigo.ScanSlice: length not a multiple of struct field count") } ensureLen(d, n) for i := 0; i < n; i++ { d := d.Index(i) if isPtr { if d.IsNil() { d.Set(reflect.New(t)) } d = d.Elem() } for j, fs := range fss { s := src[i*len(fss)+j] if s == nil { continue } if err := convertAssignValue(d.FieldByIndex(fs.index), s); err != nil { return fmt.Errorf("redigo.ScanSlice: cannot assign element %d to field %s: %v", i*len(fss)+j, fs.name, err) } } } return nil } // Args is a helper for constructing command arguments from structured values. type Args []interface{} // Add returns the result of appending value to args. func (args Args) Add(value ...interface{}) Args { return append(args, value...) } // AddFlat returns the result of appending the flattened value of v to args. // // Maps are flattened by appending the alternating keys and map values to args. // // Slices are flattened by appending the slice elements to args. // // Structs are flattened by appending the alternating names and values of // exported fields to args. If v is a nil struct pointer, then nothing is // appended. The 'redis' field tag overrides struct field names. See ScanStruct // for more information on the use of the 'redis' field tag. // // Other types are appended to args as is. func (args Args) AddFlat(v interface{}) Args { rv := reflect.ValueOf(v) switch rv.Kind() { case reflect.Struct: args = flattenStruct(args, rv) case reflect.Slice: for i := 0; i < rv.Len(); i++ { args = append(args, rv.Index(i).Interface()) } case reflect.Map: for _, k := range rv.MapKeys() { args = append(args, k.Interface(), rv.MapIndex(k).Interface()) } case reflect.Ptr: if rv.Type().Elem().Kind() == reflect.Struct { if !rv.IsNil() { args = flattenStruct(args, rv.Elem()) } } else { args = append(args, v) } default: args = append(args, v) } return args } func flattenStruct(args Args, v reflect.Value) Args { ss := structSpecForType(v.Type()) for _, fs := range ss.l { fv := v.FieldByIndex(fs.index) if fs.omitEmpty { var empty = false switch fv.Kind() { case reflect.Array, reflect.Map, reflect.Slice, reflect.String: empty = fv.Len() == 0 case reflect.Bool: empty = !fv.Bool() case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: empty = fv.Int() == 0 case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: empty = fv.Uint() == 0 case reflect.Float32, reflect.Float64: empty = fv.Float() == 0 case reflect.Interface, reflect.Ptr: empty = fv.IsNil() } if empty { continue } } args = append(args, fs.name, fv.Interface()) } return args } ================================================ FILE: vendor/github.com/garyburd/redigo/redis/script.go ================================================ // Copyright 2012 Gary Burd // // 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 redis import ( "crypto/sha1" "encoding/hex" "io" "strings" ) // Script encapsulates the source, hash and key count for a Lua script. See // http://redis.io/commands/eval for information on scripts in Redis. type Script struct { keyCount int src string hash string } // NewScript returns a new script object. If keyCount is greater than or equal // to zero, then the count is automatically inserted in the EVAL command // argument list. If keyCount is less than zero, then the application supplies // the count as the first value in the keysAndArgs argument to the Do, Send and // SendHash methods. func NewScript(keyCount int, src string) *Script { h := sha1.New() io.WriteString(h, src) return &Script{keyCount, src, hex.EncodeToString(h.Sum(nil))} } func (s *Script) args(spec string, keysAndArgs []interface{}) []interface{} { var args []interface{} if s.keyCount < 0 { args = make([]interface{}, 1+len(keysAndArgs)) args[0] = spec copy(args[1:], keysAndArgs) } else { args = make([]interface{}, 2+len(keysAndArgs)) args[0] = spec args[1] = s.keyCount copy(args[2:], keysAndArgs) } return args } // Hash returns the script hash. func (s *Script) Hash() string { return s.hash } // Do evaluates the script. Under the covers, Do optimistically evaluates the // script using the EVALSHA command. If the command fails because the script is // not loaded, then Do evaluates the script using the EVAL command (thus // causing the script to load). func (s *Script) Do(c Conn, keysAndArgs ...interface{}) (interface{}, error) { v, err := c.Do("EVALSHA", s.args(s.hash, keysAndArgs)...) if e, ok := err.(Error); ok && strings.HasPrefix(string(e), "NOSCRIPT ") { v, err = c.Do("EVAL", s.args(s.src, keysAndArgs)...) } return v, err } // SendHash evaluates the script without waiting for the reply. The script is // evaluated with the EVALSHA command. The application must ensure that the // script is loaded by a previous call to Send, Do or Load methods. func (s *Script) SendHash(c Conn, keysAndArgs ...interface{}) error { return c.Send("EVALSHA", s.args(s.hash, keysAndArgs)...) } // Send evaluates the script without waiting for the reply. func (s *Script) Send(c Conn, keysAndArgs ...interface{}) error { return c.Send("EVAL", s.args(s.src, keysAndArgs)...) } // Load loads the script without evaluating it. func (s *Script) Load(c Conn) error { _, err := c.Do("SCRIPT", "LOAD", s.src) return err } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/.gitignore ================================================ jose-util/jose-util jose-util.t.err ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/.golangci.yml ================================================ # https://github.com/golangci/golangci-lint run: skip-files: - doc_test.go modules-download-mode: readonly linters: enable-all: true disable: - gochecknoglobals - goconst - lll - maligned - nakedret - scopelint - unparam - funlen # added in 1.18 (requires go-jose changes before it can be enabled) linters-settings: gocyclo: min-complexity: 35 issues: exclude-rules: - text: "don't use ALL_CAPS in Go names" linters: - golint - text: "hardcoded credentials" linters: - gosec - text: "weak cryptographic primitive" linters: - gosec - path: json/ linters: - dupl - errcheck - gocritic - gocyclo - golint - govet - ineffassign - staticcheck - structcheck - stylecheck - unused - path: _test\.go linters: - scopelint - path: jwk.go linters: - gocyclo ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/.travis.yml ================================================ language: go matrix: fast_finish: true allow_failures: - go: tip go: - "1.13.x" - "1.14.x" - tip before_script: - export PATH=$HOME/.local/bin:$PATH before_install: - go get -u github.com/mattn/goveralls github.com/wadey/gocovmerge - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.18.0 - pip install cram --user script: - go test -v -covermode=count -coverprofile=profile.cov . - go test -v -covermode=count -coverprofile=cryptosigner/profile.cov ./cryptosigner - go test -v -covermode=count -coverprofile=cipher/profile.cov ./cipher - go test -v -covermode=count -coverprofile=jwt/profile.cov ./jwt - go test -v ./json # no coverage for forked encoding/json package - golangci-lint run - cd jose-util && go build && PATH=$PWD:$PATH cram -v jose-util.t # cram tests jose-util - cd .. after_success: - gocovmerge *.cov */*.cov > merged.coverprofile - goveralls -coverprofile merged.coverprofile -service=travis-ci ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/BUG-BOUNTY.md ================================================ Serious about security ====================== Square recognizes the important contributions the security research community can make. We therefore encourage reporting security issues with the code contained in this repository. If you believe you have discovered a security vulnerability, please follow the guidelines at . ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/CHANGELOG.md ================================================ # v3.0.1 Fixed: - Security issue: an attacker specifying a large "p2c" value can cause JSONWebEncryption.Decrypt and JSONWebEncryption.DecryptMulti to consume large amounts of CPU, causing a DoS. Thanks to Matt Schwager (@mschwager) for the disclosure and to Tom Tervoort for originally publishing the category of attack. https://i.blackhat.com/BH-US-23/Presentations/US-23-Tervoort-Three-New-Attacks-Against-JSON-Web-Tokens.pdf ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/CONTRIBUTING.md ================================================ # Contributing If you would like to contribute code to go-jose you can do so through GitHub by forking the repository and sending a pull request. When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also make sure all tests pass by running `go test`, and format your code with `go fmt`. We also recommend using `golint` and `errcheck`. Before your code can be accepted into the project you must also sign the Individual Contributor License Agreement. We use [cla-assistant.io][1] and you will be prompted to sign once a pull request is opened. [1]: https://cla-assistant.io/ ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/LICENSE ================================================ 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: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) 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 (d) 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. ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/README.md ================================================ # Go JOSE [![godoc](http://img.shields.io/badge/godoc-jose_package-blue.svg?style=flat)](https://godoc.org/gopkg.in/go-jose/go-jose.v2) [![godoc](http://img.shields.io/badge/godoc-jwt_package-blue.svg?style=flat)](https://godoc.org/gopkg.in/go-jose/go-jose.v2/jwt) [![license](http://img.shields.io/badge/license-apache_2.0-blue.svg?style=flat)](https://raw.githubusercontent.com/go-jose/go-jose/master/LICENSE) [![build](https://travis-ci.org/go-jose/go-jose.svg?branch=master)](https://travis-ci.org/go-jose/go-jose) [![coverage](https://coveralls.io/repos/github/go-jose/go-jose/badge.svg?branch=master)](https://coveralls.io/r/go-jose/go-jose) Package jose aims to provide an implementation of the Javascript Object Signing and Encryption set of standards. This includes support for JSON Web Encryption, JSON Web Signature, and JSON Web Token standards. **Disclaimer**: This library contains encryption software that is subject to the U.S. Export Administration Regulations. You may not export, re-export, transfer or download this code or any part of it in violation of any United States law, directive or regulation. In particular this software may not be exported or re-exported in any form or on any media to Iran, North Sudan, Syria, Cuba, or North Korea, or to denied persons or entities mentioned on any US maintained blocked list. ## Overview The implementation follows the [JSON Web Encryption](http://dx.doi.org/10.17487/RFC7516) (RFC 7516), [JSON Web Signature](http://dx.doi.org/10.17487/RFC7515) (RFC 7515), and [JSON Web Token](http://dx.doi.org/10.17487/RFC7519) (RFC 7519) specifications. Tables of supported algorithms are shown below. The library supports both the compact and JWS/JWE JSON Serialization formats, and has optional support for multiple recipients. It also comes with a small command-line utility ([`jose-util`](https://github.com/go-jose/go-jose/tree/master/jose-util)) for dealing with JOSE messages in a shell. **Note**: We use a forked version of the `encoding/json` package from the Go standard library which uses case-sensitive matching for member names (instead of [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html)). This is to avoid differences in interpretation of messages between go-jose and libraries in other languages. ### Versions [Version 2](https://gopkg.in/go-jose/go-jose.v2) ([branch](https://github.com/go-jose/go-jose/tree/v2), [doc](https://godoc.org/gopkg.in/go-jose/go-jose.v2)) is the current stable version: import "gopkg.in/go-jose/go-jose.v2" [Version 3](https://github.com/go-jose/go-jose) ([branch](https://github.com/go-jose/go-jose/tree/master), [doc](https://godoc.org/github.com/go-jose/go-jose)) is the under development/unstable version (not released yet): import "github.com/go-jose/go-jose/v3" All new feature development takes place on the `master` branch, which we are preparing to release as version 3 soon. Version 2 will continue to receive critical bug and security fixes. Note that starting with version 3 we are using Go modules for versioning instead of `gopkg.in` as before. Version 3 also will require Go version 1.13 or higher. Version 1 (on the `v1` branch) is frozen and not supported anymore. ### Supported algorithms See below for a table of supported algorithms. Algorithm identifiers match the names in the [JSON Web Algorithms](http://dx.doi.org/10.17487/RFC7518) standard where possible. The Godoc reference has a list of constants. Key encryption | Algorithm identifier(s) :------------------------- | :------------------------------ RSA-PKCS#1v1.5 | RSA1_5 RSA-OAEP | RSA-OAEP, RSA-OAEP-256 AES key wrap | A128KW, A192KW, A256KW AES-GCM key wrap | A128GCMKW, A192GCMKW, A256GCMKW ECDH-ES + AES key wrap | ECDH-ES+A128KW, ECDH-ES+A192KW, ECDH-ES+A256KW ECDH-ES (direct) | ECDH-ES1 Direct encryption | dir1 1. Not supported in multi-recipient mode Signing / MAC | Algorithm identifier(s) :------------------------- | :------------------------------ RSASSA-PKCS#1v1.5 | RS256, RS384, RS512 RSASSA-PSS | PS256, PS384, PS512 HMAC | HS256, HS384, HS512 ECDSA | ES256, ES384, ES512 Ed25519 | EdDSA2 2. Only available in version 2 of the package Content encryption | Algorithm identifier(s) :------------------------- | :------------------------------ AES-CBC+HMAC | A128CBC-HS256, A192CBC-HS384, A256CBC-HS512 AES-GCM | A128GCM, A192GCM, A256GCM Compression | Algorithm identifiers(s) :------------------------- | ------------------------------- DEFLATE (RFC 1951) | DEF ### Supported key types See below for a table of supported key types. These are understood by the library, and can be passed to corresponding functions such as `NewEncrypter` or `NewSigner`. Each of these keys can also be wrapped in a JWK if desired, which allows attaching a key id. Algorithm(s) | Corresponding types :------------------------- | ------------------------------- RSA | *[rsa.PublicKey](http://golang.org/pkg/crypto/rsa/#PublicKey), *[rsa.PrivateKey](http://golang.org/pkg/crypto/rsa/#PrivateKey) ECDH, ECDSA | *[ecdsa.PublicKey](http://golang.org/pkg/crypto/ecdsa/#PublicKey), *[ecdsa.PrivateKey](http://golang.org/pkg/crypto/ecdsa/#PrivateKey) EdDSA1 | [ed25519.PublicKey](https://godoc.org/pkg/crypto/ed25519#PublicKey), [ed25519.PrivateKey](https://godoc.org/pkg/crypto/ed25519#PrivateKey) AES, HMAC | []byte 1. Only available in version 2 or later of the package ## Examples [![godoc](http://img.shields.io/badge/godoc-jose_package-blue.svg?style=flat)](https://godoc.org/gopkg.in/go-jose/go-jose.v2) [![godoc](http://img.shields.io/badge/godoc-jwt_package-blue.svg?style=flat)](https://godoc.org/gopkg.in/go-jose/go-jose.v2/jwt) Examples can be found in the Godoc reference for this package. The [`jose-util`](https://github.com/go-jose/go-jose/tree/master/jose-util) subdirectory also contains a small command-line utility which might be useful as an example as well. ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/asymmetric.go ================================================ /*- * Copyright 2014 Square Inc. * * 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 jose import ( "crypto" "crypto/aes" "crypto/ecdsa" "crypto/ed25519" "crypto/rand" "crypto/rsa" "crypto/sha1" "crypto/sha256" "errors" "fmt" "math/big" josecipher "github.com/go-jose/go-jose/v3/cipher" "github.com/go-jose/go-jose/v3/json" ) // A generic RSA-based encrypter/verifier type rsaEncrypterVerifier struct { publicKey *rsa.PublicKey } // A generic RSA-based decrypter/signer type rsaDecrypterSigner struct { privateKey *rsa.PrivateKey } // A generic EC-based encrypter/verifier type ecEncrypterVerifier struct { publicKey *ecdsa.PublicKey } type edEncrypterVerifier struct { publicKey ed25519.PublicKey } // A key generator for ECDH-ES type ecKeyGenerator struct { size int algID string publicKey *ecdsa.PublicKey } // A generic EC-based decrypter/signer type ecDecrypterSigner struct { privateKey *ecdsa.PrivateKey } type edDecrypterSigner struct { privateKey ed25519.PrivateKey } // newRSARecipient creates recipientKeyInfo based on the given key. func newRSARecipient(keyAlg KeyAlgorithm, publicKey *rsa.PublicKey) (recipientKeyInfo, error) { // Verify that key management algorithm is supported by this encrypter switch keyAlg { case RSA1_5, RSA_OAEP, RSA_OAEP_256: default: return recipientKeyInfo{}, ErrUnsupportedAlgorithm } if publicKey == nil { return recipientKeyInfo{}, errors.New("invalid public key") } return recipientKeyInfo{ keyAlg: keyAlg, keyEncrypter: &rsaEncrypterVerifier{ publicKey: publicKey, }, }, nil } // newRSASigner creates a recipientSigInfo based on the given key. func newRSASigner(sigAlg SignatureAlgorithm, privateKey *rsa.PrivateKey) (recipientSigInfo, error) { // Verify that key management algorithm is supported by this encrypter switch sigAlg { case RS256, RS384, RS512, PS256, PS384, PS512: default: return recipientSigInfo{}, ErrUnsupportedAlgorithm } if privateKey == nil { return recipientSigInfo{}, errors.New("invalid private key") } return recipientSigInfo{ sigAlg: sigAlg, publicKey: staticPublicKey(&JSONWebKey{ Key: privateKey.Public(), }), signer: &rsaDecrypterSigner{ privateKey: privateKey, }, }, nil } func newEd25519Signer(sigAlg SignatureAlgorithm, privateKey ed25519.PrivateKey) (recipientSigInfo, error) { if sigAlg != EdDSA { return recipientSigInfo{}, ErrUnsupportedAlgorithm } if privateKey == nil { return recipientSigInfo{}, errors.New("invalid private key") } return recipientSigInfo{ sigAlg: sigAlg, publicKey: staticPublicKey(&JSONWebKey{ Key: privateKey.Public(), }), signer: &edDecrypterSigner{ privateKey: privateKey, }, }, nil } // newECDHRecipient creates recipientKeyInfo based on the given key. func newECDHRecipient(keyAlg KeyAlgorithm, publicKey *ecdsa.PublicKey) (recipientKeyInfo, error) { // Verify that key management algorithm is supported by this encrypter switch keyAlg { case ECDH_ES, ECDH_ES_A128KW, ECDH_ES_A192KW, ECDH_ES_A256KW: default: return recipientKeyInfo{}, ErrUnsupportedAlgorithm } if publicKey == nil || !publicKey.Curve.IsOnCurve(publicKey.X, publicKey.Y) { return recipientKeyInfo{}, errors.New("invalid public key") } return recipientKeyInfo{ keyAlg: keyAlg, keyEncrypter: &ecEncrypterVerifier{ publicKey: publicKey, }, }, nil } // newECDSASigner creates a recipientSigInfo based on the given key. func newECDSASigner(sigAlg SignatureAlgorithm, privateKey *ecdsa.PrivateKey) (recipientSigInfo, error) { // Verify that key management algorithm is supported by this encrypter switch sigAlg { case ES256, ES384, ES512: default: return recipientSigInfo{}, ErrUnsupportedAlgorithm } if privateKey == nil { return recipientSigInfo{}, errors.New("invalid private key") } return recipientSigInfo{ sigAlg: sigAlg, publicKey: staticPublicKey(&JSONWebKey{ Key: privateKey.Public(), }), signer: &ecDecrypterSigner{ privateKey: privateKey, }, }, nil } // Encrypt the given payload and update the object. func (ctx rsaEncrypterVerifier) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) { encryptedKey, err := ctx.encrypt(cek, alg) if err != nil { return recipientInfo{}, err } return recipientInfo{ encryptedKey: encryptedKey, header: &rawHeader{}, }, nil } // Encrypt the given payload. Based on the key encryption algorithm, // this will either use RSA-PKCS1v1.5 or RSA-OAEP (with SHA-1 or SHA-256). func (ctx rsaEncrypterVerifier) encrypt(cek []byte, alg KeyAlgorithm) ([]byte, error) { switch alg { case RSA1_5: return rsa.EncryptPKCS1v15(RandReader, ctx.publicKey, cek) case RSA_OAEP: return rsa.EncryptOAEP(sha1.New(), RandReader, ctx.publicKey, cek, []byte{}) case RSA_OAEP_256: return rsa.EncryptOAEP(sha256.New(), RandReader, ctx.publicKey, cek, []byte{}) } return nil, ErrUnsupportedAlgorithm } // Decrypt the given payload and return the content encryption key. func (ctx rsaDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) { return ctx.decrypt(recipient.encryptedKey, headers.getAlgorithm(), generator) } // Decrypt the given payload. Based on the key encryption algorithm, // this will either use RSA-PKCS1v1.5 or RSA-OAEP (with SHA-1 or SHA-256). func (ctx rsaDecrypterSigner) decrypt(jek []byte, alg KeyAlgorithm, generator keyGenerator) ([]byte, error) { // Note: The random reader on decrypt operations is only used for blinding, // so stubbing is meanlingless (hence the direct use of rand.Reader). switch alg { case RSA1_5: defer func() { // DecryptPKCS1v15SessionKey sometimes panics on an invalid payload // because of an index out of bounds error, which we want to ignore. // This has been fixed in Go 1.3.1 (released 2014/08/13), the recover() // only exists for preventing crashes with unpatched versions. // See: https://groups.google.com/forum/#!topic/golang-dev/7ihX6Y6kx9k // See: https://code.google.com/p/go/source/detail?r=58ee390ff31602edb66af41ed10901ec95904d33 _ = recover() }() // Perform some input validation. keyBytes := ctx.privateKey.PublicKey.N.BitLen() / 8 if keyBytes != len(jek) { // Input size is incorrect, the encrypted payload should always match // the size of the public modulus (e.g. using a 2048 bit key will // produce 256 bytes of output). Reject this since it's invalid input. return nil, ErrCryptoFailure } cek, _, err := generator.genKey() if err != nil { return nil, ErrCryptoFailure } // When decrypting an RSA-PKCS1v1.5 payload, we must take precautions to // prevent chosen-ciphertext attacks as described in RFC 3218, "Preventing // the Million Message Attack on Cryptographic Message Syntax". We are // therefore deliberately ignoring errors here. _ = rsa.DecryptPKCS1v15SessionKey(rand.Reader, ctx.privateKey, jek, cek) return cek, nil case RSA_OAEP: // Use rand.Reader for RSA blinding return rsa.DecryptOAEP(sha1.New(), rand.Reader, ctx.privateKey, jek, []byte{}) case RSA_OAEP_256: // Use rand.Reader for RSA blinding return rsa.DecryptOAEP(sha256.New(), rand.Reader, ctx.privateKey, jek, []byte{}) } return nil, ErrUnsupportedAlgorithm } // Sign the given payload func (ctx rsaDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) { var hash crypto.Hash switch alg { case RS256, PS256: hash = crypto.SHA256 case RS384, PS384: hash = crypto.SHA384 case RS512, PS512: hash = crypto.SHA512 default: return Signature{}, ErrUnsupportedAlgorithm } hasher := hash.New() // According to documentation, Write() on hash never fails _, _ = hasher.Write(payload) hashed := hasher.Sum(nil) var out []byte var err error switch alg { case RS256, RS384, RS512: out, err = rsa.SignPKCS1v15(RandReader, ctx.privateKey, hash, hashed) case PS256, PS384, PS512: out, err = rsa.SignPSS(RandReader, ctx.privateKey, hash, hashed, &rsa.PSSOptions{ SaltLength: rsa.PSSSaltLengthEqualsHash, }) } if err != nil { return Signature{}, err } return Signature{ Signature: out, protected: &rawHeader{}, }, nil } // Verify the given payload func (ctx rsaEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error { var hash crypto.Hash switch alg { case RS256, PS256: hash = crypto.SHA256 case RS384, PS384: hash = crypto.SHA384 case RS512, PS512: hash = crypto.SHA512 default: return ErrUnsupportedAlgorithm } hasher := hash.New() // According to documentation, Write() on hash never fails _, _ = hasher.Write(payload) hashed := hasher.Sum(nil) switch alg { case RS256, RS384, RS512: return rsa.VerifyPKCS1v15(ctx.publicKey, hash, hashed, signature) case PS256, PS384, PS512: return rsa.VerifyPSS(ctx.publicKey, hash, hashed, signature, nil) } return ErrUnsupportedAlgorithm } // Encrypt the given payload and update the object. func (ctx ecEncrypterVerifier) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) { switch alg { case ECDH_ES: // ECDH-ES mode doesn't wrap a key, the shared secret is used directly as the key. return recipientInfo{ header: &rawHeader{}, }, nil case ECDH_ES_A128KW, ECDH_ES_A192KW, ECDH_ES_A256KW: default: return recipientInfo{}, ErrUnsupportedAlgorithm } generator := ecKeyGenerator{ algID: string(alg), publicKey: ctx.publicKey, } switch alg { case ECDH_ES_A128KW: generator.size = 16 case ECDH_ES_A192KW: generator.size = 24 case ECDH_ES_A256KW: generator.size = 32 } kek, header, err := generator.genKey() if err != nil { return recipientInfo{}, err } block, err := aes.NewCipher(kek) if err != nil { return recipientInfo{}, err } jek, err := josecipher.KeyWrap(block, cek) if err != nil { return recipientInfo{}, err } return recipientInfo{ encryptedKey: jek, header: &header, }, nil } // Get key size for EC key generator func (ctx ecKeyGenerator) keySize() int { return ctx.size } // Get a content encryption key for ECDH-ES func (ctx ecKeyGenerator) genKey() ([]byte, rawHeader, error) { priv, err := ecdsa.GenerateKey(ctx.publicKey.Curve, RandReader) if err != nil { return nil, rawHeader{}, err } out := josecipher.DeriveECDHES(ctx.algID, []byte{}, []byte{}, priv, ctx.publicKey, ctx.size) b, err := json.Marshal(&JSONWebKey{ Key: &priv.PublicKey, }) if err != nil { return nil, nil, err } headers := rawHeader{ headerEPK: makeRawMessage(b), } return out, headers, nil } // Decrypt the given payload and return the content encryption key. func (ctx ecDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) { epk, err := headers.getEPK() if err != nil { return nil, errors.New("go-jose/go-jose: invalid epk header") } if epk == nil { return nil, errors.New("go-jose/go-jose: missing epk header") } publicKey, ok := epk.Key.(*ecdsa.PublicKey) if publicKey == nil || !ok { return nil, errors.New("go-jose/go-jose: invalid epk header") } if !ctx.privateKey.Curve.IsOnCurve(publicKey.X, publicKey.Y) { return nil, errors.New("go-jose/go-jose: invalid public key in epk header") } apuData, err := headers.getAPU() if err != nil { return nil, errors.New("go-jose/go-jose: invalid apu header") } apvData, err := headers.getAPV() if err != nil { return nil, errors.New("go-jose/go-jose: invalid apv header") } deriveKey := func(algID string, size int) []byte { return josecipher.DeriveECDHES(algID, apuData.bytes(), apvData.bytes(), ctx.privateKey, publicKey, size) } var keySize int algorithm := headers.getAlgorithm() switch algorithm { case ECDH_ES: // ECDH-ES uses direct key agreement, no key unwrapping necessary. return deriveKey(string(headers.getEncryption()), generator.keySize()), nil case ECDH_ES_A128KW: keySize = 16 case ECDH_ES_A192KW: keySize = 24 case ECDH_ES_A256KW: keySize = 32 default: return nil, ErrUnsupportedAlgorithm } key := deriveKey(string(algorithm), keySize) block, err := aes.NewCipher(key) if err != nil { return nil, err } return josecipher.KeyUnwrap(block, recipient.encryptedKey) } func (ctx edDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) { if alg != EdDSA { return Signature{}, ErrUnsupportedAlgorithm } sig, err := ctx.privateKey.Sign(RandReader, payload, crypto.Hash(0)) if err != nil { return Signature{}, err } return Signature{ Signature: sig, protected: &rawHeader{}, }, nil } func (ctx edEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error { if alg != EdDSA { return ErrUnsupportedAlgorithm } ok := ed25519.Verify(ctx.publicKey, payload, signature) if !ok { return errors.New("go-jose/go-jose: ed25519 signature failed to verify") } return nil } // Sign the given payload func (ctx ecDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) { var expectedBitSize int var hash crypto.Hash switch alg { case ES256: expectedBitSize = 256 hash = crypto.SHA256 case ES384: expectedBitSize = 384 hash = crypto.SHA384 case ES512: expectedBitSize = 521 hash = crypto.SHA512 } curveBits := ctx.privateKey.Curve.Params().BitSize if expectedBitSize != curveBits { return Signature{}, fmt.Errorf("go-jose/go-jose: expected %d bit key, got %d bits instead", expectedBitSize, curveBits) } hasher := hash.New() // According to documentation, Write() on hash never fails _, _ = hasher.Write(payload) hashed := hasher.Sum(nil) r, s, err := ecdsa.Sign(RandReader, ctx.privateKey, hashed) if err != nil { return Signature{}, err } keyBytes := curveBits / 8 if curveBits%8 > 0 { keyBytes++ } // We serialize the outputs (r and s) into big-endian byte arrays and pad // them with zeros on the left to make sure the sizes work out. Both arrays // must be keyBytes long, and the output must be 2*keyBytes long. rBytes := r.Bytes() rBytesPadded := make([]byte, keyBytes) copy(rBytesPadded[keyBytes-len(rBytes):], rBytes) sBytes := s.Bytes() sBytesPadded := make([]byte, keyBytes) copy(sBytesPadded[keyBytes-len(sBytes):], sBytes) out := append(rBytesPadded, sBytesPadded...) return Signature{ Signature: out, protected: &rawHeader{}, }, nil } // Verify the given payload func (ctx ecEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error { var keySize int var hash crypto.Hash switch alg { case ES256: keySize = 32 hash = crypto.SHA256 case ES384: keySize = 48 hash = crypto.SHA384 case ES512: keySize = 66 hash = crypto.SHA512 default: return ErrUnsupportedAlgorithm } if len(signature) != 2*keySize { return fmt.Errorf("go-jose/go-jose: invalid signature size, have %d bytes, wanted %d", len(signature), 2*keySize) } hasher := hash.New() // According to documentation, Write() on hash never fails _, _ = hasher.Write(payload) hashed := hasher.Sum(nil) r := big.NewInt(0).SetBytes(signature[:keySize]) s := big.NewInt(0).SetBytes(signature[keySize:]) match := ecdsa.Verify(ctx.publicKey, hashed, r, s) if !match { return errors.New("go-jose/go-jose: ecdsa signature failed to verify") } return nil } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/cipher/cbc_hmac.go ================================================ /*- * Copyright 2014 Square Inc. * * 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 josecipher import ( "bytes" "crypto/cipher" "crypto/hmac" "crypto/sha256" "crypto/sha512" "crypto/subtle" "encoding/binary" "errors" "hash" ) const ( nonceBytes = 16 ) // NewCBCHMAC instantiates a new AEAD based on CBC+HMAC. func NewCBCHMAC(key []byte, newBlockCipher func([]byte) (cipher.Block, error)) (cipher.AEAD, error) { keySize := len(key) / 2 integrityKey := key[:keySize] encryptionKey := key[keySize:] blockCipher, err := newBlockCipher(encryptionKey) if err != nil { return nil, err } var hash func() hash.Hash switch keySize { case 16: hash = sha256.New case 24: hash = sha512.New384 case 32: hash = sha512.New } return &cbcAEAD{ hash: hash, blockCipher: blockCipher, authtagBytes: keySize, integrityKey: integrityKey, }, nil } // An AEAD based on CBC+HMAC type cbcAEAD struct { hash func() hash.Hash authtagBytes int integrityKey []byte blockCipher cipher.Block } func (ctx *cbcAEAD) NonceSize() int { return nonceBytes } func (ctx *cbcAEAD) Overhead() int { // Maximum overhead is block size (for padding) plus auth tag length, where // the length of the auth tag is equivalent to the key size. return ctx.blockCipher.BlockSize() + ctx.authtagBytes } // Seal encrypts and authenticates the plaintext. func (ctx *cbcAEAD) Seal(dst, nonce, plaintext, data []byte) []byte { // Output buffer -- must take care not to mangle plaintext input. ciphertext := make([]byte, uint64(len(plaintext))+uint64(ctx.Overhead()))[:len(plaintext)] copy(ciphertext, plaintext) ciphertext = padBuffer(ciphertext, ctx.blockCipher.BlockSize()) cbc := cipher.NewCBCEncrypter(ctx.blockCipher, nonce) cbc.CryptBlocks(ciphertext, ciphertext) authtag := ctx.computeAuthTag(data, nonce, ciphertext) ret, out := resize(dst, uint64(len(dst))+uint64(len(ciphertext))+uint64(len(authtag))) copy(out, ciphertext) copy(out[len(ciphertext):], authtag) return ret } // Open decrypts and authenticates the ciphertext. func (ctx *cbcAEAD) Open(dst, nonce, ciphertext, data []byte) ([]byte, error) { if len(ciphertext) < ctx.authtagBytes { return nil, errors.New("go-jose/go-jose: invalid ciphertext (too short)") } offset := len(ciphertext) - ctx.authtagBytes expectedTag := ctx.computeAuthTag(data, nonce, ciphertext[:offset]) match := subtle.ConstantTimeCompare(expectedTag, ciphertext[offset:]) if match != 1 { return nil, errors.New("go-jose/go-jose: invalid ciphertext (auth tag mismatch)") } cbc := cipher.NewCBCDecrypter(ctx.blockCipher, nonce) // Make copy of ciphertext buffer, don't want to modify in place buffer := append([]byte{}, ciphertext[:offset]...) if len(buffer)%ctx.blockCipher.BlockSize() > 0 { return nil, errors.New("go-jose/go-jose: invalid ciphertext (invalid length)") } cbc.CryptBlocks(buffer, buffer) // Remove padding plaintext, err := unpadBuffer(buffer, ctx.blockCipher.BlockSize()) if err != nil { return nil, err } ret, out := resize(dst, uint64(len(dst))+uint64(len(plaintext))) copy(out, plaintext) return ret, nil } // Compute an authentication tag func (ctx *cbcAEAD) computeAuthTag(aad, nonce, ciphertext []byte) []byte { buffer := make([]byte, uint64(len(aad))+uint64(len(nonce))+uint64(len(ciphertext))+8) n := 0 n += copy(buffer, aad) n += copy(buffer[n:], nonce) n += copy(buffer[n:], ciphertext) binary.BigEndian.PutUint64(buffer[n:], uint64(len(aad))*8) // According to documentation, Write() on hash.Hash never fails. hmac := hmac.New(ctx.hash, ctx.integrityKey) _, _ = hmac.Write(buffer) return hmac.Sum(nil)[:ctx.authtagBytes] } // resize ensures that the given slice has a capacity of at least n bytes. // If the capacity of the slice is less than n, a new slice is allocated // and the existing data will be copied. func resize(in []byte, n uint64) (head, tail []byte) { if uint64(cap(in)) >= n { head = in[:n] } else { head = make([]byte, n) copy(head, in) } tail = head[len(in):] return } // Apply padding func padBuffer(buffer []byte, blockSize int) []byte { missing := blockSize - (len(buffer) % blockSize) ret, out := resize(buffer, uint64(len(buffer))+uint64(missing)) padding := bytes.Repeat([]byte{byte(missing)}, missing) copy(out, padding) return ret } // Remove padding func unpadBuffer(buffer []byte, blockSize int) ([]byte, error) { if len(buffer)%blockSize != 0 { return nil, errors.New("go-jose/go-jose: invalid padding") } last := buffer[len(buffer)-1] count := int(last) if count == 0 || count > blockSize || count > len(buffer) { return nil, errors.New("go-jose/go-jose: invalid padding") } padding := bytes.Repeat([]byte{last}, count) if !bytes.HasSuffix(buffer, padding) { return nil, errors.New("go-jose/go-jose: invalid padding") } return buffer[:len(buffer)-count], nil } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/cipher/concat_kdf.go ================================================ /*- * Copyright 2014 Square Inc. * * 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 josecipher import ( "crypto" "encoding/binary" "hash" "io" ) type concatKDF struct { z, info []byte i uint32 cache []byte hasher hash.Hash } // NewConcatKDF builds a KDF reader based on the given inputs. func NewConcatKDF(hash crypto.Hash, z, algID, ptyUInfo, ptyVInfo, supPubInfo, supPrivInfo []byte) io.Reader { buffer := make([]byte, uint64(len(algID))+uint64(len(ptyUInfo))+uint64(len(ptyVInfo))+uint64(len(supPubInfo))+uint64(len(supPrivInfo))) n := 0 n += copy(buffer, algID) n += copy(buffer[n:], ptyUInfo) n += copy(buffer[n:], ptyVInfo) n += copy(buffer[n:], supPubInfo) copy(buffer[n:], supPrivInfo) hasher := hash.New() return &concatKDF{ z: z, info: buffer, hasher: hasher, cache: []byte{}, i: 1, } } func (ctx *concatKDF) Read(out []byte) (int, error) { copied := copy(out, ctx.cache) ctx.cache = ctx.cache[copied:] for copied < len(out) { ctx.hasher.Reset() // Write on a hash.Hash never fails _ = binary.Write(ctx.hasher, binary.BigEndian, ctx.i) _, _ = ctx.hasher.Write(ctx.z) _, _ = ctx.hasher.Write(ctx.info) hash := ctx.hasher.Sum(nil) chunkCopied := copy(out[copied:], hash) copied += chunkCopied ctx.cache = hash[chunkCopied:] ctx.i++ } return copied, nil } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/cipher/ecdh_es.go ================================================ /*- * Copyright 2014 Square Inc. * * 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 josecipher import ( "bytes" "crypto" "crypto/ecdsa" "crypto/elliptic" "encoding/binary" ) // DeriveECDHES derives a shared encryption key using ECDH/ConcatKDF as described in JWE/JWA. // It is an error to call this function with a private/public key that are not on the same // curve. Callers must ensure that the keys are valid before calling this function. Output // size may be at most 1<<16 bytes (64 KiB). func DeriveECDHES(alg string, apuData, apvData []byte, priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey, size int) []byte { if size > 1<<16 { panic("ECDH-ES output size too large, must be less than or equal to 1<<16") } // algId, partyUInfo, partyVInfo inputs must be prefixed with the length algID := lengthPrefixed([]byte(alg)) ptyUInfo := lengthPrefixed(apuData) ptyVInfo := lengthPrefixed(apvData) // suppPubInfo is the encoded length of the output size in bits supPubInfo := make([]byte, 4) binary.BigEndian.PutUint32(supPubInfo, uint32(size)*8) if !priv.PublicKey.Curve.IsOnCurve(pub.X, pub.Y) { panic("public key not on same curve as private key") } z, _ := priv.Curve.ScalarMult(pub.X, pub.Y, priv.D.Bytes()) zBytes := z.Bytes() // Note that calling z.Bytes() on a big.Int may strip leading zero bytes from // the returned byte array. This can lead to a problem where zBytes will be // shorter than expected which breaks the key derivation. Therefore we must pad // to the full length of the expected coordinate here before calling the KDF. octSize := dSize(priv.Curve) if len(zBytes) != octSize { zBytes = append(bytes.Repeat([]byte{0}, octSize-len(zBytes)), zBytes...) } reader := NewConcatKDF(crypto.SHA256, zBytes, algID, ptyUInfo, ptyVInfo, supPubInfo, []byte{}) key := make([]byte, size) // Read on the KDF will never fail _, _ = reader.Read(key) return key } // dSize returns the size in octets for a coordinate on a elliptic curve. func dSize(curve elliptic.Curve) int { order := curve.Params().P bitLen := order.BitLen() size := bitLen / 8 if bitLen%8 != 0 { size++ } return size } func lengthPrefixed(data []byte) []byte { out := make([]byte, len(data)+4) binary.BigEndian.PutUint32(out, uint32(len(data))) copy(out[4:], data) return out } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/cipher/key_wrap.go ================================================ /*- * Copyright 2014 Square Inc. * * 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 josecipher import ( "crypto/cipher" "crypto/subtle" "encoding/binary" "errors" ) var defaultIV = []byte{0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6} // KeyWrap implements NIST key wrapping; it wraps a content encryption key (cek) with the given block cipher. func KeyWrap(block cipher.Block, cek []byte) ([]byte, error) { if len(cek)%8 != 0 { return nil, errors.New("go-jose/go-jose: key wrap input must be 8 byte blocks") } n := len(cek) / 8 r := make([][]byte, n) for i := range r { r[i] = make([]byte, 8) copy(r[i], cek[i*8:]) } buffer := make([]byte, 16) tBytes := make([]byte, 8) copy(buffer, defaultIV) for t := 0; t < 6*n; t++ { copy(buffer[8:], r[t%n]) block.Encrypt(buffer, buffer) binary.BigEndian.PutUint64(tBytes, uint64(t+1)) for i := 0; i < 8; i++ { buffer[i] ^= tBytes[i] } copy(r[t%n], buffer[8:]) } out := make([]byte, (n+1)*8) copy(out, buffer[:8]) for i := range r { copy(out[(i+1)*8:], r[i]) } return out, nil } // KeyUnwrap implements NIST key unwrapping; it unwraps a content encryption key (cek) with the given block cipher. func KeyUnwrap(block cipher.Block, ciphertext []byte) ([]byte, error) { if len(ciphertext)%8 != 0 { return nil, errors.New("go-jose/go-jose: key wrap input must be 8 byte blocks") } n := (len(ciphertext) / 8) - 1 r := make([][]byte, n) for i := range r { r[i] = make([]byte, 8) copy(r[i], ciphertext[(i+1)*8:]) } buffer := make([]byte, 16) tBytes := make([]byte, 8) copy(buffer[:8], ciphertext[:8]) for t := 6*n - 1; t >= 0; t-- { binary.BigEndian.PutUint64(tBytes, uint64(t+1)) for i := 0; i < 8; i++ { buffer[i] ^= tBytes[i] } copy(buffer[8:], r[t%n]) block.Decrypt(buffer, buffer) copy(r[t%n], buffer[8:]) } if subtle.ConstantTimeCompare(buffer[:8], defaultIV) == 0 { return nil, errors.New("go-jose/go-jose: failed to unwrap key") } out := make([]byte, n*8) for i := range r { copy(out[i*8:], r[i]) } return out, nil } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/crypter.go ================================================ /*- * Copyright 2014 Square Inc. * * 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 jose import ( "crypto/ecdsa" "crypto/rsa" "errors" "fmt" "reflect" "github.com/go-jose/go-jose/v3/json" ) // Encrypter represents an encrypter which produces an encrypted JWE object. type Encrypter interface { Encrypt(plaintext []byte) (*JSONWebEncryption, error) EncryptWithAuthData(plaintext []byte, aad []byte) (*JSONWebEncryption, error) Options() EncrypterOptions } // A generic content cipher type contentCipher interface { keySize() int encrypt(cek []byte, aad, plaintext []byte) (*aeadParts, error) decrypt(cek []byte, aad []byte, parts *aeadParts) ([]byte, error) } // A key generator (for generating/getting a CEK) type keyGenerator interface { keySize() int genKey() ([]byte, rawHeader, error) } // A generic key encrypter type keyEncrypter interface { encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) // Encrypt a key } // A generic key decrypter type keyDecrypter interface { decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) // Decrypt a key } // A generic encrypter based on the given key encrypter and content cipher. type genericEncrypter struct { contentAlg ContentEncryption compressionAlg CompressionAlgorithm cipher contentCipher recipients []recipientKeyInfo keyGenerator keyGenerator extraHeaders map[HeaderKey]interface{} } type recipientKeyInfo struct { keyID string keyAlg KeyAlgorithm keyEncrypter keyEncrypter } // EncrypterOptions represents options that can be set on new encrypters. type EncrypterOptions struct { Compression CompressionAlgorithm // Optional map of additional keys to be inserted into the protected header // of a JWS object. Some specifications which make use of JWS like to insert // additional values here. All values must be JSON-serializable. ExtraHeaders map[HeaderKey]interface{} } // WithHeader adds an arbitrary value to the ExtraHeaders map, initializing it // if necessary. It returns itself and so can be used in a fluent style. func (eo *EncrypterOptions) WithHeader(k HeaderKey, v interface{}) *EncrypterOptions { if eo.ExtraHeaders == nil { eo.ExtraHeaders = map[HeaderKey]interface{}{} } eo.ExtraHeaders[k] = v return eo } // WithContentType adds a content type ("cty") header and returns the updated // EncrypterOptions. func (eo *EncrypterOptions) WithContentType(contentType ContentType) *EncrypterOptions { return eo.WithHeader(HeaderContentType, contentType) } // WithType adds a type ("typ") header and returns the updated EncrypterOptions. func (eo *EncrypterOptions) WithType(typ ContentType) *EncrypterOptions { return eo.WithHeader(HeaderType, typ) } // Recipient represents an algorithm/key to encrypt messages to. // // PBES2Count and PBES2Salt correspond with the "p2c" and "p2s" headers used // on the password-based encryption algorithms PBES2-HS256+A128KW, // PBES2-HS384+A192KW, and PBES2-HS512+A256KW. If they are not provided a safe // default of 100000 will be used for the count and a 128-bit random salt will // be generated. type Recipient struct { Algorithm KeyAlgorithm Key interface{} KeyID string PBES2Count int PBES2Salt []byte } // NewEncrypter creates an appropriate encrypter based on the key type func NewEncrypter(enc ContentEncryption, rcpt Recipient, opts *EncrypterOptions) (Encrypter, error) { encrypter := &genericEncrypter{ contentAlg: enc, recipients: []recipientKeyInfo{}, cipher: getContentCipher(enc), } if opts != nil { encrypter.compressionAlg = opts.Compression encrypter.extraHeaders = opts.ExtraHeaders } if encrypter.cipher == nil { return nil, ErrUnsupportedAlgorithm } var keyID string var rawKey interface{} switch encryptionKey := rcpt.Key.(type) { case JSONWebKey: keyID, rawKey = encryptionKey.KeyID, encryptionKey.Key case *JSONWebKey: keyID, rawKey = encryptionKey.KeyID, encryptionKey.Key case OpaqueKeyEncrypter: keyID, rawKey = encryptionKey.KeyID(), encryptionKey default: rawKey = encryptionKey } switch rcpt.Algorithm { case DIRECT: // Direct encryption mode must be treated differently if reflect.TypeOf(rawKey) != reflect.TypeOf([]byte{}) { return nil, ErrUnsupportedKeyType } if encrypter.cipher.keySize() != len(rawKey.([]byte)) { return nil, ErrInvalidKeySize } encrypter.keyGenerator = staticKeyGenerator{ key: rawKey.([]byte), } recipientInfo, _ := newSymmetricRecipient(rcpt.Algorithm, rawKey.([]byte)) recipientInfo.keyID = keyID if rcpt.KeyID != "" { recipientInfo.keyID = rcpt.KeyID } encrypter.recipients = []recipientKeyInfo{recipientInfo} return encrypter, nil case ECDH_ES: // ECDH-ES (w/o key wrapping) is similar to DIRECT mode typeOf := reflect.TypeOf(rawKey) if typeOf != reflect.TypeOf(&ecdsa.PublicKey{}) { return nil, ErrUnsupportedKeyType } encrypter.keyGenerator = ecKeyGenerator{ size: encrypter.cipher.keySize(), algID: string(enc), publicKey: rawKey.(*ecdsa.PublicKey), } recipientInfo, _ := newECDHRecipient(rcpt.Algorithm, rawKey.(*ecdsa.PublicKey)) recipientInfo.keyID = keyID if rcpt.KeyID != "" { recipientInfo.keyID = rcpt.KeyID } encrypter.recipients = []recipientKeyInfo{recipientInfo} return encrypter, nil default: // Can just add a standard recipient encrypter.keyGenerator = randomKeyGenerator{ size: encrypter.cipher.keySize(), } err := encrypter.addRecipient(rcpt) return encrypter, err } } // NewMultiEncrypter creates a multi-encrypter based on the given parameters func NewMultiEncrypter(enc ContentEncryption, rcpts []Recipient, opts *EncrypterOptions) (Encrypter, error) { cipher := getContentCipher(enc) if cipher == nil { return nil, ErrUnsupportedAlgorithm } if len(rcpts) == 0 { return nil, fmt.Errorf("go-jose/go-jose: recipients is nil or empty") } encrypter := &genericEncrypter{ contentAlg: enc, recipients: []recipientKeyInfo{}, cipher: cipher, keyGenerator: randomKeyGenerator{ size: cipher.keySize(), }, } if opts != nil { encrypter.compressionAlg = opts.Compression encrypter.extraHeaders = opts.ExtraHeaders } for _, recipient := range rcpts { err := encrypter.addRecipient(recipient) if err != nil { return nil, err } } return encrypter, nil } func (ctx *genericEncrypter) addRecipient(recipient Recipient) (err error) { var recipientInfo recipientKeyInfo switch recipient.Algorithm { case DIRECT, ECDH_ES: return fmt.Errorf("go-jose/go-jose: key algorithm '%s' not supported in multi-recipient mode", recipient.Algorithm) } recipientInfo, err = makeJWERecipient(recipient.Algorithm, recipient.Key) if recipient.KeyID != "" { recipientInfo.keyID = recipient.KeyID } switch recipient.Algorithm { case PBES2_HS256_A128KW, PBES2_HS384_A192KW, PBES2_HS512_A256KW: if sr, ok := recipientInfo.keyEncrypter.(*symmetricKeyCipher); ok { sr.p2c = recipient.PBES2Count sr.p2s = recipient.PBES2Salt } } if err == nil { ctx.recipients = append(ctx.recipients, recipientInfo) } return err } func makeJWERecipient(alg KeyAlgorithm, encryptionKey interface{}) (recipientKeyInfo, error) { switch encryptionKey := encryptionKey.(type) { case *rsa.PublicKey: return newRSARecipient(alg, encryptionKey) case *ecdsa.PublicKey: return newECDHRecipient(alg, encryptionKey) case []byte: return newSymmetricRecipient(alg, encryptionKey) case string: return newSymmetricRecipient(alg, []byte(encryptionKey)) case *JSONWebKey: recipient, err := makeJWERecipient(alg, encryptionKey.Key) recipient.keyID = encryptionKey.KeyID return recipient, err } if encrypter, ok := encryptionKey.(OpaqueKeyEncrypter); ok { return newOpaqueKeyEncrypter(alg, encrypter) } return recipientKeyInfo{}, ErrUnsupportedKeyType } // newDecrypter creates an appropriate decrypter based on the key type func newDecrypter(decryptionKey interface{}) (keyDecrypter, error) { switch decryptionKey := decryptionKey.(type) { case *rsa.PrivateKey: return &rsaDecrypterSigner{ privateKey: decryptionKey, }, nil case *ecdsa.PrivateKey: return &ecDecrypterSigner{ privateKey: decryptionKey, }, nil case []byte: return &symmetricKeyCipher{ key: decryptionKey, }, nil case string: return &symmetricKeyCipher{ key: []byte(decryptionKey), }, nil case JSONWebKey: return newDecrypter(decryptionKey.Key) case *JSONWebKey: return newDecrypter(decryptionKey.Key) } if okd, ok := decryptionKey.(OpaqueKeyDecrypter); ok { return &opaqueKeyDecrypter{decrypter: okd}, nil } return nil, ErrUnsupportedKeyType } // Implementation of encrypt method producing a JWE object. func (ctx *genericEncrypter) Encrypt(plaintext []byte) (*JSONWebEncryption, error) { return ctx.EncryptWithAuthData(plaintext, nil) } // Implementation of encrypt method producing a JWE object. func (ctx *genericEncrypter) EncryptWithAuthData(plaintext, aad []byte) (*JSONWebEncryption, error) { obj := &JSONWebEncryption{} obj.aad = aad obj.protected = &rawHeader{} err := obj.protected.set(headerEncryption, ctx.contentAlg) if err != nil { return nil, err } obj.recipients = make([]recipientInfo, len(ctx.recipients)) if len(ctx.recipients) == 0 { return nil, fmt.Errorf("go-jose/go-jose: no recipients to encrypt to") } cek, headers, err := ctx.keyGenerator.genKey() if err != nil { return nil, err } obj.protected.merge(&headers) for i, info := range ctx.recipients { recipient, err := info.keyEncrypter.encryptKey(cek, info.keyAlg) if err != nil { return nil, err } err = recipient.header.set(headerAlgorithm, info.keyAlg) if err != nil { return nil, err } if info.keyID != "" { err = recipient.header.set(headerKeyID, info.keyID) if err != nil { return nil, err } } obj.recipients[i] = recipient } if len(ctx.recipients) == 1 { // Move per-recipient headers into main protected header if there's // only a single recipient. obj.protected.merge(obj.recipients[0].header) obj.recipients[0].header = nil } if ctx.compressionAlg != NONE { plaintext, err = compress(ctx.compressionAlg, plaintext) if err != nil { return nil, err } err = obj.protected.set(headerCompression, ctx.compressionAlg) if err != nil { return nil, err } } for k, v := range ctx.extraHeaders { b, err := json.Marshal(v) if err != nil { return nil, err } (*obj.protected)[k] = makeRawMessage(b) } authData := obj.computeAuthData() parts, err := ctx.cipher.encrypt(cek, authData, plaintext) if err != nil { return nil, err } obj.iv = parts.iv obj.ciphertext = parts.ciphertext obj.tag = parts.tag return obj, nil } func (ctx *genericEncrypter) Options() EncrypterOptions { return EncrypterOptions{ Compression: ctx.compressionAlg, ExtraHeaders: ctx.extraHeaders, } } // Decrypt and validate the object and return the plaintext. Note that this // function does not support multi-recipient, if you desire multi-recipient // decryption use DecryptMulti instead. func (obj JSONWebEncryption) Decrypt(decryptionKey interface{}) ([]byte, error) { headers := obj.mergedHeaders(nil) if len(obj.recipients) > 1 { return nil, errors.New("go-jose/go-jose: too many recipients in payload; expecting only one") } critical, err := headers.getCritical() if err != nil { return nil, fmt.Errorf("go-jose/go-jose: invalid crit header") } if len(critical) > 0 { return nil, fmt.Errorf("go-jose/go-jose: unsupported crit header") } key := tryJWKS(decryptionKey, obj.Header) decrypter, err := newDecrypter(key) if err != nil { return nil, err } cipher := getContentCipher(headers.getEncryption()) if cipher == nil { return nil, fmt.Errorf("go-jose/go-jose: unsupported enc value '%s'", string(headers.getEncryption())) } generator := randomKeyGenerator{ size: cipher.keySize(), } parts := &aeadParts{ iv: obj.iv, ciphertext: obj.ciphertext, tag: obj.tag, } authData := obj.computeAuthData() var plaintext []byte recipient := obj.recipients[0] recipientHeaders := obj.mergedHeaders(&recipient) cek, err := decrypter.decryptKey(recipientHeaders, &recipient, generator) if err == nil { // Found a valid CEK -- let's try to decrypt. plaintext, err = cipher.decrypt(cek, authData, parts) } if plaintext == nil { return nil, ErrCryptoFailure } // The "zip" header parameter may only be present in the protected header. if comp := obj.protected.getCompression(); comp != "" { plaintext, err = decompress(comp, plaintext) } return plaintext, err } // DecryptMulti decrypts and validates the object and returns the plaintexts, // with support for multiple recipients. It returns the index of the recipient // for which the decryption was successful, the merged headers for that recipient, // and the plaintext. func (obj JSONWebEncryption) DecryptMulti(decryptionKey interface{}) (int, Header, []byte, error) { globalHeaders := obj.mergedHeaders(nil) critical, err := globalHeaders.getCritical() if err != nil { return -1, Header{}, nil, fmt.Errorf("go-jose/go-jose: invalid crit header") } if len(critical) > 0 { return -1, Header{}, nil, fmt.Errorf("go-jose/go-jose: unsupported crit header") } key := tryJWKS(decryptionKey, obj.Header) decrypter, err := newDecrypter(key) if err != nil { return -1, Header{}, nil, err } encryption := globalHeaders.getEncryption() cipher := getContentCipher(encryption) if cipher == nil { return -1, Header{}, nil, fmt.Errorf("go-jose/go-jose: unsupported enc value '%s'", string(encryption)) } generator := randomKeyGenerator{ size: cipher.keySize(), } parts := &aeadParts{ iv: obj.iv, ciphertext: obj.ciphertext, tag: obj.tag, } authData := obj.computeAuthData() index := -1 var plaintext []byte var headers rawHeader for i, recipient := range obj.recipients { recipientHeaders := obj.mergedHeaders(&recipient) cek, err := decrypter.decryptKey(recipientHeaders, &recipient, generator) if err == nil { // Found a valid CEK -- let's try to decrypt. plaintext, err = cipher.decrypt(cek, authData, parts) if err == nil { index = i headers = recipientHeaders break } } } if plaintext == nil { return -1, Header{}, nil, ErrCryptoFailure } // The "zip" header parameter may only be present in the protected header. if comp := obj.protected.getCompression(); comp != "" { plaintext, _ = decompress(comp, plaintext) } sanitized, err := headers.sanitized() if err != nil { return -1, Header{}, nil, fmt.Errorf("go-jose/go-jose: failed to sanitize header: %v", err) } return index, sanitized, plaintext, err } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/doc.go ================================================ /*- * Copyright 2014 Square Inc. * * 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 jose aims to provide an implementation of the Javascript Object Signing and Encryption set of standards. It implements encryption and signing based on the JSON Web Encryption and JSON Web Signature standards, with optional JSON Web Token support available in a sub-package. The library supports both the compact and JWS/JWE JSON Serialization formats, and has optional support for multiple recipients. */ package jose ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/encoding.go ================================================ /*- * Copyright 2014 Square Inc. * * 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 jose import ( "bytes" "compress/flate" "encoding/base64" "encoding/binary" "io" "math/big" "strings" "unicode" "github.com/go-jose/go-jose/v3/json" ) // Helper function to serialize known-good objects. // Precondition: value is not a nil pointer. func mustSerializeJSON(value interface{}) []byte { out, err := json.Marshal(value) if err != nil { panic(err) } // We never want to serialize the top-level value "null," since it's not a // valid JOSE message. But if a caller passes in a nil pointer to this method, // MarshalJSON will happily serialize it as the top-level value "null". If // that value is then embedded in another operation, for instance by being // base64-encoded and fed as input to a signing algorithm // (https://github.com/go-jose/go-jose/issues/22), the result will be // incorrect. Because this method is intended for known-good objects, and a nil // pointer is not a known-good object, we are free to panic in this case. // Note: It's not possible to directly check whether the data pointed at by an // interface is a nil pointer, so we do this hacky workaround. // https://groups.google.com/forum/#!topic/golang-nuts/wnH302gBa4I if string(out) == "null" { panic("Tried to serialize a nil pointer.") } return out } // Strip all newlines and whitespace func stripWhitespace(data string) string { buf := strings.Builder{} buf.Grow(len(data)) for _, r := range data { if !unicode.IsSpace(r) { buf.WriteRune(r) } } return buf.String() } // Perform compression based on algorithm func compress(algorithm CompressionAlgorithm, input []byte) ([]byte, error) { switch algorithm { case DEFLATE: return deflate(input) default: return nil, ErrUnsupportedAlgorithm } } // Perform decompression based on algorithm func decompress(algorithm CompressionAlgorithm, input []byte) ([]byte, error) { switch algorithm { case DEFLATE: return inflate(input) default: return nil, ErrUnsupportedAlgorithm } } // Compress with DEFLATE func deflate(input []byte) ([]byte, error) { output := new(bytes.Buffer) // Writing to byte buffer, err is always nil writer, _ := flate.NewWriter(output, 1) _, _ = io.Copy(writer, bytes.NewBuffer(input)) err := writer.Close() return output.Bytes(), err } // Decompress with DEFLATE func inflate(input []byte) ([]byte, error) { output := new(bytes.Buffer) reader := flate.NewReader(bytes.NewBuffer(input)) _, err := io.Copy(output, reader) if err != nil { return nil, err } err = reader.Close() return output.Bytes(), err } // byteBuffer represents a slice of bytes that can be serialized to url-safe base64. type byteBuffer struct { data []byte } func newBuffer(data []byte) *byteBuffer { if data == nil { return nil } return &byteBuffer{ data: data, } } func newFixedSizeBuffer(data []byte, length int) *byteBuffer { if len(data) > length { panic("go-jose/go-jose: invalid call to newFixedSizeBuffer (len(data) > length)") } pad := make([]byte, length-len(data)) return newBuffer(append(pad, data...)) } func newBufferFromInt(num uint64) *byteBuffer { data := make([]byte, 8) binary.BigEndian.PutUint64(data, num) return newBuffer(bytes.TrimLeft(data, "\x00")) } func (b *byteBuffer) MarshalJSON() ([]byte, error) { return json.Marshal(b.base64()) } func (b *byteBuffer) UnmarshalJSON(data []byte) error { var encoded string err := json.Unmarshal(data, &encoded) if err != nil { return err } if encoded == "" { return nil } decoded, err := base64URLDecode(encoded) if err != nil { return err } *b = *newBuffer(decoded) return nil } func (b *byteBuffer) base64() string { return base64.RawURLEncoding.EncodeToString(b.data) } func (b *byteBuffer) bytes() []byte { // Handling nil here allows us to transparently handle nil slices when serializing. if b == nil { return nil } return b.data } func (b byteBuffer) bigInt() *big.Int { return new(big.Int).SetBytes(b.data) } func (b byteBuffer) toInt() int { return int(b.bigInt().Int64()) } // base64URLDecode is implemented as defined in https://www.rfc-editor.org/rfc/rfc7515.html#appendix-C func base64URLDecode(value string) ([]byte, error) { value = strings.TrimRight(value, "=") return base64.RawURLEncoding.DecodeString(value) } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/json/LICENSE ================================================ Copyright (c) 2012 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/json/README.md ================================================ # Safe JSON This repository contains a fork of the `encoding/json` package from Go 1.6. The following changes were made: * Object deserialization uses case-sensitive member name matching instead of [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html). This is to avoid differences in the interpretation of JOSE messages between go-jose and libraries written in other languages. * When deserializing a JSON object, we check for duplicate keys and reject the input whenever we detect a duplicate. Rather than trying to work with malformed data, we prefer to reject it right away. ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/json/decode.go ================================================ // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Represents JSON data structure using native Go types: booleans, floats, // strings, arrays, and maps. package json import ( "bytes" "encoding" "encoding/base64" "errors" "fmt" "math" "reflect" "runtime" "strconv" "unicode" "unicode/utf16" "unicode/utf8" ) // Unmarshal parses the JSON-encoded data and stores the result // in the value pointed to by v. // // Unmarshal uses the inverse of the encodings that // Marshal uses, allocating maps, slices, and pointers as necessary, // with the following additional rules: // // To unmarshal JSON into a pointer, Unmarshal first handles the case of // the JSON being the JSON literal null. In that case, Unmarshal sets // the pointer to nil. Otherwise, Unmarshal unmarshals the JSON into // the value pointed at by the pointer. If the pointer is nil, Unmarshal // allocates a new value for it to point to. // // To unmarshal JSON into a struct, Unmarshal matches incoming object // keys to the keys used by Marshal (either the struct field name or its tag), // preferring an exact match but also accepting a case-insensitive match. // Unmarshal will only set exported fields of the struct. // // To unmarshal JSON into an interface value, // Unmarshal stores one of these in the interface value: // // bool, for JSON booleans // float64, for JSON numbers // string, for JSON strings // []interface{}, for JSON arrays // map[string]interface{}, for JSON objects // nil for JSON null // // To unmarshal a JSON array into a slice, Unmarshal resets the slice length // to zero and then appends each element to the slice. // As a special case, to unmarshal an empty JSON array into a slice, // Unmarshal replaces the slice with a new empty slice. // // To unmarshal a JSON array into a Go array, Unmarshal decodes // JSON array elements into corresponding Go array elements. // If the Go array is smaller than the JSON array, // the additional JSON array elements are discarded. // If the JSON array is smaller than the Go array, // the additional Go array elements are set to zero values. // // To unmarshal a JSON object into a string-keyed map, Unmarshal first // establishes a map to use, If the map is nil, Unmarshal allocates a new map. // Otherwise Unmarshal reuses the existing map, keeping existing entries. // Unmarshal then stores key-value pairs from the JSON object into the map. // // If a JSON value is not appropriate for a given target type, // or if a JSON number overflows the target type, Unmarshal // skips that field and completes the unmarshaling as best it can. // If no more serious errors are encountered, Unmarshal returns // an UnmarshalTypeError describing the earliest such error. // // The JSON null value unmarshals into an interface, map, pointer, or slice // by setting that Go value to nil. Because null is often used in JSON to mean // ``not present,'' unmarshaling a JSON null into any other Go type has no effect // on the value and produces no error. // // When unmarshaling quoted strings, invalid UTF-8 or // invalid UTF-16 surrogate pairs are not treated as an error. // Instead, they are replaced by the Unicode replacement // character U+FFFD. // func Unmarshal(data []byte, v interface{}) error { // Check for well-formedness. // Avoids filling out half a data structure // before discovering a JSON syntax error. var d decodeState err := checkValid(data, &d.scan) if err != nil { return err } d.init(data) return d.unmarshal(v) } // Unmarshaler is the interface implemented by objects // that can unmarshal a JSON description of themselves. // The input can be assumed to be a valid encoding of // a JSON value. UnmarshalJSON must copy the JSON data // if it wishes to retain the data after returning. type Unmarshaler interface { UnmarshalJSON([]byte) error } // An UnmarshalTypeError describes a JSON value that was // not appropriate for a value of a specific Go type. type UnmarshalTypeError struct { Value string // description of JSON value - "bool", "array", "number -5" Type reflect.Type // type of Go value it could not be assigned to Offset int64 // error occurred after reading Offset bytes } func (e *UnmarshalTypeError) Error() string { return "json: cannot unmarshal " + e.Value + " into Go value of type " + e.Type.String() } // An UnmarshalFieldError describes a JSON object key that // led to an unexported (and therefore unwritable) struct field. // (No longer used; kept for compatibility.) type UnmarshalFieldError struct { Key string Type reflect.Type Field reflect.StructField } func (e *UnmarshalFieldError) Error() string { return "json: cannot unmarshal object key " + strconv.Quote(e.Key) + " into unexported field " + e.Field.Name + " of type " + e.Type.String() } // An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. // (The argument to Unmarshal must be a non-nil pointer.) type InvalidUnmarshalError struct { Type reflect.Type } func (e *InvalidUnmarshalError) Error() string { if e.Type == nil { return "json: Unmarshal(nil)" } if e.Type.Kind() != reflect.Ptr { return "json: Unmarshal(non-pointer " + e.Type.String() + ")" } return "json: Unmarshal(nil " + e.Type.String() + ")" } func (d *decodeState) unmarshal(v interface{}) (err error) { defer func() { if r := recover(); r != nil { if _, ok := r.(runtime.Error); ok { panic(r) } err = r.(error) } }() rv := reflect.ValueOf(v) if rv.Kind() != reflect.Ptr || rv.IsNil() { return &InvalidUnmarshalError{reflect.TypeOf(v)} } d.scan.reset() // We decode rv not rv.Elem because the Unmarshaler interface // test must be applied at the top level of the value. d.value(rv) return d.savedError } // A Number represents a JSON number literal. type Number string // String returns the literal text of the number. func (n Number) String() string { return string(n) } // Float64 returns the number as a float64. func (n Number) Float64() (float64, error) { return strconv.ParseFloat(string(n), 64) } // Int64 returns the number as an int64. func (n Number) Int64() (int64, error) { return strconv.ParseInt(string(n), 10, 64) } // isValidNumber reports whether s is a valid JSON number literal. func isValidNumber(s string) bool { // This function implements the JSON numbers grammar. // See https://tools.ietf.org/html/rfc7159#section-6 // and http://json.org/number.gif if s == "" { return false } // Optional - if s[0] == '-' { s = s[1:] if s == "" { return false } } // Digits switch { default: return false case s[0] == '0': s = s[1:] case '1' <= s[0] && s[0] <= '9': s = s[1:] for len(s) > 0 && '0' <= s[0] && s[0] <= '9' { s = s[1:] } } // . followed by 1 or more digits. if len(s) >= 2 && s[0] == '.' && '0' <= s[1] && s[1] <= '9' { s = s[2:] for len(s) > 0 && '0' <= s[0] && s[0] <= '9' { s = s[1:] } } // e or E followed by an optional - or + and // 1 or more digits. if len(s) >= 2 && (s[0] == 'e' || s[0] == 'E') { s = s[1:] if s[0] == '+' || s[0] == '-' { s = s[1:] if s == "" { return false } } for len(s) > 0 && '0' <= s[0] && s[0] <= '9' { s = s[1:] } } // Make sure we are at the end. return s == "" } type NumberUnmarshalType int const ( // unmarshal a JSON number into an interface{} as a float64 UnmarshalFloat NumberUnmarshalType = iota // unmarshal a JSON number into an interface{} as a `json.Number` UnmarshalJSONNumber // unmarshal a JSON number into an interface{} as a int64 // if value is an integer otherwise float64 UnmarshalIntOrFloat ) // decodeState represents the state while decoding a JSON value. type decodeState struct { data []byte off int // read offset in data scan scanner nextscan scanner // for calls to nextValue savedError error numberType NumberUnmarshalType } // errPhase is used for errors that should not happen unless // there is a bug in the JSON decoder or something is editing // the data slice while the decoder executes. var errPhase = errors.New("JSON decoder out of sync - data changing underfoot?") func (d *decodeState) init(data []byte) *decodeState { d.data = data d.off = 0 d.savedError = nil return d } // error aborts the decoding by panicking with err. func (d *decodeState) error(err error) { panic(err) } // saveError saves the first err it is called with, // for reporting at the end of the unmarshal. func (d *decodeState) saveError(err error) { if d.savedError == nil { d.savedError = err } } // next cuts off and returns the next full JSON value in d.data[d.off:]. // The next value is known to be an object or array, not a literal. func (d *decodeState) next() []byte { c := d.data[d.off] item, rest, err := nextValue(d.data[d.off:], &d.nextscan) if err != nil { d.error(err) } d.off = len(d.data) - len(rest) // Our scanner has seen the opening brace/bracket // and thinks we're still in the middle of the object. // invent a closing brace/bracket to get it out. if c == '{' { d.scan.step(&d.scan, '}') } else { d.scan.step(&d.scan, ']') } return item } // scanWhile processes bytes in d.data[d.off:] until it // receives a scan code not equal to op. // It updates d.off and returns the new scan code. func (d *decodeState) scanWhile(op int) int { var newOp int for { if d.off >= len(d.data) { newOp = d.scan.eof() d.off = len(d.data) + 1 // mark processed EOF with len+1 } else { c := d.data[d.off] d.off++ newOp = d.scan.step(&d.scan, c) } if newOp != op { break } } return newOp } // value decodes a JSON value from d.data[d.off:] into the value. // it updates d.off to point past the decoded value. func (d *decodeState) value(v reflect.Value) { if !v.IsValid() { _, rest, err := nextValue(d.data[d.off:], &d.nextscan) if err != nil { d.error(err) } d.off = len(d.data) - len(rest) // d.scan thinks we're still at the beginning of the item. // Feed in an empty string - the shortest, simplest value - // so that it knows we got to the end of the value. if d.scan.redo { // rewind. d.scan.redo = false d.scan.step = stateBeginValue } d.scan.step(&d.scan, '"') d.scan.step(&d.scan, '"') n := len(d.scan.parseState) if n > 0 && d.scan.parseState[n-1] == parseObjectKey { // d.scan thinks we just read an object key; finish the object d.scan.step(&d.scan, ':') d.scan.step(&d.scan, '"') d.scan.step(&d.scan, '"') d.scan.step(&d.scan, '}') } return } switch op := d.scanWhile(scanSkipSpace); op { default: d.error(errPhase) case scanBeginArray: d.array(v) case scanBeginObject: d.object(v) case scanBeginLiteral: d.literal(v) } } type unquotedValue struct{} // valueQuoted is like value but decodes a // quoted string literal or literal null into an interface value. // If it finds anything other than a quoted string literal or null, // valueQuoted returns unquotedValue{}. func (d *decodeState) valueQuoted() interface{} { switch op := d.scanWhile(scanSkipSpace); op { default: d.error(errPhase) case scanBeginArray: d.array(reflect.Value{}) case scanBeginObject: d.object(reflect.Value{}) case scanBeginLiteral: switch v := d.literalInterface().(type) { case nil, string: return v } } return unquotedValue{} } // indirect walks down v allocating pointers as needed, // until it gets to a non-pointer. // if it encounters an Unmarshaler, indirect stops and returns that. // if decodingNull is true, indirect stops at the last pointer so it can be set to nil. func (d *decodeState) indirect(v reflect.Value, decodingNull bool) (Unmarshaler, encoding.TextUnmarshaler, reflect.Value) { // If v is a named type and is addressable, // start with its address, so that if the type has pointer methods, // we find them. if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() { v = v.Addr() } for { // Load value from interface, but only if the result will be // usefully addressable. if v.Kind() == reflect.Interface && !v.IsNil() { e := v.Elem() if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) { v = e continue } } if v.Kind() != reflect.Ptr { break } if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() { break } if v.IsNil() { v.Set(reflect.New(v.Type().Elem())) } if v.Type().NumMethod() > 0 { if u, ok := v.Interface().(Unmarshaler); ok { return u, nil, reflect.Value{} } if u, ok := v.Interface().(encoding.TextUnmarshaler); ok { return nil, u, reflect.Value{} } } v = v.Elem() } return nil, nil, v } // array consumes an array from d.data[d.off-1:], decoding into the value v. // the first byte of the array ('[') has been read already. func (d *decodeState) array(v reflect.Value) { // Check for unmarshaler. u, ut, pv := d.indirect(v, false) if u != nil { d.off-- err := u.UnmarshalJSON(d.next()) if err != nil { d.error(err) } return } if ut != nil { d.saveError(&UnmarshalTypeError{"array", v.Type(), int64(d.off)}) d.off-- d.next() return } v = pv // Check type of target. switch v.Kind() { case reflect.Interface: if v.NumMethod() == 0 { // Decoding into nil interface? Switch to non-reflect code. v.Set(reflect.ValueOf(d.arrayInterface())) return } // Otherwise it's invalid. fallthrough default: d.saveError(&UnmarshalTypeError{"array", v.Type(), int64(d.off)}) d.off-- d.next() return case reflect.Array: case reflect.Slice: break } i := 0 for { // Look ahead for ] - can only happen on first iteration. op := d.scanWhile(scanSkipSpace) if op == scanEndArray { break } // Back up so d.value can have the byte we just read. d.off-- d.scan.undo(op) // Get element of array, growing if necessary. if v.Kind() == reflect.Slice { // Grow slice if necessary if i >= v.Cap() { newcap := v.Cap() + v.Cap()/2 if newcap < 4 { newcap = 4 } newv := reflect.MakeSlice(v.Type(), v.Len(), newcap) reflect.Copy(newv, v) v.Set(newv) } if i >= v.Len() { v.SetLen(i + 1) } } if i < v.Len() { // Decode into element. d.value(v.Index(i)) } else { // Ran out of fixed array: skip. d.value(reflect.Value{}) } i++ // Next token must be , or ]. op = d.scanWhile(scanSkipSpace) if op == scanEndArray { break } if op != scanArrayValue { d.error(errPhase) } } if i < v.Len() { if v.Kind() == reflect.Array { // Array. Zero the rest. z := reflect.Zero(v.Type().Elem()) for ; i < v.Len(); i++ { v.Index(i).Set(z) } } else { v.SetLen(i) } } if i == 0 && v.Kind() == reflect.Slice { v.Set(reflect.MakeSlice(v.Type(), 0, 0)) } } var nullLiteral = []byte("null") // object consumes an object from d.data[d.off-1:], decoding into the value v. // the first byte ('{') of the object has been read already. func (d *decodeState) object(v reflect.Value) { // Check for unmarshaler. u, ut, pv := d.indirect(v, false) if u != nil { d.off-- err := u.UnmarshalJSON(d.next()) if err != nil { d.error(err) } return } if ut != nil { d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)}) d.off-- d.next() // skip over { } in input return } v = pv // Decoding into nil interface? Switch to non-reflect code. if v.Kind() == reflect.Interface && v.NumMethod() == 0 { v.Set(reflect.ValueOf(d.objectInterface())) return } // Check type of target: struct or map[string]T switch v.Kind() { case reflect.Map: // map must have string kind t := v.Type() if t.Key().Kind() != reflect.String { d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)}) d.off-- d.next() // skip over { } in input return } if v.IsNil() { v.Set(reflect.MakeMap(t)) } case reflect.Struct: default: d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)}) d.off-- d.next() // skip over { } in input return } var mapElem reflect.Value keys := map[string]bool{} for { // Read opening " of string key or closing }. op := d.scanWhile(scanSkipSpace) if op == scanEndObject { // closing } - can only happen on first iteration. break } if op != scanBeginLiteral { d.error(errPhase) } // Read key. start := d.off - 1 op = d.scanWhile(scanContinue) item := d.data[start : d.off-1] key, ok := unquote(item) if !ok { d.error(errPhase) } // Check for duplicate keys. _, ok = keys[key] if !ok { keys[key] = true } else { d.error(fmt.Errorf("json: duplicate key '%s' in object", key)) } // Figure out field corresponding to key. var subv reflect.Value destring := false // whether the value is wrapped in a string to be decoded first if v.Kind() == reflect.Map { elemType := v.Type().Elem() if !mapElem.IsValid() { mapElem = reflect.New(elemType).Elem() } else { mapElem.Set(reflect.Zero(elemType)) } subv = mapElem } else { var f *field fields := cachedTypeFields(v.Type()) for i := range fields { ff := &fields[i] if bytes.Equal(ff.nameBytes, []byte(key)) { f = ff break } } if f != nil { subv = v destring = f.quoted for _, i := range f.index { if subv.Kind() == reflect.Ptr { if subv.IsNil() { subv.Set(reflect.New(subv.Type().Elem())) } subv = subv.Elem() } subv = subv.Field(i) } } } // Read : before value. if op == scanSkipSpace { op = d.scanWhile(scanSkipSpace) } if op != scanObjectKey { d.error(errPhase) } // Read value. if destring { switch qv := d.valueQuoted().(type) { case nil: d.literalStore(nullLiteral, subv, false) case string: d.literalStore([]byte(qv), subv, true) default: d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", subv.Type())) } } else { d.value(subv) } // Write value back to map; // if using struct, subv points into struct already. if v.Kind() == reflect.Map { kv := reflect.ValueOf(key).Convert(v.Type().Key()) v.SetMapIndex(kv, subv) } // Next token must be , or }. op = d.scanWhile(scanSkipSpace) if op == scanEndObject { break } if op != scanObjectValue { d.error(errPhase) } } } // literal consumes a literal from d.data[d.off-1:], decoding into the value v. // The first byte of the literal has been read already // (that's how the caller knows it's a literal). func (d *decodeState) literal(v reflect.Value) { // All bytes inside literal return scanContinue op code. start := d.off - 1 op := d.scanWhile(scanContinue) // Scan read one byte too far; back up. d.off-- d.scan.undo(op) d.literalStore(d.data[start:d.off], v, false) } // convertNumber converts the number literal s to a float64, int64 or a Number // depending on d.numberDecodeType. func (d *decodeState) convertNumber(s string) (interface{}, error) { switch d.numberType { case UnmarshalJSONNumber: return Number(s), nil case UnmarshalIntOrFloat: v, err := strconv.ParseInt(s, 10, 64) if err == nil { return v, nil } // tries to parse integer number in scientific notation f, err := strconv.ParseFloat(s, 64) if err != nil { return nil, &UnmarshalTypeError{"number " + s, reflect.TypeOf(0.0), int64(d.off)} } // if it has no decimal value use int64 if fi, fd := math.Modf(f); fd == 0.0 { return int64(fi), nil } return f, nil default: f, err := strconv.ParseFloat(s, 64) if err != nil { return nil, &UnmarshalTypeError{"number " + s, reflect.TypeOf(0.0), int64(d.off)} } return f, nil } } var numberType = reflect.TypeOf(Number("")) // literalStore decodes a literal stored in item into v. // // fromQuoted indicates whether this literal came from unwrapping a // string from the ",string" struct tag option. this is used only to // produce more helpful error messages. func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool) { // Check for unmarshaler. if len(item) == 0 { //Empty string given d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) return } wantptr := item[0] == 'n' // null u, ut, pv := d.indirect(v, wantptr) if u != nil { err := u.UnmarshalJSON(item) if err != nil { d.error(err) } return } if ut != nil { if item[0] != '"' { if fromQuoted { d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) } else { d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)}) } return } s, ok := unquoteBytes(item) if !ok { if fromQuoted { d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) } else { d.error(errPhase) } } err := ut.UnmarshalText(s) if err != nil { d.error(err) } return } v = pv switch c := item[0]; c { case 'n': // null switch v.Kind() { case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: v.Set(reflect.Zero(v.Type())) // otherwise, ignore null for primitives/string } case 't', 'f': // true, false value := c == 't' switch v.Kind() { default: if fromQuoted { d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) } else { d.saveError(&UnmarshalTypeError{"bool", v.Type(), int64(d.off)}) } case reflect.Bool: v.SetBool(value) case reflect.Interface: if v.NumMethod() == 0 { v.Set(reflect.ValueOf(value)) } else { d.saveError(&UnmarshalTypeError{"bool", v.Type(), int64(d.off)}) } } case '"': // string s, ok := unquoteBytes(item) if !ok { if fromQuoted { d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) } else { d.error(errPhase) } } switch v.Kind() { default: d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)}) case reflect.Slice: if v.Type().Elem().Kind() != reflect.Uint8 { d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)}) break } b := make([]byte, base64.StdEncoding.DecodedLen(len(s))) n, err := base64.StdEncoding.Decode(b, s) if err != nil { d.saveError(err) break } v.SetBytes(b[:n]) case reflect.String: v.SetString(string(s)) case reflect.Interface: if v.NumMethod() == 0 { v.Set(reflect.ValueOf(string(s))) } else { d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)}) } } default: // number if c != '-' && (c < '0' || c > '9') { if fromQuoted { d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) } else { d.error(errPhase) } } s := string(item) switch v.Kind() { default: if v.Kind() == reflect.String && v.Type() == numberType { v.SetString(s) if !isValidNumber(s) { d.error(fmt.Errorf("json: invalid number literal, trying to unmarshal %q into Number", item)) } break } if fromQuoted { d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) } else { d.error(&UnmarshalTypeError{"number", v.Type(), int64(d.off)}) } case reflect.Interface: n, err := d.convertNumber(s) if err != nil { d.saveError(err) break } if v.NumMethod() != 0 { d.saveError(&UnmarshalTypeError{"number", v.Type(), int64(d.off)}) break } v.Set(reflect.ValueOf(n)) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: n, err := strconv.ParseInt(s, 10, 64) if err != nil || v.OverflowInt(n) { d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)}) break } v.SetInt(n) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: n, err := strconv.ParseUint(s, 10, 64) if err != nil || v.OverflowUint(n) { d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)}) break } v.SetUint(n) case reflect.Float32, reflect.Float64: n, err := strconv.ParseFloat(s, v.Type().Bits()) if err != nil || v.OverflowFloat(n) { d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)}) break } v.SetFloat(n) } } } // The xxxInterface routines build up a value to be stored // in an empty interface. They are not strictly necessary, // but they avoid the weight of reflection in this common case. // valueInterface is like value but returns interface{} func (d *decodeState) valueInterface() interface{} { switch d.scanWhile(scanSkipSpace) { default: d.error(errPhase) panic("unreachable") case scanBeginArray: return d.arrayInterface() case scanBeginObject: return d.objectInterface() case scanBeginLiteral: return d.literalInterface() } } // arrayInterface is like array but returns []interface{}. func (d *decodeState) arrayInterface() []interface{} { var v = make([]interface{}, 0) for { // Look ahead for ] - can only happen on first iteration. op := d.scanWhile(scanSkipSpace) if op == scanEndArray { break } // Back up so d.value can have the byte we just read. d.off-- d.scan.undo(op) v = append(v, d.valueInterface()) // Next token must be , or ]. op = d.scanWhile(scanSkipSpace) if op == scanEndArray { break } if op != scanArrayValue { d.error(errPhase) } } return v } // objectInterface is like object but returns map[string]interface{}. func (d *decodeState) objectInterface() map[string]interface{} { m := make(map[string]interface{}) keys := map[string]bool{} for { // Read opening " of string key or closing }. op := d.scanWhile(scanSkipSpace) if op == scanEndObject { // closing } - can only happen on first iteration. break } if op != scanBeginLiteral { d.error(errPhase) } // Read string key. start := d.off - 1 op = d.scanWhile(scanContinue) item := d.data[start : d.off-1] key, ok := unquote(item) if !ok { d.error(errPhase) } // Check for duplicate keys. _, ok = keys[key] if !ok { keys[key] = true } else { d.error(fmt.Errorf("json: duplicate key '%s' in object", key)) } // Read : before value. if op == scanSkipSpace { op = d.scanWhile(scanSkipSpace) } if op != scanObjectKey { d.error(errPhase) } // Read value. m[key] = d.valueInterface() // Next token must be , or }. op = d.scanWhile(scanSkipSpace) if op == scanEndObject { break } if op != scanObjectValue { d.error(errPhase) } } return m } // literalInterface is like literal but returns an interface value. func (d *decodeState) literalInterface() interface{} { // All bytes inside literal return scanContinue op code. start := d.off - 1 op := d.scanWhile(scanContinue) // Scan read one byte too far; back up. d.off-- d.scan.undo(op) item := d.data[start:d.off] switch c := item[0]; c { case 'n': // null return nil case 't', 'f': // true, false return c == 't' case '"': // string s, ok := unquote(item) if !ok { d.error(errPhase) } return s default: // number if c != '-' && (c < '0' || c > '9') { d.error(errPhase) } n, err := d.convertNumber(string(item)) if err != nil { d.saveError(err) } return n } } // getu4 decodes \uXXXX from the beginning of s, returning the hex value, // or it returns -1. func getu4(s []byte) rune { if len(s) < 6 || s[0] != '\\' || s[1] != 'u' { return -1 } r, err := strconv.ParseUint(string(s[2:6]), 16, 64) if err != nil { return -1 } return rune(r) } // unquote converts a quoted JSON string literal s into an actual string t. // The rules are different than for Go, so cannot use strconv.Unquote. func unquote(s []byte) (t string, ok bool) { s, ok = unquoteBytes(s) t = string(s) return } func unquoteBytes(s []byte) (t []byte, ok bool) { if len(s) < 2 || s[0] != '"' || s[len(s)-1] != '"' { return } s = s[1 : len(s)-1] // Check for unusual characters. If there are none, // then no unquoting is needed, so return a slice of the // original bytes. r := 0 for r < len(s) { c := s[r] if c == '\\' || c == '"' || c < ' ' { break } if c < utf8.RuneSelf { r++ continue } rr, size := utf8.DecodeRune(s[r:]) if rr == utf8.RuneError && size == 1 { break } r += size } if r == len(s) { return s, true } b := make([]byte, len(s)+2*utf8.UTFMax) w := copy(b, s[0:r]) for r < len(s) { // Out of room? Can only happen if s is full of // malformed UTF-8 and we're replacing each // byte with RuneError. if w >= len(b)-2*utf8.UTFMax { nb := make([]byte, (len(b)+utf8.UTFMax)*2) copy(nb, b[0:w]) b = nb } switch c := s[r]; { case c == '\\': r++ if r >= len(s) { return } switch s[r] { default: return case '"', '\\', '/', '\'': b[w] = s[r] r++ w++ case 'b': b[w] = '\b' r++ w++ case 'f': b[w] = '\f' r++ w++ case 'n': b[w] = '\n' r++ w++ case 'r': b[w] = '\r' r++ w++ case 't': b[w] = '\t' r++ w++ case 'u': r-- rr := getu4(s[r:]) if rr < 0 { return } r += 6 if utf16.IsSurrogate(rr) { rr1 := getu4(s[r:]) if dec := utf16.DecodeRune(rr, rr1); dec != unicode.ReplacementChar { // A valid pair; consume. r += 6 w += utf8.EncodeRune(b[w:], dec) break } // Invalid surrogate; fall back to replacement rune. rr = unicode.ReplacementChar } w += utf8.EncodeRune(b[w:], rr) } // Quote, control characters are invalid. case c == '"', c < ' ': return // ASCII case c < utf8.RuneSelf: b[w] = c r++ w++ // Coerce to well-formed UTF-8. default: rr, size := utf8.DecodeRune(s[r:]) r += size w += utf8.EncodeRune(b[w:], rr) } } return b[0:w], true } ================================================ FILE: vendor/github.com/go-jose/go-jose/v3/json/encode.go ================================================ // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package json implements encoding and decoding of JSON objects as defined in // RFC 4627. The mapping between JSON objects and Go values is described // in the documentation for the Marshal and Unmarshal functions. // // See "JSON and Go" for an introduction to this package: // https://golang.org/doc/articles/json_and_go.html package json import ( "bytes" "encoding" "encoding/base64" "fmt" "math" "reflect" "runtime" "sort" "strconv" "strings" "sync" "unicode" "unicode/utf8" ) // Marshal returns the JSON encoding of v. // // Marshal traverses the value v recursively. // If an encountered value implements the Marshaler interface // and is not a nil pointer, Marshal calls its MarshalJSON method // to produce JSON. If no MarshalJSON method is present but the // value implements encoding.TextMarshaler instead, Marshal calls // its MarshalText method. // The nil pointer exception is not strictly necessary // but mimics a similar, necessary exception in the behavior of // UnmarshalJSON. // // Otherwise, Marshal uses the following type-dependent default encodings: // // Boolean values encode as JSON booleans. // // Floating point, integer, and Number values encode as JSON numbers. // // String values encode as JSON strings coerced to valid UTF-8, // replacing invalid bytes with the Unicode replacement rune. // The angle brackets "<" and ">" are escaped to "\u003c" and "\u003e" // to keep some browsers from misinterpreting JSON output as HTML. // Ampersand "&" is also escaped to "\u0026" for the same reason. // // Array and slice values encode as JSON arrays, except that // []byte encodes as a base64-encoded string, and a nil slice // encodes as the null JSON object. // // Struct values encode as JSON objects. Each exported struct field // becomes a member of the object unless // - the field's tag is "-", or // - the field is empty and its tag specifies the "omitempty" option. // The empty values are false, 0, any // nil pointer or interface value, and any array, slice, map, or string of // length zero. The object's default key string is the struct field name // but can be specified in the struct field's tag value. The "json" key in // the struct field's tag value is the key name, followed by an optional comma // and options. Examples: // // // Field is ignored by this package. // Field int `json:"-"` // // // Field appears in JSON as key "myName". // Field int `json:"myName"` // // // Field appears in JSON as key "myName" and // // the field is omitted from the object if its value is empty, // // as defined above. // Field int `json:"myName,omitempty"` // // // Field appears in JSON as key "Field" (the default), but // // the field is skipped if empty. // // Note the leading comma. // Field int `json:",omitempty"` // // The "string" option signals that a field is stored as JSON inside a // JSON-encoded string. It applies only to fields of string, floating point, // integer, or boolean types. This extra level of encoding is sometimes used // when communicating with JavaScript programs: // // Int64String int64 `json:",string"` // // The key name will be used if it's a non-empty string consisting of // only Unicode letters, digits, dollar signs, percent signs, hyphens, // underscores and slashes. // // Anonymous struct fields are usually marshaled as if their inner exported fields // were fields in the outer struct, subject to the usual Go visibility rules amended // as described in the next paragraph. // An anonymous struct field with a name given in its JSON tag is treated as // having that name, rather than being anonymous. // An anonymous struct field of interface type is treated the same as having // that type as its name, rather than being anonymous. // // The Go visibility rules for struct fields are amended for JSON when // deciding which field to marshal or unmarshal. If there are // multiple fields at the same level, and that level is the least // nested (and would therefore be the nesting level selected by the // usual Go rules), the following extra rules apply: // // 1) Of those fields, if any are JSON-tagged, only tagged fields are considered, // even if there are multiple untagged fields that would otherwise conflict. // 2) If there is exactly one field (tagged or not according to the first rule), that is selected. // 3) Otherwise there are multiple fields, and all are ignored; no error occurs. // // Handling of anonymous struct fields is new in Go 1.1. // Prior to Go 1.1, anonymous struct fields were ignored. To force ignoring of // an anonymous struct field in both current and earlier versions, give the field // a JSON tag of "-". // // Map values encode as JSON objects. // The map's key type must be string; the map keys are used as JSON object // keys, subject to the UTF-8 coercion described for string values above. // // Pointer values encode as the value pointed to. // A nil pointer encodes as the null JSON object. // // Interface values encode as the value contained in the interface. // A nil interface value encodes as the null JSON object. // // Channel, complex, and function values cannot be encoded in JSON. // Attempting to encode such a value causes Marshal to return // an UnsupportedTypeError. // // JSON cannot represent cyclic data structures and Marshal does not // handle them. Passing cyclic structures to Marshal will result in // an infinite recursion. // func Marshal(v interface{}) ([]byte, error) { e := &encodeState{} err := e.marshal(v) if err != nil { return nil, err } return e.Bytes(), nil } // MarshalIndent is like Marshal but applies Indent to format the output. func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { b, err := Marshal(v) if err != nil { return nil, err } var buf bytes.Buffer err = Indent(&buf, b, prefix, indent) if err != nil { return nil, err } return buf.Bytes(), nil } // HTMLEscape appends to dst the JSON-encoded src with <, >, &, U+2028 and U+2029 // characters inside string literals changed to \u003c, \u003e, \u0026, \u2028, \u2029 // so that the JSON will be safe to embed inside HTML