service_network_service_associations
Creates, updates, deletes, gets or lists a service_network_service_associations resource.
Overview
| Name | service_network_service_associations |
| Type | Resource |
| Id | aws.vpc_lattice.service_network_service_associations |
Fields
The following fields are returned by SELECT queries:
- get_service_network_service_association
- list_service_network_service_associations
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the service network and service association. (pattern: <code>((snsa-[0-9a-z]{17})|(arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}))</code>) |
arn | string | The Amazon Resource Name (ARN) of the association. (pattern: <code>arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}</code>) |
created_at | string (date-time) | The date and time that the association was created, in ISO-8601 format. |
created_by | string | The account that created the association. (pattern: <code>[0-9]{12}</code>) |
custom_domain_name | string | The custom domain name of the service. |
dns_entry | object | The DNS name of the service. |
failure_code | string | The failure code. |
failure_message | string | The failure message. |
service_arn | string | The Amazon Resource Name (ARN) of the service. (pattern: <code>arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:service/svc-[0-9a-z]{17}</code>) |
service_id | string | The ID of the service. (pattern: <code>svc-[0-9a-z]{17}</code>) |
service_name | string | The name of the service. (pattern: <code>(?!svc-)(?![-])(?!.[-]$)(?!.[-]{2})[a-z0-9-]+</code>) |
service_network_arn | string | The Amazon Resource Name (ARN) of the service network. (pattern: <code>arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:servicenetwork/sn-[0-9a-z]{17}</code>) |
service_network_id | string | The ID of the service network. (pattern: <code>sn-[0-9a-z]{17}</code>) |
service_network_name | string | The name of the service network. (pattern: <code>(?![-])(?!.[-]$)(?!.[-]{2})[a-z0-9-]+</code>) |
status | string | The status of the association. (CREATE_IN_PROGRESS, ACTIVE, DELETE_IN_PROGRESS, CREATE_FAILED, DELETE_FAILED) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the association. (pattern: <code>((snsa-[0-9a-z]{17})|(arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}))</code>) |
arn | string | The Amazon Resource Name (ARN) of the association. (pattern: <code>arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}</code>) |
created_at | string (date-time) | The date and time that the association was created, in ISO-8601 format. |
created_by | string | The account that created the association. (pattern: <code>[0-9]{12}</code>) |
custom_domain_name | string | The custom domain name of the service. |
dns_entry | object | The DNS information. |
service_arn | string | The Amazon Resource Name (ARN) of the service. (pattern: <code>arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:service/svc-[0-9a-z]{17}</code>) |
service_id | string | The ID of the service. (pattern: <code>svc-[0-9a-z]{17}</code>) |
service_name | string | The name of the service. (pattern: <code>(?!svc-)(?![-])(?!.[-]$)(?!.[-]{2})[a-z0-9-]+</code>) |
service_network_arn | string | The Amazon Resource Name (ARN) of the service network. (pattern: <code>arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:servicenetwork/sn-[0-9a-z]{17}</code>) |
service_network_id | string | The ID of the service network. (pattern: <code>sn-[0-9a-z]{17}</code>) |
service_network_name | string | The name of the service network. (pattern: <code>(?![-])(?!.[-]$)(?!.[-]{2})[a-z0-9-]+</code>) |
status | string | The status of the service network’s association with the service. If the deletion fails, try to delete again. (CREATE_IN_PROGRESS, ACTIVE, DELETE_IN_PROGRESS, CREATE_FAILED, DELETE_FAILED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_service_network_service_association | select | service_network_service_association_identifier, region | Retrieves information about the specified association between a service network and a service. | |
list_service_network_service_associations | select | region | serviceNetworkIdentifier, serviceIdentifier, maxResults, nextToken | Lists the associations between a service network and a service. You can filter the list either by service or service network. You must provide either the service network identifier or the service identifier. Every association in Amazon VPC Lattice has a unique Amazon Resource Name (ARN), such as when a service network is associated with a VPC or when a service is associated with a service network. If the association is for a resource is shared with another account, the association includes the local account ID as the prefix in the ARN. |
create_service_network_service_association | insert | region, serviceIdentifier, serviceNetworkIdentifier | Associates the specified service with the specified service network. For more information, see Manage service associations in the Amazon VPC Lattice User Guide. You can't use this operation if the service and service network are already associated or if there is a disassociation or deletion in progress. If the association fails, you can retry the operation by deleting the association and recreating it. You cannot associate a service and service network that are shared with a caller. The caller must own either the service or the service network. As a result of this operation, the association is created in the service network account and the association owner account. | |
delete_service_network_service_association | delete | service_network_service_association_identifier, region | Deletes the association between a service and a service network. This operation fails if an association is still in progress. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
service_network_service_association_identifier | string | The ID or ARN of the association. |
maxResults | integer | The maximum number of results to return. |
nextToken | string | A pagination token for the next page of results. |
serviceIdentifier | string | The ID or ARN of the service. |
serviceNetworkIdentifier | string | The ID or ARN of the service network. |
SELECT examples
- get_service_network_service_association
- list_service_network_service_associations
Retrieves information about the specified association between a service network and a service.
SELECT
id,
arn,
created_at,
created_by,
custom_domain_name,
dns_entry,
failure_code,
failure_message,
service_arn,
service_id,
service_name,
service_network_arn,
service_network_id,
service_network_name,
status
FROM aws.vpc_lattice.service_network_service_associations
WHERE service_network_service_association_identifier = '{{ service_network_service_association_identifier }}' -- required
AND region = '{{ region }}' -- required
;
Lists the associations between a service network and a service. You can filter the list either by service or service network. You must provide either the service network identifier or the service identifier. Every association in Amazon VPC Lattice has a unique Amazon Resource Name (ARN), such as when a service network is associated with a VPC or when a service is associated with a service network. If the association is for a resource is shared with another account, the association includes the local account ID as the prefix in the ARN.
SELECT
id,
arn,
created_at,
created_by,
custom_domain_name,
dns_entry,
service_arn,
service_id,
service_name,
service_network_arn,
service_network_id,
service_network_name,
status
FROM aws.vpc_lattice.service_network_service_associations
WHERE region = '{{ region }}' -- required
AND serviceNetworkIdentifier = '{{ serviceNetworkIdentifier }}'
AND serviceIdentifier = '{{ serviceIdentifier }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_service_network_service_association
- Manifest
Associates the specified service with the specified service network. For more information, see Manage service associations in the Amazon VPC Lattice User Guide. You can't use this operation if the service and service network are already associated or if there is a disassociation or deletion in progress. If the association fails, you can retry the operation by deleting the association and recreating it. You cannot associate a service and service network that are shared with a caller. The caller must own either the service or the service network. As a result of this operation, the association is created in the service network account and the association owner account.
INSERT INTO aws.vpc_lattice.service_network_service_associations (
clientToken,
serviceIdentifier,
serviceNetworkIdentifier,
tags,
region
)
SELECT
'{{ clientToken }}',
'{{ serviceIdentifier }}' /* required */,
'{{ serviceNetworkIdentifier }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
id,
arn,
created_by,
custom_domain_name,
dns_entry,
status
;
# Description fields are for documentation purposes
- name: service_network_service_associations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the service_network_service_associations resource.
- name: clientToken
value: "{{ clientToken }}"
- name: serviceIdentifier
value: "{{ serviceIdentifier }}"
- name: serviceNetworkIdentifier
value: "{{ serviceNetworkIdentifier }}"
- name: tags
value: "{{ tags }}"
DELETE examples
- delete_service_network_service_association
Deletes the association between a service and a service network. This operation fails if an association is still in progress.
DELETE FROM aws.vpc_lattice.service_network_service_associations
WHERE service_network_service_association_identifier = '{{ service_network_service_association_identifier }}' --required
AND region = '{{ region }}' --required
;