Class: AWSCDK::RegionInfo::RegionInfo

Inherits:
Jsii::Object
  • Object
show all
Defined in:
region_info/region_info.rb

Overview

Information pertaining to an AWS region.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ RegionInfo

Returns a new instance of RegionInfo.

Raises:

  • (NoMethodError)


8
9
10
# File 'region_info/region_info.rb', line 8

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.region_info.RegionInfo does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.get(name) ⇒ AWSCDK::RegionInfo::RegionInfo

Obtain region info for a given region name.

Parameters:

  • name (String)

    the name of the region (e.g: us-east-1).

Returns:

  • (AWSCDK::RegionInfo::RegionInfo)


40
41
42
43
# File 'region_info/region_info.rb', line 40

def self.get(name)
  Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.region_info.RegionInfo", "get", [name])
end

.jsii_overridable_methodsObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'region_info/region_info.rb', line 12

def self.jsii_overridable_methods
  {
    :cdk_metadata_resource_available => { kind: :property, name: "cdkMetadataResourceAvailable", is_optional: false },
    :is_opt_in_region => { kind: :property, name: "isOptInRegion", is_optional: false },
    :name => { kind: :property, name: "name", is_optional: false },
    :app_mesh_repository_account => { kind: :property, name: "appMeshRepositoryAccount", is_optional: true },
    :dlc_repository_account => { kind: :property, name: "dlcRepositoryAccount", is_optional: true },
    :domain_suffix => { kind: :property, name: "domainSuffix", is_optional: true },
    :ebs_env_endpoint_hosted_zone_id => { kind: :property, name: "ebsEnvEndpointHostedZoneId", is_optional: true },
    :elbv2_account => { kind: :property, name: "elbv2Account", is_optional: true },
    :firehose_cidr_block => { kind: :property, name: "firehoseCidrBlock", is_optional: true },
    :partition => { kind: :property, name: "partition", is_optional: true },
    :s3_static_website_endpoint => { kind: :property, name: "s3StaticWebsiteEndpoint", is_optional: true },
    :s3_static_website_hosted_zone_id => { kind: :property, name: "s3StaticWebsiteHostedZoneId", is_optional: true },
    :saml_sign_on_url => { kind: :property, name: "samlSignOnUrl", is_optional: true },
    :vpc_endpoint_service_name_prefix => { kind: :property, name: "vpcEndpointServiceNamePrefix", is_optional: true },
    :adot_lambda_layer_arn => { kind: :method, name: "adotLambdaLayerArn", is_optional: false },
    :app_config_lambda_arn => { kind: :method, name: "appConfigLambdaArn", is_optional: false },
    :cloudwatch_lambda_insights_arn => { kind: :method, name: "cloudwatchLambdaInsightsArn", is_optional: false },
    :params_and_secrets_lambda_layer_arn => { kind: :method, name: "paramsAndSecretsLambdaLayerArn", is_optional: false },
    :service_principal => { kind: :method, name: "servicePrincipal", is_optional: false },
  }
end

.limited_region_map(fact_name, partitions) ⇒ Hash{String => String}

Retrieves a collection of all fact values for all regions, limited to some partitions.

Parameters:

  • fact_name (String)

    the name of the fact to retrieve values for.

  • partitions (Array<String>)

    list of partitions to retrieve facts for.

Returns:

  • (Hash{String => String})

    a mapping with AWS region codes as the keys, and the fact in the given region as the value for that key



50
51
52
53
54
# File 'region_info/region_info.rb', line 50

def self.limited_region_map(fact_name, partitions)
  Jsii::Type.check_type(fact_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "factName")
  Jsii::Type.check_type(partitions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "partitions")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.region_info.RegionInfo", "limitedRegionMap", [fact_name, partitions])
end

.region_map(fact_name) ⇒ Hash{String => String}

Retrieves a collection of all fact values for all regions that fact is defined in.

Parameters:

  • fact_name (String)

    the name of the fact to retrieve values for.

Returns:

  • (Hash{String => String})

    a mapping with AWS region codes as the keys, and the fact in the given region as the value for that key



