@Generated(value="jsii-pacmak/0.22.0 (build 14afdde)", date="2020-03-18T10:30:11.844Z") @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 |
format(ArnComponents components,
Stack stack)
Creates an ARN from components.
|
static ArnComponents |
parse(String arn)
Given an ARN, parses it and returns components.
|
static ArnComponents |
parse(String arn,
String sepIfToken)
Given an ARN, parses it and returns components.
|
static ArnComponents |
parse(String arn,
String sepIfToken,
Boolean hasName)
Given an ARN, parses it and returns components.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSetprotected Arn(software.amazon.jsii.JsiiObjectRef objRef)
protected Arn(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static String format(@NotNull ArnComponents components, @NotNull 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 - This parameter is required.@Stability(value=Stable) @NotNull public static ArnComponents parse(@NotNull String arn, @Nullable String sepIfToken, @Nullable Boolean hasName)
If the ARN is a concrete string, it will be parsed and validated. The
separator (sep) will be set to '/' if the 6th component includes a '/',
in which case, resource will be set to the value before the '/' and
resourceName will be the rest. In case there is no '/', resource will
be set to the 6th components and resourceName will be set to the rest
of the string.
If the ARN includes tokens (or is a token), the ARN cannot be validated,
since we don't have the actual value yet at the time of this function
call. You will have to know the separator and the type of ARN. The
resulting ArnComponents object will contain tokens for the
subexpressions of the ARN, not string literals. In this case this
function cannot properly parse the complete final resourceName (path) out
of ARNs that use '/' to both separate the 'resource' from the
'resourceName' AND to subdivide the resourceName further. For example, in
S3 ARNs:
arn:aws:s3:::my_corporate_bucket/path/to/exampleobject.png
After parsing the resourceName will not contain 'path/to/exampleobject.png' but simply 'path'. This is a limitation because there is no slicing functionality in CloudFormation templates.
arn - The ARN to parse. This parameter is required.sepIfToken - The separator used to separate resource from resourceName.hasName - Whether there is a name component in the ARN at all.@Stability(value=Stable) @NotNull public static ArnComponents parse(@NotNull String arn, @Nullable String sepIfToken)
If the ARN is a concrete string, it will be parsed and validated. The
separator (sep) will be set to '/' if the 6th component includes a '/',
in which case, resource will be set to the value before the '/' and
resourceName will be the rest. In case there is no '/', resource will
be set to the 6th components and resourceName will be set to the rest
of the string.
If the ARN includes tokens (or is a token), the ARN cannot be validated,
since we don't have the actual value yet at the time of this function
call. You will have to know the separator and the type of ARN. The
resulting ArnComponents object will contain tokens for the
subexpressions of the ARN, not string literals. In this case this
function cannot properly parse the complete final resourceName (path) out
of ARNs that use '/' to both separate the 'resource' from the
'resourceName' AND to subdivide the resourceName further. For example, in
S3 ARNs:
arn:aws:s3:::my_corporate_bucket/path/to/exampleobject.png
After parsing the resourceName will not contain 'path/to/exampleobject.png' but simply 'path'. This is a limitation because there is no slicing functionality in CloudFormation templates.
arn - The ARN to parse. This parameter is required.sepIfToken - The separator used to separate resource from resourceName.@Stability(value=Stable) @NotNull public static ArnComponents parse(@NotNull String arn)
If the ARN is a concrete string, it will be parsed and validated. The
separator (sep) will be set to '/' if the 6th component includes a '/',
in which case, resource will be set to the value before the '/' and
resourceName will be the rest. In case there is no '/', resource will
be set to the 6th components and resourceName will be set to the rest
of the string.
If the ARN includes tokens (or is a token), the ARN cannot be validated,
since we don't have the actual value yet at the time of this function
call. You will have to know the separator and the type of ARN. The
resulting ArnComponents object will contain tokens for the
subexpressions of the ARN, not string literals. In this case this
function cannot properly parse the complete final resourceName (path) out
of ARNs that use '/' to both separate the 'resource' from the
'resourceName' AND to subdivide the resourceName further. For example, in
S3 ARNs:
arn:aws:s3:::my_corporate_bucket/path/to/exampleobject.png
After parsing the resourceName will not contain 'path/to/exampleobject.png' but simply 'path'. This is a limitation because there is no slicing functionality in CloudFormation templates.
arn - The ARN to parse. This parameter is required.Copyright © 2020. All rights reserved.