aws-sdk-ec2 1.364.0 → 1.366.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1472,6 +1472,7 @@ module Aws::EC2
1472
1472
  HostInstance = Shapes::StructureShape.new(name: 'HostInstance')
1473
1473
  HostInstanceList = Shapes::ListShape.new(name: 'HostInstanceList')
1474
1474
  HostList = Shapes::ListShape.new(name: 'HostList')
1475
+ HostMaintenance = Shapes::StringShape.new(name: 'HostMaintenance')
1475
1476
  HostOffering = Shapes::StructureShape.new(name: 'HostOffering')
1476
1477
  HostOfferingSet = Shapes::ListShape.new(name: 'HostOfferingSet')
1477
1478
  HostProperties = Shapes::StructureShape.new(name: 'HostProperties')
@@ -3193,6 +3194,7 @@ module Aws::EC2
3193
3194
  AllocateHostsRequest.add_member(:tag_specifications, Shapes::ShapeRef.new(shape: TagSpecificationList, location_name: "TagSpecification"))
3194
3195
  AllocateHostsRequest.add_member(:host_recovery, Shapes::ShapeRef.new(shape: HostRecovery, location_name: "HostRecovery"))
3195
3196
  AllocateHostsRequest.add_member(:outpost_arn, Shapes::ShapeRef.new(shape: String, location_name: "OutpostArn"))
3197
+ AllocateHostsRequest.add_member(:host_maintenance, Shapes::ShapeRef.new(shape: HostMaintenance, location_name: "HostMaintenance"))
3196
3198
  AllocateHostsRequest.struct_class = Types::AllocateHostsRequest
3197
3199
 
3198
3200
  AllocateHostsResult.add_member(:host_ids, Shapes::ShapeRef.new(shape: ResponseHostIdList, location_name: "hostIdSet"))
@@ -8919,6 +8921,7 @@ module Aws::EC2
8919
8921
  Host.add_member(:availability_zone_id, Shapes::ShapeRef.new(shape: String, location_name: "availabilityZoneId"))
8920
8922
  Host.add_member(:member_of_service_linked_resource_group, Shapes::ShapeRef.new(shape: Boolean, location_name: "memberOfServiceLinkedResourceGroup"))
8921
8923
  Host.add_member(:outpost_arn, Shapes::ShapeRef.new(shape: String, location_name: "outpostArn"))
8924
+ Host.add_member(:host_maintenance, Shapes::ShapeRef.new(shape: HostMaintenance, location_name: "hostMaintenance"))
8922
8925
  Host.struct_class = Types::Host
8923
8926
 
8924
8927
  HostInstance.add_member(:instance_id, Shapes::ShapeRef.new(shape: String, location_name: "instanceId"))
@@ -10062,7 +10065,7 @@ module Aws::EC2
10062
10065
  LaunchPermissionModifications.add_member(:remove, Shapes::ShapeRef.new(shape: LaunchPermissionList, location_name: "Remove"))
10063
10066
  LaunchPermissionModifications.struct_class = Types::LaunchPermissionModifications
10064
10067
 
10065
- LaunchSpecification.add_member(:user_data, Shapes::ShapeRef.new(shape: String, location_name: "userData"))
10068
+ LaunchSpecification.add_member(:user_data, Shapes::ShapeRef.new(shape: SensitiveUserData, location_name: "userData"))
10066
10069
  LaunchSpecification.add_member(:security_groups, Shapes::ShapeRef.new(shape: GroupIdentifierList, location_name: "groupSet"))
10067
10070
  LaunchSpecification.add_member(:addressing_type, Shapes::ShapeRef.new(shape: String, location_name: "addressingType"))
10068
10071
  LaunchSpecification.add_member(:block_device_mappings, Shapes::ShapeRef.new(shape: BlockDeviceMappingList, location_name: "blockDeviceMapping"))
@@ -10658,6 +10661,7 @@ module Aws::EC2
10658
10661
  ModifyHostsRequest.add_member(:host_recovery, Shapes::ShapeRef.new(shape: HostRecovery, location_name: "HostRecovery"))
10659
10662
  ModifyHostsRequest.add_member(:instance_type, Shapes::ShapeRef.new(shape: String, location_name: "InstanceType"))
