Skip to content

ArnFormat

An enum representing the various ARN formats that different services use.

Members

Name Description
NO_RESOURCE_NAME This represents a format where there is no 'resourceName' part.
COLON_RESOURCE_NAME This represents a format where the 'resource' and 'resourceName' parts are separated with a colon.
SLASH_RESOURCE_NAME This represents a format where the 'resource' and 'resourceName' parts are separated with a slash.
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'.

NO_RESOURCE_NAME

This represents a format where there is no 'resourceName' part.

Everything after the last colon is considered the 'resource', even if it contains slashes. For some resource types, e.g. OSS buckets, 'resource' part defines the bucket name.


COLON_RESOURCE_NAME

This represents a format where the 'resource' and 'resourceName' parts are separated with a colon.

Everything after the last colon is considered the 'resourceName', even if it contains slashes.


SLASH_RESOURCE_NAME

This represents a format where the 'resource' and 'resourceName' parts are separated with a slash.

Like in: 'acs:ecs:cn-hangzhou:123456789012*:instance/i-12345678'. Everything after the separating slash is considered the 'resourceName', even if it contains colons. The region part can be omitted. Like in: 'acs:ram::123456789012***:role/RoleName'.


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: 'acs:mns:cn-hangzhou:123456789012**:/topics/my-topic'. Note that the leading slash is not included in the parsed 'resource' part.