Skip to main content

service_network_resource_associations

Creates, updates, deletes, gets or lists a service_network_resource_associations resource.

Overview

Nameservice_network_resource_associations
TypeResource
Idaws.vpc_lattice.service_network_resource_associations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the association. (pattern: <code>snra-[0-9a-f]{17}</code>)
arnstringThe Amazon Resource Name (ARN) of the association. (pattern: <code>arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:servicenetworkresourceassociation/snra-[0-9a-f]{17}</code>)
created_atstring (date-time)The date and time that the association was created, in ISO-8601 format.
created_bystringThe account that created the association. (pattern: <code>[0-9]{12}</code>)
dns_entryobjectThe DNS entry for the service.
domain_verification_statusstringThe domain verification status in the service network resource association. (VERIFIED, PENDING, VERIFICATION_TIMED_OUT)
failure_codestringThe failure code.
failure_reasonstringThe reason the association request failed.
is_managed_associationbooleanIndicates whether the association is managed by Amazon.
last_updated_atstring (date-time)The most recent date and time that the association was updated, in ISO-8601 format.
private_dns_enabledbooleanIndicates if private DNS is enabled in the service network resource association.
private_dns_entryobjectThe private DNS entry for the service.
resource_configuration_arnstringThe Amazon Resource Name (ARN) of the association. (pattern: <code>arn:[a-z0-9f-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}</code>)
resource_configuration_idstringThe ID of the resource configuration that is associated with the service network. (pattern: <code>rcfg-[0-9a-z]{17}</code>)
resource_configuration_namestringThe name of the resource configuration that is associated with the service network. (pattern: <code>(?!rcfg-)(?![-])(?!.[-]$)(?!.[-]{2})[a-z0-9-]+</code>)
service_network_arnstringThe Amazon Resource Name (ARN) of the service network that is associated with the resource configuration.
service_network_idstringThe ID of the service network that is associated with the resource configuration.
service_network_namestringThe name of the service network that is associated with the resource configuration.
statusstringThe status of the association. (CREATE_IN_PROGRESS, ACTIVE, PARTIAL, DELETE_IN_PROGRESS, CREATE_FAILED, DELETE_FAILED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_service_network_resource_associationselectservice_network_resource_association_identifier, regionRetrieves information about the specified association between a service network and a resource configuration.
list_service_network_resource_associationsselectregionserviceNetworkIdentifier, resourceConfigurationIdentifier, maxResults, nextToken, includeChildrenLists the associations between a service network and a resource configuration.
create_service_network_resource_associationinsertregion, resourceConfigurationIdentifier, serviceNetworkIdentifierAssociates the specified service network with the specified resource configuration. This allows the resource configuration to receive connections through the service network, including through a service network VPC endpoint.
delete_service_network_resource_associationdeleteservice_network_resource_association_identifier, regionDeletes the association between a service network and a resource configuration.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
service_network_resource_association_identifierstringThe ID of the association.
includeChildrenbooleanInclude service network resource associations of the child resource configuration with the grouped resource configuration. The type is boolean and the default value is false.
maxResultsintegerThe maximum page size.
nextTokenstringIf there are additional results, a pagination token for the next page of results.
resourceConfigurationIdentifierstringThe ID of the resource configuration.
serviceNetworkIdentifierstringThe ID of the service network.

SELECT examples

Retrieves information about the specified association between a service network and a resource configuration.

SELECT
id,
arn,
created_at,
created_by,
dns_entry,
domain_verification_status,
failure_code,
failure_reason,
is_managed_association,
last_updated_at,
private_dns_enabled,
private_dns_entry,
resource_configuration_arn,
resource_configuration_id,
resource_configuration_name,
service_network_arn,
service_network_id,
service_network_name,
status
FROM aws.vpc_lattice.service_network_resource_associations
WHERE service_network_resource_association_identifier = '{{ service_network_resource_association_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Associates the specified service network with the specified resource configuration. This allows the resource configuration to receive connections through the service network, including through a service network VPC endpoint.

INSERT INTO aws.vpc_lattice.service_network_resource_associations (
clientToken,
resourceConfigurationIdentifier,
serviceNetworkIdentifier,
privateDnsEnabled,
tags,
region
)
SELECT
'{{ clientToken }}',
'{{ resourceConfigurationIdentifier }}' /* required */,
'{{ serviceNetworkIdentifier }}' /* required */,
{{ privateDnsEnabled }},
'{{ tags }}',
'{{ region }}'
RETURNING
id,
arn,
created_by,
private_dns_enabled,
status
;

DELETE examples

Deletes the association between a service network and a resource configuration.

DELETE FROM aws.vpc_lattice.service_network_resource_associations
WHERE service_network_resource_association_identifier = '{{ service_network_resource_association_identifier }}' --required
AND region = '{{ region }}' --required
;