60
61
62
63
# File 'region_info/region_info.rb', line 60

def self.region_map(fact_name)
  Jsii::Type.check_type(fact_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "factName")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.region_info.RegionInfo", "regionMap", [fact_name])
end

.regionsArray<AWSCDK::RegionInfo::RegionInfo>

Returns:

  • (Array<AWSCDK::RegionInfo::RegionInfo>)


66
67
68
# File 'region_info/region_info.rb', line 66

def self.regions()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.region_info.RegionInfo", "regions")
end

Instance Method Details

#adot_lambda_layer_arn(type, version, architecture) ⇒ String?

The ARN of the ADOT Lambda layer, for the given layer type, version and architecture.

Parameters:

  • type (String)

    the type of the ADOT lambda layer.

  • version (String)

    the layer version.

  • architecture (String)

    the Lambda Function architecture (e.g. 'x86_64' or 'arm64').

Returns:

  • (String, nil)


172
173
174
175
176
177
# File 'region_info/region_info.rb', line 172

def adot_lambda_layer_arn(type, version, architecture)
  Jsii::Type.check_type(type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  Jsii::Type.check_type(version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version")
  Jsii::Type.check_type(architecture, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "architecture")
  jsii_call_method("adotLambdaLayerArn", [type, version, architecture])
end

#app_config_lambda_arn(layer_version, architecture = nil) ⇒ String?

The ARN of the AppConfig Lambda Layer, for the given version.

Parameters:

  • layer_version (String)

    The layer version (e.g. 2.0.181).

  • architecture (String, nil) (defaults to: nil)

    The Lambda Function architecture (e.g. 'x86_64' or 'arm64'), defaults to x86_64.

Returns:

  • (String, nil)


184
185
186
187
188
# File 'region_info/region_info.rb', line 184

def app_config_lambda_arn(layer_version, architecture = nil)
  Jsii::Type.check_type(layer_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "layerVersion")
  Jsii::Type.check_type(architecture, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "architecture") unless architecture.nil?
  jsii_call_method("appConfigLambdaArn", [layer_version, architecture])
end

#app_mesh_repository_accountString?

The ID of the AWS account that owns the public ECR repository that contains the AWS App Mesh Envoy Proxy images in a given region.

Returns:

  • (String, nil)


92
93
94
# File 'region_info/region_info.rb', line 92

def ()
  jsii_get_property("appMeshRepositoryAccount")
end

#cdk_metadata_resource_availableBoolean

Whether the AWS::CDK::Metadata CloudFormation Resource is available in this region or not.

Returns:

  • (Boolean)


73
74
75
# File 'region_info/region_info.rb', line 73

def ()
  jsii_get_property("cdkMetadataResourceAvailable")
end

#cloudwatch_lambda_insights_arn(insights_version, architecture = nil) ⇒ String?

The ARN of the CloudWatch Lambda Insights extension, for the given version.

Parameters:

  • insights_version (String)

    the version (e.g. 1.0.98.0).

  • architecture (String, nil) (defaults to: nil)

    the Lambda Function architecture (e.g. 'x86_64' or 'arm64').

Returns:

  • (String, nil)


195
196
197
198
199
# File 'region_info/region_info.rb', line 195

def cloudwatch_lambda_insights_arn(insights_version, architecture = nil)
  Jsii::Type.check_type(insights_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "insightsVersion")
  Jsii::Type.check_type(architecture, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "architecture") unless architecture.nil?
  jsii_call_method("cloudwatchLambdaInsightsArn", [insights_version, architecture])
end

#dlc_repository_accountString?

The ID of the AWS account that owns the public ECR repository containing the AWS Deep Learning Containers images in this region.

Returns:

  • (String, nil)


99
100
101
# File 'region_info/region_info.rb', line 99

def ()
  jsii_get_property("dlcRepositoryAccount")
end

#domain_suffixString?

The domain name suffix (e.g: amazonaws.com) for this region.

Returns:

  • (String, nil)


106
107
108
# File 'region_info/region_info.rb', line 106

def domain_suffix()
  jsii_get_property("domainSuffix")
end

#ebs_env_endpoint_hosted_zone_idString?

The hosted zone ID used by Route 53 to alias a EBS environment endpoint in this region (e.g: Z2O1EMRO9K5GLX).

Returns:

  • (String, nil)


113
114
115
# File 'region_info/region_info.rb', line 113

def ebs_env_endpoint_hosted_zone_id()
  jsii_get_property("ebsEnvEndpointHostedZoneId")
end

#elbv2_accountString?

The account ID for ELBv2 in this region.

Returns:

  • (String, nil)


120
121
122
# File 'region_info/region_info.rb', line 120

def ()
  jsii_get_property("elbv2Account")
end

#firehose_cidr_blockString?

The CIDR block used by Amazon Data Firehose servers.

Returns:

  • (String, nil)


127
128
129
# File 'region_info/region_info.rb', line 127

def firehose_cidr_block()
  jsii_get_property("firehoseCidrBlock")
end

#is_opt_in_regionBoolean

Whether the given region is an opt-in region.

Returns:

  • (Boolean)


80
81
82
# File 'region_info/region_info.rb', line 80

def is_opt_in_region()
  jsii_get_property("isOptInRegion")
end

#nameString

Returns:

  • (String)


85
86
87
# File 'region_info/region_info.rb', line 85

def name()
  jsii_get_property("name")
end

#params_and_secrets_lambda_layer_arn(version, architecture) ⇒ String?

The ARN of the Parameters and Secrets Lambda layer for the given lambda architecture.

Parameters:

  • version (String)

    the layer version.

  • architecture (String)

    the Lambda Function architecture (e.g. 'x86_64' or 'arm64').

Returns:

  • (String, nil)


206
207
208
209
210
# File 'region_info/region_info.rb', line 206

def params_and_secrets_lambda_layer_arn(version, architecture)
  Jsii::Type.check_type(version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version")
  Jsii::Type.check_type(architecture, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "architecture")
  jsii_call_method("paramsAndSecretsLambdaLayerArn", [version, architecture])
end

#partitionString?

The name of the ARN partition for this region (e.g: aws).

Returns:

  • (String, nil)


134
135
136
# File 'region_info/region_info.rb', line 134

def partition()
  jsii_get_property("partition")
end

#s3_static_website_endpointString?

The endpoint used by S3 static website hosting in this region (e.g: s3-static-website-us-east-1.amazonaws.com).

Returns:

  • (String, nil)


141
142
143
# File 'region_info/region_info.rb', line 141

def s3_static_website_endpoint()
  jsii_get_property("s3StaticWebsiteEndpoint")
end

#s3_static_website_hosted_zone_idString?

The hosted zone ID used by Route 53 to alias a S3 static website in this region (e.g: Z2O1EMRO9K5GLX).

Returns:

  • (String, nil)


148
149
150
# File 'region_info/region_info.rb', line 148

def s3_static_website_hosted_zone_id()
  jsii_get_property("s3StaticWebsiteHostedZoneId")
end

#saml_sign_on_urlString?

SAML Sign On URL used by IAM SAML Principals.

Returns:

  • (String, nil)


155
156
157
# File 'region_info/region_info.rb', line 155

def saml_sign_on_url()
  jsii_get_property("samlSignOnUrl")
end

#service_principal(service) ⇒ String?

Deprecated.
  • Use iam.ServicePrincipal.servicePrincipalName() instead.

The name of the service principal for a given service in this region.

Parameters:

  • service (String)

    the service name (e.g: s3.amazonaws.com).

Returns:

  • (String, nil)


217
218
219
220
# File 'region_info/region_info.rb', line 217

def service_principal(service)
  Jsii::Type.check_type(service, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "service")
  jsii_call_method("servicePrincipal", [service])
end

#vpc_endpoint_service_name_prefixString?

The prefix for VPC Endpoint Service names, cn.com.amazonaws.vpce for China regions, com.amazonaws.vpce otherwise.

Returns:

  • (String, nil)


162
163
164
# File 'region_info/region_info.rb', line 162

def vpc_endpoint_service_name_prefix()
  jsii_get_property("vpcEndpointServiceNamePrefix")
end