# PhysicalResourceId

Physical ID of the custom resource.

- 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#L43)

## Example

```ts
const crossAccountRoleArn = 'arn:aws:iam::OTHERACCOUNT:role/CrossAccountRoleName'; // arn of role deployed in separate account

const callRegion = 'us-west-1'; // sdk call to be made in specified region (optional)

new cr.AwsCustomResource(this, 'CrossAccount', {
  onCreate: {
    assumedRoleArn: crossAccountRoleArn,
    region: callRegion, // optional
    service: 'sts',
    action: 'GetCallerIdentity',
    physicalResourceId: cr.PhysicalResourceId.of('id'),
  },
  policy: cr.AwsCustomResourcePolicy.fromStatements([iam.PolicyStatement.fromJson({
    Effect: "Allow",
    Action: "sts:AssumeRole",
    Resource: crossAccountRoleArn,
  })]),
});
```

## Properties

- `id`: string — Literal string to be used as the physical id.

- `responsePath`: string — Path to a response data element to be used as the physical id.

## Methods

- `fromResponse(responsePath: string): PhysicalResourceId // chainable` (static) — Extract the physical resource id from the path (dot notation) to the data in the API call response.

- `of(id: string): PhysicalResourceId // chainable` (static) — Explicit physical resource id.
