Skip to main content

service_networks

Creates, updates, deletes or gets a service_network resource or lists service_networks in a region

Overview

Nameservice_networks
TypeResource
DescriptionA service network is a logical boundary for a collection of services. You can associate services and VPCs with a service network.
Idawscc.vpclattice.service_networks

Fields

NameDatatypeDescription
arnstring
created_atstring
idstring
last_updated_atstring
namestring
auth_typestring
tagsarray
sharing_configobject
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceservice_networksINSERTregion
delete_resourceservice_networksDELETEIdentifier, region
update_resourceservice_networksUPDATEIdentifier, PatchDocument, region
list_resourcesservice_networks_list_onlySELECTregion
get_resourceservice_networksSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.vpclattice.service_networks (
Name,
AuthType,
Tags,
SharingConfig,
region
)
SELECT
'{{ name }}',
'{{ auth_type }}',
'{{ tags }}',
'{{ sharing_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.vpclattice.service_networks
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

vpc-lattice:GetServiceNetwork,
vpc-lattice:ListTagsForResource,
vpc-lattice:CreateServiceNetwork,
vpc-lattice:TagResource,
iam:CreateServiceLinkedRole