CfnResourceProps

class aws_cdk.core.CfnResourceProps(*, type, properties=None)

Bases: object

Parameters:
  • type (str) – CloudFormation resource type (e.g. AWS::S3::Bucket).

  • properties (Optional[Mapping[str, Any]]) – Resource properties. Default: - No resource properties.

ExampleMetadata:

infused

Example:

import aws_cdk.core as cdk


class MyConstruct(cdk.Resourcecdk.ITaggable):

    def __init__(self, scope, id):
        super().__init__(scope, id)

        cdk.CfnResource(self, "Resource",
            type="Whatever::The::Type",
            properties={
                # ...
                "Tags": self.tags.rendered_tags
            }
        )

Attributes

properties

Resource properties.

Default:
  • No resource properties.

type

CloudFormation resource type (e.g. AWS::S3::Bucket).