# QueueAttributes

Reference to a queue.

Used as argument in: [Queue.fromQueueAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html#fromqueueattributes)

- Source: [`aws-sqs/lib/queue-base.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-sqs/lib/queue-base.ts#L323)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sqs as sqs } from 'aws-cdk-lib';
const queueAttributes: sqs.QueueAttributes = {
  queueArn: 'queueArn',

  // the properties below are optional
  fifo: false,
  keyArn: 'keyArn',
  queueName: 'queueName',
  queueUrl: 'queueUrl',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sqs as sqs

queue_attributes = sqs.QueueAttributes(
    queue_arn="queueArn",

    # the properties below are optional
    fifo=False,
    key_arn="keyArn",
    queue_name="queueName",
    queue_url="queueUrl"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sqs.*;

QueueAttributes queueAttributes = QueueAttributes.builder()
        .queueArn("queueArn")

        // the properties below are optional
        .fifo(false)
        .keyArn("keyArn")
        .queueName("queueName")
        .queueUrl("queueUrl")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SQS;

var queueAttributes = new QueueAttributes {
    QueueArn = "queueArn",

    // the properties below are optional
    Fifo = false,
    KeyArn = "keyArn",
    QueueName = "queueName",
    QueueUrl = "queueUrl"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

queueAttributes := &QueueAttributes{
	QueueArn: jsii.String("queueArn"),

	// the properties below are optional
	Fifo: jsii.Boolean(false),
	KeyArn: jsii.String("keyArn"),
	QueueName: jsii.String("queueName"),
	QueueUrl: jsii.String("queueUrl"),
}
```

## Properties

- `fifo`: boolean — Whether this queue is an Amazon SQS FIFO queue. If false, this is a standard queue.

  **Default:** if fifo is not specified, the property will be determined based on the queue name (not possible for FIFO queues imported from a token)

  In case of a FIFO queue which is imported from a token, this value has to be explicitly set to true.

- `keyArn`: string = None — KMS encryption key, if this queue is server-side encrypted by a KMS key.

- `queueArn`: string (required) — The ARN of the queue.

- `queueName`: string — The name of the queue.

  **Default:** if queue name is not specified, the name will be derived from the queue ARN

- `queueUrl`: string — The URL of the queue.

  **Default:** 'https://sqs.<region-endpoint>/<account-ID>/<queue-name>'
