Fugue.AWS.SNS.Topic

Module Members

external

(Function)

Create a reference to an externally managed Topic.

Example usage:

topic: SNS.Topic.external("arn:aws:sns:us-east-1:123456789012:example-topic")

Type Signature

 fun (String) -> Topic
Argument: arn

The ARN of an existing topic.

Type: String

Returns:

A reference to the specified Topic.

Type: Topic

new

(Function)

Topic Constructor

Call this constructor to create a new Fugue.AWS.SNS.Topic value.

Example Usage:

topic: SNS.Topic.new {
  name: "example-topic",
  region: AWS.Us-east-1,
}

Type Signature

 fun { name: String,
       region: Region,
       policy: Optional<String>,
       resourceId: Optional<String> } -> Topic
Argument: name

The name to give the topic. Must be between 1 and 256 characters and made up of ASCII letters, numbers, underscores and hyphens.

Type: String

Argument: region

The region to create the topic in.

Type: Region

Argument: policy

The IAM policy to attach to the topic.

Type: Optional<String>

Argument: resourceId

Resource ID of the resource to import with Fugue Import. This field is only honored on fugue run. The resource ID is the ARN. Mutable. Example: arn:aws:sns:us-east-1:123456789012:topic

Type: Optional<String>

Returns:

A topic.

Type: Topic

region

(Function)

Retrieve the region from a Topic value.

Works for Topics defined in the composition as well external values.

Example usage:

topic1: SNS.Topic.new {
  name: "example-topic",
  region: AWS.Us-west-2,
}
region1: SNS.Topic.region(topic1) # => AWS.Us-west-2

topic2: SNS.Topic.external("arn:aws:sns:us-east-1:123456789012:example-topic")
region2: SNS.Topic.region(topic2) # => AWS.Us-east-1

Type Signature

 fun (Topic) -> Region
Argument: topic

The topic from which to get the region.

Type: Topic

Returns:

The region containing the topic.

Type: Region