Skip to main content

listeners

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

Overview

Namelisteners
TypeResource
DescriptionCreates a listener for a service. Before you start using your Amazon VPC Lattice service, you must add one or more listeners. A listener is a process that checks for connection requests to your services.
Idawscc.vpclattice.listeners

Fields

NameDatatypeDescription
arnstring
default_actionobject
idstring
namestring
portinteger
protocolstring
service_arnstring
service_idstring
service_identifierstring
tagsarray
regionstringAWS region.

For more information, see AWS::VpcLattice::Listener.

Methods

NameResourceAccessible byRequired Params
create_resourcelistenersINSERTDefaultAction, Protocol, region
delete_resourcelistenersDELETEIdentifier, region
update_resourcelistenersUPDATEIdentifier, PatchDocument, region
list_resourceslisteners_list_onlySELECTregion
get_resourcelistenersSELECTIdentifier, region

SELECT examples

Gets all properties from an individual listener.

SELECT
region,
arn,
default_action,
id,
name,
port,
protocol,
service_arn,
service_id,
service_identifier,
tags
FROM awscc.vpclattice.listeners
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.vpclattice.listeners (
DefaultAction,
Protocol,
region
)
SELECT
'{{ default_action }}',
'{{ protocol }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.vpclattice.listeners
SET PatchDocument = string('{{ {
"DefaultAction": default_action,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.vpclattice.listeners
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

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

vpc-lattice:CreateListener,
vpc-lattice:TagResource,
vpc-lattice:GetListener,
vpc-lattice:ListTagsForResource