Skip to main content

listeners

Creates, updates, deletes or gets a listener resource or lists listeners in a region

Overview

Namelisteners
TypeResource
DescriptionResource Type definition for AWS::GlobalAccelerator::Listener
Idaws.globalaccelerator.listeners

Fields

NameDatatypeDescription
listener_arnstringThe Amazon Resource Name (ARN) of the listener.
accelerator_arnstringThe Amazon Resource Name (ARN) of the accelerator.
port_rangesarray
protocolstringThe protocol for the listener.
client_affinitystringClient affinity lets you direct all requests from a user to the same endpoint.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAcceleratorArn, PortRanges, Protocol, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all listeners in a region.

SELECT
region,
listener_arn,
accelerator_arn,
port_ranges,
protocol,
client_affinity
FROM aws.globalaccelerator.listeners
;

Gets all properties from an individual listener.

SELECT
region,
listener_arn,
accelerator_arn,
port_ranges,
protocol,
client_affinity
FROM aws.globalaccelerator.listeners
WHERE data__Identifier = '<ListenerArn>';

INSERT example

Use the following StackQL query and manifest file to create a new listener resource, using stack-deploy.

/*+ create */
INSERT INTO aws.globalaccelerator.listeners (
AcceleratorArn,
PortRanges,
Protocol,
region
)
SELECT
'{{ AcceleratorArn }}',
'{{ PortRanges }}',
'{{ Protocol }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.globalaccelerator.listeners
WHERE data__Identifier = '<ListenerArn>'
AND region = 'us-east-1';

Permissions

To operate on the listeners resource, the following permissions are required:

Create

globalaccelerator:CreateListener,
globalaccelerator:DescribeListener,
globalaccelerator:DescribeAccelerator

Read

globalaccelerator:DescribeListener

Update

globalaccelerator:UpdateListener,
globalaccelerator:DescribeListener,
globalaccelerator:DescribeAccelerator

Delete

globalaccelerator:DescribeListener,
globalaccelerator:DeleteListener,
globalaccelerator:DescribeAccelerator

List

globalaccelerator:ListListeners