listeners
Creates, updates, deletes or gets a listener
resource or lists listeners
in a region
Overview
Name | listeners |
Type | Resource |
Description | Resource Type definition for AWS::GlobalAccelerator::Listener |
Id | aws.globalaccelerator.listeners |
Fields
Name | Datatype | Description |
---|---|---|
listener_arn | string | The Amazon Resource Name (ARN) of the listener. |
accelerator_arn | string | The Amazon Resource Name (ARN) of the accelerator. |
port_ranges | array | |
protocol | string | The protocol for the listener. |
client_affinity | string | Client affinity lets you direct all requests from a user to the same endpoint. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | AcceleratorArn, PortRanges, Protocol, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.globalaccelerator.listeners (
AcceleratorArn,
PortRanges,
Protocol,
region
)
SELECT
'{{ AcceleratorArn }}',
'{{ PortRanges }}',
'{{ Protocol }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.globalaccelerator.listeners (
AcceleratorArn,
PortRanges,
Protocol,
ClientAffinity,
region
)
SELECT
'{{ AcceleratorArn }}',
'{{ PortRanges }}',
'{{ Protocol }}',
'{{ ClientAffinity }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: listener
props:
- name: AcceleratorArn
value: '{{ AcceleratorArn }}'
- name: PortRanges
value:
- FromPort: '{{ FromPort }}'
ToPort: null
- name: Protocol
value: '{{ Protocol }}'
- name: ClientAffinity
value: '{{ ClientAffinity }}'
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