# CfnTransformer

Creates a transformer. AWS B2B Data Interchange currently supports two scenarios:.

- *Inbound EDI* : the AWS customer receives an EDI file from their trading partner. AWS B2B Data Interchange converts this EDI file into a JSON or XML file with a service-defined structure. A mapping template provided by the customer, in JSONata or XSLT format, is optionally applied to this file to produce a JSON or XML file with the structure the customer requires.
- *Outbound EDI* : the AWS customer has a JSON or XML file containing data that they wish to use in an EDI file. A mapping template, provided by the customer (in either JSONata or XSLT format) is applied to this file to generate a JSON or XML file in the service-defined structure. This file is then converted to an EDI file.

> The following fields are provided for backwards compatibility only: `fileFormat` , `mappingTemplate` , `ediType` , and `sampleDocument` .
>
> - Use the `mapping` data type in place of `mappingTemplate` and `fileFormat`
> - Use the `sampleDocuments` data type in place of `sampleDocument`
> - Use either the `inputConversion` or `outputConversion` in place of `ediType`

Extends: [Construct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Construct.html) › [CfnElement](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnElement.html) › [CfnRefElement](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnRefElement.html) › [CfnResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnResource.html) › CfnTransformer
Implements: [IInspectable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IInspectable.html), [ITaggableV2](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.ITaggableV2.html), [IEnvironmentAware](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.IEnvironmentAware.html), [ITransformerRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_b2bi.ITransformerRef.html), IConstruct, IDependable

