From e22c2495bd38232c640776ef3c1a84fb3145a8b9 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 3 Sep 2024 18:23:11 +0000 Subject: [PATCH] Regenerated Clients --- .../3ced4aa7a3484c19b67bb518f9ec39d8.json | 8 + .../6cf17f3483b54473b16c8f9ca40beda0.json | 8 + .../89e0f7a0c06b4dc5ab7e2eeb66287fb8.json | 8 + .../c3048c3bf37d437f9da0619e14faa086.json | 8 + .../c6377034452c477c88d86d10f8df502e.json | 8 + .../d7426ee7ace54a8f98226f487647cbce.json | 8 + .../f3dffc54898a4bd2a078376e23475957.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- .../connect/api_op_AssociateSecurityKey.go | 2 +- service/connect/api_op_DescribeInstance.go | 9 + service/connect/api_op_GetMetricDataV2.go | 2 +- service/connect/deserializers.go | 151 ++++++ service/connect/types/enums.go | 27 ++ service/connect/types/types.go | 55 +++ .../api_op_AcceptSubscriptionRequest.go | 3 + service/datazone/deserializers.go | 109 +++++ service/datazone/serializers.go | 50 ++ service/datazone/types/types.go | 46 ++ service/datazone/validators.go | 40 ++ .../api_op_DescribeListenerAttributes.go | 142 ++++++ .../api_op_ModifyListenerAttributes.go | 147 ++++++ .../api_op_ModifyTargetGroupAttributes.go | 4 +- .../elasticloadbalancingv2/deserializers.go | 433 ++++++++++++++++++ service/elasticloadbalancingv2/generated.json | 2 + service/elasticloadbalancingv2/serializers.go | 188 ++++++++ .../api_op_DescribeListenerAttributes.go.snap | 36 ++ .../api_op_ModifyListenerAttributes.go.snap | 36 ++ .../elasticloadbalancingv2/snapshot_test.go | 48 ++ service/elasticloadbalancingv2/types/types.go | 18 + service/elasticloadbalancingv2/validators.go | 81 ++++ service/mediaconnect/api_op_CreateFlow.go | 3 + .../api_op_DescribeFlowSourceThumbnail.go | 143 ++++++ service/mediaconnect/api_op_UpdateFlow.go | 3 + service/mediaconnect/deserializers.go | 283 ++++++++++++ service/mediaconnect/generated.json | 1 + service/mediaconnect/serializers.go | 91 ++++ ...api_op_DescribeFlowSourceThumbnail.go.snap | 36 ++ service/mediaconnect/snapshot_test.go | 24 + service/mediaconnect/types/enums.go | 19 + service/mediaconnect/types/types.go | 39 ++ service/mediaconnect/validators.go | 39 ++ service/medialive/deserializers.go | 26 ++ service/medialive/serializers.go | 10 + service/medialive/types/types.go | 8 + .../sagemaker/api_op_CreateTransformJob.go | 5 +- service/sagemaker/deserializers.go | 9 + service/sagemaker/serializers.go | 5 + service/sagemaker/types/enums.go | 21 + service/sagemaker/types/types.go | 8 +- .../api_op_UpdateDbInstance.go | 7 + service/timestreaminfluxdb/serializers.go | 10 + service/timestreaminfluxdb/types/enums.go | 18 +- 52 files changed, 2480 insertions(+), 15 deletions(-) create mode 100644 .changelog/3ced4aa7a3484c19b67bb518f9ec39d8.json create mode 100644 .changelog/6cf17f3483b54473b16c8f9ca40beda0.json create mode 100644 .changelog/89e0f7a0c06b4dc5ab7e2eeb66287fb8.json create mode 100644 .changelog/c3048c3bf37d437f9da0619e14faa086.json create mode 100644 .changelog/c6377034452c477c88d86d10f8df502e.json create mode 100644 .changelog/d7426ee7ace54a8f98226f487647cbce.json create mode 100644 .changelog/f3dffc54898a4bd2a078376e23475957.json create mode 100644 service/elasticloadbalancingv2/api_op_DescribeListenerAttributes.go create mode 100644 service/elasticloadbalancingv2/api_op_ModifyListenerAttributes.go create mode 100644 service/elasticloadbalancingv2/snapshot/api_op_DescribeListenerAttributes.go.snap create mode 100644 service/elasticloadbalancingv2/snapshot/api_op_ModifyListenerAttributes.go.snap create mode 100644 service/mediaconnect/api_op_DescribeFlowSourceThumbnail.go create mode 100644 service/mediaconnect/snapshot/api_op_DescribeFlowSourceThumbnail.go.snap diff --git a/.changelog/3ced4aa7a3484c19b67bb518f9ec39d8.json b/.changelog/3ced4aa7a3484c19b67bb518f9ec39d8.json new file mode 100644 index 00000000000..cc51b0b091f --- /dev/null +++ b/.changelog/3ced4aa7a3484c19b67bb518f9ec39d8.json @@ -0,0 +1,8 @@ +{ + "id": "3ced4aa7-a348-4c19-b67b-b518f9ec39d8", + "type": "feature", + "description": "Added MinQP as a Rate Control option for H264 and H265 encodes.", + "modules": [ + "service/medialive" + ] +} \ No newline at end of file diff --git a/.changelog/6cf17f3483b54473b16c8f9ca40beda0.json b/.changelog/6cf17f3483b54473b16c8f9ca40beda0.json new file mode 100644 index 00000000000..7f728dc521b --- /dev/null +++ b/.changelog/6cf17f3483b54473b16c8f9ca40beda0.json @@ -0,0 +1,8 @@ +{ + "id": "6cf17f34-83b5-4473-b16c-8f9ca40beda0", + "type": "feature", + "description": "Release ReplicaConfiguration as part of DescribeInstance", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/89e0f7a0c06b4dc5ab7e2eeb66287fb8.json b/.changelog/89e0f7a0c06b4dc5ab7e2eeb66287fb8.json new file mode 100644 index 00000000000..aa12d8c462b --- /dev/null +++ b/.changelog/89e0f7a0c06b4dc5ab7e2eeb66287fb8.json @@ -0,0 +1,8 @@ +{ + "id": "89e0f7a0-c06b-4dc5-ab7e-2eeb66287fb8", + "type": "feature", + "description": "Timestream for InfluxDB now supports compute scaling and deployment type conversion. This release adds the DbInstanceType and DeploymentType parameters to the UpdateDbInstance API.", + "modules": [ + "service/timestreaminfluxdb" + ] +} \ No newline at end of file diff --git a/.changelog/c3048c3bf37d437f9da0619e14faa086.json b/.changelog/c3048c3bf37d437f9da0619e14faa086.json new file mode 100644 index 00000000000..71242ea384d --- /dev/null +++ b/.changelog/c3048c3bf37d437f9da0619e14faa086.json @@ -0,0 +1,8 @@ +{ + "id": "c3048c3b-f37d-437f-9da0-619e14faa086", + "type": "feature", + "description": "Add support to let data publisher specify a subset of the data asset that a subscriber will have access to based on the asset filters provided, when accepting a subscription request.", + "modules": [ + "service/datazone" + ] +} \ No newline at end of file diff --git a/.changelog/c6377034452c477c88d86d10f8df502e.json b/.changelog/c6377034452c477c88d86d10f8df502e.json new file mode 100644 index 00000000000..030e24bd121 --- /dev/null +++ b/.changelog/c6377034452c477c88d86d10f8df502e.json @@ -0,0 +1,8 @@ +{ + "id": "c6377034-452c-477c-88d8-6d10f8df502e", + "type": "feature", + "description": "AWS Elemental MediaConnect introduces thumbnails for Flow source monitoring. Thumbnails provide still image previews of the live content feeding your MediaConnect Flow allowing you to easily verify that your source is operating as expected.", + "modules": [ + "service/mediaconnect" + ] +} \ No newline at end of file diff --git a/.changelog/d7426ee7ace54a8f98226f487647cbce.json b/.changelog/d7426ee7ace54a8f98226f487647cbce.json new file mode 100644 index 00000000000..696c994f1f8 --- /dev/null +++ b/.changelog/d7426ee7ace54a8f98226f487647cbce.json @@ -0,0 +1,8 @@ +{ + "id": "d7426ee7-ace5-4a8f-9822-6f487647cbce", + "type": "feature", + "description": "Amazon SageMaker now supports automatic mounting of a user's home folder in the Amazon Elastic File System (EFS) associated with the SageMaker Studio domain to their Studio Spaces to enable users to share data between their own private spaces.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/f3dffc54898a4bd2a078376e23475957.json b/.changelog/f3dffc54898a4bd2a078376e23475957.json new file mode 100644 index 00000000000..0db7e2ec982 --- /dev/null +++ b/.changelog/f3dffc54898a4bd2a078376e23475957.json @@ -0,0 +1,8 @@ +{ + "id": "f3dffc54-898a-4bd2-a078-376e23475957", + "type": "feature", + "description": "This release adds support for configuring TCP idle timeout on NLB and GWLB listeners.", + "modules": [ + "service/elasticloadbalancingv2" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 4ef58369a39..f4c8ccb3bb1 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.14.4" +const goModuleVersion = "1.15.0" diff --git a/service/connect/api_op_AssociateSecurityKey.go b/service/connect/api_op_AssociateSecurityKey.go index b3b226a7b30..af2d754a527 100644 --- a/service/connect/api_op_AssociateSecurityKey.go +++ b/service/connect/api_op_AssociateSecurityKey.go @@ -38,7 +38,7 @@ type AssociateSecurityKeyInput struct { // This member is required. InstanceId *string - // A valid security key in PEM format. + // A valid security key in PEM format as a String. // // This member is required. Key *string diff --git a/service/connect/api_op_DescribeInstance.go b/service/connect/api_op_DescribeInstance.go index 65757030d02..46bbffdcaea 100644 --- a/service/connect/api_op_DescribeInstance.go +++ b/service/connect/api_op_DescribeInstance.go @@ -52,6 +52,15 @@ type DescribeInstanceOutput struct { // The name of the instance. Instance *types.Instance + // Status information about the replication process. This field is included only + // when you are using the [ReplicateInstance]API to replicate an Amazon Connect instance across + // Amazon Web Services Regions. For information about replicating Amazon Connect + // instances, see [Create a replica of your existing Amazon Connect instance]in the Amazon Connect Administrator Guide. + // + // [Create a replica of your existing Amazon Connect instance]: https://docs.aws.amazon.com/connect/latest/adminguide/create-replica-connect-instance.html + // [ReplicateInstance]: https://docs.aws.amazon.com/connect/latest/APIReference/API_ReplicateInstance.html + ReplicationConfiguration *types.ReplicationConfiguration + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/connect/api_op_GetMetricDataV2.go b/service/connect/api_op_GetMetricDataV2.go index 12224bd8d3a..5dfca43b209 100644 --- a/service/connect/api_op_GetMetricDataV2.go +++ b/service/connect/api_op_GetMetricDataV2.go @@ -823,7 +823,7 @@ type GetMetricDataV2Input struct { // // The Negate key in Metric Level Filters is not applicable for this metric. // - // SUM_CONTACTS_ABANDONED Unit: Count + // CONTACTS_ABANDONED Unit: Count // // Metric filter: // diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index 57bde24bfc1..5d52a23823b 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -11110,6 +11110,11 @@ func awsRestjson1_deserializeOpDocumentDescribeInstanceOutput(v **DescribeInstan return err } + case "ReplicationConfiguration": + if err := awsRestjson1_deserializeDocumentReplicationConfiguration(&sv.ReplicationConfiguration, value); err != nil { + return err + } + default: _, _ = key, value @@ -52666,6 +52671,152 @@ func awsRestjson1_deserializeDocumentReferenceSummaryList(v *[]types.ReferenceSu return nil } +func awsRestjson1_deserializeDocumentReplicationConfiguration(v **types.ReplicationConfiguration, 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.ReplicationConfiguration + if *v == nil { + sv = &types.ReplicationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "GlobalSignInEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlobalSignInEndpoint to be of type string, got %T instead", value) + } + sv.GlobalSignInEndpoint = ptr.String(jtv) + } + + case "ReplicationStatusSummaryList": + if err := awsRestjson1_deserializeDocumentReplicationStatusSummaryList(&sv.ReplicationStatusSummaryList, value); err != nil { + return err + } + + case "SourceRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsRegion to be of type string, got %T instead", value) + } + sv.SourceRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReplicationStatusSummary(v **types.ReplicationStatusSummary, 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.ReplicationStatusSummary + if *v == nil { + sv = &types.ReplicationStatusSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsRegion to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "ReplicationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceReplicationStatus to be of type string, got %T instead", value) + } + sv.ReplicationStatus = types.InstanceReplicationStatus(jtv) + } + + case "ReplicationStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationStatusReason to be of type string, got %T instead", value) + } + sv.ReplicationStatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReplicationStatusSummaryList(v *[]types.ReplicationStatusSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ReplicationStatusSummary + if *v == nil { + cv = []types.ReplicationStatusSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReplicationStatusSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentReplicationStatusSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentRequiredFieldInfo(v **types.RequiredFieldInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/connect/types/enums.go b/service/connect/types/enums.go index 153906d702b..1007a84627a 100644 --- a/service/connect/types/enums.go +++ b/service/connect/types/enums.go @@ -951,6 +951,33 @@ func (InstanceAttributeType) Values() []InstanceAttributeType { } } +type InstanceReplicationStatus string + +// Enum values for InstanceReplicationStatus +const ( + InstanceReplicationStatusInstanceReplicationComplete InstanceReplicationStatus = "INSTANCE_REPLICATION_COMPLETE" + InstanceReplicationStatusInstanceReplicationInProgress InstanceReplicationStatus = "INSTANCE_REPLICATION_IN_PROGRESS" + InstanceReplicationStatusInstanceReplicationFailed InstanceReplicationStatus = "INSTANCE_REPLICATION_FAILED" + InstanceReplicationStatusInstanceReplicaDeleting InstanceReplicationStatus = "INSTANCE_REPLICA_DELETING" + InstanceReplicationStatusInstanceReplicationDeletionFailed InstanceReplicationStatus = "INSTANCE_REPLICATION_DELETION_FAILED" + InstanceReplicationStatusResourceReplicationNotStarted InstanceReplicationStatus = "RESOURCE_REPLICATION_NOT_STARTED" +) + +// Values returns all known values for InstanceReplicationStatus. 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 (InstanceReplicationStatus) Values() []InstanceReplicationStatus { + return []InstanceReplicationStatus{ + "INSTANCE_REPLICATION_COMPLETE", + "INSTANCE_REPLICATION_IN_PROGRESS", + "INSTANCE_REPLICATION_FAILED", + "INSTANCE_REPLICA_DELETING", + "INSTANCE_REPLICATION_DELETION_FAILED", + "RESOURCE_REPLICATION_NOT_STARTED", + } +} + type InstanceStatus string // Enum values for InstanceStatus diff --git a/service/connect/types/types.go b/service/connect/types/types.go index 976b67798ad..56633857731 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -4722,6 +4722,61 @@ type ReferenceSummaryMemberUrl struct { func (*ReferenceSummaryMemberUrl) isReferenceSummary() {} +// Details about the status of the replication of a source Amazon Connect instance +// across Amazon Web Services Regions. Use these details to understand the general +// status of a given replication. For information about why a replication process +// may fail, see [Why a ReplicateInstance call fails]in the Create a replica of your existing Amazon Connect instance +// topic in the Amazon Connect Administrator Guide. +// +// [Why a ReplicateInstance call fails]: https://docs.aws.amazon.com/connect/latest/adminguide/create-replica-connect-instance.html#why-replicateinstance-fails +type ReplicationConfiguration struct { + + // The URL that is used to sign-in to your Amazon Connect instance according to + // your traffic distribution group configuration. For more information about + // sign-in and traffic distribution groups, see [Important things to know]in the Create traffic distribution + // groups topic in the Amazon Connect Administrator Guide. + // + // [Important things to know]: https://docs.aws.amazon.com/connect/latest/adminguide/setup-traffic-distribution-groups.html + GlobalSignInEndpoint *string + + // A list of replication status summaries. The summaries contain details about the + // replication of configuration information for Amazon Connect resources, for each + // Amazon Web Services Region. + ReplicationStatusSummaryList []ReplicationStatusSummary + + // The Amazon Web Services Region where the source Amazon Connect instance was + // created. This is the Region where the [ReplicateInstance]API was called to start the replication + // process. + // + // [ReplicateInstance]: https://docs.aws.amazon.com/connect/latest/APIReference/API_ReplicateInstance.html + SourceRegion *string + + noSmithyDocumentSerde +} + +// Status information about the replication process, where you use the [ReplicateInstance] API to +// create a replica of your Amazon Connect instance in another Amazon Web Services +// Region. For more information, see [Set up Amazon Connect Global Resiliency]in the Amazon Connect Administrator Guide. +// +// [ReplicateInstance]: https://docs.aws.amazon.com/connect/latest/APIReference/API_ReplicateInstance.html +// [Set up Amazon Connect Global Resiliency]: https://docs.aws.amazon.com/connect/latest/adminguide/setup-connect-global-resiliency.html +type ReplicationStatusSummary struct { + + // The Amazon Web Services Region. This can be either the source or the replica + // Region, depending where it appears in the summary list. + Region *string + + // The state of the replication. + ReplicationStatus InstanceReplicationStatus + + // A description of the replication status. Use this information to resolve any + // issues that are preventing the successful replication of your Amazon Connect + // instance to another Region. + ReplicationStatusReason *string + + noSmithyDocumentSerde +} + // Information about a required field. type RequiredFieldInfo struct { diff --git a/service/datazone/api_op_AcceptSubscriptionRequest.go b/service/datazone/api_op_AcceptSubscriptionRequest.go index 00e85bb206d..05ddae71bb0 100644 --- a/service/datazone/api_op_AcceptSubscriptionRequest.go +++ b/service/datazone/api_op_AcceptSubscriptionRequest.go @@ -41,6 +41,9 @@ type AcceptSubscriptionRequestInput struct { // This member is required. Identifier *string + // The asset scopes of the accept subscription request. + AssetScopes []types.AcceptedAssetScope + // A description that specifies the reason for accepting the specified // subscription request. DecisionComment *string diff --git a/service/datazone/deserializers.go b/service/datazone/deserializers.go index 71dd7aefdb4..61aba38e23b 100644 --- a/service/datazone/deserializers.go +++ b/service/datazone/deserializers.go @@ -30014,6 +30014,69 @@ func awsRestjson1_deserializeDocumentAssetRevisions(v *[]types.AssetRevision, va return nil } +func awsRestjson1_deserializeDocumentAssetScope(v **types.AssetScope, 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.AssetScope + if *v == nil { + sv = &types.AssetScope{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "assetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssetId to be of type string, got %T instead", value) + } + sv.AssetId = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "filterIds": + if err := awsRestjson1_deserializeDocumentFilterIds(&sv.FilterIds, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAssetTypeItem(v **types.AssetTypeItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -34088,6 +34151,42 @@ func awsRestjson1_deserializeDocumentFilterExpressions(v *[]types.FilterExpressi return nil } +func awsRestjson1_deserializeDocumentFilterIds(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentFormEntryOutput(v **types.FormEntryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -39872,6 +39971,11 @@ func awsRestjson1_deserializeDocumentSubscribedAsset(v **types.SubscribedAsset, sv.AssetRevision = ptr.String(jtv) } + case "assetScope": + if err := awsRestjson1_deserializeDocumentAssetScope(&sv.AssetScope, value); err != nil { + return err + } + case "failureCause": if err := awsRestjson1_deserializeDocumentFailureCause(&sv.FailureCause, value); err != nil { return err @@ -39958,6 +40062,11 @@ func awsRestjson1_deserializeDocumentSubscribedAssetListing(v **types.Subscribed for key, value := range shape { switch key { + case "assetScope": + if err := awsRestjson1_deserializeDocumentAssetScope(&sv.AssetScope, value); err != nil { + return err + } + case "entityId": if value != nil { jtv, ok := value.(string) diff --git a/service/datazone/serializers.go b/service/datazone/serializers.go index ec2c3b54d96..8683e46d64c 100644 --- a/service/datazone/serializers.go +++ b/service/datazone/serializers.go @@ -220,6 +220,13 @@ func awsRestjson1_serializeOpDocumentAcceptSubscriptionRequestInput(v *AcceptSub object := value.Object() defer object.Close() + if v.AssetScopes != nil { + ok := object.Key("assetScopes") + if err := awsRestjson1_serializeDocumentAcceptedAssetScopes(v.AssetScopes, ok); err != nil { + return err + } + } + if v.DecisionComment != nil { ok := object.Key("decisionComment") ok.String(*v.DecisionComment) @@ -13143,6 +13150,38 @@ func awsRestjson1_serializeDocumentAcceptChoices(v []types.AcceptChoice, value s return nil } +func awsRestjson1_serializeDocumentAcceptedAssetScope(v *types.AcceptedAssetScope, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssetId != nil { + ok := object.Key("assetId") + ok.String(*v.AssetId) + } + + if v.FilterIds != nil { + ok := object.Key("filterIds") + if err := awsRestjson1_serializeDocumentFilterIds(v.FilterIds, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAcceptedAssetScopes(v []types.AcceptedAssetScope, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAcceptedAssetScope(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentAcceptRule(v *types.AcceptRule, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -13686,6 +13725,17 @@ func awsRestjson1_serializeDocumentFilterExpressions(v []types.FilterExpression, return nil } +func awsRestjson1_serializeDocumentFilterIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentFilterList(v []types.FilterClause, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/datazone/types/types.go b/service/datazone/types/types.go index 74e07490091..f745e92d321 100644 --- a/service/datazone/types/types.go +++ b/service/datazone/types/types.go @@ -27,6 +27,22 @@ type AcceptChoice struct { noSmithyDocumentSerde } +// The accepted asset scope. +type AcceptedAssetScope struct { + + // The asset ID of the accepted asset scope. + // + // This member is required. + AssetId *string + + // The filter IDs of the accepted asset scope. + // + // This member is required. + FilterIds []string + + noSmithyDocumentSerde +} + // Specifies the rule and the threshold under which a prediction can be accepted. type AcceptRule struct { @@ -373,6 +389,30 @@ type AssetRevision struct { noSmithyDocumentSerde } +// The asset scope. +type AssetScope struct { + + // The asset ID of the asset scope. + // + // This member is required. + AssetId *string + + // The filter IDs of the asset scope. + // + // This member is required. + FilterIds []string + + // The status of the asset scope. + // + // This member is required. + Status *string + + // The error message of the asset scope. + ErrorMessage *string + + noSmithyDocumentSerde +} + // The name map for assets. type AssetTargetNameMap struct { @@ -3637,6 +3677,9 @@ type SubscribedAsset struct { // This member is required. Status SubscriptionGrantStatus + // The asset scope of the subscribed asset. + AssetScope *AssetScope + // The failure cause included in the details of the asset for which the // subscription grant is created. FailureCause *FailureCause @@ -3657,6 +3700,9 @@ type SubscribedAsset struct { // The details of the published asset for which the subscription grant is created. type SubscribedAssetListing struct { + // The asset scope of the subscribed asset listing. + AssetScope *AssetScope + // The identifier of the published asset for which the subscription grant is // created. EntityId *string diff --git a/service/datazone/validators.go b/service/datazone/validators.go index 8df62cb47f6..a4c00a92036 100644 --- a/service/datazone/validators.go +++ b/service/datazone/validators.go @@ -3354,6 +3354,41 @@ func validateAcceptChoices(v []types.AcceptChoice) error { } } +func validateAcceptedAssetScope(v *types.AcceptedAssetScope) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptedAssetScope"} + if v.AssetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssetId")) + } + if v.FilterIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAcceptedAssetScopes(v []types.AcceptedAssetScope) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptedAssetScopes"} + for i := range v { + if err := validateAcceptedAssetScope(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAssetFilterConfiguration(v types.AssetFilterConfiguration) error { if v == nil { return nil @@ -4561,6 +4596,11 @@ func validateOpAcceptSubscriptionRequestInput(v *AcceptSubscriptionRequestInput) if v.Identifier == nil { invalidParams.Add(smithy.NewErrParamRequired("Identifier")) } + if v.AssetScopes != nil { + if err := validateAcceptedAssetScopes(v.AssetScopes); err != nil { + invalidParams.AddNested("AssetScopes", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/elasticloadbalancingv2/api_op_DescribeListenerAttributes.go b/service/elasticloadbalancingv2/api_op_DescribeListenerAttributes.go new file mode 100644 index 00000000000..39d656edf71 --- /dev/null +++ b/service/elasticloadbalancingv2/api_op_DescribeListenerAttributes.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package elasticloadbalancingv2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the attributes for the specified listener. +func (c *Client) DescribeListenerAttributes(ctx context.Context, params *DescribeListenerAttributesInput, optFns ...func(*Options)) (*DescribeListenerAttributesOutput, error) { + if params == nil { + params = &DescribeListenerAttributesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeListenerAttributes", params, optFns, c.addOperationDescribeListenerAttributesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeListenerAttributesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeListenerAttributesInput struct { + + // The Amazon Resource Name (ARN) of the listener. + // + // This member is required. + ListenerArn *string + + noSmithyDocumentSerde +} + +type DescribeListenerAttributesOutput struct { + + // Information about the listener attributes. + Attributes []types.ListenerAttribute + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeListenerAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeListenerAttributes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeListenerAttributes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeListenerAttributes"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDescribeListenerAttributesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeListenerAttributes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeListenerAttributes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeListenerAttributes", + } +} diff --git a/service/elasticloadbalancingv2/api_op_ModifyListenerAttributes.go b/service/elasticloadbalancingv2/api_op_ModifyListenerAttributes.go new file mode 100644 index 00000000000..bec12fff22b --- /dev/null +++ b/service/elasticloadbalancingv2/api_op_ModifyListenerAttributes.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package elasticloadbalancingv2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Modifies the specified attributes of the specified listener. +func (c *Client) ModifyListenerAttributes(ctx context.Context, params *ModifyListenerAttributesInput, optFns ...func(*Options)) (*ModifyListenerAttributesOutput, error) { + if params == nil { + params = &ModifyListenerAttributesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ModifyListenerAttributes", params, optFns, c.addOperationModifyListenerAttributesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ModifyListenerAttributesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ModifyListenerAttributesInput struct { + + // The listener attributes. + // + // This member is required. + Attributes []types.ListenerAttribute + + // The Amazon Resource Name (ARN) of the listener. + // + // This member is required. + ListenerArn *string + + noSmithyDocumentSerde +} + +type ModifyListenerAttributesOutput struct { + + // Information about the listener attributes. + Attributes []types.ListenerAttribute + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationModifyListenerAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyListenerAttributes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyListenerAttributes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyListenerAttributes"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpModifyListenerAttributesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyListenerAttributes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opModifyListenerAttributes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ModifyListenerAttributes", + } +} diff --git a/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go b/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go index a1afaaa1905..215a8dfa19d 100644 --- a/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go +++ b/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go @@ -29,7 +29,7 @@ func (c *Client) ModifyTargetGroupAttributes(ctx context.Context, params *Modify type ModifyTargetGroupAttributesInput struct { - // The attributes. + // The target group attributes. // // This member is required. Attributes []types.TargetGroupAttribute @@ -44,7 +44,7 @@ type ModifyTargetGroupAttributesInput struct { type ModifyTargetGroupAttributesOutput struct { - // Information about the attributes. + // Information about the target group attributes. Attributes []types.TargetGroupAttribute // Metadata pertaining to the operation's result. diff --git a/service/elasticloadbalancingv2/deserializers.go b/service/elasticloadbalancingv2/deserializers.go index 81353792b2b..9107e01c147 100644 --- a/service/elasticloadbalancingv2/deserializers.go +++ b/service/elasticloadbalancingv2/deserializers.go @@ -1972,6 +1972,114 @@ func awsAwsquery_deserializeOpErrorDescribeAccountLimits(response *smithyhttp.Re } } +type awsAwsquery_deserializeOpDescribeListenerAttributes struct { +} + +func (*awsAwsquery_deserializeOpDescribeListenerAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDescribeListenerAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorDescribeListenerAttributes(response, &metadata) + } + output := &DescribeListenerAttributesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("DescribeListenerAttributesResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentDescribeListenerAttributesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDescribeListenerAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ListenerNotFound", errorCode): + return awsAwsquery_deserializeErrorListenerNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpDescribeListenerCertificates struct { } @@ -3901,6 +4009,117 @@ func awsAwsquery_deserializeOpErrorModifyListener(response *smithyhttp.Response, } } +type awsAwsquery_deserializeOpModifyListenerAttributes struct { +} + +func (*awsAwsquery_deserializeOpModifyListenerAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpModifyListenerAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorModifyListenerAttributes(response, &metadata) + } + output := &ModifyListenerAttributesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ModifyListenerAttributesResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentModifyListenerAttributesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorModifyListenerAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidConfigurationRequest", errorCode): + return awsAwsquery_deserializeErrorInvalidConfigurationRequestException(response, errorBody) + + case strings.EqualFold("ListenerNotFound", errorCode): + return awsAwsquery_deserializeErrorListenerNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpModifyLoadBalancerAttributes struct { } @@ -10631,6 +10850,136 @@ func awsAwsquery_deserializeDocumentListener(v **types.Listener, decoder smithyx return nil } +func awsAwsquery_deserializeDocumentListenerAttribute(v **types.ListenerAttribute, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ListenerAttribute + if *v == nil { + sv = &types.ListenerAttribute{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Key", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Key = ptr.String(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Value = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentListenerAttributes(v *[]types.ListenerAttribute, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ListenerAttribute + if *v == nil { + sv = make([]types.ListenerAttribute, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.ListenerAttribute + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentListenerAttribute(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentListenerAttributesUnwrapped(v *[]types.ListenerAttribute, decoder smithyxml.NodeDecoder) error { + var sv []types.ListenerAttribute + if *v == nil { + sv = make([]types.ListenerAttribute, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ListenerAttribute + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentListenerAttribute(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsAwsquery_deserializeDocumentListenerNotFoundException(v **types.ListenerNotFoundException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16398,6 +16747,48 @@ func awsAwsquery_deserializeOpDocumentDescribeAccountLimitsOutput(v **DescribeAc return nil } +func awsAwsquery_deserializeOpDocumentDescribeListenerAttributesOutput(v **DescribeListenerAttributesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeListenerAttributesOutput + if *v == nil { + sv = &DescribeListenerAttributesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Attributes", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentListenerAttributes(&sv.Attributes, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentDescribeListenerCertificatesOutput(v **DescribeListenerCertificatesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17208,6 +17599,48 @@ func awsAwsquery_deserializeOpDocumentGetTrustStoreRevocationContentOutput(v **G return nil } +func awsAwsquery_deserializeOpDocumentModifyListenerAttributesOutput(v **ModifyListenerAttributesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ModifyListenerAttributesOutput + if *v == nil { + sv = &ModifyListenerAttributesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Attributes", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentListenerAttributes(&sv.Attributes, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentModifyListenerOutput(v **ModifyListenerOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/elasticloadbalancingv2/generated.json b/service/elasticloadbalancingv2/generated.json index 9c91956fe69..703c1bacf79 100644 --- a/service/elasticloadbalancingv2/generated.json +++ b/service/elasticloadbalancingv2/generated.json @@ -25,6 +25,7 @@ "api_op_DeleteTrustStore.go", "api_op_DeregisterTargets.go", "api_op_DescribeAccountLimits.go", + "api_op_DescribeListenerAttributes.go", "api_op_DescribeListenerCertificates.go", "api_op_DescribeListeners.go", "api_op_DescribeLoadBalancerAttributes.go", @@ -42,6 +43,7 @@ "api_op_GetTrustStoreCaCertificatesBundle.go", "api_op_GetTrustStoreRevocationContent.go", "api_op_ModifyListener.go", + "api_op_ModifyListenerAttributes.go", "api_op_ModifyLoadBalancerAttributes.go", "api_op_ModifyRule.go", "api_op_ModifyTargetGroup.go", diff --git a/service/elasticloadbalancingv2/serializers.go b/service/elasticloadbalancingv2/serializers.go index 681867554c7..2271d01801e 100644 --- a/service/elasticloadbalancingv2/serializers.go +++ b/service/elasticloadbalancingv2/serializers.go @@ -1040,6 +1040,70 @@ func (m *awsAwsquery_serializeOpDescribeAccountLimits) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpDescribeListenerAttributes struct { +} + +func (*awsAwsquery_serializeOpDescribeListenerAttributes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDescribeListenerAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeListenerAttributesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DescribeListenerAttributes") + body.Key("Version").String("2015-12-01") + + if err := awsAwsquery_serializeOpDocumentDescribeListenerAttributesInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpDescribeListenerCertificates struct { } @@ -2128,6 +2192,70 @@ func (m *awsAwsquery_serializeOpModifyListener) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpModifyListenerAttributes struct { +} + +func (*awsAwsquery_serializeOpModifyListenerAttributes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpModifyListenerAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ModifyListenerAttributesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ModifyListenerAttributes") + body.Key("Version").String("2015-12-01") + + if err := awsAwsquery_serializeOpDocumentModifyListenerAttributesInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpModifyLoadBalancerAttributes struct { } @@ -3323,6 +3451,35 @@ func awsAwsquery_serializeDocumentListenerArns(v []string, value query.Value) er return nil } +func awsAwsquery_serializeDocumentListenerAttribute(v *types.ListenerAttribute, value query.Value) error { + object := value.Object() + _ = object + + if v.Key != nil { + objectKey := object.Key("Key") + objectKey.String(*v.Key) + } + + if v.Value != nil { + objectKey := object.Key("Value") + objectKey.String(*v.Value) + } + + return nil +} + +func awsAwsquery_serializeDocumentListenerAttributes(v []types.ListenerAttribute, value query.Value) error { + array := value.Array("member") + + for i := range v { + av := array.Value() + if err := awsAwsquery_serializeDocumentListenerAttribute(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsquery_serializeDocumentListOfDescribeTargetHealthIncludeOptions(v []types.DescribeTargetHealthInputIncludeEnum, value query.Value) error { array := value.Array("member") @@ -4434,6 +4591,18 @@ func awsAwsquery_serializeOpDocumentDescribeAccountLimitsInput(v *DescribeAccoun return nil } +func awsAwsquery_serializeOpDocumentDescribeListenerAttributesInput(v *DescribeListenerAttributesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ListenerArn != nil { + objectKey := object.Key("ListenerArn") + objectKey.String(*v.ListenerArn) + } + + return nil +} + func awsAwsquery_serializeOpDocumentDescribeListenerCertificatesInput(v *DescribeListenerCertificatesInput, value query.Value) error { object := value.Object() _ = object @@ -4797,6 +4966,25 @@ func awsAwsquery_serializeOpDocumentGetTrustStoreRevocationContentInput(v *GetTr return nil } +func awsAwsquery_serializeOpDocumentModifyListenerAttributesInput(v *ModifyListenerAttributesInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Attributes != nil { + objectKey := object.Key("Attributes") + if err := awsAwsquery_serializeDocumentListenerAttributes(v.Attributes, objectKey); err != nil { + return err + } + } + + if v.ListenerArn != nil { + objectKey := object.Key("ListenerArn") + objectKey.String(*v.ListenerArn) + } + + return nil +} + func awsAwsquery_serializeOpDocumentModifyListenerInput(v *ModifyListenerInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/elasticloadbalancingv2/snapshot/api_op_DescribeListenerAttributes.go.snap b/service/elasticloadbalancingv2/snapshot/api_op_DescribeListenerAttributes.go.snap new file mode 100644 index 00000000000..d7475b0af73 --- /dev/null +++ b/service/elasticloadbalancingv2/snapshot/api_op_DescribeListenerAttributes.go.snap @@ -0,0 +1,36 @@ +DescribeListenerAttributes + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/elasticloadbalancingv2/snapshot/api_op_ModifyListenerAttributes.go.snap b/service/elasticloadbalancingv2/snapshot/api_op_ModifyListenerAttributes.go.snap new file mode 100644 index 00000000000..ce6f4317e29 --- /dev/null +++ b/service/elasticloadbalancingv2/snapshot/api_op_ModifyListenerAttributes.go.snap @@ -0,0 +1,36 @@ +ModifyListenerAttributes + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/elasticloadbalancingv2/snapshot_test.go b/service/elasticloadbalancingv2/snapshot_test.go index 9c5c22f2a4d..f45b7f32fd5 100644 --- a/service/elasticloadbalancingv2/snapshot_test.go +++ b/service/elasticloadbalancingv2/snapshot_test.go @@ -254,6 +254,18 @@ func TestCheckSnapshot_DescribeAccountLimits(t *testing.T) { } } +func TestCheckSnapshot_DescribeListenerAttributes(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeListenerAttributes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeListenerAttributes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeListenerCertificates(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeListenerCertificates(context.Background(), nil, func(o *Options) { @@ -458,6 +470,18 @@ func TestCheckSnapshot_ModifyListener(t *testing.T) { } } +func TestCheckSnapshot_ModifyListenerAttributes(t *testing.T) { + svc := New(Options{}) + _, err := svc.ModifyListenerAttributes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ModifyListenerAttributes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ModifyLoadBalancerAttributes(t *testing.T) { svc := New(Options{}) _, err := svc.ModifyLoadBalancerAttributes(context.Background(), nil, func(o *Options) { @@ -805,6 +829,18 @@ func TestUpdateSnapshot_DescribeAccountLimits(t *testing.T) { } } +func TestUpdateSnapshot_DescribeListenerAttributes(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeListenerAttributes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeListenerAttributes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeListenerCertificates(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeListenerCertificates(context.Background(), nil, func(o *Options) { @@ -1009,6 +1045,18 @@ func TestUpdateSnapshot_ModifyListener(t *testing.T) { } } +func TestUpdateSnapshot_ModifyListenerAttributes(t *testing.T) { + svc := New(Options{}) + _, err := svc.ModifyListenerAttributes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ModifyListenerAttributes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ModifyLoadBalancerAttributes(t *testing.T) { svc := New(Options{}) _, err := svc.ModifyLoadBalancerAttributes(context.Background(), nil, func(o *Options) { diff --git a/service/elasticloadbalancingv2/types/types.go b/service/elasticloadbalancingv2/types/types.go index 2b0677f6d35..470d15dd27a 100644 --- a/service/elasticloadbalancingv2/types/types.go +++ b/service/elasticloadbalancingv2/types/types.go @@ -452,6 +452,24 @@ type Listener struct { noSmithyDocumentSerde } +// Information about a listener attribute. +type ListenerAttribute struct { + + // The name of the attribute. + // + // The following attribute is supported by Network Load Balancers, and Gateway + // Load Balancers. + // + // - tcp.idle_timeout.seconds - The tcp idle timeout value, in seconds. The valid + // range is 60-6000 seconds. The default is 350 seconds. + Key *string + + // The value of the attribute. + Value *string + + noSmithyDocumentSerde +} + // Information about a load balancer. type LoadBalancer struct { diff --git a/service/elasticloadbalancingv2/validators.go b/service/elasticloadbalancingv2/validators.go index a17f2f73214..79a5f0ab0cd 100644 --- a/service/elasticloadbalancingv2/validators.go +++ b/service/elasticloadbalancingv2/validators.go @@ -310,6 +310,26 @@ func (m *validateOpDeregisterTargets) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpDescribeListenerAttributes struct { +} + +func (*validateOpDescribeListenerAttributes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeListenerAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeListenerAttributesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeListenerAttributesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeListenerCertificates struct { } @@ -510,6 +530,26 @@ func (m *validateOpGetTrustStoreRevocationContent) HandleInitialize(ctx context. return next.HandleInitialize(ctx, in) } +type validateOpModifyListenerAttributes struct { +} + +func (*validateOpModifyListenerAttributes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpModifyListenerAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ModifyListenerAttributesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpModifyListenerAttributesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpModifyListener struct { } @@ -850,6 +890,10 @@ func addOpDeregisterTargetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterTargets{}, middleware.After) } +func addOpDescribeListenerAttributesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeListenerAttributes{}, middleware.After) +} + func addOpDescribeListenerCertificatesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeListenerCertificates{}, middleware.After) } @@ -890,6 +934,10 @@ func addOpGetTrustStoreRevocationContentValidationMiddleware(stack *middleware.S return stack.Initialize.Add(&validateOpGetTrustStoreRevocationContent{}, middleware.After) } +func addOpModifyListenerAttributesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpModifyListenerAttributes{}, middleware.After) +} + func addOpModifyListenerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyListener{}, middleware.After) } @@ -1436,6 +1484,21 @@ func validateOpDeregisterTargetsInput(v *DeregisterTargetsInput) error { } } +func validateOpDescribeListenerAttributesInput(v *DescribeListenerAttributesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeListenerAttributesInput"} + if v.ListenerArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeListenerCertificatesInput(v *DescribeListenerCertificatesInput) error { if v == nil { return nil @@ -1594,6 +1657,24 @@ func validateOpGetTrustStoreRevocationContentInput(v *GetTrustStoreRevocationCon } } +func validateOpModifyListenerAttributesInput(v *ModifyListenerAttributesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModifyListenerAttributesInput"} + if v.ListenerArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ListenerArn")) + } + if v.Attributes == nil { + invalidParams.Add(smithy.NewErrParamRequired("Attributes")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpModifyListenerInput(v *ModifyListenerInput) error { if v == nil { return nil diff --git a/service/mediaconnect/api_op_CreateFlow.go b/service/mediaconnect/api_op_CreateFlow.go index 28f00a61d2a..c356dad9f91 100644 --- a/service/mediaconnect/api_op_CreateFlow.go +++ b/service/mediaconnect/api_op_CreateFlow.go @@ -60,6 +60,9 @@ type CreateFlowInput struct { // The settings for source failover. SourceFailoverConfig *types.FailoverConfig + // The settings for source monitoring. + SourceMonitoringConfig *types.MonitoringConfig + Sources []types.SetSourceRequest // The VPC interfaces you want on the flow. diff --git a/service/mediaconnect/api_op_DescribeFlowSourceThumbnail.go b/service/mediaconnect/api_op_DescribeFlowSourceThumbnail.go new file mode 100644 index 00000000000..34d277af81b --- /dev/null +++ b/service/mediaconnect/api_op_DescribeFlowSourceThumbnail.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays the thumbnail details of a flow's source stream. +func (c *Client) DescribeFlowSourceThumbnail(ctx context.Context, params *DescribeFlowSourceThumbnailInput, optFns ...func(*Options)) (*DescribeFlowSourceThumbnailOutput, error) { + if params == nil { + params = &DescribeFlowSourceThumbnailInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeFlowSourceThumbnail", params, optFns, c.addOperationDescribeFlowSourceThumbnailMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeFlowSourceThumbnailOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeFlowSourceThumbnailInput struct { + + // The Amazon Resource Name (ARN) of the flow. + // + // This member is required. + FlowArn *string + + noSmithyDocumentSerde +} + +type DescribeFlowSourceThumbnailOutput struct { + + // The details of the thumbnail, including thumbnail base64 string, timecode and + // the time when thumbnail was generated. + ThumbnailDetails *types.ThumbnailDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeFlowSourceThumbnailMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeFlowSourceThumbnail{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeFlowSourceThumbnail{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFlowSourceThumbnail"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDescribeFlowSourceThumbnailValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFlowSourceThumbnail(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeFlowSourceThumbnail(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeFlowSourceThumbnail", + } +} diff --git a/service/mediaconnect/api_op_UpdateFlow.go b/service/mediaconnect/api_op_UpdateFlow.go index 6ad1ff22005..49dc352f88e 100644 --- a/service/mediaconnect/api_op_UpdateFlow.go +++ b/service/mediaconnect/api_op_UpdateFlow.go @@ -41,6 +41,9 @@ type UpdateFlowInput struct { // The settings for source failover. SourceFailoverConfig *types.UpdateFailoverConfig + // The settings for source monitoring. + SourceMonitoringConfig *types.MonitoringConfig + noSmithyDocumentSerde } diff --git a/service/mediaconnect/deserializers.go b/service/mediaconnect/deserializers.go index 1ad6f6b59da..4557e504e1e 100644 --- a/service/mediaconnect/deserializers.go +++ b/service/mediaconnect/deserializers.go @@ -2769,6 +2769,168 @@ func awsRestjson1_deserializeOpDocumentDescribeFlowSourceMetadataOutput(v **Desc return nil } +type awsRestjson1_deserializeOpDescribeFlowSourceThumbnail struct { +} + +func (*awsRestjson1_deserializeOpDescribeFlowSourceThumbnail) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeFlowSourceThumbnail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFlowSourceThumbnail(response, &metadata) + } + output := &DescribeFlowSourceThumbnailOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeFlowSourceThumbnailOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeFlowSourceThumbnail(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeFlowSourceThumbnailOutput(v **DescribeFlowSourceThumbnailOutput, 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 *DescribeFlowSourceThumbnailOutput + if *v == nil { + sv = &DescribeFlowSourceThumbnailOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "thumbnailDetails": + if err := awsRestjson1_deserializeDocumentThumbnailDetails(&sv.ThumbnailDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpDescribeGateway struct { } @@ -11126,6 +11288,11 @@ func awsRestjson1_deserializeDocumentFlow(v **types.Flow, value interface{}) err return err } + case "sourceMonitoringConfig": + if err := awsRestjson1_deserializeDocumentMonitoringConfig(&sv.SourceMonitoringConfig, value); err != nil { + return err + } + case "sources": if err := awsRestjson1_deserializeDocument__listOfSource(&sv.Sources, value); err != nil { return err @@ -12642,6 +12809,46 @@ func awsRestjson1_deserializeDocumentMessages(v **types.Messages, value interfac return nil } +func awsRestjson1_deserializeDocumentMonitoringConfig(v **types.MonitoringConfig, 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.MonitoringConfig + if *v == nil { + sv = &types.MonitoringConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "thumbnailState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThumbnailState to be of type string, got %T instead", value) + } + sv.ThumbnailState = types.ThumbnailState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13391,6 +13598,82 @@ func awsRestjson1_deserializeDocumentSourcePriority(v **types.SourcePriority, va return nil } +func awsRestjson1_deserializeDocumentThumbnailDetails(v **types.ThumbnailDetails, 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.ThumbnailDetails + if *v == nil { + sv = &types.ThumbnailDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "thumbnail": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Thumbnail = ptr.String(jtv) + } + + case "thumbnailMessages": + if err := awsRestjson1_deserializeDocument__listOfMessageDetail(&sv.ThumbnailMessages, value); err != nil { + return err + } + + case "timecode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Timecode = ptr.String(jtv) + } + + case "timestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.Timestamp = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/mediaconnect/generated.json b/service/mediaconnect/generated.json index 4854719c1a2..5ba297580cc 100644 --- a/service/mediaconnect/generated.json +++ b/service/mediaconnect/generated.json @@ -25,6 +25,7 @@ "api_op_DescribeBridge.go", "api_op_DescribeFlow.go", "api_op_DescribeFlowSourceMetadata.go", + "api_op_DescribeFlowSourceThumbnail.go", "api_op_DescribeGateway.go", "api_op_DescribeGatewayInstance.go", "api_op_DescribeOffering.go", diff --git a/service/mediaconnect/serializers.go b/service/mediaconnect/serializers.go index a975dc050dd..c335f8af017 100644 --- a/service/mediaconnect/serializers.go +++ b/service/mediaconnect/serializers.go @@ -789,6 +789,13 @@ func awsRestjson1_serializeOpDocumentCreateFlowInput(v *CreateFlowInput, value s } } + if v.SourceMonitoringConfig != nil { + ok := object.Key("sourceMonitoringConfig") + if err := awsRestjson1_serializeDocumentMonitoringConfig(v.SourceMonitoringConfig, ok); err != nil { + return err + } + } + if v.Sources != nil { ok := object.Key("sources") if err := awsRestjson1_serializeDocument__listOfSetSourceRequest(v.Sources, ok); err != nil { @@ -1354,6 +1361,71 @@ func awsRestjson1_serializeOpHttpBindingsDescribeFlowSourceMetadataInput(v *Desc return nil } +type awsRestjson1_serializeOpDescribeFlowSourceThumbnail struct { +} + +func (*awsRestjson1_serializeOpDescribeFlowSourceThumbnail) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeFlowSourceThumbnail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeFlowSourceThumbnailInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/source-thumbnail") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeFlowSourceThumbnailInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeFlowSourceThumbnailInput(v *DescribeFlowSourceThumbnailInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FlowArn == nil || len(*v.FlowArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} + } + if v.FlowArn != nil { + if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeGateway struct { } @@ -3618,6 +3690,13 @@ func awsRestjson1_serializeOpDocumentUpdateFlowInput(v *UpdateFlowInput, value s } } + if v.SourceMonitoringConfig != nil { + ok := object.Key("sourceMonitoringConfig") + if err := awsRestjson1_serializeDocumentMonitoringConfig(v.SourceMonitoringConfig, ok); err != nil { + return err + } + } + return nil } @@ -5143,6 +5222,18 @@ func awsRestjson1_serializeDocumentMediaStreamSourceConfigurationRequest(v *type return nil } +func awsRestjson1_serializeDocumentMonitoringConfig(v *types.MonitoringConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ThumbnailState) > 0 { + ok := object.Key("thumbnailState") + ok.String(string(v.ThumbnailState)) + } + + return nil +} + func awsRestjson1_serializeDocumentSetGatewayBridgeSourceRequest(v *types.SetGatewayBridgeSourceRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/mediaconnect/snapshot/api_op_DescribeFlowSourceThumbnail.go.snap b/service/mediaconnect/snapshot/api_op_DescribeFlowSourceThumbnail.go.snap new file mode 100644 index 00000000000..2cea66a40c6 --- /dev/null +++ b/service/mediaconnect/snapshot/api_op_DescribeFlowSourceThumbnail.go.snap @@ -0,0 +1,36 @@ +DescribeFlowSourceThumbnail + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mediaconnect/snapshot_test.go b/service/mediaconnect/snapshot_test.go index ad3eb868b0b..8bff5dce946 100644 --- a/service/mediaconnect/snapshot_test.go +++ b/service/mediaconnect/snapshot_test.go @@ -254,6 +254,18 @@ func TestCheckSnapshot_DescribeFlowSourceMetadata(t *testing.T) { } } +func TestCheckSnapshot_DescribeFlowSourceThumbnail(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeFlowSourceThumbnail(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeFlowSourceThumbnail") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeGateway(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeGateway(context.Background(), nil, func(o *Options) { @@ -865,6 +877,18 @@ func TestUpdateSnapshot_DescribeFlowSourceMetadata(t *testing.T) { } } +func TestUpdateSnapshot_DescribeFlowSourceThumbnail(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeFlowSourceThumbnail(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeFlowSourceThumbnail") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeGateway(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeGateway(context.Background(), nil, func(o *Options) { diff --git a/service/mediaconnect/types/enums.go b/service/mediaconnect/types/enums.go index a5354e2084e..14f92f27596 100644 --- a/service/mediaconnect/types/enums.go +++ b/service/mediaconnect/types/enums.go @@ -645,3 +645,22 @@ func (Tcs) Values() []Tcs { "DENSITY", } } + +type ThumbnailState string + +// Enum values for ThumbnailState +const ( + ThumbnailStateEnabled ThumbnailState = "ENABLED" + ThumbnailStateDisabled ThumbnailState = "DISABLED" +) + +// Values returns all known values for ThumbnailState. 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 (ThumbnailState) Values() []ThumbnailState { + return []ThumbnailState{ + "ENABLED", + "DISABLED", + } +} diff --git a/service/mediaconnect/types/types.go b/service/mediaconnect/types/types.go index a6da1ab1160..c2e91d46c68 100644 --- a/service/mediaconnect/types/types.go +++ b/service/mediaconnect/types/types.go @@ -4,6 +4,7 @@ package types import ( smithydocument "github.com/aws/smithy-go/document" + "time" ) // Add a flow source to an existing bridge. @@ -720,6 +721,9 @@ type Flow struct { // The settings for source failover. SourceFailoverConfig *FailoverConfig + // The settings for source monitoring. + SourceMonitoringConfig *MonitoringConfig + Sources []Source // The VPC Interfaces for this flow. @@ -1384,6 +1388,15 @@ type Messages struct { noSmithyDocumentSerde } +// The settings for source monitoring. +type MonitoringConfig struct { + + // The state of thumbnail monitoring. + ThumbnailState ThumbnailState + + noSmithyDocumentSerde +} + // A savings plan that reserves a certain amount of outbound bandwidth usage at a // discounted rate each month over a period of time. type Offering struct { @@ -1766,6 +1779,32 @@ type SourcePriority struct { noSmithyDocumentSerde } +// The details of the thumbnail, including thumbnail base64 string, timecode and +// the time when thumbnail was generated. +type ThumbnailDetails struct { + + // The ARN of the flow that DescribeFlowSourceThumbnail was performed on. + // + // This member is required. + FlowArn *string + + // Status code and messages about the flow source thumbnail. + // + // This member is required. + ThumbnailMessages []MessageDetail + + // Thumbnail Base64 string. + Thumbnail *string + + // Timecode of thumbnail. + Timecode *string + + // The timestamp of when thumbnail was generated. + Timestamp *time.Time + + noSmithyDocumentSerde +} + // Attributes related to the transport stream that are used in a source or output. type Transport struct { diff --git a/service/mediaconnect/validators.go b/service/mediaconnect/validators.go index 86668dc2081..70d4f98376f 100644 --- a/service/mediaconnect/validators.go +++ b/service/mediaconnect/validators.go @@ -330,6 +330,26 @@ func (m *validateOpDescribeFlowSourceMetadata) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpDescribeFlowSourceThumbnail struct { +} + +func (*validateOpDescribeFlowSourceThumbnail) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeFlowSourceThumbnail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeFlowSourceThumbnailInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeFlowSourceThumbnailInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeGateway struct { } @@ -954,6 +974,10 @@ func addOpDescribeFlowSourceMetadataValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpDescribeFlowSourceMetadata{}, middleware.After) } +func addOpDescribeFlowSourceThumbnailValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeFlowSourceThumbnail{}, middleware.After) +} + func addOpDescribeGatewayValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeGateway{}, middleware.After) } @@ -2083,6 +2107,21 @@ func validateOpDescribeFlowSourceMetadataInput(v *DescribeFlowSourceMetadataInpu } } +func validateOpDescribeFlowSourceThumbnailInput(v *DescribeFlowSourceThumbnailInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeFlowSourceThumbnailInput"} + if v.FlowArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("FlowArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeGatewayInput(v *DescribeGatewayInput) error { if v == nil { return nil diff --git a/service/medialive/deserializers.go b/service/medialive/deserializers.go index 8c73a572d65..e488fbe102d 100644 --- a/service/medialive/deserializers.go +++ b/service/medialive/deserializers.go @@ -27014,6 +27014,19 @@ func awsRestjson1_deserializeDocumentH264Settings(v **types.H264Settings, value sv.MinIInterval = ptr.Int32(int32(i64)) } + case "minQp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max51 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinQp = ptr.Int32(int32(i64)) + } + case "numRefFrames": if value != nil { jtv, ok := value.(json.Number) @@ -27535,6 +27548,19 @@ func awsRestjson1_deserializeDocumentH265Settings(v **types.H265Settings, value sv.MinIInterval = ptr.Int32(int32(i64)) } + case "minQp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max51 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinQp = ptr.Int32(int32(i64)) + } + case "mvOverPictureBoundaries": if value != nil { jtv, ok := value.(string) diff --git a/service/medialive/serializers.go b/service/medialive/serializers.go index 23442d551e4..0310a781f65 100644 --- a/service/medialive/serializers.go +++ b/service/medialive/serializers.go @@ -10475,6 +10475,11 @@ func awsRestjson1_serializeDocumentH264Settings(v *types.H264Settings, value smi ok.Integer(*v.MinIInterval) } + if v.MinQp != nil { + ok := object.Key("minQp") + ok.Integer(*v.MinQp) + } + if v.NumRefFrames != nil { ok := object.Key("numRefFrames") ok.Integer(*v.NumRefFrames) @@ -10742,6 +10747,11 @@ func awsRestjson1_serializeDocumentH265Settings(v *types.H265Settings, value smi ok.Integer(*v.MinIInterval) } + if v.MinQp != nil { + ok := object.Key("minQp") + ok.Integer(*v.MinQp) + } + if len(v.MvOverPictureBoundaries) > 0 { ok := object.Key("mvOverPictureBoundaries") ok.String(string(v.MvOverPictureBoundaries)) diff --git a/service/medialive/types/types.go b/service/medialive/types/types.go index 46580e543a2..1e9237c154e 100644 --- a/service/medialive/types/types.go +++ b/service/medialive/types/types.go @@ -2343,6 +2343,10 @@ type H264Settings struct { // GOP. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1 MinIInterval *int32 + // Sets the minimum QP. If you aren't familiar with quantization adjustment, leave + // the field empty. MediaLive will apply an appropriate value. + MinQp *int32 + // Number of reference frames to use. The encoder may use more than requested if // using B-frames and/or interlaced encoding. NumRefFrames *int32 @@ -2596,6 +2600,10 @@ type H265Settings struct { // GOP. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1 MinIInterval *int32 + // Sets the minimum QP. If you aren't familiar with quantization adjustment, leave + // the field empty. MediaLive will apply an appropriate value. + MinQp *int32 + // If you are setting up the picture as a tile, you must set this to "disabled". // In all other configurations, you typically enter "enabled". MvOverPictureBoundaries H265MvOverPictureBoundaries diff --git a/service/sagemaker/api_op_CreateTransformJob.go b/service/sagemaker/api_op_CreateTransformJob.go index f511f758b6b..2bd1faf58cf 100644 --- a/service/sagemaker/api_op_CreateTransformJob.go +++ b/service/sagemaker/api_op_CreateTransformJob.go @@ -112,8 +112,9 @@ type CreateTransformJobInput struct { // [Associate Prediction Results with their Corresponding Input Records]: https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform-data-processing.html DataProcessing *types.DataProcessing - // The environment variables to set in the Docker container. We support up to 16 - // key and values entries in the map. + // The environment variables to set in the Docker container. Don't include any + // sensitive data in your environment variables. We support up to 16 key and values + // entries in the map. Environment map[string]string // Associates a SageMaker job as a trial component with an experiment and trial. diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 898b79ca758..f22b98f3e06 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -80661,6 +80661,15 @@ func awsAwsjson11_deserializeDocumentUserSettings(v **types.UserSettings, value for key, value := range shape { switch key { + case "AutoMountHomeEFS": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoMountHomeEFS to be of type string, got %T instead", value) + } + sv.AutoMountHomeEFS = types.AutoMountHomeEFS(jtv) + } + case "CanvasAppSettings": if err := awsAwsjson11_deserializeDocumentCanvasAppSettings(&sv.CanvasAppSettings, value); err != nil { return err diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 5718902e1ba..69bcb8ce3d0 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -29411,6 +29411,11 @@ func awsAwsjson11_serializeDocumentUserSettings(v *types.UserSettings, value smi object := value.Object() defer object.Close() + if len(v.AutoMountHomeEFS) > 0 { + ok := object.Key("AutoMountHomeEFS") + ok.String(string(v.AutoMountHomeEFS)) + } + if v.CanvasAppSettings != nil { ok := object.Key("CanvasAppSettings") if err := awsAwsjson11_serializeDocumentCanvasAppSettings(v.CanvasAppSettings, ok); err != nil { diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index c8f706ccccd..42a2816cb84 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -1128,6 +1128,27 @@ func (AutoMLSortOrder) Values() []AutoMLSortOrder { } } +type AutoMountHomeEFS string + +// Enum values for AutoMountHomeEFS +const ( + AutoMountHomeEFSEnabled AutoMountHomeEFS = "Enabled" + AutoMountHomeEFSDisabled AutoMountHomeEFS = "Disabled" + AutoMountHomeEFSDefaultAsDomain AutoMountHomeEFS = "DefaultAsDomain" +) + +// Values returns all known values for AutoMountHomeEFS. 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 (AutoMountHomeEFS) Values() []AutoMountHomeEFS { + return []AutoMountHomeEFS{ + "Enabled", + "Disabled", + "DefaultAsDomain", + } +} + type AutotuneMode string // Enum values for AutotuneMode diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index ba8c4fe38d4..4bb2859299c 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -3732,7 +3732,8 @@ type ContainerDefinition struct { // [Use Logs and Metrics to Monitor an Inference Pipeline]: https://docs.aws.amazon.com/sagemaker/latest/dg/inference-pipeline-logs-metrics.html ContainerHostname *string - // The environment variables to set in the Docker container. + // The environment variables to set in the Docker container. Don't include any + // sensitive data in your environment variables. // // The maximum length of each key and value in the Environment map is 1024 bytes. // The maximum length of all keys and values in the map, combined, is 32 KB. If you @@ -19005,6 +19006,11 @@ type UserProfileDetails struct { // precedence over those specified in CreateDomain . type UserSettings struct { + // Indicates whether auto-mounting of an EFS volume is supported for the user + // profile. The DefaultAsDomain value is only supported for user profiles. Do not + // use the DefaultAsDomain value when setting this parameter for a domain. + AutoMountHomeEFS AutoMountHomeEFS + // The Canvas app settings. CanvasAppSettings *CanvasAppSettings diff --git a/service/timestreaminfluxdb/api_op_UpdateDbInstance.go b/service/timestreaminfluxdb/api_op_UpdateDbInstance.go index b922f9ef39c..00289558120 100644 --- a/service/timestreaminfluxdb/api_op_UpdateDbInstance.go +++ b/service/timestreaminfluxdb/api_op_UpdateDbInstance.go @@ -34,11 +34,18 @@ type UpdateDbInstanceInput struct { // This member is required. Identifier *string + // The Timestream for InfluxDB DB instance type to run InfluxDB on. + DbInstanceType types.DbInstanceType + // The id of the DB parameter group to assign to your DB instance. DB parameter // groups specify how the database is configured. For example, DB parameter groups // can specify the limit for query concurrency. DbParameterGroupIdentifier *string + // Specifies whether the DB instance will be deployed as a standalone instance or + // with a Multi-AZ standby for high availability. + DeploymentType types.DeploymentType + // Configuration for sending InfluxDB engine logs to send to specified S3 bucket. LogDeliveryConfiguration *types.LogDeliveryConfiguration diff --git a/service/timestreaminfluxdb/serializers.go b/service/timestreaminfluxdb/serializers.go index eb760519f50..b26275f9e38 100644 --- a/service/timestreaminfluxdb/serializers.go +++ b/service/timestreaminfluxdb/serializers.go @@ -999,11 +999,21 @@ func awsAwsjson10_serializeOpDocumentUpdateDbInstanceInput(v *UpdateDbInstanceIn object := value.Object() defer object.Close() + if len(v.DbInstanceType) > 0 { + ok := object.Key("dbInstanceType") + ok.String(string(v.DbInstanceType)) + } + if v.DbParameterGroupIdentifier != nil { ok := object.Key("dbParameterGroupIdentifier") ok.String(*v.DbParameterGroupIdentifier) } + if len(v.DeploymentType) > 0 { + ok := object.Key("deploymentType") + ok.String(string(v.DeploymentType)) + } + if v.Identifier != nil { ok := object.Key("identifier") ok.String(*v.Identifier) diff --git a/service/timestreaminfluxdb/types/enums.go b/service/timestreaminfluxdb/types/enums.go index dddc214d3a4..7c63df3db2c 100644 --- a/service/timestreaminfluxdb/types/enums.go +++ b/service/timestreaminfluxdb/types/enums.go @@ -98,13 +98,15 @@ type Status string // Enum values for Status const ( - StatusCreating Status = "CREATING" - StatusAvailable Status = "AVAILABLE" - StatusDeleting Status = "DELETING" - StatusModifying Status = "MODIFYING" - StatusUpdating Status = "UPDATING" - StatusDeleted Status = "DELETED" - StatusFailed Status = "FAILED" + StatusCreating Status = "CREATING" + StatusAvailable Status = "AVAILABLE" + StatusDeleting Status = "DELETING" + StatusModifying Status = "MODIFYING" + StatusUpdating Status = "UPDATING" + StatusDeleted Status = "DELETED" + StatusFailed Status = "FAILED" + StatusUpdatingDeploymentType Status = "UPDATING_DEPLOYMENT_TYPE" + StatusUpdatingInstanceType Status = "UPDATING_INSTANCE_TYPE" ) // Values returns all known values for Status. Note that this can be expanded in @@ -120,6 +122,8 @@ func (Status) Values() []Status { "UPDATING", "DELETED", "FAILED", + "UPDATING_DEPLOYMENT_TYPE", + "UPDATING_INSTANCE_TYPE", } }