# PhysicalResourceIdReference

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

Extends: PhysicalResourceIdReference
Implements: IResolvable

- Source: [`custom-resources/lib/aws-custom-resource/aws-custom-resource.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts#L21)
- Type last changed: v2.79.0 · 10 May 2023

## Example

```ts
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

```ts
new PhysicalResourceIdReference()
```

## Properties

- `creationStack`: 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

- `resolve(_context: IResolveContext): any` — Produce the Token's value at resolution time.

- `toJSON(): string` — toJSON serialization to replace `PhysicalResourceIdReference` with a magic string.

- `toString(): string` — Return a string representation of this resolvable object.

  Returns a reversible string representation.
