service_networks
Creates, updates, deletes or gets a service_network resource or lists service_networks in a region
Overview
| Name | service_networks |
| Type | Resource |
| Description | A service network is a logical boundary for a collection of services. You can associate services and VPCs with a service network. |
| Id | awscc.vpclattice.service_networks |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
created_at | string | |
id | string | |
last_updated_at | string | |
name | string | |
auth_type | string | |
tags | array | |
sharing_config | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::VpcLattice::ServiceNetwork.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | service_networks | INSERT | region |
delete_resource | service_networks | DELETE | Identifier, region |
update_resource | service_networks | UPDATE | Identifier, PatchDocument, region |
list_resources | service_networks_list_only | SELECT | region |
get_resource | service_networks | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual service_network.
SELECT
region,
arn,
created_at,
id,
last_updated_at,
name,
auth_type,
tags,
sharing_config
FROM awscc.vpclattice.service_networks
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all service_networks in a region.
SELECT
region,
arn
FROM awscc.vpclattice.service_networks_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new service_network resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.vpclattice.service_networks (
Name,
AuthType,
Tags,
SharingConfig,
region
)
SELECT
'{{ name }}',
'{{ auth_type }}',
'{{ tags }}',
'{{ sharing_config }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.vpclattice.service_networks (
Name,
AuthType,
Tags,
SharingConfig,
region
)
SELECT
'{{ name }}',
'{{ auth_type }}',
'{{ tags }}',
'{{ sharing_config }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service_network
props:
- name: name
value: '{{ name }}'
- name: auth_type
value: '{{ auth_type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: sharing_config
value:
enabled: '{{ enabled }}'
UPDATE example
Use the following StackQL query and manifest file to update a service_network resource, using stack-deploy.
/*+ update */
UPDATE awscc.vpclattice.service_networks
SET PatchDocument = string('{{ {
"AuthType": auth_type,
"Tags": tags,
"SharingConfig": sharing_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.vpclattice.service_networks
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the service_networks resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
vpc-lattice:GetServiceNetwork,
vpc-lattice:ListTagsForResource,
vpc-lattice:CreateServiceNetwork,
vpc-lattice:TagResource,
iam:CreateServiceLinkedRole
vpc-lattice:GetServiceNetwork,
vpc-lattice:ListTagsForResource
vpc-lattice:GetServiceNetwork,
vpc-lattice:UpdateServiceNetwork,
vpc-lattice:TagResource,
vpc-lattice:UntagResource,
vpc-lattice:ListTagsForResource
vpc-lattice:DeleteServiceNetwork,
vpc-lattice:UntagResource
vpc-lattice:ListServiceNetworks