Class PhysicalResourceId
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.customresources.PhysicalResourceId
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:41:02.829Z")
@Stability(Stable)
public class PhysicalResourceId
extends software.amazon.jsii.JsiiObject
Physical ID of the custom resource.
Example:
String crossAccountRoleArn = "arn:aws:iam::OTHERACCOUNT:role/CrossAccountRoleName"; // arn of role deployed in separate account
String callRegion = "us-west-1"; // sdk call to be made in specified region (optional)
// sdk call to be made in specified region (optional)
AwsCustomResource.Builder.create(this, "CrossAccount")
.onCreate(AwsSdkCall.builder()
.assumedRoleArn(crossAccountRoleArn)
.region(callRegion) // optional
.service("sts")
.action("GetCallerIdentity")
.physicalResourceId(PhysicalResourceId.of("id"))
.build())
.policy(AwsCustomResourcePolicy.fromStatements(List.of(PolicyStatement.fromJson(Map.of(
"Effect", "Allow",
"Action", "sts:AssumeRole",
"Resource", crossAccountRoleArn)))))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPhysicalResourceId(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedPhysicalResourceId(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic PhysicalResourceIdfromResponse(String responsePath) Extract the physical resource id from the path (dot notation) to the data in the API call response.getId()Literal string to be used as the physical id.Path to a response data element to be used as the physical id.static PhysicalResourceIdExplicit physical resource id.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
PhysicalResourceId
protected PhysicalResourceId(software.amazon.jsii.JsiiObjectRef objRef) -
PhysicalResourceId
protected PhysicalResourceId(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromResponse
@Stability(Stable) @NotNull public static PhysicalResourceId fromResponse(@NotNull String responsePath) Extract the physical resource id from the path (dot notation) to the data in the API call response.- Parameters:
responsePath- This parameter is required.
-
of
Explicit physical resource id.- Parameters:
id- This parameter is required.
-
getId
Literal string to be used as the physical id. -
getResponsePath
Path to a response data element to be used as the physical id.
-