resource_configurations
Creates, updates, deletes or gets a resource_configuration resource or lists resource_configurations in a region
Overview
| Name | resource_configurations |
| Type | Resource |
| Description | VpcLattice ResourceConfiguration CFN resource |
| Id | awscc.vpclattice.resource_configurations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
allow_association_to_sharable_service_network | boolean | |
protocol_type | string | |
resource_configuration_type | string | |
port_ranges | array | |
resource_configuration_definition | object | |
id | string | |
resource_gateway_id | string | |
arn | string | |
resource_configuration_auth_type | string | |
tags | array | |
name | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::VpcLattice::ResourceConfiguration.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | resource_configurations | INSERT | Name, ResourceConfigurationType, region |
delete_resource | resource_configurations | DELETE | Identifier, region |
update_resource | resource_configurations | UPDATE | Identifier, PatchDocument, region |
list_resources | resource_configurations_list_only | SELECT | region |
get_resource | resource_configurations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual resource_configuration.
SELECT
region,
allow_association_to_sharable_service_network,
protocol_type,
resource_configuration_type,
port_ranges,
resource_configuration_definition,
id,
resource_gateway_id,
arn,
resource_configuration_auth_type,
resource_configuration_group_id,
tags,
name
FROM awscc.vpclattice.resource_configurations
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all resource_configurations in a region.
SELECT
region,
arn
FROM awscc.vpclattice.resource_configurations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new resource_configuration resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.vpclattice.resource_configurations (
ResourceConfigurationType,
Name,
region
)
SELECT
'{{ resource_configuration_type }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.vpclattice.resource_configurations (
AllowAssociationToSharableServiceNetwork,
ProtocolType,
ResourceConfigurationType,
PortRanges,
ResourceConfigurationDefinition,
ResourceGatewayId,
ResourceConfigurationAuthType,
ResourceConfigurationGroupId,
Tags,
Name,
region
)
SELECT
'{{ allow_association_to_sharable_service_network }}',
'{{ protocol_type }}',
'{{ resource_configuration_type }}',
'{{ port_ranges }}',
'{{ resource_configuration_definition }}',
'{{ resource_gateway_id }}',
'{{ resource_configuration_auth_type }}',
'{{ resource_configuration_group_id }}',
'{{ tags }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: resource_configuration
props:
- name: allow_association_to_sharable_service_network
value: '{{ allow_association_to_sharable_service_network }}'
- name: protocol_type
value: '{{ protocol_type }}'
- name: resource_configuration_type
value: '{{ resource_configuration_type }}'
- name: port_ranges
value:
- '{{ port_ranges[0] }}'
- name: resource_configuration_definition
value: {}
- name: resource_gateway_id
value: '{{ resource_gateway_id }}'
- name: resource_configuration_auth_type
value: '{{ resource_configuration_auth_type }}'
- name: resource_configuration_group_id
value: '{{ resource_configuration_group_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: name
value: '{{ name }}'
UPDATE example
Use the following StackQL query and manifest file to update a resource_configuration resource, using stack-deploy.
/*+ update */
UPDATE awscc.vpclattice.resource_configurations
SET PatchDocument = string('{{ {
"AllowAssociationToSharableServiceNetwork": allow_association_to_sharable_service_network,
"PortRanges": port_ranges,
"ResourceConfigurationDefinition": resource_configuration_definition,
"ResourceConfigurationGroupId": resource_configuration_group_id,
"Tags": tags,
"Name": name
} | 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.resource_configurations
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:
| Parameter | Description |
|---|---|
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 resource_configurations resource, the following permissions are required:
- Read
- Create
- Update
- List
- Delete
vpc-lattice:GetResourceConfiguration,
vpc-lattice:ListTagsForResource
ec2:DescribeSubnets,
vpc-lattice:CreateResourceConfiguration,
vpc-lattice:GetResourceConfiguration,
vpc-lattice:TagResource,
vpc-lattice:ListTagsForResource
ec2:DescribeSubnets,
vpc-lattice:TagResource,
vpc-lattice:UntagResource,
vpc-lattice:ListTagsForResource,
vpc-lattice:UpdateResourceConfiguration,
vpc-lattice:GetResourceConfiguration
vpc-lattice:ListResourceConfigurations
vpc-lattice:DeleteResourceConfiguration,
vpc-lattice:GetResourceConfiguration,
vpc-lattice:UntagResource