Try AWS Native preview for resources not in the classic version.
aws.globalaccelerator.CustomRoutingListener
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a Global Accelerator custom routing listener.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleCustomRoutingAccelerator = new Aws.GlobalAccelerator.CustomRoutingAccelerator("exampleCustomRoutingAccelerator", new()
{
IpAddressType = "IPV4",
Enabled = true,
Attributes = new Aws.GlobalAccelerator.Inputs.CustomRoutingAcceleratorAttributesArgs
{
FlowLogsEnabled = true,
FlowLogsS3Bucket = "example-bucket",
FlowLogsS3Prefix = "flow-logs/",
},
});
var exampleCustomRoutingListener = new Aws.GlobalAccelerator.CustomRoutingListener("exampleCustomRoutingListener", new()
{
AcceleratorArn = exampleCustomRoutingAccelerator.Id,
PortRanges = new[]
{
new Aws.GlobalAccelerator.Inputs.CustomRoutingListenerPortRangeArgs
{
FromPort = 80,
ToPort = 80,
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/globalaccelerator"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleCustomRoutingAccelerator, err := globalaccelerator.NewCustomRoutingAccelerator(ctx, "exampleCustomRoutingAccelerator", &globalaccelerator.CustomRoutingAcceleratorArgs{
IpAddressType: pulumi.String("IPV4"),
Enabled: pulumi.Bool(true),
Attributes: &globalaccelerator.CustomRoutingAcceleratorAttributesArgs{
FlowLogsEnabled: pulumi.Bool(true),
FlowLogsS3Bucket: pulumi.String("example-bucket"),
FlowLogsS3Prefix: pulumi.String("flow-logs/"),
},
})
if err != nil {
return err
}
_, err = globalaccelerator.NewCustomRoutingListener(ctx, "exampleCustomRoutingListener", &globalaccelerator.CustomRoutingListenerArgs{
AcceleratorArn: exampleCustomRoutingAccelerator.ID(),
PortRanges: globalaccelerator.CustomRoutingListenerPortRangeArray{
&globalaccelerator.CustomRoutingListenerPortRangeArgs{
FromPort: pulumi.Int(80),
ToPort: pulumi.Int(80),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.globalaccelerator.CustomRoutingAccelerator;
import com.pulumi.aws.globalaccelerator.CustomRoutingAcceleratorArgs;
import com.pulumi.aws.globalaccelerator.inputs.CustomRoutingAcceleratorAttributesArgs;
import com.pulumi.aws.globalaccelerator.CustomRoutingListener;
import com.pulumi.aws.globalaccelerator.CustomRoutingListenerArgs;
import com.pulumi.aws.globalaccelerator.inputs.CustomRoutingListenerPortRangeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleCustomRoutingAccelerator = new CustomRoutingAccelerator("exampleCustomRoutingAccelerator", CustomRoutingAcceleratorArgs.builder()
.ipAddressType("IPV4")
.enabled(true)
.attributes(CustomRoutingAcceleratorAttributesArgs.builder()
.flowLogsEnabled(true)
.flowLogsS3Bucket("example-bucket")
.flowLogsS3Prefix("flow-logs/")
.build())
.build());
var exampleCustomRoutingListener = new CustomRoutingListener("exampleCustomRoutingListener", CustomRoutingListenerArgs.builder()
.acceleratorArn(exampleCustomRoutingAccelerator.id())
.portRanges(CustomRoutingListenerPortRangeArgs.builder()
.fromPort(80)
.toPort(80)
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_custom_routing_accelerator = aws.globalaccelerator.CustomRoutingAccelerator("exampleCustomRoutingAccelerator",
ip_address_type="IPV4",
enabled=True,
attributes=aws.globalaccelerator.CustomRoutingAcceleratorAttributesArgs(
flow_logs_enabled=True,
flow_logs_s3_bucket="example-bucket",
flow_logs_s3_prefix="flow-logs/",
))
example_custom_routing_listener = aws.globalaccelerator.CustomRoutingListener("exampleCustomRoutingListener",
accelerator_arn=example_custom_routing_accelerator.id,
port_ranges=[aws.globalaccelerator.CustomRoutingListenerPortRangeArgs(
from_port=80,
to_port=80,
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleCustomRoutingAccelerator = new aws.globalaccelerator.CustomRoutingAccelerator("exampleCustomRoutingAccelerator", {
ipAddressType: "IPV4",
enabled: true,
attributes: {
flowLogsEnabled: true,
flowLogsS3Bucket: "example-bucket",
flowLogsS3Prefix: "flow-logs/",
},
});
const exampleCustomRoutingListener = new aws.globalaccelerator.CustomRoutingListener("exampleCustomRoutingListener", {
acceleratorArn: exampleCustomRoutingAccelerator.id,
portRanges: [{
fromPort: 80,
toPort: 80,
}],
});
resources:
exampleCustomRoutingAccelerator:
type: aws:globalaccelerator:CustomRoutingAccelerator
properties:
ipAddressType: IPV4
enabled: true
attributes:
flowLogsEnabled: true
flowLogsS3Bucket: example-bucket
flowLogsS3Prefix: flow-logs/
exampleCustomRoutingListener:
type: aws:globalaccelerator:CustomRoutingListener
properties:
acceleratorArn: ${exampleCustomRoutingAccelerator.id}
portRanges:
- fromPort: 80
toPort: 80
Create CustomRoutingListener Resource
new CustomRoutingListener(name: string, args: CustomRoutingListenerArgs, opts?: CustomResourceOptions);
@overload
def CustomRoutingListener(resource_name: str,
opts: Optional[ResourceOptions] = None,
accelerator_arn: Optional[str] = None,
port_ranges: Optional[Sequence[CustomRoutingListenerPortRangeArgs]] = None)
@overload
def CustomRoutingListener(resource_name: str,
args: CustomRoutingListenerArgs,
opts: Optional[ResourceOptions] = None)
func NewCustomRoutingListener(ctx *Context, name string, args CustomRoutingListenerArgs, opts ...ResourceOption) (*CustomRoutingListener, error)
public CustomRoutingListener(string name, CustomRoutingListenerArgs args, CustomResourceOptions? opts = null)
public CustomRoutingListener(String name, CustomRoutingListenerArgs args)
public CustomRoutingListener(String name, CustomRoutingListenerArgs args, CustomResourceOptions options)
type: aws:globalaccelerator:CustomRoutingListener
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomRoutingListenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CustomRoutingListenerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CustomRoutingListenerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomRoutingListenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomRoutingListenerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CustomRoutingListener Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CustomRoutingListener resource accepts the following input properties:
- Accelerator
Arn string The Amazon Resource Name (ARN) of a custom routing accelerator.
- Port
Ranges List<CustomRouting Listener Port Range> The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- Accelerator
Arn string The Amazon Resource Name (ARN) of a custom routing accelerator.
- Port
Ranges []CustomRouting Listener Port Range Args The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- accelerator
Arn String The Amazon Resource Name (ARN) of a custom routing accelerator.
- port
Ranges List<CustomRouting Listener Port Range> The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- accelerator
Arn string The Amazon Resource Name (ARN) of a custom routing accelerator.
- port
Ranges CustomRouting Listener Port Range[] The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- accelerator_
arn str The Amazon Resource Name (ARN) of a custom routing accelerator.
- port_
ranges Sequence[CustomRouting Listener Port Range Args] The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- accelerator
Arn String The Amazon Resource Name (ARN) of a custom routing accelerator.
- port
Ranges List<Property Map> The list of port ranges for the connections from clients to the accelerator. Fields documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomRoutingListener resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing CustomRoutingListener Resource
Get an existing CustomRoutingListener resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CustomRoutingListenerState, opts?: CustomResourceOptions): CustomRoutingListener
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
accelerator_arn: Optional[str] = None,
port_ranges: Optional[Sequence[CustomRoutingListenerPortRangeArgs]] = None) -> CustomRoutingListener
func GetCustomRoutingListener(ctx *Context, name string, id IDInput, state *CustomRoutingListenerState, opts ...ResourceOption) (*CustomRoutingListener, error)
public static CustomRoutingListener Get(string name, Input<string> id, CustomRoutingListenerState? state, CustomResourceOptions? opts = null)
public static CustomRoutingListener get(String name, Output<String> id, CustomRoutingListenerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Accelerator
Arn string The Amazon Resource Name (ARN) of a custom routing accelerator.
- Port
Ranges List<CustomRouting Listener Port Range> The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- Accelerator
Arn string The Amazon Resource Name (ARN) of a custom routing accelerator.
- Port
Ranges []CustomRouting Listener Port Range Args The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- accelerator
Arn String The Amazon Resource Name (ARN) of a custom routing accelerator.
- port
Ranges List<CustomRouting Listener Port Range> The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- accelerator
Arn string The Amazon Resource Name (ARN) of a custom routing accelerator.
- port
Ranges CustomRouting Listener Port Range[] The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- accelerator_
arn str The Amazon Resource Name (ARN) of a custom routing accelerator.
- port_
ranges Sequence[CustomRouting Listener Port Range Args] The list of port ranges for the connections from clients to the accelerator. Fields documented below.
- accelerator
Arn String The Amazon Resource Name (ARN) of a custom routing accelerator.
- port
Ranges List<Property Map> The list of port ranges for the connections from clients to the accelerator. Fields documented below.
Supporting Types
CustomRoutingListenerPortRange, CustomRoutingListenerPortRangeArgs
Import
Using pulumi import
, import Global Accelerator custom routing listeners using the id
. For example:
$ pulumi import aws:globalaccelerator/customRoutingListener:CustomRoutingListener example arn:aws:globalaccelerator::111111111111:accelerator/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/listener/xxxxxxxx
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.