cdk-cr-constructs


Namecdk-cr-constructs JSON
Version 2.1.452 PyPI version JSON
download
home_pagehttps://github.com/neilkuan/cdk-cr-constructs.git
Summaryaws cdk library for custom resource constructs.
upload_time2024-05-11 00:20:00
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/d9/ea/5cf5474ff91de97d277ff34e5c5e1f27dce8bb4c77aa91a522624f32a61a/cdk-cr-constructs-2.1.452.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.452",
    "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": "dc5f2d22183399ff04b1ed15fcb82945f3bdc6601e834e539de98ced6aa479fb",
                "md5": "799feb27b6d71a0de81ccbe1182d854a",
                "sha256": "652a97a074a6d2f9afd0327e7cb02ccfdcf8aad235ba681b9e240897f6bbf144"
            },
            "downloads": -1,
            "filename": "cdk_cr_constructs-2.1.452-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "799feb27b6d71a0de81ccbe1182d854a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 15161905,
            "upload_time": "2024-05-11T00:19:56",
            "upload_time_iso_8601": "2024-05-11T00:19:56.796367Z",
            "url": "https://files.pythonhosted.org/packages/dc/5f/2d22183399ff04b1ed15fcb82945f3bdc6601e834e539de98ced6aa479fb/cdk_cr_constructs-2.1.452-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9ea5cf5474ff91de97d277ff34e5c5e1f27dce8bb4c77aa91a522624f32a61a",
                "md5": "13b297a252c708a8ef5e44674675b75c",
                "sha256": "896adcbb5daf835455ec17a1d8c8e73c857458ebabcf5fcebc0c80d3a72669e2"
            },
            "downloads": -1,
            "filename": "cdk-cr-constructs-2.1.452.tar.gz",
            "has_sig": false,
            "md5_digest": "13b297a252c708a8ef5e44674675b75c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 15163018,
            "upload_time": "2024-05-11T00:20:00",
            "upload_time_iso_8601": "2024-05-11T00:20:00.697115Z",
            "url": "https://files.pythonhosted.org/packages/d9/ea/5cf5474ff91de97d277ff34e5c5e1f27dce8bb4c77aa91a522624f32a61a/cdk-cr-constructs-2.1.452.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-11 00:20:00",
    "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.26580s