Skip to main content

services

Creates, updates, deletes or gets a service resource or lists services in a region

Overview

Nameservices
TypeResource
DescriptionA service is any software application that can run on instances containers, or serverless functions within an account or virtual private cloud (VPC).
Idaws.vpclattice.services

Fields

NameDatatypeDescription
arnstring
auth_typestring
created_atstring
dns_entryobject
idstring
last_updated_atstring
namestring
statusstring
certificate_arnstring
custom_domain_namestring
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all services in a region.

SELECT
region,
arn,
auth_type,
created_at,
dns_entry,
id,
last_updated_at,
name,
status,
certificate_arn,
custom_domain_name,
tags
FROM aws.vpclattice.services
WHERE region = 'us-east-1';

Gets all properties from an individual service.

SELECT
region,
arn,
auth_type,
created_at,
dns_entry,
id,
last_updated_at,
name,
status,
certificate_arn,
custom_domain_name,
tags
FROM aws.vpclattice.services
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

/*+ create */
INSERT INTO aws.vpclattice.services (
AuthType,
DnsEntry,
Name,
CertificateArn,
CustomDomainName,
Tags,
region
)
SELECT
'{{ AuthType }}',
'{{ DnsEntry }}',
'{{ Name }}',
'{{ CertificateArn }}',
'{{ CustomDomainName }}',
'{{ Tags }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.vpclattice.services
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

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

Create

vpc-lattice:CreateService,
vpc-lattice:GetService,
vpc-lattice:ListTagsForResource,
vpc-lattice:TagResource,
acm:DescribeCertificate,
acm:ListCertificates,
iam:CreateServiceLinkedRole

Read

vpc-lattice:GetService,
vpc-lattice:ListTagsForResource

Update

vpc-lattice:UpdateService,
vpc-lattice:TagResource,
vpc-lattice:UntagResource,
vpc-lattice:GetService,
vpc-lattice:ListTagsForResource

Delete

vpc-lattice:DeleteService,
vpc-lattice:GetService

List

vpc-lattice:ListServices