aws-cdk-lib.custom_resources.PhysicalResourceId

class PhysicalResourceId

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

Physical ID of the custom resource.

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,
  }),
})

Properties

NameTypeDescription
id?stringLiteral string to be used as the physical id.
responsePath?stringPath to a response data element to be used as the physical id.

id?

Type: string (optional)

Literal string to be used as the physical id.


responsePath?

Type: string (optional)

Path to a response data element to be used as the physical id.

Methods

NameDescription
static fromResponse(responsePath)Extract the physical resource id from the path (dot notation) to the data in the API call response.
static of(id)Explicit physical resource id.

static fromResponse(responsePath)

public static fromResponse(responsePath: string): PhysicalResourceId

Parameters

  • responsePath string

Returns

  • PhysicalResourceId

Extract the physical resource id from the path (dot notation) to the data in the API call response.


static of(id)

public static of(id: string): PhysicalResourceId

Parameters

  • id string

Returns

  • PhysicalResourceId

Explicit physical resource id.