# ArnFormat

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

- Source: [`core/lib/arn.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/arn.ts#L11)

## 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

| Member | 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 separated with a slash, but there is also an additional slash after the colon separating 'account' from 'resource'. |

## Referenced by

- [`ArnComponents`](/v2/docs/aws-cdk-lib.ArnComponents).arnFormat
