service_network_resource_associations
Creates, updates, deletes or gets a service_network_resource_association resource or lists service_network_resource_associations in a region
Overview
| Name | service_network_resource_associations |
| Type | Resource |
| Description | VpcLattice ServiceNetworkResourceAssociation CFN resource |
| Id | awscc.vpclattice.service_network_resource_associations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | |
arn | string | |
resource_configuration_id | string | |
service_network_id | string | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::VpcLattice::ServiceNetworkResourceAssociation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | service_network_resource_associations | INSERT | region |
delete_resource | service_network_resource_associations | DELETE | Identifier, region |
update_resource | service_network_resource_associations | UPDATE | Identifier, PatchDocument, region |
list_resources | service_network_resource_associations_list_only | SELECT | region |
get_resource | service_network_resource_associations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual service_network_resource_association.
SELECT
region,
id,
arn,
resource_configuration_id,
service_network_id,
tags
FROM awscc.vpclattice.service_network_resource_associations
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all service_network_resource_associations in a region.
SELECT
region,
arn
FROM awscc.vpclattice.service_network_resource_associations_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new service_network_resource_association resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.vpclattice.service_network_resource_associations (
ResourceConfigurationId,
ServiceNetworkId,
Tags,
region
)
SELECT
'{{ resource_configuration_id }}',
'{{ service_network_id }}',
'{{ tags }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.vpclattice.service_network_resource_associations (
ResourceConfigurationId,
ServiceNetworkId,
Tags,
region
)
SELECT
'{{ resource_configuration_id }}',
'{{ service_network_id }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service_network_resource_association
props:
- name: resource_configuration_id
value: '{{ resource_configuration_id }}'
- name: service_network_id
value: '{{ service_network_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a service_network_resource_association resource, using stack-deploy.
/*+ update */
UPDATE awscc.vpclattice.service_network_resource_associations
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.vpclattice.service_network_resource_associations
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the service_network_resource_associations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
vpc-lattice:CreateServiceNetworkResourceAssociation,
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:TagResource,
vpc-lattice:ListTagsForResource
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:ListTagsForResource
vpc-lattice:TagResource,
vpc-lattice:UntagResource,
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:ListTagsForResource
vpc-lattice:DeleteServiceNetworkResourceAssociation,
vpc-lattice:GetServiceNetworkResourceAssociation,
vpc-lattice:UntagResource
vpc-lattice:ListServiceNetworkResourceAssociations