10660
10663
  ModifyHostsRequest.add_member(:instance_family, Shapes::ShapeRef.new(shape: String, location_name: "InstanceFamily"))
10664
+ ModifyHostsRequest.add_member(:host_maintenance, Shapes::ShapeRef.new(shape: HostMaintenance, location_name: "HostMaintenance"))
10661
10665
  ModifyHostsRequest.struct_class = Types::ModifyHostsRequest
10662
10666
 
10663
10667
  ModifyHostsResult.add_member(:successful, Shapes::ShapeRef.new(shape: ResponseHostIdList, location_name: "successful"))
@@ -12345,7 +12349,7 @@ module Aws::EC2
12345
12349
  RequestSpotLaunchSpecification.add_member(:placement, Shapes::ShapeRef.new(shape: SpotPlacement, location_name: "placement"))
12346
12350
  RequestSpotLaunchSpecification.add_member(:ramdisk_id, Shapes::ShapeRef.new(shape: RamdiskId, location_name: "ramdiskId"))
12347
12351
  RequestSpotLaunchSpecification.add_member(:subnet_id, Shapes::ShapeRef.new(shape: SubnetId, location_name: "subnetId"))
12348
- RequestSpotLaunchSpecification.add_member(:user_data, Shapes::ShapeRef.new(shape: String, location_name: "userData"))
12352
+ RequestSpotLaunchSpecification.add_member(:user_data, Shapes::ShapeRef.new(shape: SensitiveUserData, location_name: "userData"))
12349
12353
  RequestSpotLaunchSpecification.struct_class = Types::RequestSpotLaunchSpecification
12350
12354
 
12351
12355
  RequestSpotLaunchSpecificationSecurityGroupIdList.member = Shapes::ShapeRef.new(shape: SecurityGroupId, location_name: "item")
@@ -12558,7 +12562,7 @@ module Aws::EC2
12558
12562
  ResponseLaunchTemplateData.add_member(:ram_disk_id, Shapes::ShapeRef.new(shape: String, location_name: "ramDiskId"))
12559
12563
  ResponseLaunchTemplateData.add_member(:disable_api_termination, Shapes::ShapeRef.new(shape: Boolean, location_name: "disableApiTermination"))
12560
12564
  ResponseLaunchTemplateData.add_member(:instance_initiated_shutdown_behavior, Shapes::ShapeRef.new(shape: ShutdownBehavior, location_name: "instanceInitiatedShutdownBehavior"))
12561
- ResponseLaunchTemplateData.add_member(:user_data, Shapes::ShapeRef.new(shape: String, location_name: "userData"))
12565
+ ResponseLaunchTemplateData.add_member(:user_data, Shapes::ShapeRef.new(shape: SensitiveUserData, location_name: "userData"))
12562
12566
  ResponseLaunchTemplateData.add_member(:tag_specifications, Shapes::ShapeRef.new(shape: LaunchTemplateTagSpecificationList, location_name: "tagSpecificationSet"))
12563
12567
  ResponseLaunchTemplateData.add_member(:elastic_gpu_specifications, Shapes::ShapeRef.new(shape: ElasticGpuSpecificationResponseList, location_name: "elasticGpuSpecificationSet"))
12564
12568
  ResponseLaunchTemplateData.add_member(:elastic_inference_accelerators, Shapes::ShapeRef.new(shape: LaunchTemplateElasticInferenceAcceleratorResponseList, location_name: "elasticInferenceAcceleratorSet"))
@@ -13191,7 +13195,7 @@ module Aws::EC2
13191
13195
  SpotFleetLaunchSpecification.add_member(:ramdisk_id, Shapes::ShapeRef.new(shape: String, location_name: "ramdiskId"))
13192
13196
  SpotFleetLaunchSpecification.add_member(:spot_price, Shapes::ShapeRef.new(shape: String, location_name: "spotPrice"))
13193
13197
  SpotFleetLaunchSpecification.add_member(:subnet_id, Shapes::ShapeRef.new(shape: SubnetId, location_name: "subnetId"))
