From 1d8fb3bda76e7fa0373768c10f90aa2aa5281e4a Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Mon, 12 Feb 2024 19:14:12 +0000 Subject: [PATCH] Regenerated Clients --- .../0e0d89e9762a4481a49b51cf40bd8954.json | 8 ++ .../2e65f90bad934fc98651c01c90afbd86.json | 8 ++ .../45b7ab4cbf3149a7832a081ee0d3285e.json | 8 ++ .../5e6c21239816428991d0020ab0aad084.json | 8 ++ service/appsync/api_op_CreateApiCache.go | 10 ++ service/appsync/api_op_CreateDataSource.go | 8 ++ service/appsync/api_op_CreateGraphqlApi.go | 3 + service/appsync/api_op_CreateResolver.go | 7 ++ service/appsync/api_op_UpdateApiCache.go | 10 ++ service/appsync/api_op_UpdateDataSource.go | 8 ++ service/appsync/api_op_UpdateGraphqlApi.go | 3 + service/appsync/api_op_UpdateResolver.go | 7 ++ service/appsync/deserializers.go | 99 +++++++++++++++ service/appsync/serializers.go | 66 ++++++++++ service/appsync/types/enums.go | 111 ++++++++++++++++ service/appsync/types/types.go | 119 ++++++++++++++++++ service/appsync/validators.go | 31 +++++ service/cloudwatch/api_client.go | 20 +-- service/cloudwatch/api_op_PutMetricData.go | 11 ++ service/cloudwatch/options.go | 7 ++ service/neptunegraph/api_op_CreateGraph.go | 4 +- .../api_op_CreateGraphUsingImportTask.go | 2 +- service/neptunegraph/api_op_ExecuteQuery.go | 20 ++- service/neptunegraph/api_op_GetQuery.go | 4 +- .../api_op_RestoreGraphFromSnapshot.go | 2 +- service/neptunegraph/api_op_UpdateGraph.go | 2 +- service/neptunegraph/document/doc.go | 66 ++++++++++ service/neptunegraph/document/document.go | 34 +++++ service/neptunegraph/generated.json | 4 + .../internal/document/document.go | 99 +++++++++++++++ .../internal/document/document_test.go | 11 ++ service/neptunegraph/serializers.go | 40 ++++++ .../api_op_CheckDomainAvailability.go | 14 ++- .../route53domains/api_op_GetDomainDetail.go | 31 ++--- .../route53domains/api_op_RegisterDomain.go | 40 +++--- .../route53domains/api_op_TransferDomain.go | 35 ++++-- .../api_op_UpdateDomainContact.go | 3 + .../api_op_UpdateDomainContactPrivacy.go | 33 ++--- service/route53domains/deserializers.go | 14 +++ service/route53domains/endpoints.go | 2 +- service/route53domains/serializers.go | 36 ++++++ service/route53domains/types/enums.go | 8 ++ service/route53domains/types/types.go | 2 +- service/route53domains/validators.go | 15 +++ 44 files changed, 992 insertions(+), 81 deletions(-) create mode 100644 .changelog/0e0d89e9762a4481a49b51cf40bd8954.json create mode 100644 .changelog/2e65f90bad934fc98651c01c90afbd86.json create mode 100644 .changelog/45b7ab4cbf3149a7832a081ee0d3285e.json create mode 100644 .changelog/5e6c21239816428991d0020ab0aad084.json create mode 100644 service/neptunegraph/document/doc.go create mode 100644 service/neptunegraph/document/document.go create mode 100644 service/neptunegraph/internal/document/document.go create mode 100644 service/neptunegraph/internal/document/document_test.go diff --git a/.changelog/0e0d89e9762a4481a49b51cf40bd8954.json b/.changelog/0e0d89e9762a4481a49b51cf40bd8954.json new file mode 100644 index 00000000000..0b15082ba16 --- /dev/null +++ b/.changelog/0e0d89e9762a4481a49b51cf40bd8954.json @@ -0,0 +1,8 @@ +{ + "id": "0e0d89e9-762a-4481-a49b-51cf40bd8954", + "type": "feature", + "description": "Adds support for new options on GraphqlAPIs, Resolvers and Data Sources for emitting Amazon CloudWatch metrics for enhanced monitoring of AppSync APIs.", + "modules": [ + "service/appsync" + ] +} \ No newline at end of file diff --git a/.changelog/2e65f90bad934fc98651c01c90afbd86.json b/.changelog/2e65f90bad934fc98651c01c90afbd86.json new file mode 100644 index 00000000000..69de4dfb2ce --- /dev/null +++ b/.changelog/2e65f90bad934fc98651c01c90afbd86.json @@ -0,0 +1,8 @@ +{ + "id": "2e65f90b-ad93-4fc9-8651-c01c90afbd86", + "type": "feature", + "description": "This release enables PutMetricData API request payload compression by default.", + "modules": [ + "service/cloudwatch" + ] +} \ No newline at end of file diff --git a/.changelog/45b7ab4cbf3149a7832a081ee0d3285e.json b/.changelog/45b7ab4cbf3149a7832a081ee0d3285e.json new file mode 100644 index 00000000000..acf55709d70 --- /dev/null +++ b/.changelog/45b7ab4cbf3149a7832a081ee0d3285e.json @@ -0,0 +1,8 @@ +{ + "id": "45b7ab4c-bf31-49a7-832a-081ee0d3285e", + "type": "feature", + "description": "Adding a new option \"parameters\" for data plane api ExecuteQuery to support running parameterized query via SDK.", + "modules": [ + "service/neptunegraph" + ] +} \ No newline at end of file diff --git a/.changelog/5e6c21239816428991d0020ab0aad084.json b/.changelog/5e6c21239816428991d0020ab0aad084.json new file mode 100644 index 00000000000..ae3dd06d0d7 --- /dev/null +++ b/.changelog/5e6c21239816428991d0020ab0aad084.json @@ -0,0 +1,8 @@ +{ + "id": "5e6c2123-9816-4289-91d0-020ab0aad084", + "type": "feature", + "description": "This release adds bill contact support for RegisterDomain, TransferDomain, UpdateDomainContact and GetDomainDetail API.", + "modules": [ + "service/route53domains" + ] +} \ No newline at end of file diff --git a/service/appsync/api_op_CreateApiCache.go b/service/appsync/api_op_CreateApiCache.go index 2b3f34d990a..f884d82aa12 100644 --- a/service/appsync/api_op_CreateApiCache.go +++ b/service/appsync/api_op_CreateApiCache.go @@ -75,6 +75,16 @@ type CreateApiCacheInput struct { // creation. AtRestEncryptionEnabled bool + // Controls how cache health metrics will be emitted to CloudWatch. Cache health + // metrics include: + // - NetworkBandwidthOutAllowanceExceeded: The number of times a specified + // GraphQL operation was called. + // - EngineCPUUtilization: The number of GraphQL errors that occurred during a + // specified GraphQL operation. + // Metrics will be recorded by API ID. You can set the value to ENABLED or DISABLED + // . + HealthMetricsConfig types.CacheHealthMetricsConfig + // Transit encryption flag when connecting to cache. You cannot update this // setting after creation. TransitEncryptionEnabled bool diff --git a/service/appsync/api_op_CreateDataSource.go b/service/appsync/api_op_CreateDataSource.go index cea3261fe49..1f43aa45238 100644 --- a/service/appsync/api_op_CreateDataSource.go +++ b/service/appsync/api_op_CreateDataSource.go @@ -66,6 +66,14 @@ type CreateDataSourceInput struct { // Lambda settings. LambdaConfig *types.LambdaDataSourceConfig + // Enables or disables enhanced data source metrics for specified data sources. + // Note that metricsConfig won't be used unless the dataSourceLevelMetricsBehavior + // value is set to PER_DATA_SOURCE_METRICS . If the dataSourceLevelMetricsBehavior + // is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be + // ignored. However, you can still set its value. metricsConfig can be ENABLED or + // DISABLED . + MetricsConfig types.DataSourceLevelMetricsConfig + // Amazon OpenSearch Service settings. OpenSearchServiceConfig *types.OpenSearchServiceDataSourceConfig diff --git a/service/appsync/api_op_CreateGraphqlApi.go b/service/appsync/api_op_CreateGraphqlApi.go index 219f0ffb48d..320005d8720 100644 --- a/service/appsync/api_op_CreateGraphqlApi.go +++ b/service/appsync/api_op_CreateGraphqlApi.go @@ -48,6 +48,9 @@ type CreateGraphqlApiInput struct { // or merged API ( MERGED ). ApiType types.GraphQLApiType + // The enhancedMetricsConfig object. + EnhancedMetricsConfig *types.EnhancedMetricsConfig + // Sets the value of the GraphQL API to enable ( ENABLED ) or disable ( DISABLED ) // introspection. If no value is provided, the introspection configuration will be // set to ENABLED by default. This field will produce an error if the operation diff --git a/service/appsync/api_op_CreateResolver.go b/service/appsync/api_op_CreateResolver.go index 05fc3d2f056..937c6be7ce5 100644 --- a/service/appsync/api_op_CreateResolver.go +++ b/service/appsync/api_op_CreateResolver.go @@ -69,6 +69,13 @@ type CreateResolverInput struct { // The maximum batching size for a resolver. MaxBatchSize int32 + // Enables or disables enhanced resolver metrics for specified resolvers. Note + // that metricsConfig won't be used unless the resolverLevelMetricsBehavior value + // is set to PER_RESOLVER_METRICS . If the resolverLevelMetricsBehavior is set to + // FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will be ignored. However, + // you can still set its value. metricsConfig can be ENABLED or DISABLED . + MetricsConfig types.ResolverLevelMetricsConfig + // The PipelineConfig . PipelineConfig *types.PipelineConfig diff --git a/service/appsync/api_op_UpdateApiCache.go b/service/appsync/api_op_UpdateApiCache.go index d37ff1c5971..bf12136ffa8 100644 --- a/service/appsync/api_op_UpdateApiCache.go +++ b/service/appsync/api_op_UpdateApiCache.go @@ -71,6 +71,16 @@ type UpdateApiCacheInput struct { // This member is required. Type types.ApiCacheType + // Controls how cache health metrics will be emitted to CloudWatch. Cache health + // metrics include: + // - NetworkBandwidthOutAllowanceExceeded: The number of times a specified + // GraphQL operation was called. + // - EngineCPUUtilization: The number of GraphQL errors that occurred during a + // specified GraphQL operation. + // Metrics will be recorded by API ID. You can set the value to ENABLED or DISABLED + // . + HealthMetricsConfig types.CacheHealthMetricsConfig + noSmithyDocumentSerde } diff --git a/service/appsync/api_op_UpdateDataSource.go b/service/appsync/api_op_UpdateDataSource.go index 28fb739038e..d4a65654206 100644 --- a/service/appsync/api_op_UpdateDataSource.go +++ b/service/appsync/api_op_UpdateDataSource.go @@ -66,6 +66,14 @@ type UpdateDataSourceInput struct { // The new Lambda configuration. LambdaConfig *types.LambdaDataSourceConfig + // Enables or disables enhanced data source metrics for specified data sources. + // Note that metricsConfig won't be used unless the dataSourceLevelMetricsBehavior + // value is set to PER_DATA_SOURCE_METRICS . If the dataSourceLevelMetricsBehavior + // is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be + // ignored. However, you can still set its value. metricsConfig can be ENABLED or + // DISABLED . + MetricsConfig types.DataSourceLevelMetricsConfig + // The new OpenSearch configuration. OpenSearchServiceConfig *types.OpenSearchServiceDataSourceConfig diff --git a/service/appsync/api_op_UpdateGraphqlApi.go b/service/appsync/api_op_UpdateGraphqlApi.go index 4a8cdb2b96f..9edcc5aecd1 100644 --- a/service/appsync/api_op_UpdateGraphqlApi.go +++ b/service/appsync/api_op_UpdateGraphqlApi.go @@ -46,6 +46,9 @@ type UpdateGraphqlApiInput struct { // The new authentication type for the GraphqlApi object. AuthenticationType types.AuthenticationType + // The enhancedMetricsConfig object. + EnhancedMetricsConfig *types.EnhancedMetricsConfig + // Sets the value of the GraphQL API to enable ( ENABLED ) or disable ( DISABLED ) // introspection. If no value is provided, the introspection configuration will be // set to ENABLED by default. This field will produce an error if the operation diff --git a/service/appsync/api_op_UpdateResolver.go b/service/appsync/api_op_UpdateResolver.go index 3d2553da076..2c07df8eb6f 100644 --- a/service/appsync/api_op_UpdateResolver.go +++ b/service/appsync/api_op_UpdateResolver.go @@ -67,6 +67,13 @@ type UpdateResolverInput struct { // The maximum batching size for a resolver. MaxBatchSize int32 + // Enables or disables enhanced resolver metrics for specified resolvers. Note + // that metricsConfig won't be used unless the resolverLevelMetricsBehavior value + // is set to PER_RESOLVER_METRICS . If the resolverLevelMetricsBehavior is set to + // FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will be ignored. However, + // you can still set its value. metricsConfig can be ENABLED or DISABLED . + MetricsConfig types.ResolverLevelMetricsConfig + // The PipelineConfig . PipelineConfig *types.PipelineConfig diff --git a/service/appsync/deserializers.go b/service/appsync/deserializers.go index 7c66bbede64..92e74ffdd73 100644 --- a/service/appsync/deserializers.go +++ b/service/appsync/deserializers.go @@ -1233,6 +1233,9 @@ func awsRestjson1_deserializeOpErrorCreateFunction(response *smithyhttp.Response } switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) @@ -2218,6 +2221,9 @@ func awsRestjson1_deserializeOpErrorDeleteFunction(response *smithyhttp.Response } switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) @@ -8826,6 +8832,9 @@ func awsRestjson1_deserializeOpErrorUpdateFunction(response *smithyhttp.Response } switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) @@ -10155,6 +10164,15 @@ func awsRestjson1_deserializeDocumentApiCache(v **types.ApiCache, value interfac sv.AtRestEncryptionEnabled = jtv } + case "healthMetricsConfig": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CacheHealthMetricsConfig to be of type string, got %T instead", value) + } + sv.HealthMetricsConfig = types.CacheHealthMetricsConfig(jtv) + } + case "status": if value != nil { jtv, ok := value.(string) @@ -11072,6 +11090,15 @@ func awsRestjson1_deserializeDocumentDataSource(v **types.DataSource, value inte return err } + case "metricsConfig": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataSourceLevelMetricsConfig to be of type string, got %T instead", value) + } + sv.MetricsConfig = types.DataSourceLevelMetricsConfig(jtv) + } + case "name": if value != nil { jtv, ok := value.(string) @@ -11894,6 +11921,64 @@ func awsRestjson1_deserializeDocumentElasticsearchDataSourceConfig(v **types.Ela return nil } +func awsRestjson1_deserializeDocumentEnhancedMetricsConfig(v **types.EnhancedMetricsConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnhancedMetricsConfig + if *v == nil { + sv = &types.EnhancedMetricsConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dataSourceLevelMetricsBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataSourceLevelMetricsBehavior to be of type string, got %T instead", value) + } + sv.DataSourceLevelMetricsBehavior = types.DataSourceLevelMetricsBehavior(jtv) + } + + case "operationLevelMetricsConfig": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperationLevelMetricsConfig to be of type string, got %T instead", value) + } + sv.OperationLevelMetricsConfig = types.OperationLevelMetricsConfig(jtv) + } + + case "resolverLevelMetricsBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResolverLevelMetricsBehavior to be of type string, got %T instead", value) + } + sv.ResolverLevelMetricsBehavior = types.ResolverLevelMetricsBehavior(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentEnvironmentVariableMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12328,6 +12413,11 @@ func awsRestjson1_deserializeDocumentGraphqlApi(v **types.GraphqlApi, value inte return err } + case "enhancedMetricsConfig": + if err := awsRestjson1_deserializeDocumentEnhancedMetricsConfig(&sv.EnhancedMetricsConfig, value); err != nil { + return err + } + case "introspectionConfig": if value != nil { jtv, ok := value.(string) @@ -13333,6 +13423,15 @@ func awsRestjson1_deserializeDocumentResolver(v **types.Resolver, value interfac sv.MaxBatchSize = int32(i64) } + case "metricsConfig": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResolverLevelMetricsConfig to be of type string, got %T instead", value) + } + sv.MetricsConfig = types.ResolverLevelMetricsConfig(jtv) + } + case "pipelineConfig": if err := awsRestjson1_deserializeDocumentPipelineConfig(&sv.PipelineConfig, value); err != nil { return err diff --git a/service/appsync/serializers.go b/service/appsync/serializers.go index 6177606d87c..17eaef52077 100644 --- a/service/appsync/serializers.go +++ b/service/appsync/serializers.go @@ -392,6 +392,11 @@ func awsRestjson1_serializeOpDocumentCreateApiCacheInput(v *CreateApiCacheInput, ok.Boolean(v.AtRestEncryptionEnabled) } + if len(v.HealthMetricsConfig) > 0 { + ok := object.Key("healthMetricsConfig") + ok.String(string(v.HealthMetricsConfig)) + } + if v.TransitEncryptionEnabled { ok := object.Key("transitEncryptionEnabled") ok.Boolean(v.TransitEncryptionEnabled) @@ -623,6 +628,11 @@ func awsRestjson1_serializeOpDocumentCreateDataSourceInput(v *CreateDataSourceIn } } + if len(v.MetricsConfig) > 0 { + ok := object.Key("metricsConfig") + ok.String(string(v.MetricsConfig)) + } + if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) @@ -961,6 +971,13 @@ func awsRestjson1_serializeOpDocumentCreateGraphqlApiInput(v *CreateGraphqlApiIn ok.String(string(v.AuthenticationType)) } + if v.EnhancedMetricsConfig != nil { + ok := object.Key("enhancedMetricsConfig") + if err := awsRestjson1_serializeDocumentEnhancedMetricsConfig(v.EnhancedMetricsConfig, ok); err != nil { + return err + } + } + if len(v.IntrospectionConfig) > 0 { ok := object.Key("introspectionConfig") ok.String(string(v.IntrospectionConfig)) @@ -1160,6 +1177,11 @@ func awsRestjson1_serializeOpDocumentCreateResolverInput(v *CreateResolverInput, ok.Integer(v.MaxBatchSize) } + if len(v.MetricsConfig) > 0 { + ok := object.Key("metricsConfig") + ok.String(string(v.MetricsConfig)) + } + if v.PipelineConfig != nil { ok := object.Key("pipelineConfig") if err := awsRestjson1_serializeDocumentPipelineConfig(v.PipelineConfig, ok); err != nil { @@ -4629,6 +4651,11 @@ func awsRestjson1_serializeOpDocumentUpdateApiCacheInput(v *UpdateApiCacheInput, ok.String(string(v.ApiCachingBehavior)) } + if len(v.HealthMetricsConfig) > 0 { + ok := object.Key("healthMetricsConfig") + ok.String(string(v.HealthMetricsConfig)) + } + { ok := object.Key("ttl") ok.Long(v.Ttl) @@ -4873,6 +4900,11 @@ func awsRestjson1_serializeOpDocumentUpdateDataSourceInput(v *UpdateDataSourceIn } } + if len(v.MetricsConfig) > 0 { + ok := object.Key("metricsConfig") + ok.String(string(v.MetricsConfig)) + } + if v.OpenSearchServiceConfig != nil { ok := object.Key("openSearchServiceConfig") if err := awsRestjson1_serializeDocumentOpenSearchServiceDataSourceConfig(v.OpenSearchServiceConfig, ok); err != nil { @@ -5226,6 +5258,13 @@ func awsRestjson1_serializeOpDocumentUpdateGraphqlApiInput(v *UpdateGraphqlApiIn ok.String(string(v.AuthenticationType)) } + if v.EnhancedMetricsConfig != nil { + ok := object.Key("enhancedMetricsConfig") + if err := awsRestjson1_serializeDocumentEnhancedMetricsConfig(v.EnhancedMetricsConfig, ok); err != nil { + return err + } + } + if len(v.IntrospectionConfig) > 0 { ok := object.Key("introspectionConfig") ok.String(string(v.IntrospectionConfig)) @@ -5417,6 +5456,11 @@ func awsRestjson1_serializeOpDocumentUpdateResolverInput(v *UpdateResolverInput, ok.Integer(v.MaxBatchSize) } + if len(v.MetricsConfig) > 0 { + ok := object.Key("metricsConfig") + ok.String(string(v.MetricsConfig)) + } + if v.PipelineConfig != nil { ok := object.Key("pipelineConfig") if err := awsRestjson1_serializeDocumentPipelineConfig(v.PipelineConfig, ok); err != nil { @@ -5881,6 +5925,28 @@ func awsRestjson1_serializeDocumentElasticsearchDataSourceConfig(v *types.Elasti return nil } +func awsRestjson1_serializeDocumentEnhancedMetricsConfig(v *types.EnhancedMetricsConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DataSourceLevelMetricsBehavior) > 0 { + ok := object.Key("dataSourceLevelMetricsBehavior") + ok.String(string(v.DataSourceLevelMetricsBehavior)) + } + + if len(v.OperationLevelMetricsConfig) > 0 { + ok := object.Key("operationLevelMetricsConfig") + ok.String(string(v.OperationLevelMetricsConfig)) + } + + if len(v.ResolverLevelMetricsBehavior) > 0 { + ok := object.Key("resolverLevelMetricsBehavior") + ok.String(string(v.ResolverLevelMetricsBehavior)) + } + + return nil +} + func awsRestjson1_serializeDocumentEnvironmentVariableMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/appsync/types/enums.go b/service/appsync/types/enums.go index d91063d173e..c2b1aa82451 100644 --- a/service/appsync/types/enums.go +++ b/service/appsync/types/enums.go @@ -164,6 +164,24 @@ func (BadRequestReason) Values() []BadRequestReason { } } +type CacheHealthMetricsConfig string + +// Enum values for CacheHealthMetricsConfig +const ( + CacheHealthMetricsConfigEnabled CacheHealthMetricsConfig = "ENABLED" + CacheHealthMetricsConfigDisabled CacheHealthMetricsConfig = "DISABLED" +) + +// Values returns all known values for CacheHealthMetricsConfig. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (CacheHealthMetricsConfig) Values() []CacheHealthMetricsConfig { + return []CacheHealthMetricsConfig{ + "ENABLED", + "DISABLED", + } +} + type ConflictDetectionType string // Enum values for ConflictDetectionType @@ -225,6 +243,44 @@ func (DataSourceIntrospectionStatus) Values() []DataSourceIntrospectionStatus { } } +type DataSourceLevelMetricsBehavior string + +// Enum values for DataSourceLevelMetricsBehavior +const ( + DataSourceLevelMetricsBehaviorFullRequestDataSourceMetrics DataSourceLevelMetricsBehavior = "FULL_REQUEST_DATA_SOURCE_METRICS" + DataSourceLevelMetricsBehaviorPerDataSourceMetrics DataSourceLevelMetricsBehavior = "PER_DATA_SOURCE_METRICS" +) + +// Values returns all known values for DataSourceLevelMetricsBehavior. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (DataSourceLevelMetricsBehavior) Values() []DataSourceLevelMetricsBehavior { + return []DataSourceLevelMetricsBehavior{ + "FULL_REQUEST_DATA_SOURCE_METRICS", + "PER_DATA_SOURCE_METRICS", + } +} + +type DataSourceLevelMetricsConfig string + +// Enum values for DataSourceLevelMetricsConfig +const ( + DataSourceLevelMetricsConfigEnabled DataSourceLevelMetricsConfig = "ENABLED" + DataSourceLevelMetricsConfigDisabled DataSourceLevelMetricsConfig = "DISABLED" +) + +// Values returns all known values for DataSourceLevelMetricsConfig. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (DataSourceLevelMetricsConfig) Values() []DataSourceLevelMetricsConfig { + return []DataSourceLevelMetricsConfig{ + "ENABLED", + "DISABLED", + } +} + type DataSourceType string // Enum values for DataSourceType @@ -366,6 +422,24 @@ func (MergeType) Values() []MergeType { } } +type OperationLevelMetricsConfig string + +// Enum values for OperationLevelMetricsConfig +const ( + OperationLevelMetricsConfigEnabled OperationLevelMetricsConfig = "ENABLED" + OperationLevelMetricsConfigDisabled OperationLevelMetricsConfig = "DISABLED" +) + +// Values returns all known values for OperationLevelMetricsConfig. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (OperationLevelMetricsConfig) Values() []OperationLevelMetricsConfig { + return []OperationLevelMetricsConfig{ + "ENABLED", + "DISABLED", + } +} + type OutputType string // Enum values for OutputType @@ -437,6 +511,43 @@ func (ResolverKind) Values() []ResolverKind { } } +type ResolverLevelMetricsBehavior string + +// Enum values for ResolverLevelMetricsBehavior +const ( + ResolverLevelMetricsBehaviorFullRequestResolverMetrics ResolverLevelMetricsBehavior = "FULL_REQUEST_RESOLVER_METRICS" + ResolverLevelMetricsBehaviorPerResolverMetrics ResolverLevelMetricsBehavior = "PER_RESOLVER_METRICS" +) + +// Values returns all known values for ResolverLevelMetricsBehavior. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (ResolverLevelMetricsBehavior) Values() []ResolverLevelMetricsBehavior { + return []ResolverLevelMetricsBehavior{ + "FULL_REQUEST_RESOLVER_METRICS", + "PER_RESOLVER_METRICS", + } +} + +type ResolverLevelMetricsConfig string + +// Enum values for ResolverLevelMetricsConfig +const ( + ResolverLevelMetricsConfigEnabled ResolverLevelMetricsConfig = "ENABLED" + ResolverLevelMetricsConfigDisabled ResolverLevelMetricsConfig = "DISABLED" +) + +// Values returns all known values for ResolverLevelMetricsConfig. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResolverLevelMetricsConfig) Values() []ResolverLevelMetricsConfig { + return []ResolverLevelMetricsConfig{ + "ENABLED", + "DISABLED", + } +} + type RuntimeName string // Enum values for RuntimeName diff --git a/service/appsync/types/types.go b/service/appsync/types/types.go index e6fcda32182..f9d44a67d83 100644 --- a/service/appsync/types/types.go +++ b/service/appsync/types/types.go @@ -62,6 +62,18 @@ type ApiCache struct { // creation. AtRestEncryptionEnabled bool + // Controls how cache health metrics will be emitted to CloudWatch. Cache health + // metrics include: + // - NetworkBandwidthOutAllowanceExceeded: The network packets dropped because + // the throughput exceeded the aggregated bandwidth limit. This is useful for + // diagnosing bottlenecks in a cache configuration. + // - EngineCPUUtilization: The CPU utilization (percentage) allocated to the + // Redis process. This is useful for diagnosing bottlenecks in a cache + // configuration. + // Metrics will be recorded by API ID. You can set the value to ENABLED or DISABLED + // . + HealthMetricsConfig CacheHealthMetricsConfig + // The cache instance status. // - AVAILABLE: The instance is available for use. // - CREATING: The instance is currently creating. @@ -299,6 +311,14 @@ type DataSource struct { // Lambda settings. LambdaConfig *LambdaDataSourceConfig + // Enables or disables enhanced data source metrics for specified data sources. + // Note that metricsConfig won't be used unless the dataSourceLevelMetricsBehavior + // value is set to PER_DATA_SOURCE_METRICS . If the dataSourceLevelMetricsBehavior + // is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be + // ignored. However, you can still set its value. metricsConfig can be ENABLED or + // DISABLED . + MetricsConfig DataSourceLevelMetricsConfig + // The name of the data source. Name *string @@ -511,6 +531,95 @@ type ElasticsearchDataSourceConfig struct { noSmithyDocumentSerde } +// Enables and controls the enhanced metrics feature. Enhanced metrics emit +// granular data on API usage and performance such as AppSync request and error +// counts, latency, and cache hits/misses. All enhanced metric data is sent to your +// CloudWatch account, and you can configure the types of data that will be sent. +// Enhanced metrics can be configured at the resolver, data source, and operation +// levels. EnhancedMetricsConfig contains three required parameters, each +// controlling one of these categories: +// - resolverLevelMetricsBehavior : Controls how resolver metrics will be emitted +// to CloudWatch. Resolver metrics include: +// - GraphQL errors: The number of GraphQL errors that occurred. +// - Requests: The number of invocations that occurred during a request. +// - Latency: The time to complete a resolver invocation. +// - Cache hits: The number of cache hits during a request. +// - Cache misses: The number of cache misses during a request. These metrics +// can be emitted to CloudWatch per resolver or for all resolvers in the request. +// Metrics will be recorded by API ID and resolver name. +// resolverLevelMetricsBehavior accepts one of these values at a time: +// - FULL_REQUEST_RESOLVER_METRICS : Records and emits metric data for all +// resolvers in the request. +// - PER_RESOLVER_METRICS : Records and emits metric data for resolvers that have +// the metricConfig value set to ENABLED . +// - dataSourceLevelMetricsBehavior : Controls how data source metrics will be +// emitted to CloudWatch. Data source metrics include: +// - Requests: The number of invocations that occured during a request. +// - Latency: The time to complete a data source invocation. +// - Errors: The number of errors that occurred during a data source invocation. +// These metrics can be emitted to CloudWatch per data source or for all data +// sources in the request. Metrics will be recorded by API ID and data source name. +// dataSourceLevelMetricsBehavior accepts one of these values at a time: +// - FULL_REQUEST_DATA_SOURCE_METRICS : Records and emits metric data for all +// data sources in the request. +// - PER_DATA_SOURCE_METRICS : Records and emits metric data for data sources +// that have the metricConfig value set to ENABLED . +// - operationLevelMetricsConfig : Controls how operation metrics will be emitted +// to CloudWatch. Operation metrics include: +// - Requests: The number of times a specified GraphQL operation was called. +// - GraphQL errors: The number of GraphQL errors that occurred during a +// specified GraphQL operation. Metrics will be recorded by API ID and operation +// name. You can set the value to ENABLED or DISABLED . +type EnhancedMetricsConfig struct { + + // Controls how data source metrics will be emitted to CloudWatch. Data source + // metrics include: + // - Requests: The number of invocations that occured during a request. + // - Latency: The time to complete a data source invocation. + // - Errors: The number of errors that occurred during a data source invocation. + // These metrics can be emitted to CloudWatch per data source or for all data + // sources in the request. Metrics will be recorded by API ID and data source name. + // dataSourceLevelMetricsBehavior accepts one of these values at a time: + // - FULL_REQUEST_DATA_SOURCE_METRICS : Records and emits metric data for all + // data sources in the request. + // - PER_DATA_SOURCE_METRICS : Records and emits metric data for data sources + // that have the metricConfig value set to ENABLED . + // + // This member is required. + DataSourceLevelMetricsBehavior DataSourceLevelMetricsBehavior + + // Controls how operation metrics will be emitted to CloudWatch. Operation metrics + // include: + // - Requests: The number of times a specified GraphQL operation was called. + // - GraphQL errors: The number of GraphQL errors that occurred during a + // specified GraphQL operation. + // Metrics will be recorded by API ID and operation name. You can set the value to + // ENABLED or DISABLED . + // + // This member is required. + OperationLevelMetricsConfig OperationLevelMetricsConfig + + // Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics + // include: + // - GraphQL errors: The number of GraphQL errors that occurred. + // - Requests: The number of invocations that occurred during a request. + // - Latency: The time to complete a resolver invocation. + // - Cache hits: The number of cache hits during a request. + // - Cache misses: The number of cache misses during a request. + // These metrics can be emitted to CloudWatch per resolver or for all resolvers in + // the request. Metrics will be recorded by API ID and resolver name. + // resolverLevelMetricsBehavior accepts one of these values at a time: + // - FULL_REQUEST_RESOLVER_METRICS : Records and emits metric data for all + // resolvers in the request. + // - PER_RESOLVER_METRICS : Records and emits metric data for resolvers that have + // the metricConfig value set to ENABLED . + // + // This member is required. + ResolverLevelMetricsBehavior ResolverLevelMetricsBehavior + + noSmithyDocumentSerde +} + // Contains the list of errors generated. When using JavaScript, this will apply // to the request or response function evaluation. type ErrorDetail struct { @@ -618,6 +727,9 @@ type GraphqlApi struct { // The DNS records for the API. Dns map[string]string + // The enhancedMetricsConfig object. + EnhancedMetricsConfig *EnhancedMetricsConfig + // Sets the value of the GraphQL API to enable ( ENABLED ) or disable ( DISABLED ) // introspection. If no value is provided, the introspection configuration will be // set to ENABLED by default. This field will produce an error if the operation @@ -928,6 +1040,13 @@ type Resolver struct { // The maximum batching size for a resolver. MaxBatchSize int32 + // Enables or disables enhanced resolver metrics for specified resolvers. Note + // that metricsConfig won't be used unless the resolverLevelMetricsBehavior value + // is set to PER_RESOLVER_METRICS . If the resolverLevelMetricsBehavior is set to + // FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will be ignored. However, + // you can still set its value. metricsConfig can be ENABLED or DISABLED . + MetricsConfig ResolverLevelMetricsConfig + // The PipelineConfig . PipelineConfig *PipelineConfig diff --git a/service/appsync/validators.go b/service/appsync/validators.go index 507d5c09a4f..67753d34591 100644 --- a/service/appsync/validators.go +++ b/service/appsync/validators.go @@ -1641,6 +1641,27 @@ func validateElasticsearchDataSourceConfig(v *types.ElasticsearchDataSourceConfi } } +func validateEnhancedMetricsConfig(v *types.EnhancedMetricsConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EnhancedMetricsConfig"} + if len(v.ResolverLevelMetricsBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResolverLevelMetricsBehavior")) + } + if len(v.DataSourceLevelMetricsBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DataSourceLevelMetricsBehavior")) + } + if len(v.OperationLevelMetricsConfig) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("OperationLevelMetricsConfig")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateEventBridgeDataSourceConfig(v *types.EventBridgeDataSourceConfig) error { if v == nil { return nil @@ -2017,6 +2038,11 @@ func validateOpCreateGraphqlApiInput(v *CreateGraphqlApiInput) error { invalidParams.AddNested("LambdaAuthorizerConfig", err.(smithy.InvalidParamsError)) } } + if v.EnhancedMetricsConfig != nil { + if err := validateEnhancedMetricsConfig(v.EnhancedMetricsConfig); err != nil { + invalidParams.AddNested("EnhancedMetricsConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2969,6 +2995,11 @@ func validateOpUpdateGraphqlApiInput(v *UpdateGraphqlApiInput) error { invalidParams.AddNested("LambdaAuthorizerConfig", err.(smithy.InvalidParamsError)) } } + if v.EnhancedMetricsConfig != nil { + if err := validateEnhancedMetricsConfig(v.EnhancedMetricsConfig); err != nil { + invalidParams.AddNested("EnhancedMetricsConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/cloudwatch/api_client.go b/service/cloudwatch/api_client.go index 4159dba3b36..6d79fd89e7f 100644 --- a/service/cloudwatch/api_client.go +++ b/service/cloudwatch/api_client.go @@ -229,15 +229,17 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + DisableRequestCompression: cfg.DisableRequestCompression, + RequestMinCompressSizeBytes: cfg.RequestMinCompressSizeBytes, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) diff --git a/service/cloudwatch/api_op_PutMetricData.go b/service/cloudwatch/api_op_PutMetricData.go index 89ce9b2d0b5..1ca754cfd74 100644 --- a/service/cloudwatch/api_op_PutMetricData.go +++ b/service/cloudwatch/api_op_PutMetricData.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types" "github.com/aws/smithy-go/middleware" + smithyrequestcompression "github.com/aws/smithy-go/private/requestcompression" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -142,6 +143,9 @@ func (c *Client) addOperationPutMetricDataMiddlewares(stack *middleware.Stack, o if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addOperationPutMetricDataRequestCompressionMiddleware(stack, options); err != nil { + return err + } if err = addOpPutMetricDataValidationMiddleware(stack); err != nil { return err } @@ -166,6 +170,13 @@ func (c *Client) addOperationPutMetricDataMiddlewares(stack *middleware.Stack, o return nil } +func addOperationPutMetricDataRequestCompressionMiddleware(stack *middleware.Stack, options Options) error { + return smithyrequestcompression.AddRequestCompression(stack, options.DisableRequestCompression, options.RequestMinCompressSizeBytes, + []string{ + "gzip", + }) +} + func newServiceMetadataMiddleware_opPutMetricData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/options.go b/service/cloudwatch/options.go index 69a23e5125d..d6114e6c17c 100644 --- a/service/cloudwatch/options.go +++ b/service/cloudwatch/options.go @@ -42,6 +42,9 @@ type Options struct { // clients initial default settings. DefaultsMode aws.DefaultsMode + // Whether to disable automatic request compression for supported operations. + DisableRequestCompression bool + // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions @@ -67,6 +70,10 @@ type Options struct { // The region to send requests to. (Required) Region string + // The minimum request body size, in bytes, at which compression should occur. The + // default value is 10 KiB. Values must fall within [0, 1MiB]. + RequestMinCompressSizeBytes int64 + // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify diff --git a/service/neptunegraph/api_op_CreateGraph.go b/service/neptunegraph/api_op_CreateGraph.go index de80fc252df..c86c787e6dd 100644 --- a/service/neptunegraph/api_op_CreateGraph.go +++ b/service/neptunegraph/api_op_CreateGraph.go @@ -53,7 +53,7 @@ type CreateGraphInput struct { KmsKeyIdentifier *string // Specifies whether or not the graph can be reachable over the internet. All - // access to graphs IAM authenticated. ( true to enable, or false to disable. + // access to graphs is IAM authenticated. ( true to enable, or false to disable. PublicConnectivity *bool // The number of replicas in other AZs. Min =0, Max = 2, Default = 1. @@ -115,7 +115,7 @@ type CreateGraphOutput struct { ProvisionedMemory *int32 // Specifies whether or not the graph can be reachable over the internet. All - // access to graphs IAM authenticated. + // access to graphs is IAM authenticated. PublicConnectivity *bool // The number of replicas in other AZs. diff --git a/service/neptunegraph/api_op_CreateGraphUsingImportTask.go b/service/neptunegraph/api_op_CreateGraphUsingImportTask.go index 991cfda482e..4a638c0938c 100644 --- a/service/neptunegraph/api_op_CreateGraphUsingImportTask.go +++ b/service/neptunegraph/api_op_CreateGraphUsingImportTask.go @@ -90,7 +90,7 @@ type CreateGraphUsingImportTaskInput struct { MinProvisionedMemory *int32 // Specifies whether or not the graph can be reachable over the internet. All - // access to graphs IAM authenticated. ( true to enable, or false to disable). + // access to graphs is IAM authenticated. ( true to enable, or false to disable). PublicConnectivity *bool // The number of replicas in other AZs to provision on the new graph after import. diff --git a/service/neptunegraph/api_op_ExecuteQuery.go b/service/neptunegraph/api_op_ExecuteQuery.go index f865ce082ea..2be4bbf5f04 100644 --- a/service/neptunegraph/api_op_ExecuteQuery.go +++ b/service/neptunegraph/api_op_ExecuteQuery.go @@ -7,6 +7,7 @@ import ( "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/neptunegraph/document" "github.com/aws/aws-sdk-go-v2/service/neptunegraph/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" @@ -18,10 +19,17 @@ import ( // Execute an openCypher query. Currently, the SDK does not support parameterized // queries. If you want to make a parameterized query call, you can use an HTTP -// request. Non-parametrized queries are not considered for plan caching. You can -// force plan caching with planCache=enabled . The plan cache will be reused only -// for the same exact query. Slight variations in the query will not be able to -// reuse the query plan cache. +// request. When invoking this operation in a Neptune Analytics cluster, the IAM +// user or role making the request must have a policy attached that allows one of +// the following IAM actions in that cluster, depending on the query: +// - neptune-graph:ReadDataViaQuery +// - neptune-graph:WriteDataViaQuery +// - neptune-graph:DeleteDataViaQuery +// +// Non-parametrized queries are not considered for plan caching. You can force +// plan caching with planCache=enabled . The plan cache will be reused only for the +// same exact query. Slight variations in the query will not be able to reuse the +// query plan cache. func (c *Client) ExecuteQuery(ctx context.Context, params *ExecuteQueryInput, optFns ...func(*Options)) (*ExecuteQueryOutput, error) { if params == nil { params = &ExecuteQueryInput{} @@ -61,6 +69,10 @@ type ExecuteQueryInput struct { // flowing etc. ExplainMode types.ExplainMode + // The data parameters the query can use in JSON format. For example: {"name": + // "john", "age": 20}. (optional) + Parameters map[string]document.Interface + // Query plan cache is a feature that saves the query plan and reuses it on // successive executions of the same query. This reduces query latency, and works // for both READ and UPDATE queries. The plan cache is an LRU cache with a 5 diff --git a/service/neptunegraph/api_op_GetQuery.go b/service/neptunegraph/api_op_GetQuery.go index c6091e80407..69e36d58008 100644 --- a/service/neptunegraph/api_op_GetQuery.go +++ b/service/neptunegraph/api_op_GetQuery.go @@ -15,7 +15,9 @@ import ( "strings" ) -// Retrieves the status of a specified query. +// Retrieves the status of a specified query. When invoking this operation in a +// Neptune Analytics cluster, the IAM user or role making the request must have the +// neptune-graph:GetQueryStatus IAM action attached. func (c *Client) GetQuery(ctx context.Context, params *GetQueryInput, optFns ...func(*Options)) (*GetQueryOutput, error) { if params == nil { params = &GetQueryInput{} diff --git a/service/neptunegraph/api_op_RestoreGraphFromSnapshot.go b/service/neptunegraph/api_op_RestoreGraphFromSnapshot.go index fc1b148672e..0a02d69c308 100644 --- a/service/neptunegraph/api_op_RestoreGraphFromSnapshot.go +++ b/service/neptunegraph/api_op_RestoreGraphFromSnapshot.go @@ -54,7 +54,7 @@ type RestoreGraphFromSnapshotInput struct { ProvisionedMemory *int32 // Specifies whether or not the graph can be reachable over the internet. All - // access to graphs IAM authenticated. ( true to enable, or false to disable). + // access to graphs is IAM authenticated. ( true to enable, or false to disable). PublicConnectivity *bool // The number of replicas in other AZs. Min =0, Max = 2, Default =1 diff --git a/service/neptunegraph/api_op_UpdateGraph.go b/service/neptunegraph/api_op_UpdateGraph.go index b5a9589befd..0fd019cd908 100644 --- a/service/neptunegraph/api_op_UpdateGraph.go +++ b/service/neptunegraph/api_op_UpdateGraph.go @@ -46,7 +46,7 @@ type UpdateGraphInput struct { ProvisionedMemory *int32 // Specifies whether or not the graph can be reachable over the internet. All - // access to graphs IAM authenticated. ( true to enable, or false to disable. + // access to graphs is IAM authenticated. ( true to enable, or false to disable. PublicConnectivity *bool noSmithyDocumentSerde diff --git a/service/neptunegraph/document/doc.go b/service/neptunegraph/document/doc.go new file mode 100644 index 00000000000..2b06b14f3cd --- /dev/null +++ b/service/neptunegraph/document/doc.go @@ -0,0 +1,66 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package document implements encoding and decoding of open-content that has a JSON-like data model. +// This data-model allows for UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a +// map of UTF-8 strings to these values. +// +// Interface defines the semantics for how a document type is marshalled and unmarshalled for requests and responses +// for the service. To send a document as input to the service you use NewLazyDocument and pass it the Go type to be +// sent to the service. NewLazyDocument returns a document Interface type that encodes the provided Go type during +// the request serialization step after you have invoked an API client operation that uses the document type. +// +// The following examples show how you can create document types using basic Go types. +// +// NewLazyDocument(map[string]interface{}{ +// "favoriteNumber": 42, +// "fruits": []string{"apple", "orange"}, +// "capitals": map[string]interface{}{ +// "Washington": "Olympia", +// "Oregon": "Salem", +// }, +// "skyIsBlue": true, +// }) +// +// NewLazyDocument(3.14159) +// +// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) +// +// NewLazyDocument(true) +// +// Services can send document types as part of their API responses. To retrieve the content of a response document +// you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass +// a reference to the Go type that you want to unmarshal and map the response to. +// +// For example, if you expect to receive key/value map from the service response: +// +// var kv map[string]interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { +// // handle error +// } +// +// If a service can return one or more data-types in the response, you can use an empty interface and type switch to +// dynamically handle the response type. +// +// var v interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { +// // handle error +// } +// +// switch vv := v.(type) { +// case map[string]interface{}: +// // handle key/value map +// case []interface{}: +// // handle array of values +// case bool: +// // handle boolean +// case document.Number: +// // handle an arbitrary precision number +// case string: +// // handle string +// default: +// // handle unknown case +// } +// +// The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document +// including more in depth examples that cover user-defined structure types. +package document diff --git a/service/neptunegraph/document/document.go b/service/neptunegraph/document/document.go new file mode 100644 index 00000000000..6e66604e7aa --- /dev/null +++ b/service/neptunegraph/document/document.go @@ -0,0 +1,34 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + internaldocument "github.com/aws/aws-sdk-go-v2/service/neptunegraph/internal/document" +) + +// Interface defines a document which is a protocol-agnostic type which supports a +// JSON-like data-model. You can use this type to send UTF-8 strings, arbitrary +// precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 +// strings to these values. +// +// You create a document type using the NewLazyDocument function and passing it +// the Go type to marshal. When receiving a document in an API response, you use +// the document's UnmarshalSmithyDocument function to decode the response to your +// desired Go type. Unless documented specifically generated structure types in +// client packages or client types packages are not supported at this time. Such +// types embed a noSmithyDocumentSerde and will cause an error to be returned when +// attempting to send an API request. +// +// For more information see the accompanying package documentation and linked +// references. +type Interface = internaldocument.Interface + +// You create document type using the NewLazyDocument function and passing it the +// Go type to be marshaled and sent to the service. The document marshaler supports +// semantics similar to the encoding/json Go standard library. +// +// For more information see the accompanying package documentation and linked +// references. +func NewLazyDocument(v interface{}) Interface { + return internaldocument.NewDocumentMarshaler(v) +} diff --git a/service/neptunegraph/generated.json b/service/neptunegraph/generated.json index 877a7e52e92..83e60c65ace 100644 --- a/service/neptunegraph/generated.json +++ b/service/neptunegraph/generated.json @@ -40,10 +40,14 @@ "auth.go", "deserializers.go", "doc.go", + "document/doc.go", + "document/document.go", "endpoints.go", "endpoints_config_test.go", "endpoints_test.go", "generated.json", + "internal/document/document.go", + "internal/document/document_test.go", "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "options.go", diff --git a/service/neptunegraph/internal/document/document.go b/service/neptunegraph/internal/document/document.go new file mode 100644 index 00000000000..8d4870e6026 --- /dev/null +++ b/service/neptunegraph/internal/document/document.go @@ -0,0 +1,99 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + "bytes" + "encoding/json" + smithydocument "github.com/aws/smithy-go/document" + smithydocumentjson "github.com/aws/smithy-go/document/json" +) + +// github.com/aws/aws-sdk-go-v2/service/neptunegraph/internal/document.smithyDocument +// is an interface which is used to bind a document type to its service client. +type smithyDocument interface { + isSmithyDocument() +} + +// github.com/aws/aws-sdk-go-v2/service/neptunegraph/internal/document.Interface +// is a JSON-like data model type that is protocol agnostic and is usedto send +// open-content to a service. +type Interface interface { + smithyDocument + smithydocument.Marshaler + smithydocument.Unmarshaler +} + +type documentMarshaler struct { + value interface{} +} + +func (m *documentMarshaler) UnmarshalSmithyDocument(v interface{}) error { + mBytes, err := m.MarshalSmithyDocument() + if err != nil { + return err + } + + jDecoder := json.NewDecoder(bytes.NewReader(mBytes)) + jDecoder.UseNumber() + + var jv interface{} + if err := jDecoder.Decode(&v); err != nil { + return err + } + + return NewDocumentUnmarshaler(v).UnmarshalSmithyDocument(&jv) +} + +func (m *documentMarshaler) MarshalSmithyDocument() ([]byte, error) { + return smithydocumentjson.NewEncoder().Encode(m.value) +} + +func (m *documentMarshaler) isSmithyDocument() {} + +var _ Interface = (*documentMarshaler)(nil) + +type documentUnmarshaler struct { + value interface{} +} + +func (m *documentUnmarshaler) UnmarshalSmithyDocument(v interface{}) error { + decoder := smithydocumentjson.NewDecoder() + return decoder.DecodeJSONInterface(m.value, v) +} + +func (m *documentUnmarshaler) MarshalSmithyDocument() ([]byte, error) { + return json.Marshal(m.value) +} + +func (m *documentUnmarshaler) isSmithyDocument() {} + +var _ Interface = (*documentUnmarshaler)(nil) + +// NewDocumentMarshaler creates a new document marshaler for the given input type +func NewDocumentMarshaler(v interface{}) Interface { + return &documentMarshaler{ + value: v, + } +} + +// NewDocumentUnmarshaler creates a new document unmarshaler for the given service +// response +func NewDocumentUnmarshaler(v interface{}) Interface { + return &documentUnmarshaler{ + value: v, + } +} + +// github.com/aws/aws-sdk-go-v2/service/neptunegraph/internal/document.IsInterface +// returns whether the given Interface implementation is a valid client +// implementation +func IsInterface(v Interface) (ok bool) { + defer func() { + if err := recover(); err != nil { + ok = false + } + }() + v.isSmithyDocument() + return true +} diff --git a/service/neptunegraph/internal/document/document_test.go b/service/neptunegraph/internal/document/document_test.go new file mode 100644 index 00000000000..775645dcd6e --- /dev/null +++ b/service/neptunegraph/internal/document/document_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +var _ smithyDocument = (Interface)(nil) +var _ smithydocument.Marshaler = (Interface)(nil) +var _ smithydocument.Unmarshaler = (Interface)(nil) diff --git a/service/neptunegraph/serializers.go b/service/neptunegraph/serializers.go index 0db64557d7a..acf6da6f76d 100644 --- a/service/neptunegraph/serializers.go +++ b/service/neptunegraph/serializers.go @@ -6,6 +6,8 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/neptunegraph/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/neptunegraph/internal/document" "github.com/aws/aws-sdk-go-v2/service/neptunegraph/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" @@ -892,6 +894,13 @@ func awsRestjson1_serializeOpDocumentExecuteQueryInput(v *ExecuteQueryInput, val ok.String(string(v.Language)) } + if v.Parameters != nil { + ok := object.Key("parameters") + if err := awsRestjson1_serializeDocumentDocumentValuedMap(v.Parameters, ok); err != nil { + return err + } + } + if len(v.PlanCache) > 0 { ok := object.Key("planCache") ok.String(string(v.PlanCache)) @@ -2179,6 +2188,22 @@ func awsRestjson1_serializeOpDocumentUpdateGraphInput(v *UpdateGraphInput, value return nil } +func awsRestjson1_serializeDocumentDocumentValuedMap(v map[string]document.Interface, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentDocument(v[key], om); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentImportOptions(v types.ImportOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2268,3 +2293,18 @@ func awsRestjson1_serializeDocumentVectorSearchConfiguration(v *types.VectorSear return nil } + +func awsRestjson1_serializeDocumentDocument(v document.Interface, value smithyjson.Value) error { + if v == nil { + return nil + } + if !internaldocument.IsInterface(v) { + return fmt.Errorf("%T is not a compatible document type", v) + } + db, err := v.MarshalSmithyDocument() + if err != nil { + return err + } + value.Write(db) + return nil +} diff --git a/service/route53domains/api_op_CheckDomainAvailability.go b/service/route53domains/api_op_CheckDomainAvailability.go index 5022ffd6b6a..928dcca867a 100644 --- a/service/route53domains/api_op_CheckDomainAvailability.go +++ b/service/route53domains/api_op_CheckDomainAvailability.go @@ -68,12 +68,14 @@ type CheckDomainAvailabilityOutput struct { // preordered. DONT_KNOW The TLD registry didn't reply with a definitive answer // about whether the domain name is available. Route 53 can return this response // for a variety of reasons, for example, the registry is performing maintenance. - // Try again later. PENDING The TLD registry didn't return a response in the - // expected amount of time. When the response is delayed, it usually takes just a - // few extra seconds. You can resubmit the request immediately. RESERVED The domain - // name has been reserved for another person or organization. UNAVAILABLE The - // domain name is not available. UNAVAILABLE_PREMIUM The domain name is not - // available. UNAVAILABLE_RESTRICTED The domain name is forbidden. + // Try again later. INVALID_NAME_FOR_TLD The TLD isn't valid. For example, it can + // contain characters that aren't allowed. PENDING The TLD registry didn't return a + // response in the expected amount of time. When the response is delayed, it + // usually takes just a few extra seconds. You can resubmit the request + // immediately. RESERVED The domain name has been reserved for another person or + // organization. UNAVAILABLE The domain name is not available. UNAVAILABLE_PREMIUM + // The domain name is not available. UNAVAILABLE_RESTRICTED The domain name is + // forbidden. Availability types.DomainAvailability // Metadata pertaining to the operation's result. diff --git a/service/route53domains/api_op_GetDomainDetail.go b/service/route53domains/api_op_GetDomainDetail.go index cfcc2c83bdb..be21d38c909 100644 --- a/service/route53domains/api_op_GetDomainDetail.go +++ b/service/route53domains/api_op_GetDomainDetail.go @@ -58,14 +58,22 @@ type GetDomainDetailOutput struct { // Specifies whether contact information is concealed from WHOIS queries. If the // value is true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If the value is false , WHOIS queries - // return the information that you entered for the admin contact. + // Amazon Registrar or for our registrar associate, Gandi. If the value is false , + // WHOIS queries return the information that you entered for the admin contact. AdminPrivacy *bool // Specifies whether the domain registration is set to renew automatically. AutoRenew *bool + // Provides details about the domain billing contact. + BillingContact *types.ContactDetail + + // Specifies whether contact information is concealed from WHOIS queries. If the + // value is true , WHOIS ("who is") queries return contact information either for + // Amazon Registrar or for our registrar associate, Gandi. If the value is false , + // WHOIS queries return the information that you entered for the billing contact. + BillingPrivacy *bool + // The date when the domain was created as found in the response to a WHOIS query. // The date and time is in Unix time format and Coordinated Universal time (UTC). CreationDate *time.Time @@ -91,16 +99,12 @@ type GetDomainDetailOutput struct { // Specifies whether contact information is concealed from WHOIS queries. If the // value is true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If the value is false , WHOIS queries - // return the information that you entered for the registrant contact (domain - // owner). + // Amazon Registrar or for our registrar associate, Gandi. If the value is false , + // WHOIS queries return the information that you entered for the registrant contact + // (domain owner). RegistrantPrivacy *bool - // Name of the registrar of the domain as identified in the registry. Domains with - // a .com, .net, or .org TLD are registered by Amazon Registrar. All other domains - // are registered by our registrar associate, Gandi. The value for domains that are - // registered by Gandi is "GANDI SAS" . + // Name of the registrar of the domain as identified in the registry. RegistrarName *string // Web address of the registrar. @@ -130,9 +134,8 @@ type GetDomainDetailOutput struct { // Specifies whether contact information is concealed from WHOIS queries. If the // value is true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If the value is false , WHOIS queries - // return the information that you entered for the technical contact. + // Amazon Registrar or for our registrar associate, Gandi. If the value is false , + // WHOIS queries return the information that you entered for the technical contact. TechPrivacy *bool // The last updated date of the domain as found in the response to a WHOIS query. diff --git a/service/route53domains/api_op_RegisterDomain.go b/service/route53domains/api_op_RegisterDomain.go index 155d58ee401..a622dda1523 100644 --- a/service/route53domains/api_op_RegisterDomain.go +++ b/service/route53domains/api_op_RegisterDomain.go @@ -105,34 +105,44 @@ type RegisterDomainInput struct { // true AutoRenew *bool + // Provides detailed contact information. For information about the values that + // you specify for each element, see ContactDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html) + // . + BillingContact *types.ContactDetail + // Reserved for future use. IdnLangCode *string // Whether you want to conceal contact information from WHOIS queries. If you // specify true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If you specify false , WHOIS queries - // return the information that you entered for the admin contact. You must specify - // the same privacy setting for the administrative, registrant, and technical - // contacts. Default: true + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the admin contact. You + // must specify the same privacy setting for the administrative, billing, + // registrant, and technical contacts. Default: true PrivacyProtectAdminContact *bool // Whether you want to conceal contact information from WHOIS queries. If you // specify true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If you specify false , WHOIS queries - // return the information that you entered for the registrant contact (the domain - // owner). You must specify the same privacy setting for the administrative, - // registrant, and technical contacts. Default: true + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the billing contact. + // You must specify the same privacy setting for the administrative, billing, + // registrant, and technical contacts. + PrivacyProtectBillingContact *bool + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true , WHOIS ("who is") queries return contact information either for + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the registrant contact + // (the domain owner). You must specify the same privacy setting for the + // administrative, billing, registrant, and technical contacts. Default: true PrivacyProtectRegistrantContact *bool // Whether you want to conceal contact information from WHOIS queries. If you // specify true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If you specify false , WHOIS queries - // return the information that you entered for the technical contact. You must - // specify the same privacy setting for the administrative, registrant, and - // technical contacts. Default: true + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the technical contact. + // You must specify the same privacy setting for the administrative, billing, + // registrant, and technical contacts. Default: true PrivacyProtectTechContact *bool noSmithyDocumentSerde diff --git a/service/route53domains/api_op_TransferDomain.go b/service/route53domains/api_op_TransferDomain.go index 211b7e47000..039f5ffa89f 100644 --- a/service/route53domains/api_op_TransferDomain.go +++ b/service/route53domains/api_op_TransferDomain.go @@ -25,7 +25,11 @@ import ( // see Transferring a Domain from Amazon Route 53 to Another Registrar (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-from-route-53.html) // in the Amazon Route 53 Developer Guide. // -// If the registrar for your domain is also the DNS service provider for the +// During the transfer of any country code top-level domains (ccTLDs) to Route 53, +// except for .cc and .tv, updates to the owner contact are ignored and the owner +// contact data from the registry is used. You can update the owner contact after +// the transfer is complete. For more information, see UpdateDomainContact (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_UpdateDomainContact.html) +// . If the registrar for your domain is also the DNS service provider for the // domain, we highly recommend that you transfer your DNS service to Route 53 or to // another DNS service provider before you transfer your registration. Some // registrars provide free DNS service when you purchase a domain registration. @@ -100,6 +104,9 @@ type TransferDomainInput struct { // true AutoRenew *bool + // Provides detailed contact information. + BillingContact *types.ContactDetail + // Reserved for future use. IdnLangCode *string @@ -115,20 +122,26 @@ type TransferDomainInput struct { // Whether you want to conceal contact information from WHOIS queries. If you // specify true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If you specify false , WHOIS queries - // return the information that you entered for the registrant contact (domain - // owner). You must specify the same privacy setting for the administrative, - // registrant, and technical contacts. Default: true + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the billing contact. + // You must specify the same privacy setting for the administrative, billing, + // registrant, and technical contacts. + PrivacyProtectBillingContact *bool + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true , WHOIS ("who is") queries return contact information either for + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the registrant contact + // (domain owner). You must specify the same privacy setting for the + // administrative, billing, registrant, and technical contacts. Default: true PrivacyProtectRegistrantContact *bool // Whether you want to conceal contact information from WHOIS queries. If you // specify true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If you specify false , WHOIS queries - // return the information that you entered for the technical contact. You must - // specify the same privacy setting for the administrative, registrant, and - // technical contacts. Default: true + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the technical contact. + // You must specify the same privacy setting for the administrative, billing, + // registrant, and technical contacts. Default: true PrivacyProtectTechContact *bool noSmithyDocumentSerde diff --git a/service/route53domains/api_op_UpdateDomainContact.go b/service/route53domains/api_op_UpdateDomainContact.go index dbde0db23ae..ffd3882729e 100644 --- a/service/route53domains/api_op_UpdateDomainContact.go +++ b/service/route53domains/api_op_UpdateDomainContact.go @@ -44,6 +44,9 @@ type UpdateDomainContactInput struct { // Provides detailed contact information. AdminContact *types.ContactDetail + // Provides detailed contact information. + BillingContact *types.ContactDetail + // Customer's consent for the owner change request. Required if the domain is not // free (consent price is more than $0.00). Consent *types.Consent diff --git a/service/route53domains/api_op_UpdateDomainContactPrivacy.go b/service/route53domains/api_op_UpdateDomainContactPrivacy.go index 9b29c3c11ce..cc990936e39 100644 --- a/service/route53domains/api_op_UpdateDomainContactPrivacy.go +++ b/service/route53domains/api_op_UpdateDomainContactPrivacy.go @@ -55,29 +55,34 @@ type UpdateDomainContactPrivacyInput struct { // Whether you want to conceal contact information from WHOIS queries. If you // specify true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If you specify false , WHOIS queries - // return the information that you entered for the admin contact. You must specify - // the same privacy setting for the administrative, registrant, and technical - // contacts. + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the admin contact. You + // must specify the same privacy setting for the administrative, billing, + // registrant, and technical contacts. AdminPrivacy *bool // Whether you want to conceal contact information from WHOIS queries. If you // specify true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If you specify false , WHOIS queries - // return the information that you entered for the registrant contact (domain - // owner). You must specify the same privacy setting for the administrative, + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the billing contact. + // You must specify the same privacy setting for the administrative, billing, // registrant, and technical contacts. + BillingPrivacy *bool + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true , WHOIS ("who is") queries return contact information either for + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the registrant contact + // (domain owner). You must specify the same privacy setting for the + // administrative, billing, registrant, and technical contacts. RegistrantPrivacy *bool // Whether you want to conceal contact information from WHOIS queries. If you // specify true , WHOIS ("who is") queries return contact information either for - // Amazon Registrar (for .com, .net, and .org domains) or for our registrar - // associate, Gandi (for all other TLDs). If you specify false , WHOIS queries - // return the information that you entered for the technical contact. You must - // specify the same privacy setting for the administrative, registrant, and - // technical contacts. + // Amazon Registrar or for our registrar associate, Gandi. If you specify false , + // WHOIS queries return the information that you entered for the technical contact. + // You must specify the same privacy setting for the administrative, billing, + // registrant, and technical contacts. TechPrivacy *bool noSmithyDocumentSerde diff --git a/service/route53domains/deserializers.go b/service/route53domains/deserializers.go index 2f6a64f61fc..f0433c6e807 100644 --- a/service/route53domains/deserializers.go +++ b/service/route53domains/deserializers.go @@ -6397,6 +6397,20 @@ func awsAwsjson11_deserializeOpDocumentGetDomainDetailOutput(v **GetDomainDetail sv.AutoRenew = ptr.Bool(jtv) } + case "BillingContact": + if err := awsAwsjson11_deserializeDocumentContactDetail(&sv.BillingContact, value); err != nil { + return err + } + + case "BillingPrivacy": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.BillingPrivacy = ptr.Bool(jtv) + } + case "CreationDate": if value != nil { switch jtv := value.(type) { diff --git a/service/route53domains/endpoints.go b/service/route53domains/endpoints.go index 460616063b4..699f89f4896 100644 --- a/service/route53domains/endpoints.go +++ b/service/route53domains/endpoints.go @@ -366,7 +366,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://route53domains-fips.") diff --git a/service/route53domains/serializers.go b/service/route53domains/serializers.go index f810df98efd..de170a3d371 100644 --- a/service/route53domains/serializers.go +++ b/service/route53domains/serializers.go @@ -2598,6 +2598,13 @@ func awsAwsjson11_serializeOpDocumentRegisterDomainInput(v *RegisterDomainInput, ok.Boolean(*v.AutoRenew) } + if v.BillingContact != nil { + ok := object.Key("BillingContact") + if err := awsAwsjson11_serializeDocumentContactDetail(v.BillingContact, ok); err != nil { + return err + } + } + if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) @@ -2618,6 +2625,11 @@ func awsAwsjson11_serializeOpDocumentRegisterDomainInput(v *RegisterDomainInput, ok.Boolean(*v.PrivacyProtectAdminContact) } + if v.PrivacyProtectBillingContact != nil { + ok := object.Key("PrivacyProtectBillingContact") + ok.Boolean(*v.PrivacyProtectBillingContact) + } + if v.PrivacyProtectRegistrantContact != nil { ok := object.Key("PrivacyProtectRegistrantContact") ok.Boolean(*v.PrivacyProtectRegistrantContact) @@ -2736,6 +2748,13 @@ func awsAwsjson11_serializeOpDocumentTransferDomainInput(v *TransferDomainInput, ok.Boolean(*v.AutoRenew) } + if v.BillingContact != nil { + ok := object.Key("BillingContact") + if err := awsAwsjson11_serializeDocumentContactDetail(v.BillingContact, ok); err != nil { + return err + } + } + if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) @@ -2763,6 +2782,11 @@ func awsAwsjson11_serializeOpDocumentTransferDomainInput(v *TransferDomainInput, ok.Boolean(*v.PrivacyProtectAdminContact) } + if v.PrivacyProtectBillingContact != nil { + ok := object.Key("PrivacyProtectBillingContact") + ok.Boolean(*v.PrivacyProtectBillingContact) + } + if v.PrivacyProtectRegistrantContact != nil { ok := object.Key("PrivacyProtectRegistrantContact") ok.Boolean(*v.PrivacyProtectRegistrantContact) @@ -2818,6 +2842,13 @@ func awsAwsjson11_serializeOpDocumentUpdateDomainContactInput(v *UpdateDomainCon } } + if v.BillingContact != nil { + ok := object.Key("BillingContact") + if err := awsAwsjson11_serializeDocumentContactDetail(v.BillingContact, ok); err != nil { + return err + } + } + if v.Consent != nil { ok := object.Key("Consent") if err := awsAwsjson11_serializeDocumentConsent(v.Consent, ok); err != nil { @@ -2856,6 +2887,11 @@ func awsAwsjson11_serializeOpDocumentUpdateDomainContactPrivacyInput(v *UpdateDo ok.Boolean(*v.AdminPrivacy) } + if v.BillingPrivacy != nil { + ok := object.Key("BillingPrivacy") + ok.Boolean(*v.BillingPrivacy) + } + if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) diff --git a/service/route53domains/types/enums.go b/service/route53domains/types/enums.go index f02c31efaee..ccdd18f9a89 100644 --- a/service/route53domains/types/enums.go +++ b/service/route53domains/types/enums.go @@ -554,6 +554,8 @@ const ( DomainAvailabilityUnavailableRestricted DomainAvailability = "UNAVAILABLE_RESTRICTED" DomainAvailabilityReserved DomainAvailability = "RESERVED" DomainAvailabilityDontKnow DomainAvailability = "DONT_KNOW" + DomainAvailabilityInvalidNameForTld DomainAvailability = "INVALID_NAME_FOR_TLD" + DomainAvailabilityPending DomainAvailability = "PENDING" ) // Values returns all known values for DomainAvailability. Note that this can be @@ -569,6 +571,8 @@ func (DomainAvailability) Values() []DomainAvailability { "UNAVAILABLE_RESTRICTED", "RESERVED", "DONT_KNOW", + "INVALID_NAME_FOR_TLD", + "PENDING", } } @@ -729,6 +733,8 @@ const ( OperationTypePushDomain OperationType = "PUSH_DOMAIN" OperationTypeInternalTransferOutDomain OperationType = "INTERNAL_TRANSFER_OUT_DOMAIN" OperationTypeInternalTransferInDomain OperationType = "INTERNAL_TRANSFER_IN_DOMAIN" + OperationTypeReleaseToGandi OperationType = "RELEASE_TO_GANDI" + OperationTypeTransferOnRenew OperationType = "TRANSFER_ON_RENEW" ) // Values returns all known values for OperationType. Note that this can be @@ -754,6 +760,8 @@ func (OperationType) Values() []OperationType { "PUSH_DOMAIN", "INTERNAL_TRANSFER_OUT_DOMAIN", "INTERNAL_TRANSFER_IN_DOMAIN", + "RELEASE_TO_GANDI", + "TRANSFER_ON_RENEW", } } diff --git a/service/route53domains/types/types.go b/service/route53domains/types/types.go index f42cd8fc200..46b36552d66 100644 --- a/service/route53domains/types/types.go +++ b/service/route53domains/types/types.go @@ -252,7 +252,7 @@ type DomainTransferability struct { // TRANSFERABLE The domain name can be transferred to Route 53. UNTRANSFERRABLE The // domain name can't be transferred to Route 53. DONT_KNOW Reserved for future use. // DOMAIN_IN_OWN_ACCOUNT The domain already exists in the current Amazon Web - // Services account. DOMAIN_IN_ANOTHER_ACCOUNT the domain exists in another Amazon + // Services account. DOMAIN_IN_ANOTHER_ACCOUNT The domain exists in another Amazon // Web Services account. PREMIUM_DOMAIN Premium domain transfer is not supported. Transferable Transferable diff --git a/service/route53domains/validators.go b/service/route53domains/validators.go index a2f82fe6ae6..cedbb645ea3 100644 --- a/service/route53domains/validators.go +++ b/service/route53domains/validators.go @@ -1188,6 +1188,11 @@ func validateOpRegisterDomainInput(v *RegisterDomainInput) error { invalidParams.AddNested("TechContact", err.(smithy.InvalidParamsError)) } } + if v.BillingContact != nil { + if err := validateContactDetail(v.BillingContact); err != nil { + invalidParams.AddNested("BillingContact", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1292,6 +1297,11 @@ func validateOpTransferDomainInput(v *TransferDomainInput) error { invalidParams.AddNested("TechContact", err.(smithy.InvalidParamsError)) } } + if v.BillingContact != nil { + if err := validateContactDetail(v.BillingContact); err != nil { + invalidParams.AddNested("BillingContact", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1345,6 +1355,11 @@ func validateOpUpdateDomainContactInput(v *UpdateDomainContactInput) error { invalidParams.AddNested("Consent", err.(smithy.InvalidParamsError)) } } + if v.BillingContact != nil { + if err := validateContactDetail(v.BillingContact); err != nil { + invalidParams.AddNested("BillingContact", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else {