Skip to content
v2.275.0

ArnFormat Enum ​

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

Example ​

ts
declare const stack: Stack;

// Builds "arn:<PARTITION>:lambda:<REGION>:<ACCOUNT>:function:MyFunction"
stack.formatArn({
  service: 'lambda',
  resource: 'function',
  arnFormat: ArnFormat.COLON_RESOURCE_NAME,
  resourceName: 'MyFunction'
});

Members ​

MemberDescription
NO_RESOURCE_NAMEThis represents a format where there is no 'resourceName' part.
COLON_RESOURCE_NAMEThis represents a format where the 'resource' and 'resourceName' parts are separated with a colon.
SLASH_RESOURCE_NAMEThis represents a format where the 'resource' and 'resourceName' parts are separated with a slash.
SLASH_RESOURCE_SLASH_RESOURCE_NAMEThis represents a format where the 'resource' and 'resourceName' parts are separated with a slash, but there is also an additional slash after the colon separating 'account' from 'resource'.

Referenced by ​