lib/aws-sdk-controltower/endpoints.rb in aws-sdk-controltower-1.29.0 vs lib/aws-sdk-controltower/endpoints.rb in aws-sdk-controltower-1.30.0
- old
+ new
@@ -12,381 +12,300 @@
# @api private
module Endpoints
class CreateLandingZone
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class DeleteLandingZone
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class DisableBaseline
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class DisableControl
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class EnableBaseline
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class EnableControl
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class GetBaseline
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class GetBaselineOperation
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class GetControlOperation
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class GetEnabledBaseline
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class GetEnabledControl
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class GetLandingZone
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class GetLandingZoneOperation
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ListBaselines
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ListControlOperations
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ListEnabledBaselines
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ListEnabledControls
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ListLandingZoneOperations
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ListLandingZones
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ListTagsForResource
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ResetEnabledBaseline
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class ResetLandingZone
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class TagResource
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class UntagResource
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class UpdateEnabledBaseline
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class UpdateEnabledControl
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
class UpdateLandingZone
def self.build(context)
- unless context.config.regional_endpoint
- endpoint = context.config.endpoint.to_s
- end
Aws::ControlTower::EndpointParameters.new(
region: context.config.region,
use_dual_stack: context.config.use_dualstack_endpoint,
use_fips: context.config.use_fips_endpoint,
- endpoint: endpoint,
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
)
end
end
end