- CloudFormation: [`AWS::B2BI::Transformer`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-b2bi-transformer.html)
- Source: Generated at build time
- Type last changed: v2.252.0 · 30 Apr 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_b2bi as b2bi } from 'aws-cdk-lib';
const cfnTransformer = new b2bi.CfnTransformer(this, 'MyCfnTransformer', {
  name: 'name',
  status: 'status',

  // the properties below are optional
  ediType: {
    x12Details: {
      transactionSet: 'transactionSet',
      version: 'version',
    },
  },
  fileFormat: 'fileFormat',
  inputConversion: {
    fromFormat: 'fromFormat',

    // the properties below are optional
    advancedOptions: {
      x12: {
        splitOptions: {
          splitBy: 'splitBy',
        },
        validationOptions: {
          validationRules: [{
            codeListValidationRule: {
              elementId: 'elementId',

              // the properties below are optional
              codesToAdd: ['codesToAdd'],
              codesToRemove: ['codesToRemove'],
            },
            elementLengthValidationRule: {
              elementId: 'elementId',
              maxLength: 123,
              minLength: 123,
            },
            elementRequirementValidationRule: {
              elementPosition: 'elementPosition',
              requirement: 'requirement',
            },
          }],
        },
      },
    },
    formatOptions: {
      x12: {
        transactionSet: 'transactionSet',
        version: 'version',
      },
    },
  },
  mapping: {
    templateLanguage: 'templateLanguage',

    // the properties below are optional
    template: 'template',
  },
  mappingTemplate: 'mappingTemplate',
  outputConversion: {
    toFormat: 'toFormat',

    // the properties below are optional
    advancedOptions: {
      x12: {
        splitOptions: {
          splitBy: 'splitBy',
        },
        validationOptions: {
          validationRules: [{
            codeListValidationRule: {
              elementId: 'elementId',

              // the properties below are optional
              codesToAdd: ['codesToAdd'],
              codesToRemove: ['codesToRemove'],
            },
            elementLengthValidationRule: {
              elementId: 'elementId',
              maxLength: 123,
              minLength: 123,
            },
            elementRequirementValidationRule: {
              elementPosition: 'elementPosition',
              requirement: 'requirement',
            },
          }],
        },
      },
    },
    formatOptions: {
      x12: {
        transactionSet: 'transactionSet',
        version: 'version',
      },
    },
  },
  sampleDocument: 'sampleDocument',
  sampleDocuments: {
    bucketName: 'bucketName',
    keys: [{
      input: 'input',
      output: 'output',
    }],
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
});
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_b2bi as b2bi

cfn_transformer = b2bi.CfnTransformer(self, "MyCfnTransformer",
    name="name",
    status="status",

    # the properties below are optional
    edi_type=b2bi.CfnTransformer.EdiTypeProperty(
        x12_details=b2bi.CfnTransformer.X12DetailsProperty(
            transaction_set="transactionSet",
            version="version"
        )
    ),
    file_format="fileFormat",
    input_conversion=b2bi.CfnTransformer.InputConversionProperty(
        from_format="fromFormat",

        # the properties below are optional
        advanced_options=b2bi.CfnTransformer.AdvancedOptionsProperty(
            x12=b2bi.CfnTransformer.X12AdvancedOptionsProperty(
                split_options=b2bi.CfnTransformer.X12SplitOptionsProperty(
                    split_by="splitBy"
                ),
                validation_options=b2bi.CfnTransformer.X12ValidationOptionsProperty(
                    validation_rules=[b2bi.CfnTransformer.X12ValidationRuleProperty(
                        code_list_validation_rule=b2bi.CfnTransformer.X12CodeListValidationRuleProperty(
                            element_id="elementId",

                            # the properties below are optional
                            codes_to_add=["codesToAdd"],
                            codes_to_remove=["codesToRemove"]
                        ),
                        element_length_validation_rule=b2bi.CfnTransformer.X12ElementLengthValidationRuleProperty(
                            element_id="elementId",
                            max_length=123,
                            min_length=123
                        ),
                        element_requirement_validation_rule=b2bi.CfnTransformer.X12ElementRequirementValidationRuleProperty(
                            element_position="elementPosition",
                            requirement="requirement"
                        )
                    )]
                )
            )
        ),
        format_options=b2bi.CfnTransformer.FormatOptionsProperty(
            x12=b2bi.CfnTransformer.X12DetailsProperty(
                transaction_set="transactionSet",
                version="version"
            )
        )
    ),
    mapping=b2bi.CfnTransformer.MappingProperty(
        template_language="templateLanguage",

        # the properties below are optional
        template="template"
    ),
    mapping_template="mappingTemplate",
    output_conversion=b2bi.CfnTransformer.OutputConversionProperty(
        to_format="toFormat",

        # the properties below are optional
        advanced_options=b2bi.CfnTransformer.AdvancedOptionsProperty(
            x12=b2bi.CfnTransformer.X12AdvancedOptionsProperty(
                split_options=b2bi.CfnTransformer.X12SplitOptionsProperty(
                    split_by="splitBy"
                ),
                validation_options=b2bi.CfnTransformer.X12ValidationOptionsProperty(
                    validation_rules=[b2bi.CfnTransformer.X12ValidationRuleProperty(
                        code_list_validation_rule=b2bi.CfnTransformer.X12CodeListValidationRuleProperty(
                            element_id="elementId",

                            # the properties below are optional
                            codes_to_add=["codesToAdd"],
                            codes_to_remove=["codesToRemove"]
                        ),
                        element_length_validation_rule=b2bi.CfnTransformer.X12ElementLengthValidationRuleProperty(
                            element_id="elementId",
                            max_length=123,
                            min_length=123
                        ),
                        element_requirement_validation_rule=b2bi.CfnTransformer.X12ElementRequirementValidationRuleProperty(
                            element_position="elementPosition",
                            requirement="requirement"
                        )
                    )]
                )
            )
        ),
        format_options=b2bi.CfnTransformer.FormatOptionsProperty(
            x12=b2bi.CfnTransformer.X12DetailsProperty(
                transaction_set="transactionSet",
                version="version"
            )
        )
    ),
    sample_document="sampleDocument",
    sample_documents=b2bi.CfnTransformer.SampleDocumentsProperty(
        bucket_name="bucketName",
        keys=[b2bi.CfnTransformer.SampleDocumentKeysProperty(
            input="input",
            output="output"
        )]
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.b2bi.*;

CfnTransformer cfnTransformer = CfnTransformer.Builder.create(this, "MyCfnTransformer")
        .name("name")
        .status("status")

        // the properties below are optional
        .ediType(EdiTypeProperty.builder()
                .x12Details(X12DetailsProperty.builder()
                        .transactionSet("transactionSet")
                        .version("version")
                        .build())
                .build())
        .fileFormat("fileFormat")
        .inputConversion(InputConversionProperty.builder()
                .fromFormat("fromFormat")

                // the properties below are optional
                .advancedOptions(AdvancedOptionsProperty.builder()
                        .x12(X12AdvancedOptionsProperty.builder()
                                .splitOptions(X12SplitOptionsProperty.builder()
                                        .splitBy("splitBy")
                                        .build())
                                .validationOptions(X12ValidationOptionsProperty.builder()
                                        .validationRules(List.of(X12ValidationRuleProperty.builder()
                                                .codeListValidationRule(X12CodeListValidationRuleProperty.builder()
                                                        .elementId("elementId")

                                                        // the properties below are optional
                                                        .codesToAdd(List.of("codesToAdd"))
                                                        .codesToRemove(List.of("codesToRemove"))
                                                        .build())
                                                .elementLengthValidationRule(X12ElementLengthValidationRuleProperty.builder()
                                                        .elementId("elementId")
                                                        .maxLength(123)
                                                        .minLength(123)
                                                        .build())
                                                .elementRequirementValidationRule(X12ElementRequirementValidationRuleProperty.builder()
                                                        .elementPosition("elementPosition")
                                                        .requirement("requirement")
                                                        .build())
                                                .build()))
                                        .build())
                                .build())
                        .build())
                .formatOptions(FormatOptionsProperty.builder()
                        .x12(X12DetailsProperty.builder()
                                .transactionSet("transactionSet")
                                .version("version")
                                .build())
                        .build())
                .build())
        .mapping(MappingProperty.builder()
                .templateLanguage("templateLanguage")

                // the properties below are optional
                .template("template")
                .build())
        .mappingTemplate("mappingTemplate")
        .outputConversion(OutputConversionProperty.builder()
                .toFormat("toFormat")

                // the properties below are optional
                .advancedOptions(AdvancedOptionsProperty.builder()
                        .x12(X12AdvancedOptionsProperty.builder()
                                .splitOptions(X12SplitOptionsProperty.builder()
                                        .splitBy("splitBy")
                                        .build())
                                .validationOptions(X12ValidationOptionsProperty.builder()
                                        .validationRules(List.of(X12ValidationRuleProperty.builder()
                                                .codeListValidationRule(X12CodeListValidationRuleProperty.builder()
                                                        .elementId("elementId")

                                                        // the properties below are optional
                                                        .codesToAdd(List.of("codesToAdd"))
                                                        .codesToRemove(List.of("codesToRemove"))
                                                        .build())
                                                .elementLengthValidationRule(X12ElementLengthValidationRuleProperty.builder()
                                                        .elementId("elementId")
                                                        .maxLength(123)
                                                        .minLength(123)
                                                        .build())
                                                .elementRequirementValidationRule(X12ElementRequirementValidationRuleProperty.builder()
                                                        .elementPosition("elementPosition")
                                                        .requirement("requirement")
                                                        .build())
                                                .build()))
                                        .build())
                                .build())
                        .build())
                .formatOptions(FormatOptionsProperty.builder()
                        .x12(X12DetailsProperty.builder()
                                .transactionSet("transactionSet")
                                .version("version")
                                .build())
                        .build())
                .build())
        .sampleDocument("sampleDocument")
        .sampleDocuments(SampleDocumentsProperty.builder()
                .bucketName("bucketName")
                .keys(List.of(SampleDocumentKeysProperty.builder()
                        .input("input")
                        .output("output")
                        .build()))
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.B2BI;

var cfnTransformer = new CfnTransformer(this, "MyCfnTransformer", new CfnTransformerProps {
    Name = "name",
    Status = "status",

    // the properties below are optional
    EdiType = new EdiTypeProperty {
        X12Details = new X12DetailsProperty {
            TransactionSet = "transactionSet",
            Version = "version"
        }
    },
    FileFormat = "fileFormat",
    InputConversion = new InputConversionProperty {
        FromFormat = "fromFormat",

        // the properties below are optional
        AdvancedOptions = new AdvancedOptionsProperty {
            X12 = new X12AdvancedOptionsProperty {
                SplitOptions = new X12SplitOptionsProperty {
                    SplitBy = "splitBy"
                },
                ValidationOptions = new X12ValidationOptionsProperty {
                    ValidationRules = new [] { new X12ValidationRuleProperty {
                        CodeListValidationRule = new X12CodeListValidationRuleProperty {
                            ElementId = "elementId",

                            // the properties below are optional
                            CodesToAdd = new [] { "codesToAdd" },
                            CodesToRemove = new [] { "codesToRemove" }
                        },
                        ElementLengthValidationRule = new X12ElementLengthValidationRuleProperty {
                            ElementId = "elementId",
                            MaxLength = 123,
                            MinLength = 123
                        },
                        ElementRequirementValidationRule = new X12ElementRequirementValidationRuleProperty {
                            ElementPosition = "elementPosition",
                            Requirement = "requirement"
                        }
                    } }
                }
            }
        },
        FormatOptions = new FormatOptionsProperty {
            X12 = new X12DetailsProperty {
                TransactionSet = "transactionSet",
                Version = "version"
            }
        }
    },
    Mapping = new MappingProperty {
        TemplateLanguage = "templateLanguage",

        // the properties below are optional
        Template = "template"
    },
    MappingTemplate = "mappingTemplate",
    OutputConversion = new OutputConversionProperty {
        ToFormat = "toFormat",

        // the properties below are optional
        AdvancedOptions = new AdvancedOptionsProperty {
            X12 = new X12AdvancedOptionsProperty {
                SplitOptions = new X12SplitOptionsProperty {
                    SplitBy = "splitBy"
                },
                ValidationOptions = new X12ValidationOptionsProperty {
                    ValidationRules = new [] { new X12ValidationRuleProperty {
                        CodeListValidationRule = new X12CodeListValidationRuleProperty {
                            ElementId = "elementId",

                            // the properties below are optional
                            CodesToAdd = new [] { "codesToAdd" },
                            CodesToRemove = new [] { "codesToRemove" }
                        },
                        ElementLengthValidationRule = new X12ElementLengthValidationRuleProperty {
                            ElementId = "elementId",
                            MaxLength = 123,
                            MinLength = 123
                        },
                        ElementRequirementValidationRule = new X12ElementRequirementValidationRuleProperty {
                            ElementPosition = "elementPosition",
                            Requirement = "requirement"
                        }
                    } }
                }
            }
        },
        FormatOptions = new FormatOptionsProperty {
            X12 = new X12DetailsProperty {
                TransactionSet = "transactionSet",
                Version = "version"
            }
        }
    },
    SampleDocument = "sampleDocument",
    SampleDocuments = new SampleDocumentsProperty {
        BucketName = "bucketName",
        Keys = new [] { new SampleDocumentKeysProperty {
            Input = "input",
            Output = "output"
        } }
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnTransformer := awscdk.Aws_b2bi.NewCfnTransformer(this, jsii.String("MyCfnTransformer"), &CfnTransformerProps{
	Name: jsii.String("name"),
	Status: jsii.String("status"),

	// the properties below are optional
	EdiType: &EdiTypeProperty{
		X12Details: &X12DetailsProperty{
			TransactionSet: jsii.String("transactionSet"),
			Version: jsii.String("version"),
		},
	},
	FileFormat: jsii.String("fileFormat"),
	InputConversion: &InputConversionProperty{
		FromFormat: jsii.String("fromFormat"),

		// the properties below are optional
		AdvancedOptions: &AdvancedOptionsProperty{
			X12: &X12AdvancedOptionsProperty{
				SplitOptions: &X12SplitOptionsProperty{
					SplitBy: jsii.String("splitBy"),
				},
				ValidationOptions: &X12ValidationOptionsProperty{
					ValidationRules: []interface{}{
						&X12ValidationRuleProperty{
							CodeListValidationRule: &X12CodeListValidationRuleProperty{
								ElementId: jsii.String("elementId"),

								// the properties below are optional
								CodesToAdd: []*string{
									jsii.String("codesToAdd"),
								},
								CodesToRemove: []*string{
									jsii.String("codesToRemove"),
								},
							},
							ElementLengthValidationRule: &X12ElementLengthValidationRuleProperty{
								ElementId: jsii.String("elementId"),
								MaxLength: jsii.Number(123),
								MinLength: jsii.Number(123),
							},
							ElementRequirementValidationRule: &X12ElementRequirementValidationRuleProperty{
								ElementPosition: jsii.String("elementPosition"),
								Requirement: jsii.String("requirement"),
							},
						},
					},
				},
			},
		},
		FormatOptions: &FormatOptionsProperty{
			X12: &X12DetailsProperty{
				TransactionSet: jsii.String("transactionSet"),
				Version: jsii.String("version"),
			},
		},
	},
	Mapping: &MappingProperty{
		TemplateLanguage: jsii.String("templateLanguage"),

		// the properties below are optional
		Template: jsii.String("template"),
	},
	MappingTemplate: jsii.String("mappingTemplate"),
	OutputConversion: &OutputConversionProperty{
		ToFormat: jsii.String("toFormat"),

		// the properties below are optional
		AdvancedOptions: &AdvancedOptionsProperty{
			X12: &X12AdvancedOptionsProperty{
				SplitOptions: &X12SplitOptionsProperty{
					SplitBy: jsii.String("splitBy"),
				},
				ValidationOptions: &X12ValidationOptionsProperty{
					ValidationRules: []interface{}{
						&X12ValidationRuleProperty{
							CodeListValidationRule: &X12CodeListValidationRuleProperty{
								ElementId: jsii.String("elementId"),

								// the properties below are optional
								CodesToAdd: []*string{
									jsii.String("codesToAdd"),
								},
								CodesToRemove: []*string{
									jsii.String("codesToRemove"),
								},
							},
							ElementLengthValidationRule: &X12ElementLengthValidationRuleProperty{
								ElementId: jsii.String("elementId"),
								MaxLength: jsii.Number(123),
								MinLength: jsii.Number(123),
							},
							ElementRequirementValidationRule: &X12ElementRequirementValidationRuleProperty{
								ElementPosition: jsii.String("elementPosition"),
								Requirement: jsii.String("requirement"),
							},
						},
					},
				},
			},
		},
		FormatOptions: &FormatOptionsProperty{
			X12: &X12DetailsProperty{
				TransactionSet: jsii.String("transactionSet"),
				Version: jsii.String("version"),
			},
		},
	},
	SampleDocument: jsii.String("sampleDocument"),
	SampleDocuments: &SampleDocumentsProperty{
		BucketName: jsii.String("bucketName"),
		Keys: []interface{}{
			&SampleDocumentKeysProperty{
				Input: jsii.String("input"),
				Output: jsii.String("output"),
			},
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
})
```

## Initializer

TypeScript:

```ts
new CfnTransformer(scope: Construct, id: string, props: CfnTransformerProps)
```

Python:

```python
CfnTransformer(scope: Construct, id: str, props: CfnTransformerProps)
```

Java:

```java
new CfnTransformer(Construct scope, String id, CfnTransformerProps props)
```

C# / .NET:

```csharp
new CfnTransformer(Construct scope, string id, CfnTransformerProps props)
```

Golang:

```go
NewCfnTransformer(Scope Construct, Id *string, Props CfnTransformerProps)
```

## Construct Props

- `ediType`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.EdiTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.EdiTypeProperty.html) — this property has been deprecated

- `fileFormat`: string — this property has been deprecated

- `inputConversion`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.InputConversionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.InputConversionProperty.html) — Returns a structure that contains the format options for the transformation.

- `mapping`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.MappingProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.MappingProperty.html) — Returns the structure that contains the mapping template and its language (either XSLT or JSONATA).

- `mappingTemplate`: string — this property has been deprecated

  Please use input-conversion or output-conversion.

- `name`: string (required) — Returns the descriptive name for the transformer.

- `outputConversion`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.OutputConversionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.OutputConversionProperty.html) — Returns the `OutputConversion` object, which contains the format options for the outbound transformation.

- `sampleDocument`: string — this property has been deprecated

  Please use input-conversion or output-conversion.

- `sampleDocuments`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.SampleDocumentsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.SampleDocumentsProperty.html) — Returns a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.

- `status`: string (required) — Returns the state of the newly created transformer.

  The transformer can be either `active` or `inactive` . For the transformer to be used in a capability, its status must `active` .

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A key-value pair for a specific transformer.

  Tags are metadata that you can use to search for and group capabilities for various purposes.

## Properties

- `attrCreatedAt`: string — Returns a timestamp indicating when the transformer was created.

  For example, `2023-07-20T19:58:44.624Z` .

- `attrModifiedAt`: string — Returns a timestamp representing the date and time for the most recent change for the transformer object.

- `attrTransformerArn`: string — Returns an Amazon Resource Name (ARN) for a specific transformer.

- `attrTransformerId`: string — The system-assigned unique identifier for the transformer.

- `cdkTagManager`: [TagManager](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.TagManager.html) — Tag Manager which manages the tags for this resource.

- `CFN_RESOURCE_TYPE_NAME`: string (static) — The CloudFormation resource type name for this resource class.

- `cfnOptions`: [ICfnResourceOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.ICfnResourceOptions.html) — Options for this resource, such as condition, update policy etc.

- `cfnResourceType`: string — AWS resource type.

- `creationStack`: string[]

- `ediType`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.EdiTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.EdiTypeProperty.html) — this property has been deprecated

- `env`: [ResourceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html)

- `fileFormat`: string — this property has been deprecated

- `inputConversion`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.InputConversionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.InputConversionProperty.html) — Returns a structure that contains the format options for the transformation.

- `logicalId`: string — The logical ID for this CloudFormation stack element.

  The logical ID of the element
  is calculated from the path of the resource node in the construct tree.

  To override this value, use `overrideLogicalId(newLogicalId)`.

- `mapping`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.MappingProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.MappingProperty.html) — Returns the structure that contains the mapping template and its language (either XSLT or JSONATA).

- `mappingTemplate`: string — this property has been deprecated

- `name`: string — Returns the descriptive name for the transformer.

- `node`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `outputConversion`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.OutputConversionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.OutputConversionProperty.html) — Returns the `OutputConversion` object, which contains the format options for the outbound transformation.

- `ref`: string — Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

  If, by any chance, the intrinsic reference of a resource is not a string, you could
  coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.

- `sampleDocument`: string — this property has been deprecated

- `sampleDocuments`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.SampleDocumentsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_b2bi.CfnTransformer.SampleDocumentsProperty.html) — Returns a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.

- `stack`: [Stack](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this element is defined.

  CfnElements must be defined within a stack scope (directly or indirectly).

- `status`: string — Returns the state of the newly created transformer.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A key-value pair for a specific transformer.

- `transformerRef`: [TransformerReference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_b2bi.TransformerReference.html) — A reference to a Transformer resource.

## Methods

- `addDeletionOverride(path: string): void` — Syntactic sugar for `addOverride(path, undefined)`.

  **Parameters**

  - `path` — The path of the value to delete.

- `addDependency(target: CfnResource): void` — Use `addResourceDependency` instead.

  This method has been renamed to `addResourceDependency` to more clearly
  set it apart from `construct.node.addDependency`. See the documentation
  of that function for more details.

- `addDependsOn(target: CfnResource): void` — Use `addResourceDependency` instead.

  This can be used for resources across stacks (or nested stack) boundaries
  and the dependency will automatically be transferred to the relevant scope.

  This method has been renamed to `addResourceDependency`, which makes it
  more clear that this method operates at a different level from the
  construct-level `construct.node.addDependency()` mechanism.

- `addMetadata(key: string, value: any): void` — Add a value to the CloudFormation Resource Metadata.

- `addOverride(path: string, value: any): void` — Adds an override to the synthesized CloudFormation resource.

  To add a
  property override, either use `addPropertyOverride` or prefix `path` with
  "Properties." (i.e. `Properties.TopicName`).

  If the override is nested, separate each nested level using a dot (.) in the path parameter.
  If there is an array as part of the nesting, specify the index in the path.

  To include a literal `.` in the property name, prefix with a `\`. In most
  programming languages you will need to write this as `"\\."` because the
  `\` itself will need to be escaped.

  For example,
  ```typescript
  cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
  cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
  ```
  would add the overrides
  ```json
  "Properties": {
    "GlobalSecondaryIndexes": [
      {
        "Projection": {
          "NonKeyAttributes": [ "myattribute" ]
          ...
        }
        ...
      },
      {
        "ProjectionType": "INCLUDE"
        ...
      },
    ]
    ...
  }
  ```

  The `value` argument to `addOverride` will not be processed or translated
  in any way. Pass raw JSON values in here with the correct capitalization
  for CloudFormation. If you pass CDK classes or structs, they will be
  rendered with lowercased key names, and CloudFormation will reject the
  template.

  **Parameters**

  - `path` — - The path of the property, you can use dot notation to override values in complex types.
  - `value` — - The value.

- `addPropertyDeletionOverride(propertyPath: string): void` — Adds an override that deletes the value of a property from the resource definition.

  **Parameters**

  - `propertyPath` — The path to the property.

- `addPropertyOverride(propertyPath: string, value: any): void` — Adds an override to a resource property.

  Syntactic sugar for `addOverride("Properties.<...>", value)`.

  **Parameters**

  - `propertyPath` — The path of the property.
  - `value` — The value.

- `addResourceDependency(target: CfnResource, reason?: string): void` — Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

  This can be used for resources across stacks (or nested stack) boundaries
  and the dependency will automatically be transferred to the relevant scope.

  This method only adds dependencies between L1 resources. If you are
  looking for a generic construct-to-construct dependency mechanism that works
  for all constructs including L2s, use `construct.node.addDependency` instead.

- `applyCrossStackReferenceStrength(strength: ReferenceStrength): void` — Sets the cross-stack reference strength for this resource.

  When set, any cross-stack reference to this resource will use the specified
  strength instead of the global default from the consuming stack's context.

  **Parameters**

  - `strength` — - The reference strength to use for this resource.

- `applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void` — Sets the deletion policy of the resource based on the removal policy specified.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
  cases, a snapshot can be taken of the resource prior to deletion
  (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
  can be found in the following link:

- `arnForTransformer(resource: ITransformerRef): string` (static)

- `cfnPropertyName(cdkPropertyName: string): string`

- `getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference` — Returns a token for an runtime attribute of this resource.

  Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
  in case there is no generated attribute.

  **Parameters**

  - `attributeName` — The name of the attribute.

- `getMetadata(key: string): any` — Retrieve a value value from the CloudFormation Resource Metadata.

- `inspect(inspector: TreeInspector): void` — Examines the CloudFormation resource and discloses attributes.

  **Parameters**

  - `inspector` — tree inspector to collect and process attributes.

- `isCfnElement(x: any): boolean` (static) — Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

  Uses duck-typing instead of `instanceof` to allow stack elements from different
  versions of this library to be included in the same stack.

  **Returns:** The construct as a stack element or undefined if it is not a stack element.

- `isCfnResource(x: any): boolean` (static) — Check whether the given object is a CfnResource.

- `isCfnTransformer(x: any): boolean` (static) — Checks whether the given object is a CfnTransformer.

- `isConstruct(x: any): boolean` (static) — Checks if `x` is a construct.

  Use this method instead of `instanceof` to properly detect `Construct`
  instances, even when the construct library is symlinked.

  Explanation: in JavaScript, multiple copies of the `constructs` library on
  disk are seen as independent, completely different libraries. As a
  consequence, the class `Construct` in each copy of the `constructs` library
  is seen as a different class, and an instance of one class will not test as
  `instanceof` the other class. `npm install` will not create installations
  like this, but users may manually symlink construct libraries together or
  use a monorepo tool: in those cases, multiple copies of the `constructs`
  library can be accidentally installed, and `instanceof` will behave
  unpredictably. It is safest to avoid using `instanceof`, and using
  this type-testing method instead.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Construct`.

- `obtainDependencies(): Stack | CfnResource[]` — Retrieves an array of resources and stacks this resource depends on.

  For resources depended on directly, returns the `CfnResource` object. For
  dependencies on other stacks, returns the `Stack` object. The order of the
  array is not guaranteed.

- `overrideLogicalId(newLogicalId: string): void` — Overrides the auto-generated logical ID with a specific ID.

  **Parameters**

  - `newLogicalId` — The new logical ID to use for this stack element.

- `removeDependency(target: CfnResource): void` — Use `removeResourceDependency` instead

  This can be used for resources across stacks (including nested stacks)
  and the dependency will automatically be removed from the relevant scope.

- `removeResourceDependency(target: CfnResource): void` — Indicates that this resource no longer depends on another resource.

  This can be used for resources across stacks (including nested stacks)
  and the dependency will automatically be removed from the relevant scope.

- `replaceDependency(target: CfnResource, newTarget: CfnResource): void` — Replaces one dependency with another.

  **Parameters**

  - `target` — The dependency to replace.
  - `newTarget` — The new dependency to add.

- `toString(): string` — Returns a string representation of this construct.

  **Returns:** a string representation of this resource

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.
  Use multiple `with()` calls if subsequent mixins should apply to added
  constructs.
