From 23145e3e605a93582020facfe13350b4153714e1 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 4 Jan 2024 19:50:15 +0000 Subject: [PATCH] Regenerated Clients --- .../0f29b705ea8d450085f4754bff2eaf5b.json | 8 + .../13cc0f97329343f380f1022f76ac58c4.json | 8 + .../2dbcdcfb514847a5bfe8574b6555be33.json | 8 + .../5114105b221840e59e15c2b3e227bee7.json | 8 + .../67658b378b5e47eaa5ddde1c4aa25ed6.json | 8 + .../6d0dce41fbe84fc8b2b841b823731b48.json | 8 + .../c0e6fa339ce940968669a12f49e3cd73.json | 8 + .../ffcff598849347a4afaf086da079dbf1.json | 8 + service/configservice/types/enums.go | 36 + service/configservice/types/types.go | 26 +- service/docdb/deserializers.go | 29 + service/docdb/types/types.go | 9 + service/ecs/api_op_CreateTaskSet.go | 3 +- service/ecs/deserializers.go | 9 + service/ecs/serializers.go | 10 + service/ecs/types/enums.go | 18 + service/ecs/types/types.go | 12 + service/elasticsearchservice/endpoints.go | 57 ++ .../elasticsearchservice/endpoints_test.go | 6 +- service/elasticsearchservice/types/enums.go | 6 +- service/elasticsearchservice/types/types.go | 9 +- service/lightsail/api_op_AttachDisk.go | 4 +- service/lightsail/api_op_CreateCertificate.go | 10 +- service/lightsail/api_op_CreateDisk.go | 12 +- .../api_op_CreateDiskFromSnapshot.go | 16 +- .../lightsail/api_op_CreateDiskSnapshot.go | 16 +- service/lightsail/api_op_CreateDomain.go | 8 +- service/lightsail/api_op_CreateDomainEntry.go | 3 +- service/lightsail/api_op_CreateInstances.go | 20 +- .../api_op_CreateInstancesFromSnapshot.go | 2 +- .../lightsail/api_op_CreateLoadBalancer.go | 11 +- ...api_op_CreateLoadBalancerTlsCertificate.go | 4 +- service/lightsail/api_op_DeleteDisk.go | 2 +- .../lightsail/api_op_DeleteDiskSnapshot.go | 2 +- service/lightsail/api_op_DetachDisk.go | 3 +- service/lightsail/api_op_GetAutoSnapshots.go | 3 +- service/lightsail/api_op_GetDisk.go | 2 +- service/lightsail/api_op_GetDiskSnapshot.go | 2 +- .../api_op_GetDistributionLatestCacheReset.go | 2 +- .../api_op_GetOperationsForResource.go | 6 +- service/lightsail/api_op_GetRegions.go | 5 +- service/lightsail/api_op_GetSetupHistory.go | 150 ++++ .../api_op_ResetDistributionCache.go | 3 +- service/lightsail/api_op_SetIpAddressType.go | 2 +- .../lightsail/api_op_SetupInstanceHttps.go | 157 ++++ .../api_op_UpdateLoadBalancerAttribute.go | 2 +- service/lightsail/deserializers.go | 759 +++++++++++++++++- service/lightsail/generated.json | 2 + service/lightsail/serializers.go | 167 ++++ service/lightsail/types/enums.go | 38 + service/lightsail/types/types.go | 294 ++++--- service/lightsail/validators.go | 87 ++ service/opensearch/api_op_CreateDomain.go | 5 +- .../opensearch/api_op_UpdateDomainConfig.go | 5 +- service/opensearch/types/enums.go | 6 +- service/opensearch/types/types.go | 16 +- .../sagemaker/api_op_CreateFeatureGroup.go | 13 + .../sagemaker/api_op_DescribeFeatureGroup.go | 14 + .../sagemaker/api_op_UpdateFeatureGroup.go | 6 + service/sagemaker/deserializers.go | 71 ++ service/sagemaker/serializers.go | 58 ++ service/sagemaker/types/enums.go | 18 + service/sagemaker/types/types.go | 86 ++ service/sagemaker/validators.go | 20 + ...teServiceActionWithProvisioningArtifact.go | 41 + .../api_op_CreatePortfolioShare.go | 16 +- .../api_op_DeleteServiceAction.go | 41 + ...teServiceActionFromProvisioningArtifact.go | 41 + service/servicecatalog/serializers.go | 15 + 69 files changed, 2333 insertions(+), 227 deletions(-) create mode 100644 .changelog/0f29b705ea8d450085f4754bff2eaf5b.json create mode 100644 .changelog/13cc0f97329343f380f1022f76ac58c4.json create mode 100644 .changelog/2dbcdcfb514847a5bfe8574b6555be33.json create mode 100644 .changelog/5114105b221840e59e15c2b3e227bee7.json create mode 100644 .changelog/67658b378b5e47eaa5ddde1c4aa25ed6.json create mode 100644 .changelog/6d0dce41fbe84fc8b2b841b823731b48.json create mode 100644 .changelog/c0e6fa339ce940968669a12f49e3cd73.json create mode 100644 .changelog/ffcff598849347a4afaf086da079dbf1.json create mode 100644 service/lightsail/api_op_GetSetupHistory.go create mode 100644 service/lightsail/api_op_SetupInstanceHttps.go diff --git a/.changelog/0f29b705ea8d450085f4754bff2eaf5b.json b/.changelog/0f29b705ea8d450085f4754bff2eaf5b.json new file mode 100644 index 00000000000..37dd71d86c8 --- /dev/null +++ b/.changelog/0f29b705ea8d450085f4754bff2eaf5b.json @@ -0,0 +1,8 @@ +{ + "id": "0f29b705-ea8d-4500-85f4-754bff2eaf5b", + "type": "feature", + "description": "This release adds support for new or existing Amazon OpenSearch domains to enable TLS 1.3 or TLS 1.2 with perfect forward secrecy cipher suites for domain endpoints.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/13cc0f97329343f380f1022f76ac58c4.json b/.changelog/13cc0f97329343f380f1022f76ac58c4.json new file mode 100644 index 00000000000..540307be34b --- /dev/null +++ b/.changelog/13cc0f97329343f380f1022f76ac58c4.json @@ -0,0 +1,8 @@ +{ + "id": "13cc0f97-3293-43f3-80f1-022f76ac58c4", + "type": "feature", + "description": "This release adds support to set up an HTTPS endpoint on an instance.", + "modules": [ + "service/lightsail" + ] +} \ No newline at end of file diff --git a/.changelog/2dbcdcfb514847a5bfe8574b6555be33.json b/.changelog/2dbcdcfb514847a5bfe8574b6555be33.json new file mode 100644 index 00000000000..f75efee085b --- /dev/null +++ b/.changelog/2dbcdcfb514847a5bfe8574b6555be33.json @@ -0,0 +1,8 @@ +{ + "id": "2dbcdcfb-5148-47a5-bfe8-574b6555be33", + "type": "feature", + "description": "Added Idempotency token support to Service Catalog AssociateServiceActionWithProvisioningArtifact, DisassociateServiceActionFromProvisioningArtifact, DeleteServiceAction API", + "modules": [ + "service/servicecatalog" + ] +} \ No newline at end of file diff --git a/.changelog/5114105b221840e59e15c2b3e227bee7.json b/.changelog/5114105b221840e59e15c2b3e227bee7.json new file mode 100644 index 00000000000..b5045881540 --- /dev/null +++ b/.changelog/5114105b221840e59e15c2b3e227bee7.json @@ -0,0 +1,8 @@ +{ + "id": "5114105b-2218-40e5-9e15-c2b3e227bee7", + "type": "feature", + "description": "Adding PerformanceInsightsEnabled and PerformanceInsightsKMSKeyId fields to DescribeDBInstances Response.", + "modules": [ + "service/docdb" + ] +} \ No newline at end of file diff --git a/.changelog/67658b378b5e47eaa5ddde1c4aa25ed6.json b/.changelog/67658b378b5e47eaa5ddde1c4aa25ed6.json new file mode 100644 index 00000000000..d6943624921 --- /dev/null +++ b/.changelog/67658b378b5e47eaa5ddde1c4aa25ed6.json @@ -0,0 +1,8 @@ +{ + "id": "67658b37-8b5e-47ea-a5dd-de1c4aa25ed6", + "type": "feature", + "description": "This release adds support for new or existing Amazon OpenSearch domains to enable TLS 1.3 or TLS 1.2 with perfect forward secrecy cipher suites for domain endpoints.", + "modules": [ + "service/elasticsearchservice" + ] +} \ No newline at end of file diff --git a/.changelog/6d0dce41fbe84fc8b2b841b823731b48.json b/.changelog/6d0dce41fbe84fc8b2b841b823731b48.json new file mode 100644 index 00000000000..7205bc1b54e --- /dev/null +++ b/.changelog/6d0dce41fbe84fc8b2b841b823731b48.json @@ -0,0 +1,8 @@ +{ + "id": "6d0dce41-fbe8-4fc8-b2b8-41b823731b48", + "type": "feature", + "description": "Updated ResourceType enum with new resource types onboarded by AWS Config in November and December 2023.", + "modules": [ + "service/configservice" + ] +} \ No newline at end of file diff --git a/.changelog/c0e6fa339ce940968669a12f49e3cd73.json b/.changelog/c0e6fa339ce940968669a12f49e3cd73.json new file mode 100644 index 00000000000..efe7b519c48 --- /dev/null +++ b/.changelog/c0e6fa339ce940968669a12f49e3cd73.json @@ -0,0 +1,8 @@ +{ + "id": "c0e6fa33-9ce9-4096-8669-a12f49e3cd73", + "type": "feature", + "description": "Adding support for provisioned throughput mode for SageMaker Feature Groups", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/ffcff598849347a4afaf086da079dbf1.json b/.changelog/ffcff598849347a4afaf086da079dbf1.json new file mode 100644 index 00000000000..845335a1e63 --- /dev/null +++ b/.changelog/ffcff598849347a4afaf086da079dbf1.json @@ -0,0 +1,8 @@ +{ + "id": "ffcff598-8493-47a4-afaf-086da079dbf1", + "type": "feature", + "description": "This release adds support for managed instance draining which facilitates graceful termination of Amazon ECS instances.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/service/configservice/types/enums.go b/service/configservice/types/enums.go index 4b4441d9fb1..d7f6b9e5749 100644 --- a/service/configservice/types/enums.go +++ b/service/configservice/types/enums.go @@ -1065,6 +1065,24 @@ const ( ResourceTypeLambdaCodeSigningConfig ResourceType = "AWS::Lambda::CodeSigningConfig" ResourceTypeNetworkManagerConnectPeer ResourceType = "AWS::NetworkManager::ConnectPeer" ResourceTypeResourceExplorer2Index ResourceType = "AWS::ResourceExplorer2::Index" + ResourceTypeAppStreamFleet ResourceType = "AWS::AppStream::Fleet" + ResourceTypeCognitoUserPool ResourceType = "AWS::Cognito::UserPool" + ResourceTypeCognitoUserPoolClient ResourceType = "AWS::Cognito::UserPoolClient" + ResourceTypeCognitoUserPoolGroup ResourceType = "AWS::Cognito::UserPoolGroup" + ResourceTypeEC2NetworkInsightsAccessScope ResourceType = "AWS::EC2::NetworkInsightsAccessScope" + ResourceTypeEC2NetworkInsightsAnalysis ResourceType = "AWS::EC2::NetworkInsightsAnalysis" + ResourceTypeGrafanaWorkspace ResourceType = "AWS::Grafana::Workspace" + ResourceTypeGroundStationDataflowEndpointGroup ResourceType = "AWS::GroundStation::DataflowEndpointGroup" + ResourceTypeImageBuilderImageRecipe ResourceType = "AWS::ImageBuilder::ImageRecipe" + ResourceTypeKMSAlias ResourceType = "AWS::KMS::Alias" + ResourceTypeM2Environment ResourceType = "AWS::M2::Environment" + ResourceTypeQuickSightDataSource ResourceType = "AWS::QuickSight::DataSource" + ResourceTypeQuickSightTemplate ResourceType = "AWS::QuickSight::Template" + ResourceTypeQuickSightTheme ResourceType = "AWS::QuickSight::Theme" + ResourceTypeRDSOptionGroup ResourceType = "AWS::RDS::OptionGroup" + ResourceTypeRedshiftEndpointAccess ResourceType = "AWS::Redshift::EndpointAccess" + ResourceTypeRoute53ResolverFirewallRuleGroup ResourceType = "AWS::Route53Resolver::FirewallRuleGroup" + ResourceTypeSSMDocument ResourceType = "AWS::SSM::Document" ) // Values returns all known values for ResourceType. Note that this can be @@ -1461,6 +1479,24 @@ func (ResourceType) Values() []ResourceType { "AWS::Lambda::CodeSigningConfig", "AWS::NetworkManager::ConnectPeer", "AWS::ResourceExplorer2::Index", + "AWS::AppStream::Fleet", + "AWS::Cognito::UserPool", + "AWS::Cognito::UserPoolClient", + "AWS::Cognito::UserPoolGroup", + "AWS::EC2::NetworkInsightsAccessScope", + "AWS::EC2::NetworkInsightsAnalysis", + "AWS::Grafana::Workspace", + "AWS::GroundStation::DataflowEndpointGroup", + "AWS::ImageBuilder::ImageRecipe", + "AWS::KMS::Alias", + "AWS::M2::Environment", + "AWS::QuickSight::DataSource", + "AWS::QuickSight::Template", + "AWS::QuickSight::Theme", + "AWS::RDS::OptionGroup", + "AWS::Redshift::EndpointAccess", + "AWS::Route53Resolver::FirewallRuleGroup", + "AWS::SSM::Document", } } diff --git a/service/configservice/types/types.go b/service/configservice/types/types.go index cb168f66cb8..fcebb0f9708 100644 --- a/service/configservice/types/types.go +++ b/service/configservice/types/types.go @@ -866,8 +866,9 @@ type ConfigurationRecorder struct { // // - Continuous recording allows you to record configuration changes // continuously whenever a change occurs. - // - Daily recording allows you record configuration data once every 24 hours, - // only if a change has occurred. + // - Daily recording allows you to receive a configuration item (CI) + // representing the most recent state of your resources over the last 24-hour + // period, only if it’s different from the previous CI recorded. // Firewall Manager depends on continuous recording to monitor your resources. If // you are using Firewall Manager, it is recommended that you set the recording // frequency to Continuous. You can also override the recording frequency for @@ -2307,8 +2308,9 @@ type RecordingGroup struct { // // - Continuous recording allows you to record configuration changes // continuously whenever a change occurs. -// - Daily recording allows you record configuration data once every 24 hours, -// only if a change has occurred. +// - Daily recording allows you to receive a configuration item (CI) +// representing the most recent state of your resources over the last 24-hour +// period, only if it’s different from the previous CI recorded. // // Firewall Manager depends on continuous recording to monitor your resources. If // you are using Firewall Manager, it is recommended that you set the recording @@ -2343,8 +2345,9 @@ type RecordingModeOverride struct { // specified in the override. // - Continuous recording allows you to record configuration changes // continuously whenever a change occurs. - // - Daily recording allows you record configuration data once every 24 hours, - // only if a change has occurred. + // - Daily recording allows you to receive a configuration item (CI) + // representing the most recent state of your resources over the last 24-hour + // period, only if it’s different from the previous CI recorded. // Firewall Manager depends on continuous recording to monitor your resources. If // you are using Firewall Manager, it is recommended that you set the recording // frequency to Continuous. @@ -2485,10 +2488,13 @@ type RemediationConfiguration struct { // The type of a resource. ResourceType *string - // Maximum time in seconds that Config runs auto-remediation. If you do not select - // a number, the default is 60 seconds. For example, if you specify - // RetryAttemptSeconds as 50 seconds and MaximumAutomaticAttempts as 5, Config will - // run auto-remediations 5 times within 50 seconds before throwing an exception. + // Time window to determine whether or not to add a remediation exception to + // prevent infinite remediation attempts. If MaximumAutomaticAttempts remediation + // attempts have been made under RetryAttemptSeconds , a remediation exception will + // be added to the resource. If you do not select a number, the default is 60 + // seconds. For example, if you specify RetryAttemptSeconds as 50 seconds and + // MaximumAutomaticAttempts as 5, Config will run auto-remediations 5 times within + // 50 seconds before adding a remediation exception to the resource. RetryAttemptSeconds *int64 // Version of the target. For example, version of the SSM document. If you make diff --git a/service/docdb/deserializers.go b/service/docdb/deserializers.go index 16b3220c337..d5578a54cb4 100644 --- a/service/docdb/deserializers.go +++ b/service/docdb/deserializers.go @@ -11552,6 +11552,35 @@ func awsAwsquery_deserializeDocumentDBInstance(v **types.DBInstance, decoder smi return err } + case strings.EqualFold("PerformanceInsightsEnabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected BooleanOptional to be of type *bool, got %T instead", val) + } + sv.PerformanceInsightsEnabled = ptr.Bool(xtv) + } + + case strings.EqualFold("PerformanceInsightsKMSKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PerformanceInsightsKMSKeyId = ptr.String(xtv) + } + case strings.EqualFold("PreferredBackupWindow", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/docdb/types/types.go b/service/docdb/types/types.go index f2b9e610812..2bbe68c46b5 100644 --- a/service/docdb/types/types.go +++ b/service/docdb/types/types.go @@ -495,6 +495,15 @@ type DBInstance struct { // only when changes are pending. Specific changes are identified by subelements. PendingModifiedValues *PendingModifiedValues + // Set to true if Amazon RDS Performance Insights is enabled for the DB instance, + // and otherwise false . + PerformanceInsightsEnabled *bool + + // The KMS key identifier for encryption of Performance Insights data. The KMS key + // ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias + // for the KMS encryption key. + PerformanceInsightsKMSKeyId *string + // Specifies the daily time range during which automated backups are created if // automated backups are enabled, as determined by the BackupRetentionPeriod . PreferredBackupWindow *string diff --git a/service/ecs/api_op_CreateTaskSet.go b/service/ecs/api_op_CreateTaskSet.go index ee805435c88..7596b4c09cc 100644 --- a/service/ecs/api_op_CreateTaskSet.go +++ b/service/ecs/api_op_CreateTaskSet.go @@ -15,7 +15,8 @@ import ( // Create a task set in the specified cluster and service. This is used when a // service uses the EXTERNAL deployment controller type. For more information, see // Amazon ECS deployment types (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) -// in the Amazon Elastic Container Service Developer Guide. +// in the Amazon Elastic Container Service Developer Guide. You can create a +// maximum of 5 tasks sets for a deployment. func (c *Client) CreateTaskSet(ctx context.Context, params *CreateTaskSetInput, optFns ...func(*Options)) (*CreateTaskSetOutput, error) { if params == nil { params = &CreateTaskSetInput{} diff --git a/service/ecs/deserializers.go b/service/ecs/deserializers.go index 272b900f68b..3f1e9b1bb83 100644 --- a/service/ecs/deserializers.go +++ b/service/ecs/deserializers.go @@ -8128,6 +8128,15 @@ func awsAwsjson11_deserializeDocumentAutoScalingGroupProvider(v **types.AutoScal sv.AutoScalingGroupArn = ptr.String(jtv) } + case "managedDraining": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedDraining to be of type string, got %T instead", value) + } + sv.ManagedDraining = types.ManagedDraining(jtv) + } + case "managedScaling": if err := awsAwsjson11_deserializeDocumentManagedScaling(&sv.ManagedScaling, value); err != nil { return err diff --git a/service/ecs/serializers.go b/service/ecs/serializers.go index 0f74e9a1304..e835813498e 100644 --- a/service/ecs/serializers.go +++ b/service/ecs/serializers.go @@ -3175,6 +3175,11 @@ func awsAwsjson11_serializeDocumentAutoScalingGroupProvider(v *types.AutoScaling ok.String(*v.AutoScalingGroupArn) } + if len(v.ManagedDraining) > 0 { + ok := object.Key("managedDraining") + ok.String(string(v.ManagedDraining)) + } + if v.ManagedScaling != nil { ok := object.Key("managedScaling") if err := awsAwsjson11_serializeDocumentManagedScaling(v.ManagedScaling, ok); err != nil { @@ -3194,6 +3199,11 @@ func awsAwsjson11_serializeDocumentAutoScalingGroupProviderUpdate(v *types.AutoS object := value.Object() defer object.Close() + if len(v.ManagedDraining) > 0 { + ok := object.Key("managedDraining") + ok.String(string(v.ManagedDraining)) + } + if v.ManagedScaling != nil { ok := object.Key("managedScaling") if err := awsAwsjson11_serializeDocumentManagedScaling(v.ManagedScaling, ok); err != nil { diff --git a/service/ecs/types/enums.go b/service/ecs/types/enums.go index 059121ff980..6e95ae68efb 100644 --- a/service/ecs/types/enums.go +++ b/service/ecs/types/enums.go @@ -601,6 +601,24 @@ func (ManagedAgentName) Values() []ManagedAgentName { } } +type ManagedDraining string + +// Enum values for ManagedDraining +const ( + ManagedDrainingEnabled ManagedDraining = "ENABLED" + ManagedDrainingDisabled ManagedDraining = "DISABLED" +) + +// Values returns all known values for ManagedDraining. 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 (ManagedDraining) Values() []ManagedDraining { + return []ManagedDraining{ + "ENABLED", + "DISABLED", + } +} + type ManagedScalingStatus string // Enum values for ManagedScalingStatus diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index 9642ca4f979..7787f6d3672 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -83,6 +83,12 @@ type AutoScalingGroupProvider struct { // This member is required. AutoScalingGroupArn *string + // The managed draining option for the Auto Scaling group capacity provider. When + // you enable this, Amazon ECS manages and gracefully drains the EC2 container + // instances that are in the Auto Scaling group capacity provider. The default is + // ENABLED . + ManagedDraining ManagedDraining + // The managed scaling settings for the Auto Scaling group capacity provider. ManagedScaling *ManagedScaling @@ -106,6 +112,12 @@ type AutoScalingGroupProvider struct { // The details of the Auto Scaling group capacity provider to update. type AutoScalingGroupProviderUpdate struct { + // The managed draining option for the Auto Scaling group capacity provider. When + // you enable this, Amazon ECS manages and gracefully drains the EC2 container + // instances that are in the Auto Scaling group capacity provider. The default is + // ENABLED . + ManagedDraining ManagedDraining + // The managed scaling settings for the Auto Scaling group capacity provider. ManagedScaling *ManagedScaling diff --git a/service/elasticsearchservice/endpoints.go b/service/elasticsearchservice/endpoints.go index ea00e344bf8..9dfee48a030 100644 --- a/service/elasticsearchservice/endpoints.go +++ b/service/elasticsearchservice/endpoints.go @@ -390,6 +390,63 @@ func (r *resolver) ResolveEndpoint( } if _UseDualStack == true { if true == _PartitionResult.SupportsDualStack { + if "aws" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://aos.") + out.WriteString(_Region) + out.WriteString(".api.aws") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if "aws-cn" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://aos.") + out.WriteString(_Region) + out.WriteString(".api.amazonwebservices.com.cn") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if "aws-us-gov" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://aos.") + out.WriteString(_Region) + out.WriteString(".api.aws") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } uriString := func() string { var out strings.Builder out.WriteString("https://es.") diff --git a/service/elasticsearchservice/endpoints_test.go b/service/elasticsearchservice/endpoints_test.go index d73a322977f..a73ae072fd3 100644 --- a/service/elasticsearchservice/endpoints_test.go +++ b/service/elasticsearchservice/endpoints_test.go @@ -1083,7 +1083,7 @@ func TestEndpointCase27(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://es.us-east-1.api.aws") + uri, _ := url.Parse("https://aos.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1278,7 +1278,7 @@ func TestEndpointCase32(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://es.cn-north-1.api.amazonwebservices.com.cn") + uri, _ := url.Parse("https://aos.cn-north-1.api.amazonwebservices.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1512,7 +1512,7 @@ func TestEndpointCase38(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://es.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://aos.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, diff --git a/service/elasticsearchservice/types/enums.go b/service/elasticsearchservice/types/enums.go index 2b417bf0853..6a551e2bc1e 100644 --- a/service/elasticsearchservice/types/enums.go +++ b/service/elasticsearchservice/types/enums.go @@ -586,8 +586,9 @@ type TLSSecurityPolicy string // Enum values for TLSSecurityPolicy const ( - TLSSecurityPolicyPolicyMinTls10201907 TLSSecurityPolicy = "Policy-Min-TLS-1-0-2019-07" - TLSSecurityPolicyPolicyMinTls12201907 TLSSecurityPolicy = "Policy-Min-TLS-1-2-2019-07" + TLSSecurityPolicyPolicyMinTls10201907 TLSSecurityPolicy = "Policy-Min-TLS-1-0-2019-07" + TLSSecurityPolicyPolicyMinTls12201907 TLSSecurityPolicy = "Policy-Min-TLS-1-2-2019-07" + TLSSecurityPolicyPolicyMinTls12Pfs202310 TLSSecurityPolicy = "Policy-Min-TLS-1-2-PFS-2023-10" ) // Values returns all known values for TLSSecurityPolicy. Note that this can be @@ -597,6 +598,7 @@ func (TLSSecurityPolicy) Values() []TLSSecurityPolicy { return []TLSSecurityPolicy{ "Policy-Min-TLS-1-0-2019-07", "Policy-Min-TLS-1-2-2019-07", + "Policy-Min-TLS-1-2-PFS-2023-10", } } diff --git a/service/elasticsearchservice/types/types.go b/service/elasticsearchservice/types/types.go index 69451a6c6d1..39a5786ca90 100644 --- a/service/elasticsearchservice/types/types.go +++ b/service/elasticsearchservice/types/types.go @@ -446,9 +446,12 @@ type DomainEndpointOptions struct { // of Elasticsearch domain. // // It can be one of the following values: - // - Policy-Min-TLS-1-0-2019-07: TLS security policy which supports TLSv1.0 and - // higher. - // - Policy-Min-TLS-1-2-2019-07: TLS security policy which supports only TLSv1.2 + // - Policy-Min-TLS-1-0-2019-07: TLS security policy that supports TLS version + // 1.0 to TLS version 1.2 + // - Policy-Min-TLS-1-2-2019-07: TLS security policy that supports only TLS + // version 1.2 + // - Policy-Min-TLS-1-2-PFS-2023-10: TLS security policy that supports TLS + // version 1.2 to TLS version 1.3 with perfect forward secrecy cipher suites TLSSecurityPolicy TLSSecurityPolicy noSmithyDocumentSerde diff --git a/service/lightsail/api_op_AttachDisk.go b/service/lightsail/api_op_AttachDisk.go index 2d6c13f60ad..d8d90e3c9e5 100644 --- a/service/lightsail/api_op_AttachDisk.go +++ b/service/lightsail/api_op_AttachDisk.go @@ -35,12 +35,12 @@ func (c *Client) AttachDisk(ctx context.Context, params *AttachDiskInput, optFns type AttachDiskInput struct { - // The unique Lightsail disk name (e.g., my-disk ). + // The unique Lightsail disk name ( my-disk ). // // This member is required. DiskName *string - // The disk path to expose to the instance (e.g., /dev/xvdf ). + // The disk path to expose to the instance ( /dev/xvdf ). // // This member is required. DiskPath *string diff --git a/service/lightsail/api_op_CreateCertificate.go b/service/lightsail/api_op_CreateCertificate.go index c8f8db2ebcc..bafa339e3f3 100644 --- a/service/lightsail/api_op_CreateCertificate.go +++ b/service/lightsail/api_op_CreateCertificate.go @@ -44,15 +44,15 @@ type CreateCertificateInput struct { // This member is required. CertificateName *string - // The domain name (e.g., example.com ) for the certificate. + // The domain name ( example.com ) for the certificate. // // This member is required. DomainName *string - // An array of strings that specify the alternate domains (e.g., example2.com ) and - // subdomains (e.g., blog.example.com ) for the certificate. You can specify a - // maximum of nine alternate domains (in addition to the primary domain name). - // Wildcard domain entries (e.g., *.example.com ) are not supported. + // An array of strings that specify the alternate domains ( example2.com ) and + // subdomains ( blog.example.com ) for the certificate. You can specify a maximum + // of nine alternate domains (in addition to the primary domain name). Wildcard + // domain entries ( *.example.com ) are not supported. SubjectAlternativeNames []string // The tag keys and optional values to add to the certificate during create. Use diff --git a/service/lightsail/api_op_CreateDisk.go b/service/lightsail/api_op_CreateDisk.go index a854291f93e..812871d8620 100644 --- a/service/lightsail/api_op_CreateDisk.go +++ b/service/lightsail/api_op_CreateDisk.go @@ -13,7 +13,7 @@ import ( ) // Creates a block storage disk that can be attached to an Amazon Lightsail -// instance in the same Availability Zone (e.g., us-east-2a ). The create disk +// instance in the same Availability Zone ( us-east-2a ). The create disk // operation supports tag-based access control via request tags. For more // information, see the Amazon Lightsail Developer Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags) // . @@ -34,20 +34,20 @@ func (c *Client) CreateDisk(ctx context.Context, params *CreateDiskInput, optFns type CreateDiskInput struct { - // The Availability Zone where you want to create the disk (e.g., us-east-2a ). Use - // the same Availability Zone as the Lightsail instance to which you want to attach - // the disk. Use the get regions operation to list the Availability Zones where + // The Availability Zone where you want to create the disk ( us-east-2a ). Use the + // same Availability Zone as the Lightsail instance to which you want to attach the + // disk. Use the get regions operation to list the Availability Zones where // Lightsail is currently available. // // This member is required. AvailabilityZone *string - // The unique Lightsail disk name (e.g., my-disk ). + // The unique Lightsail disk name ( my-disk ). // // This member is required. DiskName *string - // The size of the disk in GB (e.g., 32 ). + // The size of the disk in GB ( 32 ). // // This member is required. SizeInGb *int32 diff --git a/service/lightsail/api_op_CreateDiskFromSnapshot.go b/service/lightsail/api_op_CreateDiskFromSnapshot.go index f29829ff47b..6541b040ebd 100644 --- a/service/lightsail/api_op_CreateDiskFromSnapshot.go +++ b/service/lightsail/api_op_CreateDiskFromSnapshot.go @@ -14,7 +14,7 @@ import ( // Creates a block storage disk from a manual or automatic snapshot of a disk. The // resulting disk can be attached to an Amazon Lightsail instance in the same -// Availability Zone (e.g., us-east-2a ). The create disk from snapshot operation +// Availability Zone ( us-east-2a ). The create disk from snapshot operation // supports tag-based access control via request tags and resource tags applied to // the resource identified by disk snapshot name . For more information, see the // Amazon Lightsail Developer Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags) @@ -36,20 +36,20 @@ func (c *Client) CreateDiskFromSnapshot(ctx context.Context, params *CreateDiskF type CreateDiskFromSnapshotInput struct { - // The Availability Zone where you want to create the disk (e.g., us-east-2a ). - // Choose the same Availability Zone as the Lightsail instance where you want to - // create the disk. Use the GetRegions operation to list the Availability Zones - // where Lightsail is currently available. + // The Availability Zone where you want to create the disk ( us-east-2a ). Choose + // the same Availability Zone as the Lightsail instance where you want to create + // the disk. Use the GetRegions operation to list the Availability Zones where + // Lightsail is currently available. // // This member is required. AvailabilityZone *string - // The unique Lightsail disk name (e.g., my-disk ). + // The unique Lightsail disk name ( my-disk ). // // This member is required. DiskName *string - // The size of the disk in GB (e.g., 32 ). + // The size of the disk in GB ( 32 ). // // This member is required. SizeInGb *int32 @@ -57,7 +57,7 @@ type CreateDiskFromSnapshotInput struct { // An array of objects that represent the add-ons to enable for the new disk. AddOns []types.AddOnRequest - // The name of the disk snapshot (e.g., my-snapshot ) from which to create the new + // The name of the disk snapshot ( my-snapshot ) from which to create the new // storage disk. Constraint: // - This parameter cannot be defined together with the source disk name // parameter. The disk snapshot name and source disk name parameters are mutually diff --git a/service/lightsail/api_op_CreateDiskSnapshot.go b/service/lightsail/api_op_CreateDiskSnapshot.go index 224e6853562..3e5ab6203e8 100644 --- a/service/lightsail/api_op_CreateDiskSnapshot.go +++ b/service/lightsail/api_op_CreateDiskSnapshot.go @@ -51,21 +51,21 @@ func (c *Client) CreateDiskSnapshot(ctx context.Context, params *CreateDiskSnaps type CreateDiskSnapshotInput struct { - // The name of the destination disk snapshot (e.g., my-disk-snapshot ) based on the + // The name of the destination disk snapshot ( my-disk-snapshot ) based on the // source disk. // // This member is required. DiskSnapshotName *string - // The unique name of the source disk (e.g., Disk-Virginia-1 ). This parameter - // cannot be defined together with the instance name parameter. The disk name and - // instance name parameters are mutually exclusive. + // The unique name of the source disk ( Disk-Virginia-1 ). This parameter cannot be + // defined together with the instance name parameter. The disk name and instance + // name parameters are mutually exclusive. DiskName *string - // The unique name of the source instance (e.g., Amazon_Linux-512MB-Virginia-1 ). - // When this is defined, a snapshot of the instance's system volume is created. - // This parameter cannot be defined together with the disk name parameter. The - // instance name and disk name parameters are mutually exclusive. + // The unique name of the source instance ( Amazon_Linux-512MB-Virginia-1 ). When + // this is defined, a snapshot of the instance's system volume is created. This + // parameter cannot be defined together with the disk name parameter. The instance + // name and disk name parameters are mutually exclusive. InstanceName *string // The tag keys and optional values to add to the resource during create. Use the diff --git a/service/lightsail/api_op_CreateDomain.go b/service/lightsail/api_op_CreateDomain.go index 9603824c39f..0c1d9a90ee5 100644 --- a/service/lightsail/api_op_CreateDomain.go +++ b/service/lightsail/api_op_CreateDomain.go @@ -12,9 +12,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a domain resource for the specified domain (e.g., example.com). The -// create domain operation supports tag-based access control via request tags. For -// more information, see the Amazon Lightsail Developer Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags) +// Creates a domain resource for the specified domain (example.com). The create +// domain operation supports tag-based access control via request tags. For more +// information, see the Amazon Lightsail Developer Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags) // . func (c *Client) CreateDomain(ctx context.Context, params *CreateDomainInput, optFns ...func(*Options)) (*CreateDomainOutput, error) { if params == nil { @@ -33,7 +33,7 @@ func (c *Client) CreateDomain(ctx context.Context, params *CreateDomainInput, op type CreateDomainInput struct { - // The domain name to manage (e.g., example.com ). + // The domain name to manage ( example.com ). // // This member is required. DomainName *string diff --git a/service/lightsail/api_op_CreateDomainEntry.go b/service/lightsail/api_op_CreateDomainEntry.go index d53305add51..7d6b469b626 100644 --- a/service/lightsail/api_op_CreateDomainEntry.go +++ b/service/lightsail/api_op_CreateDomainEntry.go @@ -42,8 +42,7 @@ type CreateDomainEntryInput struct { // This member is required. DomainEntry *types.DomainEntry - // The domain name (e.g., example.com ) for which you want to create the domain - // entry. + // The domain name ( example.com ) for which you want to create the domain entry. // // This member is required. DomainName *string diff --git a/service/lightsail/api_op_CreateInstances.go b/service/lightsail/api_op_CreateInstances.go index 21b5b6952ea..3787e9e77e3 100644 --- a/service/lightsail/api_op_CreateInstances.go +++ b/service/lightsail/api_op_CreateInstances.go @@ -42,19 +42,19 @@ type CreateInstancesInput struct { // This member is required. AvailabilityZone *string - // The ID for a virtual private server image (e.g., app_wordpress_4_4 or - // app_lamp_7_0 ). Use the get blueprints operation to return a list of available - // images (or blueprints). Use active blueprints when creating new instances. - // Inactive blueprints are listed to support customers with existing instances and - // are not necessarily available to create new instances. Blueprints are marked - // inactive when they become outdated due to operating system updates or new - // application releases. + // The ID for a virtual private server image ( app_wordpress_4_4 or app_lamp_7_0 ). + // Use the get blueprints operation to return a list of available images (or + // blueprints). Use active blueprints when creating new instances. Inactive + // blueprints are listed to support customers with existing instances and are not + // necessarily available to create new instances. Blueprints are marked inactive + // when they become outdated due to operating system updates or new application + // releases. // // This member is required. BlueprintId *string // The bundle of specification information for your virtual private server (or - // instance), including the pricing plan (e.g., micro_1_0 ). + // instance), including the pricing plan ( micro_1_0 ). // // This member is required. BundleId *string @@ -69,8 +69,8 @@ type CreateInstancesInput struct { // An array of objects representing the add-ons to enable for the new instance. AddOns []types.AddOnRequest - // (Deprecated) The name for your custom image. In releases prior to June 12, - // 2017, this parameter was ignored by the API. It is now deprecated. + // (Discontinued) The name for your custom image. In releases prior to June 12, + // 2017, this parameter was ignored by the API. It is now discontinued. // // Deprecated: This member has been deprecated. CustomImageName *string diff --git a/service/lightsail/api_op_CreateInstancesFromSnapshot.go b/service/lightsail/api_op_CreateInstancesFromSnapshot.go index 55d743995af..1049a2d98d4 100644 --- a/service/lightsail/api_op_CreateInstancesFromSnapshot.go +++ b/service/lightsail/api_op_CreateInstancesFromSnapshot.go @@ -45,7 +45,7 @@ type CreateInstancesFromSnapshotInput struct { AvailabilityZone *string // The bundle of specification information for your virtual private server (or - // instance), including the pricing plan (e.g., micro_1_0 ). + // instance), including the pricing plan ( micro_1_0 ). // // This member is required. BundleId *string diff --git a/service/lightsail/api_op_CreateLoadBalancer.go b/service/lightsail/api_op_CreateLoadBalancer.go index fc0893fd74e..7395ec56b3d 100644 --- a/service/lightsail/api_op_CreateLoadBalancer.go +++ b/service/lightsail/api_op_CreateLoadBalancer.go @@ -49,12 +49,11 @@ type CreateLoadBalancerInput struct { LoadBalancerName *string // The optional alternative domains and subdomains to use with your SSL/TLS - // certificate (e.g., www.example.com , example.com , m.example.com , - // blog.example.com ). + // certificate ( www.example.com , example.com , m.example.com , blog.example.com ). CertificateAlternativeNames []string - // The domain name with which your certificate is associated (e.g., example.com ). - // If you specify certificateDomainName , then certificateName is required (and + // The domain name with which your certificate is associated ( example.com ). If + // you specify certificateDomainName , then certificateName is required (and // vice-versa). CertificateDomainName *string @@ -63,8 +62,8 @@ type CreateLoadBalancerInput struct { CertificateName *string // The path you provided to perform the load balancer health check. If you didn't - // specify a health check path, Lightsail uses the root path of your website (e.g., - // "/" ). You may want to specify a custom health check path other than the root of + // specify a health check path, Lightsail uses the root path of your website ( "/" + // ). You may want to specify a custom health check path other than the root of // your application if your home page loads slowly or has a lot of media or // scripting on it. HealthCheckPath *string diff --git a/service/lightsail/api_op_CreateLoadBalancerTlsCertificate.go b/service/lightsail/api_op_CreateLoadBalancerTlsCertificate.go index 7cb68bbb914..c1fba12de3a 100644 --- a/service/lightsail/api_op_CreateLoadBalancerTlsCertificate.go +++ b/service/lightsail/api_op_CreateLoadBalancerTlsCertificate.go @@ -35,7 +35,7 @@ func (c *Client) CreateLoadBalancerTlsCertificate(ctx context.Context, params *C type CreateLoadBalancerTlsCertificateInput struct { - // The domain name (e.g., example.com ) for your SSL/TLS certificate. + // The domain name ( example.com ) for your SSL/TLS certificate. // // This member is required. CertificateDomainName *string @@ -57,7 +57,7 @@ type CreateLoadBalancerTlsCertificateInput struct { // An array of strings listing alternative domains and subdomains for your SSL/TLS // certificate. Lightsail will de-dupe the names for you. You can have a maximum of // 9 alternative names (in addition to the 1 primary domain). We do not support - // wildcards (e.g., *.example.com ). + // wildcards ( *.example.com ). CertificateAlternativeNames []string // The tag keys and optional values to add to the resource during create. Use the diff --git a/service/lightsail/api_op_DeleteDisk.go b/service/lightsail/api_op_DeleteDisk.go index ea7e8f39050..31325a0f532 100644 --- a/service/lightsail/api_op_DeleteDisk.go +++ b/service/lightsail/api_op_DeleteDisk.go @@ -35,7 +35,7 @@ func (c *Client) DeleteDisk(ctx context.Context, params *DeleteDiskInput, optFns type DeleteDiskInput struct { - // The unique name of the disk you want to delete (e.g., my-disk ). + // The unique name of the disk you want to delete ( my-disk ). // // This member is required. DiskName *string diff --git a/service/lightsail/api_op_DeleteDiskSnapshot.go b/service/lightsail/api_op_DeleteDiskSnapshot.go index 0d818998b3e..c6a2cfbad50 100644 --- a/service/lightsail/api_op_DeleteDiskSnapshot.go +++ b/service/lightsail/api_op_DeleteDiskSnapshot.go @@ -39,7 +39,7 @@ func (c *Client) DeleteDiskSnapshot(ctx context.Context, params *DeleteDiskSnaps type DeleteDiskSnapshotInput struct { - // The name of the disk snapshot you want to delete (e.g., my-disk-snapshot ). + // The name of the disk snapshot you want to delete ( my-disk-snapshot ). // // This member is required. DiskSnapshotName *string diff --git a/service/lightsail/api_op_DetachDisk.go b/service/lightsail/api_op_DetachDisk.go index f281c43de71..bf0c5cfabec 100644 --- a/service/lightsail/api_op_DetachDisk.go +++ b/service/lightsail/api_op_DetachDisk.go @@ -36,8 +36,7 @@ func (c *Client) DetachDisk(ctx context.Context, params *DetachDiskInput, optFns type DetachDiskInput struct { - // The unique name of the disk you want to detach from your instance (e.g., my-disk - // ). + // The unique name of the disk you want to detach from your instance ( my-disk ). // // This member is required. DiskName *string diff --git a/service/lightsail/api_op_GetAutoSnapshots.go b/service/lightsail/api_op_GetAutoSnapshots.go index 84858db9b45..bb8d310bfd6 100644 --- a/service/lightsail/api_op_GetAutoSnapshots.go +++ b/service/lightsail/api_op_GetAutoSnapshots.go @@ -50,7 +50,8 @@ type GetAutoSnapshotsOutput struct { // The name of the source instance or disk for the automatic snapshots. ResourceName *string - // The resource type (e.g., Instance or Disk ). + // The resource type of the automatic snapshot. The possible values are Instance , + // and Disk . ResourceType types.ResourceType // Metadata pertaining to the operation's result. diff --git a/service/lightsail/api_op_GetDisk.go b/service/lightsail/api_op_GetDisk.go index 0ff83f580e3..3bf25655a2c 100644 --- a/service/lightsail/api_op_GetDisk.go +++ b/service/lightsail/api_op_GetDisk.go @@ -30,7 +30,7 @@ func (c *Client) GetDisk(ctx context.Context, params *GetDiskInput, optFns ...fu type GetDiskInput struct { - // The name of the disk (e.g., my-disk ). + // The name of the disk ( my-disk ). // // This member is required. DiskName *string diff --git a/service/lightsail/api_op_GetDiskSnapshot.go b/service/lightsail/api_op_GetDiskSnapshot.go index d952727dfc6..b2c080de404 100644 --- a/service/lightsail/api_op_GetDiskSnapshot.go +++ b/service/lightsail/api_op_GetDiskSnapshot.go @@ -30,7 +30,7 @@ func (c *Client) GetDiskSnapshot(ctx context.Context, params *GetDiskSnapshotInp type GetDiskSnapshotInput struct { - // The name of the disk snapshot (e.g., my-disk-snapshot ). + // The name of the disk snapshot ( my-disk-snapshot ). // // This member is required. DiskSnapshotName *string diff --git a/service/lightsail/api_op_GetDistributionLatestCacheReset.go b/service/lightsail/api_op_GetDistributionLatestCacheReset.go index 358cdc35677..79664d1d061 100644 --- a/service/lightsail/api_op_GetDistributionLatestCacheReset.go +++ b/service/lightsail/api_op_GetDistributionLatestCacheReset.go @@ -42,7 +42,7 @@ type GetDistributionLatestCacheResetInput struct { type GetDistributionLatestCacheResetOutput struct { - // The timestamp of the last cache reset (e.g., 1479734909.17 ) in Unix time format. + // The timestamp of the last cache reset ( 1479734909.17 ) in Unix time format. CreateTime *time.Time // The status of the last cache reset. diff --git a/service/lightsail/api_op_GetOperationsForResource.go b/service/lightsail/api_op_GetOperationsForResource.go index fa017690b77..754e5c40476 100644 --- a/service/lightsail/api_op_GetOperationsForResource.go +++ b/service/lightsail/api_op_GetOperationsForResource.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets operations for a specific resource (e.g., an instance or a static IP). +// Gets operations for a specific resource (an instance or a static IP). func (c *Client) GetOperationsForResource(ctx context.Context, params *GetOperationsForResourceInput, optFns ...func(*Options)) (*GetOperationsForResourceOutput, error) { if params == nil { params = &GetOperationsForResourceInput{} @@ -46,9 +46,9 @@ type GetOperationsForResourceInput struct { type GetOperationsForResourceOutput struct { - // (Deprecated) Returns the number of pages of results that remain. In releases + // (Discontinued) Returns the number of pages of results that remain. In releases // prior to June 12, 2017, this parameter returned null by the API. It is now - // deprecated, and the API returns the next page token parameter instead. + // discontinued, and the API returns the next page token parameter instead. // // Deprecated: This member has been deprecated. NextPageCount *string diff --git a/service/lightsail/api_op_GetRegions.go b/service/lightsail/api_op_GetRegions.go index d1274a123ef..9eb73482649 100644 --- a/service/lightsail/api_op_GetRegions.go +++ b/service/lightsail/api_op_GetRegions.go @@ -32,13 +32,12 @@ func (c *Client) GetRegions(ctx context.Context, params *GetRegionsInput, optFns type GetRegionsInput struct { // A Boolean value indicating whether to also include Availability Zones in your - // get regions request. Availability Zones are indicated with a letter: e.g., - // us-east-2a . + // get regions request. Availability Zones are indicated with a letter: us-east-2a . IncludeAvailabilityZones *bool // A Boolean value indicating whether to also include Availability Zones for // databases in your get regions request. Availability Zones are indicated with a - // letter (e.g., us-east-2a ). + // letter ( us-east-2a ). IncludeRelationalDatabaseAvailabilityZones *bool noSmithyDocumentSerde diff --git a/service/lightsail/api_op_GetSetupHistory.go b/service/lightsail/api_op_GetSetupHistory.go new file mode 100644 index 00000000000..51d4537d27a --- /dev/null +++ b/service/lightsail/api_op_GetSetupHistory.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lightsail + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/lightsail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns detailed information for five of the most recent SetupInstanceHttps +// requests that were ran on the target instance. +func (c *Client) GetSetupHistory(ctx context.Context, params *GetSetupHistoryInput, optFns ...func(*Options)) (*GetSetupHistoryOutput, error) { + if params == nil { + params = &GetSetupHistoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSetupHistory", params, optFns, c.addOperationGetSetupHistoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSetupHistoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSetupHistoryInput struct { + + // The name of the resource for which you are requesting information. + // + // This member is required. + ResourceName *string + + // The token to advance to the next page of results from your request. To get a + // page token, perform an initial GetSetupHistory request. If your results are + // paginated, the response will return a next page token that you can specify as + // the page token in a subsequent request. + PageToken *string + + noSmithyDocumentSerde +} + +type GetSetupHistoryOutput struct { + + // The token to advance to the next page of results from your request. A next page + // token is not returned if there are no more results to display. To get the next + // page of results, perform another GetSetupHistory request and specify the next + // page token using the pageToken parameter. + NextPageToken *string + + // The historical information that's returned. + SetupHistory []types.SetupHistory + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSetupHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetSetupHistory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetSetupHistory{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetSetupHistory"); 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 = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.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 = addOpGetSetupHistoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSetupHistory(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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_opGetSetupHistory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetSetupHistory", + } +} diff --git a/service/lightsail/api_op_ResetDistributionCache.go b/service/lightsail/api_op_ResetDistributionCache.go index 5e848f2333c..133755270ac 100644 --- a/service/lightsail/api_op_ResetDistributionCache.go +++ b/service/lightsail/api_op_ResetDistributionCache.go @@ -42,8 +42,7 @@ type ResetDistributionCacheInput struct { type ResetDistributionCacheOutput struct { - // The timestamp of the reset cache request (e.g., 1479734909.17 ) in Unix time - // format. + // The timestamp of the reset cache request ( 1479734909.17 ) in Unix time format. CreateTime *time.Time // An array of objects that describe the result of the action, such as the status diff --git a/service/lightsail/api_op_SetIpAddressType.go b/service/lightsail/api_op_SetIpAddressType.go index cbf325793b4..e17a61d956f 100644 --- a/service/lightsail/api_op_SetIpAddressType.go +++ b/service/lightsail/api_op_SetIpAddressType.go @@ -44,7 +44,7 @@ type SetIpAddressTypeInput struct { // This member is required. ResourceName *string - // The resource type. The possible values are Distribution , Instance , and + // The resource type. The resource values are Distribution , Instance , and // LoadBalancer . Distribution-related APIs are available only in the N. Virginia ( // us-east-1 ) Amazon Web Services Region. Set your Amazon Web Services Region // configuration to us-east-1 to create, view, or edit distributions. diff --git a/service/lightsail/api_op_SetupInstanceHttps.go b/service/lightsail/api_op_SetupInstanceHttps.go new file mode 100644 index 00000000000..ce4c3db3950 --- /dev/null +++ b/service/lightsail/api_op_SetupInstanceHttps.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lightsail + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/lightsail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an SSL/TLS certificate that secures traffic for your website. After the +// certificate is created, it is installed on the specified Lightsail instance. If +// you provide more than one domain name in the request, at least one name must be +// less than or equal to 63 characters in length. +func (c *Client) SetupInstanceHttps(ctx context.Context, params *SetupInstanceHttpsInput, optFns ...func(*Options)) (*SetupInstanceHttpsOutput, error) { + if params == nil { + params = &SetupInstanceHttpsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SetupInstanceHttps", params, optFns, c.addOperationSetupInstanceHttpsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SetupInstanceHttpsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SetupInstanceHttpsInput struct { + + // The certificate authority that issues the SSL/TLS certificate. + // + // This member is required. + CertificateProvider types.CertificateProvider + + // The name of the domain and subdomains that were specified for the SSL/TLS + // certificate. + // + // This member is required. + DomainNames []string + + // The contact method for SSL/TLS certificate renewal alerts. You can enter one + // email address. + // + // This member is required. + EmailAddress *string + + // The name of the Lightsail instance. + // + // This member is required. + InstanceName *string + + noSmithyDocumentSerde +} + +type SetupInstanceHttpsOutput struct { + + // The available API operations for SetupInstanceHttps . + Operations []types.Operation + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSetupInstanceHttpsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpSetupInstanceHttps{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSetupInstanceHttps{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SetupInstanceHttps"); 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 = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.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 = addOpSetupInstanceHttpsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetupInstanceHttps(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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_opSetupInstanceHttps(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SetupInstanceHttps", + } +} diff --git a/service/lightsail/api_op_UpdateLoadBalancerAttribute.go b/service/lightsail/api_op_UpdateLoadBalancerAttribute.go index 81b464d12ad..501a4f4d746 100644 --- a/service/lightsail/api_op_UpdateLoadBalancerAttribute.go +++ b/service/lightsail/api_op_UpdateLoadBalancerAttribute.go @@ -63,7 +63,7 @@ type UpdateLoadBalancerAttributeInput struct { // This member is required. AttributeValue *string - // The name of the load balancer that you want to modify (e.g., my-load-balancer . + // The name of the load balancer that you want to modify ( my-load-balancer . // // This member is required. LoadBalancerName *string diff --git a/service/lightsail/deserializers.go b/service/lightsail/deserializers.go index 86bbefc0638..bebd17d04a8 100644 --- a/service/lightsail/deserializers.go +++ b/service/lightsail/deserializers.go @@ -15668,6 +15668,129 @@ func awsAwsjson11_deserializeOpErrorGetRelationalDatabaseSnapshots(response *smi } } +type awsAwsjson11_deserializeOpGetSetupHistory struct { +} + +func (*awsAwsjson11_deserializeOpGetSetupHistory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetSetupHistory) 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, awsAwsjson11_deserializeOpErrorGetSetupHistory(response, &metadata) + } + output := &GetSetupHistoryOutput{} + 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 = awsAwsjson11_deserializeOpDocumentGetSetupHistoryOutput(&output, shape) + 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 awsAwsjson11_deserializeOpErrorGetSetupHistory(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("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsAwsjson11_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("UnauthenticatedException", errorCode): + return awsAwsjson11_deserializeErrorUnauthenticatedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpGetStaticIp struct { } @@ -17711,6 +17834,129 @@ func awsAwsjson11_deserializeOpErrorSetResourceAccessForBucket(response *smithyh } } +type awsAwsjson11_deserializeOpSetupInstanceHttps struct { +} + +func (*awsAwsjson11_deserializeOpSetupInstanceHttps) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpSetupInstanceHttps) 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, awsAwsjson11_deserializeOpErrorSetupInstanceHttps(response, &metadata) + } + output := &SetupInstanceHttpsOutput{} + 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 = awsAwsjson11_deserializeOpDocumentSetupInstanceHttpsOutput(&output, shape) + 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 awsAwsjson11_deserializeOpErrorSetupInstanceHttps(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("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsAwsjson11_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("UnauthenticatedException", errorCode): + return awsAwsjson11_deserializeErrorUnauthenticatedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpStartGUISession struct { } @@ -32784,7 +33030,7 @@ func awsAwsjson11_deserializeDocumentSessions(v *[]types.Session, value interfac return nil } -func awsAwsjson11_deserializeDocumentStaticIp(v **types.StaticIp, value interface{}) error { +func awsAwsjson11_deserializeDocumentSetupDomainNameList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -32792,29 +33038,431 @@ func awsAwsjson11_deserializeDocumentStaticIp(v **types.StaticIp, value interfac return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.StaticIp + var cv []string if *v == nil { - sv = &types.StaticIp{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SetupDomainName to be of type string, got %T instead", value) } - + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSetupExecutionDetails(v **types.SetupExecutionDetails, 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.SetupExecutionDetails + if *v == nil { + sv = &types.SetupExecutionDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "command": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Command = ptr.String(jtv) + } + + case "dateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected IsoDate to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "standardError": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.StandardError = ptr.String(jtv) + } + + case "standardOutput": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.StandardOutput = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SetupStatus to be of type string, got %T instead", value) + } + sv.Status = types.SetupStatus(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSetupExecutionDetailsList(v *[]types.SetupExecutionDetails, 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.SetupExecutionDetails + if *v == nil { + cv = []types.SetupExecutionDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SetupExecutionDetails + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSetupExecutionDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSetupHistory(v **types.SetupHistory, 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.SetupHistory + if *v == nil { + sv = &types.SetupHistory{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "executionDetails": + if err := awsAwsjson11_deserializeDocumentSetupExecutionDetailsList(&sv.ExecutionDetails, value); err != nil { + return err + } + + case "operationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.OperationId = ptr.String(jtv) + } + + case "request": + if err := awsAwsjson11_deserializeDocumentSetupRequest(&sv.Request, value); err != nil { + return err + } + + case "resource": + if err := awsAwsjson11_deserializeDocumentSetupHistoryResource(&sv.Resource, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SetupStatus to be of type string, got %T instead", value) + } + sv.Status = types.SetupStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSetupHistoryList(v *[]types.SetupHistory, 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.SetupHistory + if *v == nil { + cv = []types.SetupHistory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SetupHistory + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSetupHistory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSetupHistoryResource(v **types.SetupHistoryResource, 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.SetupHistoryResource + if *v == nil { + sv = &types.SetupHistoryResource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected IsoDate to be a JSON Number, got %T instead", value) + + } + } + + case "location": + if err := awsAwsjson11_deserializeDocumentResourceLocation(&sv.Location, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSetupRequest(v **types.SetupRequest, 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.SetupRequest + if *v == nil { + sv = &types.SetupRequest{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "certificateProvider": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CertificateProvider to be of type string, got %T instead", value) + } + sv.CertificateProvider = types.CertificateProvider(jtv) + } + + case "domainNames": + if err := awsAwsjson11_deserializeDocumentSetupDomainNameList(&sv.DomainNames, value); err != nil { + return err + } + + case "instanceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.InstanceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentStaticIp(v **types.StaticIp, 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.StaticIp + if *v == nil { + sv = &types.StaticIp{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "attachedTo": if value != nil { jtv, ok := value.(string) @@ -38126,6 +38774,51 @@ func awsAwsjson11_deserializeOpDocumentGetRelationalDatabasesOutput(v **GetRelat return nil } +func awsAwsjson11_deserializeOpDocumentGetSetupHistoryOutput(v **GetSetupHistoryOutput, 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 *GetSetupHistoryOutput + if *v == nil { + sv = &GetSetupHistoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextPageToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SetupHistoryPageToken to be of type string, got %T instead", value) + } + sv.NextPageToken = ptr.String(jtv) + } + + case "setupHistory": + if err := awsAwsjson11_deserializeDocumentSetupHistoryList(&sv.SetupHistory, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetStaticIpOutput(v **GetStaticIpOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -38740,6 +39433,42 @@ func awsAwsjson11_deserializeOpDocumentSetResourceAccessForBucketOutput(v **SetR return nil } +func awsAwsjson11_deserializeOpDocumentSetupInstanceHttpsOutput(v **SetupInstanceHttpsOutput, 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 *SetupInstanceHttpsOutput + if *v == nil { + sv = &SetupInstanceHttpsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "operations": + if err := awsAwsjson11_deserializeDocumentOperationList(&sv.Operations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentStartGUISessionOutput(v **StartGUISessionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/lightsail/generated.json b/service/lightsail/generated.json index 542aa41c61d..80a2893fcef 100644 --- a/service/lightsail/generated.json +++ b/service/lightsail/generated.json @@ -132,6 +132,7 @@ "api_op_GetRelationalDatabaseSnapshot.go", "api_op_GetRelationalDatabaseSnapshots.go", "api_op_GetRelationalDatabases.go", + "api_op_GetSetupHistory.go", "api_op_GetStaticIp.go", "api_op_GetStaticIps.go", "api_op_ImportKeyPair.go", @@ -148,6 +149,7 @@ "api_op_SendContactMethodVerification.go", "api_op_SetIpAddressType.go", "api_op_SetResourceAccessForBucket.go", + "api_op_SetupInstanceHttps.go", "api_op_StartGUISession.go", "api_op_StartInstance.go", "api_op_StartRelationalDatabase.go", diff --git a/service/lightsail/serializers.go b/service/lightsail/serializers.go index 4b7c8c97387..d3235bd9d5a 100644 --- a/service/lightsail/serializers.go +++ b/service/lightsail/serializers.go @@ -6782,6 +6782,61 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseSnapshots) HandleSerialize return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetSetupHistory struct { +} + +func (*awsAwsjson11_serializeOpGetSetupHistory) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetSetupHistory) 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.(*GetSetupHistoryInput) + _ = 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-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Lightsail_20161128.GetSetupHistory") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetSetupHistoryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.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 awsAwsjson11_serializeOpGetStaticIp struct { } @@ -7662,6 +7717,61 @@ func (m *awsAwsjson11_serializeOpSetResourceAccessForBucket) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpSetupInstanceHttps struct { +} + +func (*awsAwsjson11_serializeOpSetupInstanceHttps) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpSetupInstanceHttps) 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.(*SetupInstanceHttpsInput) + _ = 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-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Lightsail_20161128.SetupInstanceHttps") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentSetupInstanceHttpsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.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 awsAwsjson11_serializeOpStartGUISession struct { } @@ -9574,6 +9684,17 @@ func awsAwsjson11_serializeDocumentResourceNameList(v []string, value smithyjson return nil } +func awsAwsjson11_serializeDocumentSetupDomainNameList(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 awsAwsjson11_serializeDocumentStopInstanceOnIdleRequest(v *types.StopInstanceOnIdleRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -12162,6 +12283,23 @@ func awsAwsjson11_serializeOpDocumentGetRelationalDatabaseSnapshotsInput(v *GetR return nil } +func awsAwsjson11_serializeOpDocumentGetSetupHistoryInput(v *GetSetupHistoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PageToken != nil { + ok := object.Key("pageToken") + ok.String(*v.PageToken) + } + + if v.ResourceName != nil { + ok := object.Key("resourceName") + ok.String(*v.ResourceName) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetStaticIpInput(v *GetStaticIpInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -12460,6 +12598,35 @@ func awsAwsjson11_serializeOpDocumentSetResourceAccessForBucketInput(v *SetResou return nil } +func awsAwsjson11_serializeOpDocumentSetupInstanceHttpsInput(v *SetupInstanceHttpsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.CertificateProvider) > 0 { + ok := object.Key("certificateProvider") + ok.String(string(v.CertificateProvider)) + } + + if v.DomainNames != nil { + ok := object.Key("domainNames") + if err := awsAwsjson11_serializeDocumentSetupDomainNameList(v.DomainNames, ok); err != nil { + return err + } + } + + if v.EmailAddress != nil { + ok := object.Key("emailAddress") + ok.String(*v.EmailAddress) + } + + if v.InstanceName != nil { + ok := object.Key("instanceName") + ok.String(*v.InstanceName) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentStartGUISessionInput(v *StartGUISessionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/lightsail/types/enums.go b/service/lightsail/types/enums.go index 27bae720fb3..309132e3bd2 100644 --- a/service/lightsail/types/enums.go +++ b/service/lightsail/types/enums.go @@ -255,6 +255,22 @@ func (CertificateDomainValidationStatus) Values() []CertificateDomainValidationS } } +type CertificateProvider string + +// Enum values for CertificateProvider +const ( + CertificateProviderLetsEncrypt CertificateProvider = "LetsEncrypt" +) + +// Values returns all known values for CertificateProvider. 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 (CertificateProvider) Values() []CertificateProvider { + return []CertificateProvider{ + "LetsEncrypt", + } +} + type CertificateStatus string // Enum values for CertificateStatus @@ -1528,6 +1544,7 @@ const ( OperationTypeUpdateInstanceMetadataOptions OperationType = "UpdateInstanceMetadataOptions" OperationTypeStartGUISession OperationType = "StartGUISession" OperationTypeStopGUISession OperationType = "StopGUISession" + OperationTypeSetupInstanceHttps OperationType = "SetupInstanceHttps" ) // Values returns all known values for OperationType. Note that this can be @@ -1617,6 +1634,7 @@ func (OperationType) Values() []OperationType { "UpdateInstanceMetadataOptions", "StartGUISession", "StopGUISession", + "SetupInstanceHttps", } } @@ -1965,6 +1983,26 @@ func (ResourceType) Values() []ResourceType { } } +type SetupStatus string + +// Enum values for SetupStatus +const ( + SetupStatusSucceeded SetupStatus = "succeeded" + SetupStatusFailed SetupStatus = "failed" + SetupStatusInProgress SetupStatus = "inProgress" +) + +// Values returns all known values for SetupStatus. 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 (SetupStatus) Values() []SetupStatus { + return []SetupStatus{ + "succeeded", + "failed", + "inProgress", + } +} + type Status string // Enum values for Status diff --git a/service/lightsail/types/types.go b/service/lightsail/types/types.go index a6665e1b39c..955364ca3a1 100644 --- a/service/lightsail/types/types.go +++ b/service/lightsail/types/types.go @@ -263,7 +263,7 @@ type Alarm struct { // The period, in seconds, over which the statistic is applied. Period *int32 - // The Lightsail resource type (e.g., Alarm ). + // The Lightsail resource type of the alarm. ResourceType ResourceType // The current state of the alarm. An alarm has the following possible states: @@ -319,7 +319,7 @@ type Alarm struct { // in an automatic snapshot. type AttachedDisk struct { - // The path of the disk (e.g., /dev/xvdf ). + // The path of the disk ( /dev/xvdf ). Path *string // The size of the disk in GB. @@ -405,14 +405,14 @@ type Blueprint struct { // parameter only applies to Lightsail for Research resources. AppCategory AppCategory - // The ID for the virtual private server image (e.g., app_wordpress_4_4 or - // app_lamp_7_0 ). + // The ID for the virtual private server image ( app_wordpress_4_4 or app_lamp_7_0 + // ). BlueprintId *string // The description of the blueprint. Description *string - // The group name of the blueprint (e.g., amazon-linux ). + // The group name of the blueprint ( amazon-linux ). Group *string // A Boolean value indicating whether the blueprint is active. Inactive blueprints @@ -430,7 +430,7 @@ type Blueprint struct { // runs on all instance sizes. MinPower *int32 - // The friendly name of the blueprint (e.g., Amazon Linux ). + // The friendly name of the blueprint ( Amazon Linux ). Name *string // The operating system platform (either Linux/Unix-based or Windows Server-based) @@ -440,11 +440,10 @@ type Blueprint struct { // The product URL to learn more about the image or blueprint. ProductUrl *string - // The type of the blueprint (e.g., os or app ). + // The type of the blueprint ( os or app ). Type BlueprintType - // The version number of the operating system, application, or stack (e.g., - // 2016.03.0 ). + // The version number of the operating system, application, or stack ( 2016.03.0 ). Version *string // The version code. @@ -499,7 +498,7 @@ type Bucket struct { // read-only access to the bucket. ReadonlyAccessAccounts []string - // The Lightsail resource type of the bucket (for example, Bucket ). + // The Lightsail resource type of the bucket. ResourceType *string // An array of objects that describe Lightsail instances that have access to the @@ -601,35 +600,35 @@ type BucketState struct { // server (or instance). type Bundle struct { - // The bundle ID (e.g., micro_1_0 ). + // The bundle ID ( micro_1_0 ). BundleId *string - // The number of vCPUs included in the bundle (e.g., 2 ). + // The number of vCPUs included in the bundle ( 2 ). CpuCount *int32 - // The size of the SSD (e.g., 30 ). + // The size of the SSD ( 30 ). DiskSizeInGb *int32 - // The Amazon EC2 instance type (e.g., t2.micro ). + // The Amazon EC2 instance type ( t2.micro ). InstanceType *string // A Boolean value indicating whether the bundle is active. IsActive *bool - // A friendly name for the bundle (e.g., Micro ). + // A friendly name for the bundle ( Micro ). Name *string - // A numeric value that represents the power of the bundle (e.g., 500 ). You can - // use the bundle's power value in conjunction with a blueprint's minimum power - // value to determine whether the blueprint will run on the bundle. For example, - // you need a bundle with a power value of 500 or more to create an instance that - // uses a blueprint with a minimum power value of 500. + // A numeric value that represents the power of the bundle ( 500 ). You can use the + // bundle's power value in conjunction with a blueprint's minimum power value to + // determine whether the blueprint will run on the bundle. For example, you need a + // bundle with a power value of 500 or more to create an instance that uses a + // blueprint with a minimum power value of 500. Power *int32 - // The price in US dollars (e.g., 5.0 ) of the bundle. + // The price in US dollars ( 5.0 ) of the bundle. Price *float32 - // The amount of RAM in GB (e.g., 2.0 ). + // The amount of RAM in GB ( 2.0 ). RamSizeInGb *float32 // Virtual computer blueprints that are supported by a Lightsail for Research @@ -642,7 +641,7 @@ type Bundle struct { // bundle. SupportedPlatforms []InstancePlatform - // The data transfer rate per month in GB (e.g., 2000 ). + // The data transfer rate per month in GB ( 2000 ). TransferPerMonthInGb *int32 noSmithyDocumentSerde @@ -800,7 +799,7 @@ type Certificate struct { // certificate. KeyAlgorithm *string - // The name of the certificate (e.g., my-certificate ). + // The name of the certificate ( my-certificate ). Name *string // The timestamp when the certificate expires. @@ -863,8 +862,8 @@ type Certificate struct { // The validation status of the certificate. Status CertificateStatus - // An array of strings that specify the alternate domains (e.g., example2.com ) and - // subdomains (e.g., blog.example.com ) of the certificate. + // An array of strings that specify the alternate domains ( example2.com ) and + // subdomains ( blog.example.com ) of the certificate. SubjectAlternativeNames []string // The support code. Include this code in your email to support when you have @@ -928,7 +927,7 @@ type CloudFormationStackRecord struct { // CloudFormationStackRecord followed by a GUID. Name *string - // The Lightsail resource type (e.g., CloudFormationStackRecord ). + // The Lightsail resource type ( CloudFormationStackRecord ). ResourceType ResourceType // A list of objects describing the source of the CloudFormation stack record. @@ -950,7 +949,7 @@ type CloudFormationStackRecordSourceInfo struct { // The name of the record. Name *string - // The Lightsail resource type (e.g., ExportSnapshotRecord ). + // The Lightsail resource type ( ExportSnapshotRecord ). ResourceType CloudFormationStackRecordSourceType noSmithyDocumentSerde @@ -981,7 +980,7 @@ type ContactMethod struct { // The protocol of the contact method, such as email or SMS (text messaging). Protocol ContactProtocol - // The Lightsail resource type (e.g., ContactMethod ). + // The Lightsail resource type of the contact method. ResourceType ResourceType // The current status of the contact method. A contact method has the following @@ -1111,7 +1110,7 @@ type ContainerService struct { // for your Lightsail container service. PublicDomainNames map[string][]string - // The Lightsail resource type of the container service (i.e., ContainerService ). + // The Lightsail resource type of the container service. ResourceType ResourceType // The scale specification of the container service. The scale specifies the @@ -1166,13 +1165,13 @@ type ContainerServiceDeployment struct { // The state of the deployment. A deployment can be in one of the following // states: - // - Activating - The deployment is being created. - // - Active - The deployment was successfully created, and it's currently running + // - ACTIVATING - The deployment is being created. + // - ACTIVE - The deployment was successfully created, and it's currently running // on the container service. The container service can have only one deployment in // an active state at a time. - // - Inactive - The deployment was previously successfully created, but it is not + // - INACTIVE - The deployment was previously successfully created, but it is not // currently running on the container service. - // - Failed - The deployment failed. Use the GetContainerLog action to view the + // - FAILED - The deployment failed. Use the GetContainerLog action to view the // log events for the containers in the deployment to try to determine the reason // for the failure. State ContainerServiceDeploymentState @@ -1311,10 +1310,10 @@ type ContainerServicePower struct { // container services. IsActive *bool - // The friendly name of the power (e.g., nano ). + // The friendly name of the power ( nano ). Name *string - // The ID of the power (e.g., nano-1 ). + // The ID of the power ( nano-1 ). PowerId *string // The monthly price of the power in USD. @@ -1441,9 +1440,9 @@ type Disk struct { // The resources to which the disk is attached. AttachedTo *string - // (Deprecated) The attachment state of the disk. In releases prior to November + // (Discontinued) The attachment state of the disk. In releases prior to November // 14, 2017, this parameter returned attached for system disks in the API - // response. It is now deprecated, but still included in the response. Use + // response. It is now discontinued, but still included in the response. Use // isAttached instead. // // Deprecated: This member has been deprecated. @@ -1456,9 +1455,9 @@ type Disk struct { // The date when the disk was created. CreatedAt *time.Time - // (Deprecated) The number of GB in use by the disk. In releases prior to November - // 14, 2017, this parameter was not included in the API response. It is now - // deprecated. + // (Discontinued) The number of GB in use by the disk. In releases prior to + // November 14, 2017, this parameter was not included in the API response. It is + // now discontinued. // // Deprecated: This member has been deprecated. GbInUse *int32 @@ -1482,7 +1481,7 @@ type Disk struct { // The disk path. Path *string - // The Lightsail resource type (e.g., Disk ). + // The Lightsail resource type ( Disk ). ResourceType ResourceType // The size of the disk in GB. @@ -1517,7 +1516,7 @@ type DiskInfo struct { // The disk path. Path *string - // The size of the disk in GB (e.g., 32 ). + // The size of the disk in GB ( 32 ). SizeInGb *int32 noSmithyDocumentSerde @@ -1526,7 +1525,7 @@ type DiskInfo struct { // Describes a block storage disk mapping. type DiskMap struct { - // The new disk name (e.g., my-new-disk ). + // The new disk name ( my-new-disk ). NewDiskName *string // The original disk path exposed to the instance (for example, /dev/sdh ). @@ -1566,13 +1565,13 @@ type DiskSnapshot struct { // The AWS Region and Availability Zone where the disk snapshot was created. Location *ResourceLocation - // The name of the disk snapshot (e.g., my-disk-snapshot ). + // The name of the disk snapshot ( my-disk-snapshot ). Name *string // The progress of the snapshot. Progress *string - // The Lightsail resource type (e.g., DiskSnapshot ). + // The Lightsail resource type ( DiskSnapshot ). ResourceType ResourceType // The size of the disk in GB. @@ -1597,7 +1596,7 @@ type DiskSnapshot struct { // Describes a disk snapshot. type DiskSnapshotInfo struct { - // The size of the disk in GB (e.g., 32 ). + // The size of the disk in GB ( 32 ). SizeInGb *int32 noSmithyDocumentSerde @@ -1655,7 +1654,7 @@ type DnsRecordCreationState struct { // Describes a domain where you are storing recordsets. type Domain struct { - // The Amazon Resource Name (ARN) of the domain recordset (e.g., + // The Amazon Resource Name (ARN) of the domain recordset ( // arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE // ). Arn *string @@ -1709,15 +1708,15 @@ type DomainEntry struct { // The name of the domain. Name *string - // (Deprecated) The options for the domain entry. In releases prior to November + // (Discontinued) The options for the domain entry. In releases prior to November // 29, 2017, this parameter was not included in the API response. It is now - // deprecated. + // discontinued. // // Deprecated: This member has been deprecated. Options map[string]string - // The target IP address (e.g., 192.0.2.0 ), or AWS name server (e.g., - // ns-111.awsdns-22.com. ). For Lightsail load balancers, the value looks like + // The target IP address ( 192.0.2.0 ), or AWS name server ( ns-111.awsdns-22.com. + // ). For Lightsail load balancers, the value looks like // ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com . For // Lightsail distributions, the value looks like exampled1182ne.cloudfront.net . // For Lightsail container services, the value looks like @@ -1829,7 +1828,7 @@ type ExportSnapshotRecord struct { // The export snapshot record name. Name *string - // The Lightsail resource type (e.g., ExportSnapshotRecord ). + // The Lightsail resource type ( ExportSnapshotRecord ). ResourceType ResourceType // A list of objects describing the source of the export snapshot record. @@ -1865,7 +1864,7 @@ type ExportSnapshotRecordSourceInfo struct { // The name of the source instance or disk snapshot. Name *string - // The Lightsail resource type (e.g., InstanceSnapshot or DiskSnapshot ). + // The Lightsail resource type ( InstanceSnapshot or DiskSnapshot ). ResourceType ExportSnapshotRecordSourceType noSmithyDocumentSerde @@ -1934,9 +1933,9 @@ type HostKeyAttributes struct { } // Describes the origin resource of an Amazon Lightsail content delivery network -// (CDN) distribution. An origin can be a Lightsail instance, bucket, or load -// balancer. A distribution pulls content from an origin, caches it, and serves it -// to viewers via a worldwide network of edge servers. +// (CDN) distribution. An origin can be a Lightsail instance, bucket, container +// service, or load balancer. A distribution pulls content from an origin, caches +// it, and serves it to viewers via a worldwide network of edge servers. type InputOrigin struct { // The name of the origin resource. @@ -1958,21 +1957,21 @@ type Instance struct { // An array of objects representing the add-ons enabled on the instance. AddOns []AddOn - // The Amazon Resource Name (ARN) of the instance (e.g., + // The Amazon Resource Name (ARN) of the instance ( // arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE // ). Arn *string - // The blueprint ID (e.g., os_amlinux_2016_03 ). + // The blueprint ID ( os_amlinux_2016_03 ). BlueprintId *string - // The friendly name of the blueprint (e.g., Amazon Linux ). + // The friendly name of the blueprint ( Amazon Linux ). BlueprintName *string - // The bundle for the instance (e.g., micro_1_0 ). + // The bundle for the instance ( micro_1_0 ). BundleId *string - // The timestamp when the instance was created (e.g., 1479734909.17 ) in Unix time + // The timestamp when the instance was created ( 1479734909.17 ) in Unix time // format. CreatedAt *time.Time @@ -1995,7 +1994,7 @@ type Instance struct { // The metadata options for the Amazon Lightsail instance. MetadataOptions *InstanceMetadataOptions - // The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1 ). + // The name the user gave the instance ( Amazon_Linux-1GB-Ohio-1 ). Name *string // Information about the public ports and monthly data transfer rates for the @@ -2011,11 +2010,11 @@ type Instance struct { // The type of resource (usually Instance ). ResourceType ResourceType - // The name of the SSH key being used to connect to the instance (e.g., + // The name of the SSH key being used to connect to the instance ( // LightsailDefaultKeyPair ). SshKeyName *string - // The status code and the state (e.g., running ) for the instance. + // The status code and the state ( running ) for the instance. State *InstanceState // The support code. Include this code in your email to support when you have @@ -2028,7 +2027,7 @@ type Instance struct { // . Tags []Tag - // The user name for connecting to the instance (e.g., ec2-user ). + // The user name for connecting to the instance ( ec2-user ). Username *string noSmithyDocumentSerde @@ -2039,8 +2038,7 @@ type Instance struct { type InstanceAccessDetails struct { // For SSH access, the public key to use when accessing your instance For OpenSSH - // clients (e.g., command line SSH), you should save this value to tempkey-cert.pub - // . + // clients (command line SSH), you should save this value to tempkey-cert.pub . CertKey *string // For SSH access, the date on which the temporary keys expire. @@ -2072,8 +2070,8 @@ type InstanceAccessDetails struct { // create an instance, it can take up to 15 minutes for the instance to be ready. PasswordData *PasswordData - // For SSH access, the temporary private key. For OpenSSH clients (e.g., command - // line SSH), you should save this value to tempkey ). + // For SSH access, the temporary private key. For OpenSSH clients (command line + // SSH), you should save this value to tempkey ). PrivateKey *string // The protocol for these Amazon Lightsail instance access details. @@ -2094,7 +2092,7 @@ type InstanceEntry struct { // This member is required. AvailabilityZone *string - // The instance type (e.g., t2.micro ) to use for the new Amazon EC2 instance. + // The instance type ( t2.micro ) to use for the new Amazon EC2 instance. // // This member is required. InstanceType *string @@ -2152,7 +2150,7 @@ type InstanceHardware struct { // The disks attached to the instance. Disks []Disk - // The amount of RAM in GB on the instance (e.g., 1.0 ). + // The amount of RAM in GB on the instance ( 1.0 ). RamSizeInGb *float32 noSmithyDocumentSerde @@ -2431,27 +2429,27 @@ type InstancePortState struct { // Describes an instance snapshot. type InstanceSnapshot struct { - // The Amazon Resource Name (ARN) of the snapshot (e.g., + // The Amazon Resource Name (ARN) of the snapshot ( // arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE // ). Arn *string - // The timestamp when the snapshot was created (e.g., 1479907467.024 ). + // The timestamp when the snapshot was created ( 1479907467.024 ). CreatedAt *time.Time // An array of disk objects containing information about all block storage disks. FromAttachedDisks []Disk - // The blueprint ID from which you created the snapshot (e.g., os_debian_8_3 ). A + // The blueprint ID from which you created the snapshot ( os_debian_8_3 ). A // blueprint is a virtual private server (or instance) image used to create // instances quickly. FromBlueprintId *string - // The bundle ID from which you created the snapshot (e.g., micro_1_0 ). + // The bundle ID from which you created the snapshot ( micro_1_0 ). FromBundleId *string // The Amazon Resource Name (ARN) of the instance from which the snapshot was - // created (e.g., + // created ( // arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE // ). FromInstanceArn *string @@ -2498,10 +2496,10 @@ type InstanceSnapshot struct { // Describes an instance snapshot. type InstanceSnapshotInfo struct { - // The blueprint ID from which the source instance (e.g., os_debian_8_3 ). + // The blueprint ID from which the source instance ( os_debian_8_3 ). FromBlueprintId *string - // The bundle ID from which the source instance was created (e.g., micro_1_0 ). + // The bundle ID from which the source instance was created ( micro_1_0 ). FromBundleId *string // A list of objects describing the disks that were attached to the source @@ -2517,7 +2515,7 @@ type InstanceState struct { // The status code for the instance. Code *int32 - // The state of the instance (e.g., running or pending ). + // The state of the instance ( running or pending ). Name *string noSmithyDocumentSerde @@ -2526,12 +2524,12 @@ type InstanceState struct { // Describes an SSH key pair. type KeyPair struct { - // The Amazon Resource Name (ARN) of the key pair (e.g., + // The Amazon Resource Name (ARN) of the key pair ( // arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE // ). Arn *string - // The timestamp when the key pair was created (e.g., 1479816991.349 ). + // The timestamp when the key pair was created ( 1479816991.349 ). CreatedAt *time.Time // The RSA fingerprint of the key pair. @@ -2621,7 +2619,7 @@ type LightsailDistribution struct { // The public DNS of the origin. OriginPublicDNS *string - // The Lightsail resource type (e.g., Distribution ). + // The Lightsail resource type ( Distribution ). ResourceType ResourceType // The status of the distribution. @@ -2676,11 +2674,11 @@ type LoadBalancer struct { // only, and dualstack for IPv4 and IPv6. IpAddressType IpAddressType - // The AWS Region where your load balancer was created (e.g., us-east-2a ). - // Lightsail automatically creates your load balancer across Availability Zones. + // The AWS Region where your load balancer was created ( us-east-2a ). Lightsail + // automatically creates your load balancer across Availability Zones. Location *ResourceLocation - // The name of the load balancer (e.g., my-load-balancer ). + // The name of the load balancer ( my-load-balancer ). Name *string // The protocol you have enabled for your load balancer. Valid values are below. @@ -2691,7 +2689,7 @@ type LoadBalancer struct { // For HTTPS, use port 443. PublicPorts []int32 - // The resource type (e.g., LoadBalancer . + // The resource type ( LoadBalancer . ResourceType ResourceType // The status of your load balancer. Valid values are below. @@ -2790,7 +2788,7 @@ type LoadBalancerTlsCertificate struct { // certificate. Location *ResourceLocation - // The name of the SSL/TLS certificate (e.g., my-certificate ). + // The name of the SSL/TLS certificate ( my-certificate ). Name *string // The timestamp when the SSL/TLS certificate expires. @@ -2803,7 +2801,7 @@ type LoadBalancerTlsCertificate struct { // Lightsail. RenewalSummary *LoadBalancerTlsCertificateRenewalSummary - // The resource type (e.g., LoadBalancerTlsCertificate ). + // The resource type ( LoadBalancerTlsCertificate ). // - Instance - A Lightsail instance (a virtual private server) // - StaticIp - A static IP address // - KeyPair - The key pair used to connect to a Lightsail instance @@ -2838,8 +2836,8 @@ type LoadBalancerTlsCertificate struct { // certificate. Subject *string - // An array of strings that specify the alternate domains (e.g., example2.com ) and - // subdomains (e.g., blog.example.com ) for the certificate. + // An array of strings that specify the alternate domains ( example2.com ) and + // subdomains ( blog.example.com ) for the certificate. SubjectAlternativeNames []string // The support code. Include this code in your email to support when you have @@ -3021,7 +3019,7 @@ type MetricDatapoint struct { // The sum. Sum *float64 - // The timestamp (e.g., 1479816991.349 ). + // The timestamp ( 1479816991.349 ). Timestamp *time.Time // The unit. @@ -3082,7 +3080,7 @@ type NameServersUpdateState struct { // Describes the API operation. type Operation struct { - // The timestamp when the operation was initialized (e.g., 1479816991.349 ). + // The timestamp when the operation was initialized ( 1479816991.349 ). CreatedAt *time.Time // The error code. @@ -3100,7 +3098,7 @@ type Operation struct { // The Amazon Web Services Region and Availability Zone. Location *ResourceLocation - // Details about the operation (e.g., Debian-1GB-Ohio-1 ). + // Details about the operation ( Debian-1GB-Ohio-1 ). OperationDetails *string // The type of operation. @@ -3115,7 +3113,7 @@ type Operation struct { // The status of the operation. Status OperationStatus - // The timestamp when the status was changed (e.g., 1479816991.349 ). + // The timestamp when the status was changed ( 1479816991.349 ). StatusChangedAt *time.Time noSmithyDocumentSerde @@ -3137,7 +3135,7 @@ type Origin struct { // The AWS Region name of the origin resource. RegionName RegionName - // The resource type of the origin resource (e.g., Instance). + // The resource type of the origin resource (Instance). ResourceType ResourceType noSmithyDocumentSerde @@ -3351,17 +3349,17 @@ type Region struct { // The Availability Zones. Follows the format us-east-2a (case-sensitive). AvailabilityZones []AvailabilityZone - // The continent code (e.g., NA , meaning North America). + // The continent code ( NA , meaning North America). ContinentCode *string - // The description of the Amazon Web Services Region (e.g., This region is - // recommended to serve users in the eastern United States and eastern Canada ). + // The description of the Amazon Web Services Region ( This region is recommended + // to serve users in the eastern United States and eastern Canada ). Description *string - // The display name (e.g., Ohio ). + // The display name ( Ohio ). DisplayName *string - // The region name (e.g., us-east-2 ). + // The region name ( us-east-2 ). Name RegionName // The Availability Zones for databases. Follows the format us-east-2a @@ -3808,18 +3806,104 @@ type Session struct { noSmithyDocumentSerde } +// Returns details about the commands that were run. +type SetupExecutionDetails struct { + + // The command that was executed. + Command *string + + // The timestamp for when the request was run. + DateTime *time.Time + + // The name of the target resource. + Name *string + + // The text written by the command to stderr. + StandardError *string + + // The text written by the command to stdout. + StandardOutput *string + + // The status of the SetupInstanceHttps request. + Status SetupStatus + + // The current version of the script.. + Version *string + + noSmithyDocumentSerde +} + +// Returns a list of the commands that were ran on the target resource. The status +// of each command is also returned. +type SetupHistory struct { + + // Describes the full details of the request. + ExecutionDetails []SetupExecutionDetails + + // A GUID that's used to identify the operation. + OperationId *string + + // Information about the specified request. + Request *SetupRequest + + // The target resource name for the request. + Resource *SetupHistoryResource + + // The status of the request. + Status SetupStatus + + noSmithyDocumentSerde +} + +// The Lightsail resource that SetupHistory was ran on. +type SetupHistoryResource struct { + + // The Amazon Resource Name (ARN) of the Lightsail resource. + Arn *string + + // The timestamp for when the resource was created. + CreatedAt *time.Time + + // Describes the resource location. + Location *ResourceLocation + + // The name of the Lightsail resource. + Name *string + + // The Lightsail resource type. For example, Instance . + ResourceType ResourceType + + noSmithyDocumentSerde +} + +// Returns information that was submitted during the SetupInstanceHttps request. +// Email information is redacted for privacy. +type SetupRequest struct { + + // The Certificate Authority (CA) that issues the SSL/TLS certificate. + CertificateProvider CertificateProvider + + // The name of the domain and subdomains that the SSL/TLS certificate secures. + DomainNames []string + + // The name of the Lightsail instance. + InstanceName *string + + noSmithyDocumentSerde +} + // Describes a static IP. type StaticIp struct { - // The Amazon Resource Name (ARN) of the static IP (e.g., + // The Amazon Resource Name (ARN) of the static IP ( // arn:aws:lightsail:us-east-2:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE // ). Arn *string - // The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Ohio-1 ). + // The instance where the static IP is attached ( Amazon_Linux-1GB-Ohio-1 ). AttachedTo *string - // The timestamp when the static IP was created (e.g., 1479735304.222 ). + // The timestamp when the static IP was created ( 1479735304.222 ). CreatedAt *time.Time // The static IP address. @@ -3831,7 +3915,7 @@ type StaticIp struct { // The region and Availability Zone where the static IP was created. Location *ResourceLocation - // The name of the static IP (e.g., StaticIP-Ohio-EXAMPLE ). + // The name of the static IP ( StaticIP-Ohio-EXAMPLE ). Name *string // The resource type (usually StaticIp ). diff --git a/service/lightsail/validators.go b/service/lightsail/validators.go index 6baa00719f0..d9874a5f2d4 100644 --- a/service/lightsail/validators.go +++ b/service/lightsail/validators.go @@ -1810,6 +1810,26 @@ func (m *validateOpGetRelationalDatabaseSnapshot) HandleInitialize(ctx context.C return next.HandleInitialize(ctx, in) } +type validateOpGetSetupHistory struct { +} + +func (*validateOpGetSetupHistory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSetupHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSetupHistoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSetupHistoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetStaticIp struct { } @@ -2050,6 +2070,26 @@ func (m *validateOpSetResourceAccessForBucket) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpSetupInstanceHttps struct { +} + +func (*validateOpSetupInstanceHttps) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSetupInstanceHttps) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SetupInstanceHttpsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSetupInstanceHttpsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartGUISession struct { } @@ -2770,6 +2810,10 @@ func addOpGetRelationalDatabaseSnapshotValidationMiddleware(stack *middleware.St return stack.Initialize.Add(&validateOpGetRelationalDatabaseSnapshot{}, middleware.After) } +func addOpGetSetupHistoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSetupHistory{}, middleware.After) +} + func addOpGetStaticIpValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetStaticIp{}, middleware.After) } @@ -2818,6 +2862,10 @@ func addOpSetResourceAccessForBucketValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpSetResourceAccessForBucket{}, middleware.After) } +func addOpSetupInstanceHttpsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSetupInstanceHttps{}, middleware.After) +} + func addOpStartGUISessionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartGUISession{}, middleware.After) } @@ -4644,6 +4692,21 @@ func validateOpGetRelationalDatabaseSnapshotInput(v *GetRelationalDatabaseSnapsh } } +func validateOpGetSetupHistoryInput(v *GetSetupHistoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSetupHistoryInput"} + if v.ResourceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetStaticIpInput(v *GetStaticIpInput) error { if v == nil { return nil @@ -4866,6 +4929,30 @@ func validateOpSetResourceAccessForBucketInput(v *SetResourceAccessForBucketInpu } } +func validateOpSetupInstanceHttpsInput(v *SetupInstanceHttpsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SetupInstanceHttpsInput"} + if v.InstanceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceName")) + } + if v.EmailAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("EmailAddress")) + } + if v.DomainNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainNames")) + } + if len(v.CertificateProvider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CertificateProvider")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartGUISessionInput(v *StartGUISessionInput) error { if v == nil { return nil diff --git a/service/opensearch/api_op_CreateDomain.go b/service/opensearch/api_op_CreateDomain.go index 6b0321fb595..66fb0e1ebd0 100644 --- a/service/opensearch/api_op_CreateDomain.go +++ b/service/opensearch/api_op_CreateDomain.go @@ -97,7 +97,10 @@ type CreateDomainInput struct { // . EngineVersion *string - // The type of IP addresses supported by the endpoint for the domain. + // Specify either dual stack or IPv4 as your IP address type. Dual stack allows + // you to share domain resources across IPv4 and IPv6 address types, and is the + // recommended option. If you set your IP address type to dual stack, you can't + // change your address type later. IPAddressType types.IPAddressType // Key-value pairs to configure log publishing. diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index f2f6646da39..c1b1ae41318 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -95,7 +95,10 @@ type UpdateDomainConfigInput struct { // Encryption at rest options for the domain. EncryptionAtRestOptions *types.EncryptionAtRestOptions - // The type of IP addresses supported by the endpoint for the domain. + // Specify either dual stack or IPv4 as your IP address type. Dual stack allows + // you to share domain resources across IPv4 and IPv6 address types, and is the + // recommended option. If your IP address type is currently set to dual stack, you + // can't change it. IPAddressType types.IPAddressType // Options to publish OpenSearch logs to Amazon CloudWatch Logs. diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index d15c106e024..0c54aa3bcfa 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -997,8 +997,9 @@ type TLSSecurityPolicy string // Enum values for TLSSecurityPolicy const ( - TLSSecurityPolicyPolicyMinTls10201907 TLSSecurityPolicy = "Policy-Min-TLS-1-0-2019-07" - TLSSecurityPolicyPolicyMinTls12201907 TLSSecurityPolicy = "Policy-Min-TLS-1-2-2019-07" + TLSSecurityPolicyPolicyMinTls10201907 TLSSecurityPolicy = "Policy-Min-TLS-1-0-2019-07" + TLSSecurityPolicyPolicyMinTls12201907 TLSSecurityPolicy = "Policy-Min-TLS-1-2-2019-07" + TLSSecurityPolicyPolicyMinTls12Pfs202310 TLSSecurityPolicy = "Policy-Min-TLS-1-2-PFS-2023-10" ) // Values returns all known values for TLSSecurityPolicy. Note that this can be @@ -1008,6 +1009,7 @@ func (TLSSecurityPolicy) Values() []TLSSecurityPolicy { return []TLSSecurityPolicy{ "Policy-Min-TLS-1-0-2019-07", "Policy-Min-TLS-1-2-2019-07", + "Policy-Min-TLS-1-2-PFS-2023-10", } } diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 8fda21b22ef..c631a911e5d 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -672,7 +672,10 @@ type DomainConfig struct { // The OpenSearch or Elasticsearch version that the domain is running. EngineVersion *VersionStatus - // The type of IP addresses supported by the endpoint for the domain. + // Choose either dual stack or IPv4 as your IP address type. Dual stack allows you + // to share domain resources across IPv4 and IPv6 address types, and is the + // recommended option. If you set your IP address type to dual stack, you can't + // change your address type later. IPAddressType *IPAddressTypeStatus // Key-value pairs to configure log publishing. @@ -720,6 +723,8 @@ type DomainEndpointOptions struct { // 1.0 to TLS version 1.2 // - Policy-Min-TLS-1-2-2019-07: TLS security policy that supports only TLS // version 1.2 + // - Policy-Min-TLS-1-2-PFS-2023-10: TLS security policy that supports TLS + // version 1.2 to TLS version 1.3 with perfect forward secrecy cipher suites TLSSecurityPolicy TLSSecurityPolicy noSmithyDocumentSerde @@ -929,13 +934,14 @@ type DomainStatus struct { // to the domain. Endpoint *string - // The domain endpoint to which index and search requests are submitted. For - // example, search-imdb-movies-oopcnjfn6ugo.eu-west-1.es.amazonaws.com or - // doc-imdb-movies-oopcnjfn6u.eu-west-1.es.amazonaws.com . + // If IPAddressType to set to dualstack , a version 2 domain endpoint is + // provisioned. This endpoint functions like a normal endpoint, except that it + // works with both IPv4 and IPv6 IP addresses. Normal endpoints work only with IPv4 + // IP addresses. EndpointV2 *string // The key-value pair that exists if the OpenSearch Service domain uses VPC - // endpoints.. Example key, value : + // endpoints. Example key, value : // 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com' . Endpoints map[string]string diff --git a/service/sagemaker/api_op_CreateFeatureGroup.go b/service/sagemaker/api_op_CreateFeatureGroup.go index d1467c02946..8e152a3e79f 100644 --- a/service/sagemaker/api_op_CreateFeatureGroup.go +++ b/service/sagemaker/api_op_CreateFeatureGroup.go @@ -116,6 +116,19 @@ type CreateFeatureGroupInput struct { // Tags used to identify Features in each FeatureGroup . Tags []types.Tag + // Used to set feature group throughput configuration. There are two modes: + // ON_DEMAND and PROVISIONED . With on-demand mode, you are charged for data reads + // and writes that your application performs on your feature group. You do not need + // to specify read and write throughput because Feature Store accommodates your + // workloads as they ramp up and down. You can switch a feature group to on-demand + // only once in a 24 hour period. With provisioned throughput mode, you specify the + // read and write capacity per second that you expect your application to require, + // and you are billed based on those limits. Exceeding provisioned throughput will + // result in your requests being throttled. Note: PROVISIONED throughput mode is + // supported only for feature groups that are offline-only, or use the Standard (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType) + // tier online store. + ThroughputConfig *types.ThroughputConfig + noSmithyDocumentSerde } diff --git a/service/sagemaker/api_op_DescribeFeatureGroup.go b/service/sagemaker/api_op_DescribeFeatureGroup.go index dc5b72576bb..dba70ffb122 100644 --- a/service/sagemaker/api_op_DescribeFeatureGroup.go +++ b/service/sagemaker/api_op_DescribeFeatureGroup.go @@ -129,6 +129,20 @@ type DescribeFeatureGroupOutput struct { // into the OfflineStore if an OfflineStoreConfig is provided. RoleArn *string + // Active throughput configuration of the feature group. Used to set feature group + // throughput configuration. There are two modes: ON_DEMAND and PROVISIONED . With + // on-demand mode, you are charged for data reads and writes that your application + // performs on your feature group. You do not need to specify read and write + // throughput because Feature Store accommodates your workloads as they ramp up and + // down. You can switch a feature group to on-demand only once in a 24 hour period. + // With provisioned throughput mode, you specify the read and write capacity per + // second that you expect your application to require, and you are billed based on + // those limits. Exceeding provisioned throughput will result in your requests + // being throttled. Note: PROVISIONED throughput mode is supported only for + // feature groups that are offline-only, or use the Standard (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType) + // tier online store. + ThroughputConfig *types.ThroughputConfigDescription + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/sagemaker/api_op_UpdateFeatureGroup.go b/service/sagemaker/api_op_UpdateFeatureGroup.go index d06806eaead..10dfee5f820 100644 --- a/service/sagemaker/api_op_UpdateFeatureGroup.go +++ b/service/sagemaker/api_op_UpdateFeatureGroup.go @@ -54,6 +54,12 @@ type UpdateFeatureGroupInput struct { // Updates the feature group online store configuration. OnlineStoreConfig *types.OnlineStoreConfigUpdate + // The new throughput configuration for the feature group. You can switch between + // on-demand and provisioned modes or update the read / write capacity of + // provisioned feature groups. You can switch a feature group to on-demand only + // once in a 24 hour period. + ThroughputConfig *types.ThroughputConfigUpdate + noSmithyDocumentSerde } diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 39d68b6a3ed..e567df4d790 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -73790,6 +73790,72 @@ func awsAwsjson11_deserializeDocumentTextGenerationResolvedAttributes(v **types. return nil } +func awsAwsjson11_deserializeDocumentThroughputConfigDescription(v **types.ThroughputConfigDescription, 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.ThroughputConfigDescription + if *v == nil { + sv = &types.ThroughputConfigDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ProvisionedReadCapacityUnits": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CapacityUnit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProvisionedReadCapacityUnits = ptr.Int32(int32(i64)) + } + + case "ProvisionedWriteCapacityUnits": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CapacityUnit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProvisionedWriteCapacityUnits = ptr.Int32(int32(i64)) + } + + case "ThroughputMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThroughputMode to be of type string, got %T instead", value) + } + sv.ThroughputMode = types.ThroughputMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentTimeSeriesConfig(v **types.TimeSeriesConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -84881,6 +84947,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeFeatureGroupOutput(v **DescribeFe sv.RoleArn = ptr.String(jtv) } + case "ThroughputConfig": + if err := awsAwsjson11_deserializeDocumentThroughputConfigDescription(&sv.ThroughputConfig, value); err != nil { + return err + } + default: _, _ = key, value diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 8ce79964a5c..8f174ea7bf4 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -27001,6 +27001,50 @@ func awsAwsjson11_serializeDocumentTextGenerationJobConfig(v *types.TextGenerati return nil } +func awsAwsjson11_serializeDocumentThroughputConfig(v *types.ThroughputConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProvisionedReadCapacityUnits != nil { + ok := object.Key("ProvisionedReadCapacityUnits") + ok.Integer(*v.ProvisionedReadCapacityUnits) + } + + if v.ProvisionedWriteCapacityUnits != nil { + ok := object.Key("ProvisionedWriteCapacityUnits") + ok.Integer(*v.ProvisionedWriteCapacityUnits) + } + + if len(v.ThroughputMode) > 0 { + ok := object.Key("ThroughputMode") + ok.String(string(v.ThroughputMode)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentThroughputConfigUpdate(v *types.ThroughputConfigUpdate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProvisionedReadCapacityUnits != nil { + ok := object.Key("ProvisionedReadCapacityUnits") + ok.Integer(*v.ProvisionedReadCapacityUnits) + } + + if v.ProvisionedWriteCapacityUnits != nil { + ok := object.Key("ProvisionedWriteCapacityUnits") + ok.Integer(*v.ProvisionedWriteCapacityUnits) + } + + if len(v.ThroughputMode) > 0 { + ok := object.Key("ThroughputMode") + ok.String(string(v.ThroughputMode)) + } + + return nil +} + func awsAwsjson11_serializeDocumentTimeSeriesConfig(v *types.TimeSeriesConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -29135,6 +29179,13 @@ func awsAwsjson11_serializeOpDocumentCreateFeatureGroupInput(v *CreateFeatureGro } } + if v.ThroughputConfig != nil { + ok := object.Key("ThroughputConfig") + if err := awsAwsjson11_serializeDocumentThroughputConfig(v.ThroughputConfig, ok); err != nil { + return err + } + } + return nil } @@ -37199,6 +37250,13 @@ func awsAwsjson11_serializeOpDocumentUpdateFeatureGroupInput(v *UpdateFeatureGro } } + if v.ThroughputConfig != nil { + ok := object.Key("ThroughputConfig") + if err := awsAwsjson11_serializeDocumentThroughputConfigUpdate(v.ThroughputConfig, ok); err != nil { + return err + } + } + return nil } diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 3aabc58733d..fb25550680f 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -6136,6 +6136,24 @@ func (TargetPlatformOs) Values() []TargetPlatformOs { } } +type ThroughputMode string + +// Enum values for ThroughputMode +const ( + ThroughputModeOnDemand ThroughputMode = "OnDemand" + ThroughputModeProvisioned ThroughputMode = "Provisioned" +) + +// Values returns all known values for ThroughputMode. 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 (ThroughputMode) Values() []ThroughputMode { + return []ThroughputMode{ + "OnDemand", + "Provisioned", + } +} + type TrafficRoutingConfigType string // Enum values for TrafficRoutingConfigType diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 19bbe280f7d..e1f33c948ef 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -14483,6 +14483,92 @@ type TextGenerationResolvedAttributes struct { noSmithyDocumentSerde } +// Used to set feature group throughput configuration. There are two modes: +// ON_DEMAND and PROVISIONED . With on-demand mode, you are charged for data reads +// and writes that your application performs on your feature group. You do not need +// to specify read and write throughput because Feature Store accommodates your +// workloads as they ramp up and down. You can switch a feature group to on-demand +// only once in a 24 hour period. With provisioned throughput mode, you specify the +// read and write capacity per second that you expect your application to require, +// and you are billed based on those limits. Exceeding provisioned throughput will +// result in your requests being throttled. Note: PROVISIONED throughput mode is +// supported only for feature groups that are offline-only, or use the Standard (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType) +// tier online store. +type ThroughputConfig struct { + + // The mode used for your feature group throughput: ON_DEMAND or PROVISIONED . + // + // This member is required. + ThroughputMode ThroughputMode + + // For provisioned feature groups with online store enabled, this indicates the + // read throughput you are billed for and can consume without throttling. This + // field is not applicable for on-demand feature groups. + ProvisionedReadCapacityUnits *int32 + + // For provisioned feature groups, this indicates the write throughput you are + // billed for and can consume without throttling. This field is not applicable for + // on-demand feature groups. + ProvisionedWriteCapacityUnits *int32 + + noSmithyDocumentSerde +} + +// Active throughput configuration of the feature group. Used to set feature group +// throughput configuration. There are two modes: ON_DEMAND and PROVISIONED . With +// on-demand mode, you are charged for data reads and writes that your application +// performs on your feature group. You do not need to specify read and write +// throughput because Feature Store accommodates your workloads as they ramp up and +// down. You can switch a feature group to on-demand only once in a 24 hour period. +// With provisioned throughput mode, you specify the read and write capacity per +// second that you expect your application to require, and you are billed based on +// those limits. Exceeding provisioned throughput will result in your requests +// being throttled. Note: PROVISIONED throughput mode is supported only for +// feature groups that are offline-only, or use the Standard (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType) +// tier online store. +type ThroughputConfigDescription struct { + + // The mode used for your feature group throughput: ON_DEMAND or PROVISIONED . + // + // This member is required. + ThroughputMode ThroughputMode + + // For provisioned feature groups with online store enabled, this indicates the + // read throughput you are billed for and can consume without throttling. This + // field is not applicable for on-demand feature groups. + ProvisionedReadCapacityUnits *int32 + + // For provisioned feature groups, this indicates the write throughput you are + // billed for and can consume without throttling. This field is not applicable for + // on-demand feature groups. + ProvisionedWriteCapacityUnits *int32 + + noSmithyDocumentSerde +} + +// The new throughput configuration for the feature group. You can switch between +// on-demand and provisioned modes or update the read / write capacity of +// provisioned feature groups. You can switch a feature group to on-demand only +// once in a 24 hour period. +type ThroughputConfigUpdate struct { + + // For provisioned feature groups with online store enabled, this indicates the + // read throughput you are billed for and can consume without throttling. + ProvisionedReadCapacityUnits *int32 + + // For provisioned feature groups, this indicates the write throughput you are + // billed for and can consume without throttling. + ProvisionedWriteCapacityUnits *int32 + + // Target throughput mode of the feature group. Throughput update is an + // asynchronous operation, and the outcome should be monitored by polling + // LastUpdateStatus field in DescribeFeatureGroup response. You cannot update a + // feature group's throughput while another update is in progress. + ThroughputMode ThroughputMode + + noSmithyDocumentSerde +} + // The collection of components that defines the time-series. type TimeSeriesConfig struct { diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index 2b248101818..7798c4a2c7c 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -11679,6 +11679,21 @@ func validateTextGenerationJobConfig(v *types.TextGenerationJobConfig) error { } } +func validateThroughputConfig(v *types.ThroughputConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ThroughputConfig"} + if len(v.ThroughputMode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ThroughputMode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTimeSeriesConfig(v *types.TimeSeriesConfig) error { if v == nil { return nil @@ -12961,6 +12976,11 @@ func validateOpCreateFeatureGroupInput(v *CreateFeatureGroupInput) error { invalidParams.AddNested("OfflineStoreConfig", err.(smithy.InvalidParamsError)) } } + if v.ThroughputConfig != nil { + if err := validateThroughputConfig(v.ThroughputConfig); err != nil { + invalidParams.AddNested("ThroughputConfig", err.(smithy.InvalidParamsError)) + } + } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) diff --git a/service/servicecatalog/api_op_AssociateServiceActionWithProvisioningArtifact.go b/service/servicecatalog/api_op_AssociateServiceActionWithProvisioningArtifact.go index d9fe3f341cb..47f51791319 100644 --- a/service/servicecatalog/api_op_AssociateServiceActionWithProvisioningArtifact.go +++ b/service/servicecatalog/api_op_AssociateServiceActionWithProvisioningArtifact.go @@ -49,6 +49,11 @@ type AssociateServiceActionWithProvisioningArtifactInput struct { // - zh - Chinese AcceptLanguage *string + // A unique identifier that you provide to ensure idempotency. If multiple + // requests from the same Amazon Web Services account use the same idempotency + // token, the same response is returned for each repeated request. + IdempotencyToken *string + noSmithyDocumentSerde } @@ -114,6 +119,9 @@ func (c *Client) addOperationAssociateServiceActionWithProvisioningArtifactMiddl if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addIdempotencyToken_opAssociateServiceActionWithProvisioningArtifactMiddleware(stack, options); err != nil { + return err + } if err = addOpAssociateServiceActionWithProvisioningArtifactValidationMiddleware(stack); err != nil { return err } @@ -138,6 +146,39 @@ func (c *Client) addOperationAssociateServiceActionWithProvisioningArtifactMiddl return nil } +type idempotencyToken_initializeOpAssociateServiceActionWithProvisioningArtifact struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpAssociateServiceActionWithProvisioningArtifact) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpAssociateServiceActionWithProvisioningArtifact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*AssociateServiceActionWithProvisioningArtifactInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateServiceActionWithProvisioningArtifactInput ") + } + + if input.IdempotencyToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.IdempotencyToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opAssociateServiceActionWithProvisioningArtifactMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateServiceActionWithProvisioningArtifact{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opAssociateServiceActionWithProvisioningArtifact(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_CreatePortfolioShare.go b/service/servicecatalog/api_op_CreatePortfolioShare.go index 6d04ccf9b91..85a765f8a22 100644 --- a/service/servicecatalog/api_op_CreatePortfolioShare.go +++ b/service/servicecatalog/api_op_CreatePortfolioShare.go @@ -70,13 +70,15 @@ type CreatePortfolioShareInput struct { // the PortfolioShare creation process. OrganizationNode *types.OrganizationNode - // Enables or disables Principal sharing when creating the portfolio share. If - // this flag is not provided, principal sharing is disabled. When you enable - // Principal Name Sharing for a portfolio share, the share recipient account end - // users with a principal that matches any of the associated IAM patterns can - // provision products from the portfolio. Once shared, the share recipient can view - // associations of PrincipalType : IAM_PATTERN on their portfolio. You can create - // the principals in the recipient account before or after creating the share. + // This parameter is only supported for portfolios with an OrganizationalNode Type + // of ORGANIZATION or ORGANIZATIONAL_UNIT . Enables or disables Principal sharing + // when creating the portfolio share. If you do not provide this flag, principal + // sharing is disabled. When you enable Principal Name Sharing for a portfolio + // share, the share recipient account end users with a principal that matches any + // of the associated IAM patterns can provision products from the portfolio. Once + // shared, the share recipient can view associations of PrincipalType : IAM_PATTERN + // on their portfolio. You can create the principals in the recipient account + // before or after creating the share. SharePrincipals bool // Enables or disables TagOptions sharing when creating the portfolio share. If diff --git a/service/servicecatalog/api_op_DeleteServiceAction.go b/service/servicecatalog/api_op_DeleteServiceAction.go index 5d22c238afa..64f62c95e5b 100644 --- a/service/servicecatalog/api_op_DeleteServiceAction.go +++ b/service/servicecatalog/api_op_DeleteServiceAction.go @@ -39,6 +39,11 @@ type DeleteServiceActionInput struct { // - zh - Chinese AcceptLanguage *string + // A unique identifier that you provide to ensure idempotency. If multiple + // requests from the same Amazon Web Services account use the same idempotency + // token, the same response is returned for each repeated request. + IdempotencyToken *string + noSmithyDocumentSerde } @@ -104,6 +109,9 @@ func (c *Client) addOperationDeleteServiceActionMiddlewares(stack *middleware.St if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addIdempotencyToken_opDeleteServiceActionMiddleware(stack, options); err != nil { + return err + } if err = addOpDeleteServiceActionValidationMiddleware(stack); err != nil { return err } @@ -128,6 +136,39 @@ func (c *Client) addOperationDeleteServiceActionMiddlewares(stack *middleware.St return nil } +type idempotencyToken_initializeOpDeleteServiceAction struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteServiceAction) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteServiceAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DeleteServiceActionInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteServiceActionInput ") + } + + if input.IdempotencyToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.IdempotencyToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteServiceActionMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteServiceAction{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opDeleteServiceAction(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_DisassociateServiceActionFromProvisioningArtifact.go b/service/servicecatalog/api_op_DisassociateServiceActionFromProvisioningArtifact.go index 391dfc8bb21..bb96ae27103 100644 --- a/service/servicecatalog/api_op_DisassociateServiceActionFromProvisioningArtifact.go +++ b/service/servicecatalog/api_op_DisassociateServiceActionFromProvisioningArtifact.go @@ -50,6 +50,11 @@ type DisassociateServiceActionFromProvisioningArtifactInput struct { // - zh - Chinese AcceptLanguage *string + // A unique identifier that you provide to ensure idempotency. If multiple + // requests from the same Amazon Web Services account use the same idempotency + // token, the same response is returned for each repeated request. + IdempotencyToken *string + noSmithyDocumentSerde } @@ -115,6 +120,9 @@ func (c *Client) addOperationDisassociateServiceActionFromProvisioningArtifactMi if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { return err } + if err = addIdempotencyToken_opDisassociateServiceActionFromProvisioningArtifactMiddleware(stack, options); err != nil { + return err + } if err = addOpDisassociateServiceActionFromProvisioningArtifactValidationMiddleware(stack); err != nil { return err } @@ -139,6 +147,39 @@ func (c *Client) addOperationDisassociateServiceActionFromProvisioningArtifactMi return nil } +type idempotencyToken_initializeOpDisassociateServiceActionFromProvisioningArtifact struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDisassociateServiceActionFromProvisioningArtifact) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDisassociateServiceActionFromProvisioningArtifact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DisassociateServiceActionFromProvisioningArtifactInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DisassociateServiceActionFromProvisioningArtifactInput ") + } + + if input.IdempotencyToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.IdempotencyToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDisassociateServiceActionFromProvisioningArtifactMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDisassociateServiceActionFromProvisioningArtifact{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opDisassociateServiceActionFromProvisioningArtifact(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/serializers.go b/service/servicecatalog/serializers.go index 06566cdbb23..2b9dd2f1a59 100644 --- a/service/servicecatalog/serializers.go +++ b/service/servicecatalog/serializers.go @@ -5736,6 +5736,11 @@ func awsAwsjson11_serializeOpDocumentAssociateServiceActionWithProvisioningArtif ok.String(*v.AcceptLanguage) } + if v.IdempotencyToken != nil { + ok := object.Key("IdempotencyToken") + ok.String(*v.IdempotencyToken) + } + if v.ProductId != nil { ok := object.Key("ProductId") ok.String(*v.ProductId) @@ -6344,6 +6349,11 @@ func awsAwsjson11_serializeOpDocumentDeleteServiceActionInput(v *DeleteServiceAc ok.String(*v.Id) } + if v.IdempotencyToken != nil { + ok := object.Key("IdempotencyToken") + ok.String(*v.IdempotencyToken) + } + return nil } @@ -6808,6 +6818,11 @@ func awsAwsjson11_serializeOpDocumentDisassociateServiceActionFromProvisioningAr ok.String(*v.AcceptLanguage) } + if v.IdempotencyToken != nil { + ok := object.Key("IdempotencyToken") + ok.String(*v.IdempotencyToken) + } + if v.ProductId != nil { ok := object.Key("ProductId") ok.String(*v.ProductId)