interop

February 20, 2025 · View on GitHub

@pulumi/cdkDocs


@pulumi/cdk / interop

interop

Type Aliases

ResourceAttributeMapping

ResourceAttributeMapping: object

Use this type if you need to control the attributes that are available on the mapped resource. For example if the CFN resource has an attribute called resourceArn and the mapped resource only has an attribute called arn you can return the extra resourceArn attribute

Type declaration

NameTypeDefined in
attributes?objectinterop.ts:78
resourcepulumi.Resourceinterop.ts:77

Example

return {
  resource: mappedResource,
  attributes: {
    resourceArn: mappedResource.arn,
  }
}

Defined in

interop.ts:76


ResourceAttributeMappingArray

ResourceAttributeMappingArray: ResourceAttributeMapping & object[]

Use this type if a single CFN resource maps to multiple AWS resources

Defined in

interop.ts:84


ResourceMapping

ResourceMapping: ResourceAttributeMapping | pulumi.Resource | ResourceAttributeMappingArray

Defined in

interop.ts:86

Functions

normalize()

normalize(value, cfnType?, pulumiProvider?): any

normalize will take the resource properties for a specific CloudFormation resource and will covert those properties to be compatible with Pulumi properties.

Parameters

ParameterTypeDescription
valueanyThe resource properties to be normalized
cfnType?stringThe CloudFormation resource type being normalized (e.g. AWS::S3::Bucket). If no value is provided then property conversion will be done without schema knowledge
pulumiProvider?PulumiProviderThe pulumi provider to read the schema from. If cfnType is provided then this defaults to PulumiProvider.AWS_NATIVE

Returns

any

The normalized resource properties

Defined in

interop.ts:31