aws-cdk-lib.custom_resources.PhysicalResourceIdReference

class PhysicalResourceIdReference

LanguageType name
.NETAmazon.CDK.CustomResources.PhysicalResourceIdReference
Gogithub.com/aws/aws-cdk-go/awscdk/v2/customresources#PhysicalResourceIdReference
Javasoftware.amazon.awscdk.customresources.PhysicalResourceIdReference
Pythonaws_cdk.custom_resources.PhysicalResourceIdReference
TypeScript (source)aws-cdk-lib » custom_resources » PhysicalResourceIdReference

Implements IResolvable

Reference to the physical resource id that can be passed to the AWS operation as a parameter.

Example

const awsCustom = new cr.AwsCustomResource(this, 'aws-custom', {
  onCreate: {
    service: '...',
    action: '...',
    parameters: {
      text: '...',
    },
    physicalResourceId: cr.PhysicalResourceId.of('...'),
  },
  onUpdate: {
    service: '...',
    action: '...',
    parameters: {
      text: '...',
      resourceId: new cr.PhysicalResourceIdReference(),
    },
  },
  policy: cr.AwsCustomResourcePolicy.fromSdkCalls({
    resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE,
  }),
})

Initializer

new PhysicalResourceIdReference()

Properties

NameTypeDescription
creationStackstring[]The creation stack of this resolvable which will be appended to errors thrown during resolution.

creationStack

Type: string[]

The creation stack of this resolvable which will be appended to errors thrown during resolution.

This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.

Methods

NameDescription
resolve(_context)Produce the Token's value at resolution time.
toJSON()toJSON serialization to replace PhysicalResourceIdReference with a magic string.
toString()Return a string representation of this resolvable object.

resolve(_context)

public resolve(_context: IResolveContext): any

Parameters

  • _context IResolveContext

Returns

  • any

Produce the Token's value at resolution time.


toJSON()

public toJSON(): string

Returns

  • string

toJSON serialization to replace PhysicalResourceIdReference with a magic string.


toString()

public toString(): string

Returns

  • string

Return a string representation of this resolvable object.

Returns a reversible string representation.