aws-cdk.region-info


Nameaws-cdk.region-info JSON
Version 2.205.0 PyPI version JSON
download
home_pagehttps://github.com/aws/aws-cdk
SummaryAWS region information, such as service principal names
upload_time2025-07-15 13:30:28
maintainerNone
docs_urlNone
authorAmazon Web Services
requires_python~=3.9
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AWS Region-Specific Information Directory

## Usage

Some information used in CDK Applications differs from one AWS region to
another, such as service principals used in IAM policies, S3 static website
endpoints, ...

### The `RegionInfo` class

The library offers a simple interface to obtain region specific information in
the form of the `RegionInfo` class. This is the preferred way to interact with
the regional information database:

```python
# Get the information for "eu-west-1":
region = region_info.RegionInfo.get("eu-west-1")

# Access attributes:
region.s3_static_website_endpoint
```

The `RegionInfo` layer is built on top of the Low-Level API, which is described
below and can be used to register additional data, including user-defined facts
that are not available through the `RegionInfo` interface.

### Low-Level API

This library offers a primitive database of such information so that CDK
constructs can easily access regional information. The `FactName` class provides
a list of known fact names, which can then be used with the `RegionInfo` to
retrieve a particular value:

```python
static_website = region_info.Fact.find("ap-northeast-1", region_info.FactName.S3_STATIC_WEBSITE_ENDPOINT)
```

## Supplying new or missing information

As new regions are released, it might happen that a particular fact you need is
missing from the library. In such cases, the `Fact.register` method can be used
to inject FactName into the database:

```python
@jsii.implements(region_info.IFact)
class MyFact:

region_info.Fact.register(MyFact())
```

## Overriding incorrect information

In the event information provided by the library is incorrect, it can be
overridden using the same `Fact.register` method demonstrated above, simply
adding an extra boolean argument:

```python
@jsii.implements(region_info.IFact)
class MyFact:

region_info.Fact.register(MyFact(), True)
```

If you happen to have stumbled upon incorrect data built into this library, it
is always a good idea to report your findings in a [GitHub issue](https://github.com/aws/aws-cdk/issues), so we can fix
it for everyone else!

---


This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aws/aws-cdk",
    "name": "aws-cdk.region-info",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Amazon Web Services",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c3/64/3ebb0d5af38b740c8b0f873104b44ad8548ee1af24fd77514853b795af8d/aws_cdk_region_info-2.205.0.tar.gz",
    "platform": null,
    "description": "# AWS Region-Specific Information Directory\n\n## Usage\n\nSome information used in CDK Applications differs from one AWS region to\nanother, such as service principals used in IAM policies, S3 static website\nendpoints, ...\n\n### The `RegionInfo` class\n\nThe library offers a simple interface to obtain region specific information in\nthe form of the `RegionInfo` class. This is the preferred way to interact with\nthe regional information database:\n\n```python\n# Get the information for \"eu-west-1\":\nregion = region_info.RegionInfo.get(\"eu-west-1\")\n\n# Access attributes:\nregion.s3_static_website_endpoint\n```\n\nThe `RegionInfo` layer is built on top of the Low-Level API, which is described\nbelow and can be used to register additional data, including user-defined facts\nthat are not available through the `RegionInfo` interface.\n\n### Low-Level API\n\nThis library offers a primitive database of such information so that CDK\nconstructs can easily access regional information. The `FactName` class provides\na list of known fact names, which can then be used with the `RegionInfo` to\nretrieve a particular value:\n\n```python\nstatic_website = region_info.Fact.find(\"ap-northeast-1\", region_info.FactName.S3_STATIC_WEBSITE_ENDPOINT)\n```\n\n## Supplying new or missing information\n\nAs new regions are released, it might happen that a particular fact you need is\nmissing from the library. In such cases, the `Fact.register` method can be used\nto inject FactName into the database:\n\n```python\n@jsii.implements(region_info.IFact)\nclass MyFact:\n\nregion_info.Fact.register(MyFact())\n```\n\n## Overriding incorrect information\n\nIn the event information provided by the library is incorrect, it can be\noverridden using the same `Fact.register` method demonstrated above, simply\nadding an extra boolean argument:\n\n```python\n@jsii.implements(region_info.IFact)\nclass MyFact:\n\nregion_info.Fact.register(MyFact(), True)\n```\n\nIf you happen to have stumbled upon incorrect data built into this library, it\nis always a good idea to report your findings in a [GitHub issue](https://github.com/aws/aws-cdk/issues), so we can fix\nit for everyone else!\n\n---\n\n\nThis module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "AWS region information, such as service principal names",
    "version": "2.205.0",
    "project_urls": {
        "Homepage": "https://github.com/aws/aws-cdk",
        "Source": "https://github.com/aws/aws-cdk.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1de3e40db50a0acc0036376800b40b5c3dd187250c44d4460db7b1213544eddf",
                "md5": "8e1002b94678a5f2b87f89e33d33efb3",
                "sha256": "9de01ef09ce890e033679f8fa7a1ecf56505a2fde6cde42d0ee3669159d532f6"
            },
            "downloads": -1,
            "filename": "aws_cdk_region_info-2.205.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8e1002b94678a5f2b87f89e33d33efb3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 292279,
            "upload_time": "2025-07-15T13:29:59",
            "upload_time_iso_8601": "2025-07-15T13:29:59.542016Z",
            "url": "https://files.pythonhosted.org/packages/1d/e3/e40db50a0acc0036376800b40b5c3dd187250c44d4460db7b1213544eddf/aws_cdk_region_info-2.205.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c3643ebb0d5af38b740c8b0f873104b44ad8548ee1af24fd77514853b795af8d",
                "md5": "7c40cd81b56bac84b33314dae894cbb9",
                "sha256": "e0a19c6e7e19730aae1d56ade00f123cd47cadc0cb35392493bae641daccf33f"
            },
            "downloads": -1,
            "filename": "aws_cdk_region_info-2.205.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7c40cd81b56bac84b33314dae894cbb9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.9",
            "size": 293597,
            "upload_time": "2025-07-15T13:30:28",
            "upload_time_iso_8601": "2025-07-15T13:30:28.628153Z",
            "url": "https://files.pythonhosted.org/packages/c3/64/3ebb0d5af38b740c8b0f873104b44ad8548ee1af24fd77514853b795af8d/aws_cdk_region_info-2.205.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-15 13:30:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aws",
    "github_project": "aws-cdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aws-cdk.region-info"
}
        
Elapsed time: 0.50109s