# CfnResourceProps

Used as props by: [CfnResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnResource.html)

- Source: [`core/lib/cfn-resource.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/core/lib/cfn-resource.ts#L30)

## Example

TypeScript:

```ts
class MyConstruct extends Resource implements ITaggable {
  public readonly tags = new TagManager(TagType.KEY_VALUE, 'Whatever::The::Type');

  constructor(scope: Construct, id: string) {
    super(scope, id);

    new CfnResource(this, 'Resource', {
      type: 'Whatever::The::Type',
      properties: {
        // ...
        Tags: this.tags.renderedTags,
      },
    });
  }
}
```

Python:

```python
@jsii.implements(ITaggable)
class MyConstruct(Resource):

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

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

Java:

```java
public class MyConstruct extends Resource implements ITaggable {
    public final Object tags;

    public MyConstruct(Construct scope, String id) {
        super(scope, id);

        CfnResource.Builder.create(this, "Resource")
                .type("Whatever::The::Type")
                .properties(Map.of(
                        // ...
                        "Tags", this.tags.getRenderedTags()))
                .build();
    }
}
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
class MyConstruct : Resource, ITaggable
{
    public readonly void Tags = new TagManager(TagType.KEY_VALUE, "Whatever::The::Type");

    public MyConstruct(Construct scope, string id) : base(scope, id)
    {

        new CfnResource(this, "Resource", new CfnResourceProps {
            Type = "Whatever::The::Type",
            Properties = new Dictionary<string, object> {
                // ...
                { "Tags", Tags.RenderedTags }
            }
        });
    }
}
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
type myConstruct struct {
	Resource
	tags
}

func newMyConstruct(scope Construct, id *string) *myConstruct {
	this := &myConstruct{}
	newResource_Override(this, scope, id)

	awscdk.NewCfnResource(this, jsii.String("Resource"), &CfnResourceProps{
		Type: jsii.String("Whatever::The::Type"),
		Properties: map[string]interface{}{
			// ...
			"Tags": this.tags.renderedTags,
		},
	})
	return this
}
```

## Properties

- `properties`: { [key: string]: any } — Resource properties.

  **Default:** No resource properties.

- `type`: string (required) — CloudFormation resource type (e.g. `AWS::S3::Bucket`).
