AmazonResourceNameOptions Class
Definition
- Namespace
- Savvyio.Extensions.SimpleQueueService
- Assemblies
- Savvyio.Extensions.SimpleQueueService.dll
Configuration options that is related to Amazon Resource Name (ARN).
public class AmazonResourceNameOptions : IValidatableParameterObject, IParameterObject
- Inheritance
-
objectAmazonResourceNameOptions
- Implements
Examples
AmazonResourceNameOptions builds Amazon Resource Names (ARNs) for SQS queues and SNS topics using the configured partition, region, and account ID.
using Savvyio.Extensions.SimpleQueueService;
namespace ExampleApp;
public class AmazonResourceNameSetup
{
public static string BuildQueueArn(string queueName)
{
var options = new AmazonResourceNameOptions
{
Partition = "aws",
Region = "eu-west-1",
AccountId = "123456789012"
};
return $"arn:{options.Partition}:sqs:{options.Region}:{options.AccountId}:{queueName}";
}
}
Remarks
Constructors
| Name | Description |
|---|---|
| AmazonResourceNameOptions() | Initializes a new instance of the AmazonResourceNameOptions class. |
Properties
| Name | Description |
|---|---|
| AccountId | Gets or sets the default ID of the AWS account that owns the resource (without the hyphens) to embed in the ARN. |
| DefaultAccountId | Gets or sets the default ID of the AWS account that owns the resource (without the hyphens) to embed in the ARN. Default is "000000000000". |
| DefaultPartition | Gets or sets the default partition in which the resource is located to embed in the ARN. Default is "aws". |
| DefaultRegion | Gets or sets the default region code to embed in the ARN. Default is "eu-west-1". |
| Partition | Gets or sets the partition in which the resource is located to embed in the ARN. |
| Region | Gets or sets the default region code to embed in the ARN. |
Methods
| Name | Description |
|---|---|
| ValidateOptions() | Determines whether the public read-write properties of this instance are in a valid state. |