Enum ArnFormat
- All Implemented Interfaces:
Serializable
,Comparable<ArnFormat>
,java.lang.constant.Constable
Example:
Stack stack; // Builds "arn:<PARTITION>:lambda:<REGION>:<ACCOUNT>:function:MyFunction" stack.formatArn(ArnComponents.builder() .service("lambda") .resource("function") .arnFormat(ArnFormat.COLON_RESOURCE_NAME) .resourceName("MyFunction") .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis represents a format where the 'resource' and 'resourceName' parts are separated with a colon.This represents a format where there is no 'resourceName' part.This represents a format where the 'resource' and 'resourceName' parts are separated with a slash.This represents a format where the 'resource' and 'resourceName' parts are seperated with a slash, but there is also an additional slash after the colon separating 'account' from 'resource'. -
Method Summary
-
Enum Constant Details
-
NO_RESOURCE_NAME
This represents a format where there is no 'resourceName' part.This format is used for S3 resources, like 'arn:aws:s3:::bucket'. Everything after the last colon is considered the 'resource', even if it contains slashes, like in 'arn:aws:s3:::bucket/object.zip'.
-
COLON_RESOURCE_NAME
This represents a format where the 'resource' and 'resourceName' parts are separated with a colon.Like in: 'arn:aws:service:region:account:resource:resourceName'. Everything after the last colon is considered the 'resourceName', even if it contains slashes, like in 'arn:aws:apigateway:region:account:resource:/test/mydemoresource/*'.
-
SLASH_RESOURCE_NAME
This represents a format where the 'resource' and 'resourceName' parts are separated with a slash.Like in: 'arn:aws:service:region:account:resource/resourceName'. Everything after the separating slash is considered the 'resourceName', even if it contains colons, like in 'arn:aws:cognito-sync:region:account:identitypool/us-east-1:1a1a1a1a-ffff-1111-9999-12345678:bla'.
-
SLASH_RESOURCE_SLASH_RESOURCE_NAME
This represents a format where the 'resource' and 'resourceName' parts are seperated with a slash, but there is also an additional slash after the colon separating 'account' from 'resource'.Like in: 'arn:aws:service:region:account:/resource/resourceName'. Note that the leading slash is not included in the parsed 'resource' part.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-