aws-cdk.region-info


Nameaws-cdk.region-info JSON
Version 2.214.0 PyPI version JSON
download
home_pagehttps://github.com/aws/aws-cdk
SummaryAWS region information, such as service principal names
upload_time2025-09-02 12:33:30
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/77/73/dbe13b7c7af20ae612bfd5ac73e0cf1f04d76bf96d85d784cb6535e3c627/aws_cdk_region_info-2.214.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.214.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": "c9182130e7a562da756e4889157a54ebc47a809e00821561dcf0fa5277254a21",
                "md5": "2ccf657f1a117dfaf36e8ba22cfffce6",
                "sha256": "cf692f8357a71aa0c4c95f9efcd99049f30eef8242661867b0fc9e43d35d8d3e"
            },
            "downloads": -1,
            "filename": "aws_cdk_region_info-2.214.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2ccf657f1a117dfaf36e8ba22cfffce6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 296313,
            "upload_time": "2025-09-02T12:32:59",
            "upload_time_iso_8601": "2025-09-02T12:32:59.627525Z",
            "url": "https://files.pythonhosted.org/packages/c9/18/2130e7a562da756e4889157a54ebc47a809e00821561dcf0fa5277254a21/aws_cdk_region_info-2.214.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7773dbe13b7c7af20ae612bfd5ac73e0cf1f04d76bf96d85d784cb6535e3c627",
                "md5": "d5b8616f0f26e67c98f2bc80dbf5ab28",
                "sha256": "8d70718a21facde556be21effa81d0448725fd2e4fe88b2bb5b6f0bf2b36f232"
            },
            "downloads": -1,
            "filename": "aws_cdk_region_info-2.214.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d5b8616f0f26e67c98f2bc80dbf5ab28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.9",
            "size": 297798,
            "upload_time": "2025-09-02T12:33:30",
            "upload_time_iso_8601": "2025-09-02T12:33:30.299810Z",
            "url": "https://files.pythonhosted.org/packages/77/73/dbe13b7c7af20ae612bfd5ac73e0cf1f04d76bf96d85d784cb6535e3c627/aws_cdk_region_info-2.214.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-02 12:33:30",
    "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: 1.16385s