CfnResourceProps

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

Bases: object

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

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

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.

Return type

Optional[Mapping[str, Any]]

type

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

Return type

str