services
Creates, updates, deletes or gets a service
resource or lists services
in a region
Overview
Name | services |
Type | Resource |
Description | A service is any software application that can run on instances containers, or serverless functions within an account or virtual private cloud (VPC). |
Id | aws.vpclattice.services |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
auth_type | string | |
created_at | string | |
dns_entry | object | |
id | string | |
last_updated_at | string | |
name | string | |
status | string | |
certificate_arn | string | |
custom_domain_name | string | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | 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 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.vpclattice.services (
AuthType,
DnsEntry,
Name,
CertificateArn,
CustomDomainName,
Tags,
region
)
SELECT
'{{ AuthType }}',
'{{ DnsEntry }}',
'{{ Name }}',
'{{ CertificateArn }}',
'{{ CustomDomainName }}',
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.vpclattice.services (
AuthType,
DnsEntry,
Name,
CertificateArn,
CustomDomainName,
Tags,
region
)
SELECT
'{{ AuthType }}',
'{{ DnsEntry }}',
'{{ Name }}',
'{{ CertificateArn }}',
'{{ CustomDomainName }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service
props:
- name: AuthType
value: '{{ AuthType }}'
- name: DnsEntry
value:
DomainName: '{{ DomainName }}'
HostedZoneId: '{{ HostedZoneId }}'
- name: Name
value: '{{ Name }}'
- name: CertificateArn
value: '{{ CertificateArn }}'
- name: CustomDomainName
value: '{{ CustomDomainName }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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