@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:35.789Z") @Stability(value=Stable) public class Arn extends software.amazon.jsii.JsiiObject
| Modifier | Constructor and Description |
|---|---|
protected |
Arn(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Arn(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static String |
extractResourceName(String arn,
String resourceType)
Extract the full resource name from an ARN.
|
static String |
format(ArnComponents components)
Creates an ARN from components.
|
static String |
format(ArnComponents components,
Stack stack)
Creates an ARN from components.
|
static ArnComponents |
split(String arn,
ArnFormat arnFormat)
Splits the provided ARN into its components.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Arn(software.amazon.jsii.JsiiObjectRef objRef)
protected Arn(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static String extractResourceName(@NotNull String arn, @NotNull String resourceType)
Necessary for resource names (paths) that may contain the separator, like
arn:aws:iam::111111111111:role/path/to/role/name.
Only works if we statically know the expected
We can't extract the 'resourceType' from the ARN at hand, because CloudFormation Expressions
only allow literals in the 'separator' argument to
Only necessary for ARN formats for which the type-name separator is resourceType beforehand, since we're going
to use that to split the string on ':{ Fn::Split }, and so it can't be
{ Fn::Select: [5, { Fn::Split: [':', ARN] }}.
/.
arn - This parameter is required.resourceType - This parameter is required.@Stability(value=Stable) @NotNull public static String format(@NotNull ArnComponents components, @Nullable Stack stack)
If partition, region or account are not specified, the stack's
partition, region and account will be used.
If any component is the empty string, an empty string will be inserted into the generated ARN at the location that component corresponds to.
The ARN will be formatted as follows:
arn:{partition}:{service}:{region}:{account}:{resource}{sep}{resource-name}
The required ARN pieces that are omitted will be taken from the stack that the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope can be 'undefined'.
components - This parameter is required.stack - @Stability(value=Stable) @NotNull public static String format(@NotNull ArnComponents components)
If partition, region or account are not specified, the stack's
partition, region and account will be used.
If any component is the empty string, an empty string will be inserted into the generated ARN at the location that component corresponds to.
The ARN will be formatted as follows:
arn:{partition}:{service}:{region}:{account}:{resource}{sep}{resource-name}
The required ARN pieces that are omitted will be taken from the stack that the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope can be 'undefined'.
components - This parameter is required.@Stability(value=Stable) @NotNull public static ArnComponents split(@NotNull String arn, @NotNull ArnFormat arnFormat)
Works both if 'arn' is a string like 'arn:aws:s3:::bucket', and a Token representing a dynamic CloudFormation expression (in which case the returned components will also be dynamic CloudFormation expressions, encoded as Tokens).
arn - the ARN to split into its components. This parameter is required.arnFormat - the expected format of 'arn' - depends on what format the service 'arn' represents uses. This parameter is required.Copyright © 2022. All rights reserved.