PhysicalResourceIdReference

class aws_cdk.custom_resources.PhysicalResourceIdReference

Bases: object

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

ExampleMetadata:

infused

Example:

aws_custom = cr.AwsCustomResource(self, "aws-custom",
    on_create=cr.AwsSdkCall(
        service="...",
        action="...",
        parameters={
            "text": "..."
        },
        physical_resource_id=cr.PhysicalResourceId.of("...")
    ),
    on_update=cr.AwsSdkCall(
        service="...",
        action="...",
        parameters={
            "text": "...",
            "resource_id": cr.PhysicalResourceIdReference()
        }
    ),
    policy=cr.AwsCustomResourcePolicy.from_sdk_calls(
        resources=cr.AwsCustomResourcePolicy.ANY_RESOURCE
    )
)

Methods

resolve(_context)

Produce the Token’s value at resolution time.

Parameters:

_context (IResolveContext) –

Return type:

Any

to_json()

toJSON serialization to replace PhysicalResourceIdReference with a magic string.

Return type:

str

to_string()

Return a string representation of this resolvable object.

Returns a reversible string representation.

Return type:

str

Attributes

creation_stack

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.