13194
- SpotFleetLaunchSpecification.add_member(:user_data, Shapes::ShapeRef.new(shape: String, location_name: "userData"))
13198
+ SpotFleetLaunchSpecification.add_member(:user_data, Shapes::ShapeRef.new(shape: SensitiveUserData, location_name: "userData"))
13195
13199
  SpotFleetLaunchSpecification.add_member(:weighted_capacity, Shapes::ShapeRef.new(shape: Double, location_name: "weightedCapacity"))
13196
13200
  SpotFleetLaunchSpecification.add_member(:tag_specifications, Shapes::ShapeRef.new(shape: SpotFleetTagSpecificationList, location_name: "tagSpecificationSet"))
13197
13201
  SpotFleetLaunchSpecification.add_member(:instance_requirements, Shapes::ShapeRef.new(shape: InstanceRequirements, location_name: "instanceRequirements"))
@@ -50,9 +50,6 @@ module Aws::EC2
50
50
 
51
51
  def initialize(options = {})
52
52
  self[:region] = options[:region]
53
- if self[:region].nil?
54
- raise ArgumentError, "Missing required EndpointParameter: :region"
55
- end
56
53
  self[:use_dual_stack] = options[:use_dual_stack]
57
54
  self[:use_dual_stack] = false if self[:use_dual_stack].nil?
58
55
  if self[:use_dual_stack].nil?
@@ -14,45 +14,48 @@ module Aws::EC2
14
14
  use_dual_stack = parameters.use_dual_stack
15
15
  use_fips = parameters.use_fips
16
16
  endpoint = parameters.endpoint
17
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
18
- if Aws::Endpoints::Matchers.set?(endpoint)
17
+ if Aws::Endpoints::Matchers.set?(endpoint)
18
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
19
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
+ end
21
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
22
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
+ end
24
+ return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
25
+ end
26
+ if Aws::Endpoints::Matchers.set?(region)
27
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
29
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
+ return Aws::Endpoints::Endpoint.new(url: "https://ec2-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
+ end
32
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
+ end
19
34
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
20
- raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
35
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
+ if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
37
+ return Aws::Endpoints::Endpoint.new(url: "https://ec2.#{region}.amazonaws.com", headers: {}, properties: {})
38
+ end
39
+ return Aws::Endpoints::Endpoint.new(url: "https://ec2-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
+ end
41
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
21
42
  end
22
43
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
23
- raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
24
- end
25
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
26
- end
27
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
28
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
29
- return Aws::Endpoints::Endpoint.new(url: "https://ec2-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
30
- end
31
- raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
32
- end
33
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
34
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
35
- if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
36
- return Aws::Endpoints::Endpoint.new(url: "https://ec2.#{region}.amazonaws.com", headers: {}, properties: {})
44
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
45
+ return Aws::Endpoints::Endpoint.new(url: "https://ec2.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
37
46
  end
38
- return Aws::Endpoints::Endpoint.new(url: "https://ec2-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
47
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
39
48
  end
40
- raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
41
- end
42
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
43
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
44
- return Aws::Endpoints::Endpoint.new(url: "https://ec2.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
49
+ if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-east-1")
50
+ return Aws::Endpoints::Endpoint.new(url: "https://ec2.us-gov-east-1.amazonaws.com", headers: {}, properties: {})
45
51
  end
46
- raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
47
- end
48
- if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-east-1")
49
- return Aws::Endpoints::Endpoint.new(url: "https://ec2.us-gov-east-1.amazonaws.com", headers: {}, properties: {})
50
- end
51
- if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-west-1")
52
- return Aws::Endpoints::Endpoint.new(url: "https://ec2.us-gov-west-1.amazonaws.com", headers: {}, properties: {})
52
+ if Aws::Endpoints::Matchers.string_equals?(region, "us-gov-west-1")
53
+ return Aws::Endpoints::Endpoint.new(url: "https://ec2.us-gov-west-1.amazonaws.com", headers: {}, properties: {})
54
+ end
55
+ return Aws::Endpoints::Endpoint.new(url: "https://ec2.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
53
56
  end
54
- return Aws::Endpoints::Endpoint.new(url: "https://ec2.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
55
57
  end
58
+ raise ArgumentError, "Invalid Configuration: Missing Region"
56
59
  raise ArgumentError, 'No endpoint could be resolved'
57
60
 
58
61
  end