cdk-cr-constructs


Namecdk-cr-constructs JSON
Version 2.1.674 PyPI version JSON
download
home_pagehttps://github.com/neilkuan/cdk-cr-constructs.git
Summaryaws cdk library for custom resource constructs.
upload_time2025-01-02 00:24:33
maintainerNone
docs_urlNone
authorNeil Kuan<guan840912@gmail.com>
requires_python~=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## `cdk-cr-constructs`

This Construct is collect custom resource

### Example for CustomResourceGetEIP

```python
import { App, Stack, CfnOutput, Duration, aws_iam } from 'aws-cdk-lib';
import { CustomResourceGetEIP } from 'cdk-cr-constructs';
const env = {
  region: process.env.CDK_DEFAULT_REGION,
  account: process.env.CDK_DEFAULT_ACCOUNT,
};
const app = new App();
const stack = new Stack(app, 'testing-stack', { env });
const getIps = new CustomResourceGetEIP(stack, 'CustomResourceGetEIP', {
  /**
   * Discovery us-east-1 Elastic Ips.
   */
  regions: ['us-east-1'],
  /**
   * Add Company Ips.
   */
  companyIps: ['1.2.3.4'],
});
const role = new aws_iam.Role(stack, 'DemoRole', {
  assumedBy: new aws_iam.AccountRootPrincipal(),
});
/**
 * Example create an assume role, allow all action from ip address.
*/
role.addToPolicy(new aws_iam.PolicyStatement({
  effect: aws_iam.Effect.ALLOW,
  resources: ['*'],
  actions: ['*'],
  conditions: {
    IpAddress: {
      'aws:SourceIp': getIps.ipList(),
    },
  },
}));
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/neilkuan/cdk-cr-constructs.git",
    "name": "cdk-cr-constructs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Neil Kuan<guan840912@gmail.com>",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/99/97/10075721c6aed604da77e2864a720357038c6a5436416f6efb08a78806e4/cdk_cr_constructs-2.1.674.tar.gz",
    "platform": null,
    "description": "## `cdk-cr-constructs`\n\nThis Construct is collect custom resource\n\n### Example for CustomResourceGetEIP\n\n```python\nimport { App, Stack, CfnOutput, Duration, aws_iam } from 'aws-cdk-lib';\nimport { CustomResourceGetEIP } from 'cdk-cr-constructs';\nconst env = {\n  region: process.env.CDK_DEFAULT_REGION,\n  account: process.env.CDK_DEFAULT_ACCOUNT,\n};\nconst app = new App();\nconst stack = new Stack(app, 'testing-stack', { env });\nconst getIps = new CustomResourceGetEIP(stack, 'CustomResourceGetEIP', {\n  /**\n   * Discovery us-east-1 Elastic Ips.\n   */\n  regions: ['us-east-1'],\n  /**\n   * Add Company Ips.\n   */\n  companyIps: ['1.2.3.4'],\n});\nconst role = new aws_iam.Role(stack, 'DemoRole', {\n  assumedBy: new aws_iam.AccountRootPrincipal(),\n});\n/**\n * Example create an assume role, allow all action from ip address.\n*/\nrole.addToPolicy(new aws_iam.PolicyStatement({\n  effect: aws_iam.Effect.ALLOW,\n  resources: ['*'],\n  actions: ['*'],\n  conditions: {\n    IpAddress: {\n      'aws:SourceIp': getIps.ipList(),\n    },\n  },\n}));\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "aws cdk library for custom resource constructs.",
    "version": "2.1.674",
    "project_urls": {
        "Homepage": "https://github.com/neilkuan/cdk-cr-constructs.git",
        "Source": "https://github.com/neilkuan/cdk-cr-constructs.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e82129e2c43a6f2de2847d4b22284206e6104c2ab780cf05bf1ba9f8d8072996",
                "md5": "16a15e2683c1c5e526e680bbca33bb31",
                "sha256": "82947fcead7fd52971a143cb5deb5c1403d9c9fc0a86c807ace2a1e9669e1818"
            },
            "downloads": -1,
            "filename": "cdk_cr_constructs-2.1.674-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16a15e2683c1c5e526e680bbca33bb31",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 15662799,
            "upload_time": "2025-01-02T00:24:27",
            "upload_time_iso_8601": "2025-01-02T00:24:27.146655Z",
            "url": "https://files.pythonhosted.org/packages/e8/21/29e2c43a6f2de2847d4b22284206e6104c2ab780cf05bf1ba9f8d8072996/cdk_cr_constructs-2.1.674-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "999710075721c6aed604da77e2864a720357038c6a5436416f6efb08a78806e4",
                "md5": "50991d37bcde6ef833842bb0c2c2a346",
                "sha256": "c7bbf47cfdd4edd9d910e2c471ec480b60f4706d87ed25ba80ed133cad5ae929"
            },
            "downloads": -1,
            "filename": "cdk_cr_constructs-2.1.674.tar.gz",
            "has_sig": false,
            "md5_digest": "50991d37bcde6ef833842bb0c2c2a346",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 15663865,
            "upload_time": "2025-01-02T00:24:33",
            "upload_time_iso_8601": "2025-01-02T00:24:33.447601Z",
            "url": "https://files.pythonhosted.org/packages/99/97/10075721c6aed604da77e2864a720357038c6a5436416f6efb08a78806e4/cdk_cr_constructs-2.1.674.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-02 00:24:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neilkuan",
    "github_project": "cdk-cr-constructs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cdk-cr-constructs"
}
        
Elapsed time: 0.36422s