vpc_association_authorizations
Creates, updates, deletes, gets or lists a vpc_association_authorizations resource.
Overview
| Name | vpc_association_authorizations |
| Type | Resource |
| Id | aws.route53.vpc_association_authorizations |
Fields
The following fields are returned by SELECT queries:
- list_vpc_association_authorizations
| Name | Datatype | Description |
|---|---|---|
vpc_id | string | (Private hosted zones only) The ID of an Amazon VPC. |
vpc_region | string | (Private hosted zones only) The region that an Amazon VPC was created in. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_vpc_association_authorizations | select | id, region | nexttoken, maxresults | Gets a list of the VPCs that were created by other accounts and that can be associated with a specified hosted zone because you've submitted one or more CreateVPCAssociationAuthorization requests. The response includes a VPCs element with a VPC child element for each VPC that can be associated with the hosted zone. |
create_vpc_association_authorization | insert | id, region | Authorizes the Amazon Web Services account that created a specified VPC to submit an AssociateVPCWithHostedZone request to associate the VPC with a specified hosted zone that was created by a different account. To submit a CreateVPCAssociationAuthorization request, you must use the account that created the hosted zone. After you authorize the association, use the account that created the VPC to submit an AssociateVPCWithHostedZone request. If you want to associate multiple VPCs that you created by using one account with a hosted zone that you created by using a different account, you must submit one authorization request for each VPC. | |
delete_vpc_association_authorization | delete | id, region | Removes authorization to submit an AssociateVPCWithHostedZone request to associate a specified VPC with a hosted zone that was created by a different account. You must use the account that created the hosted zone to submit a DeleteVPCAssociationAuthorization request. Sending this request only prevents the Amazon Web Services account that created the VPC from associating the VPC with the Amazon Route 53 hosted zone in the future. If the VPC is already associated with the hosted zone, DeleteVPCAssociationAuthorization won't disassociate the VPC from the hosted zone. If you want to delete an existing association, use DisassociateVPCFromHostedZone. |
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 |
|---|---|---|
id | string | When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone. |
region | string | AWS region (default: us-east-1) |
maxresults | string | Optional: An integer that specifies the maximum number of VPCs that you want Amazon Route 53 to return. If you don't specify a value for MaxResults, Route 53 returns up to 50 VPCs per page. |
nexttoken | string | Optional: If a response includes a NextToken element, there are more VPCs that can be associated with the specified hosted zone. To get the next page of results, submit another request, and include the value of NextToken from the response in the nexttoken parameter in another ListVPCAssociationAuthorizations request. |
SELECT examples
- list_vpc_association_authorizations
Gets a list of the VPCs that were created by other accounts and that can be associated with a specified hosted zone because you've submitted one or more CreateVPCAssociationAuthorization requests. The response includes a VPCs element with a VPC child element for each VPC that can be associated with the hosted zone.
SELECT
vpc_id,
vpc_region
FROM aws.route53.vpc_association_authorizations
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
AND nexttoken = '{{ nexttoken }}'
AND maxresults = '{{ maxresults }}'
;
INSERT examples
- create_vpc_association_authorization
- Manifest
Authorizes the Amazon Web Services account that created a specified VPC to submit an AssociateVPCWithHostedZone request to associate the VPC with a specified hosted zone that was created by a different account. To submit a CreateVPCAssociationAuthorization request, you must use the account that created the hosted zone. After you authorize the association, use the account that created the VPC to submit an AssociateVPCWithHostedZone request. If you want to associate multiple VPCs that you created by using one account with a hosted zone that you created by using a different account, you must submit one authorization request for each VPC.
INSERT INTO aws.route53.vpc_association_authorizations (
VPC,
id,
region
)
SELECT
'{{ VPC }}',
'{{ id }}',
'{{ region }}'
RETURNING
hosted_zone_id,
vpc
;
# Description fields are for documentation purposes
- name: vpc_association_authorizations
props:
- name: id
value: "{{ id }}"
description: Required parameter for the vpc_association_authorizations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the vpc_association_authorizations resource.
- name: VPC
description: |
(Private hosted zones only) A complex type that contains information about an Amazon VPC. If you associate a private hosted zone with an Amazon VPC when you make a CreateHostedZone request, the following parameters are also required.
value:
VPCRegion: "{{ VPCRegion }}"
VPCId: "{{ VPCId }}"
DELETE examples
- delete_vpc_association_authorization
Removes authorization to submit an AssociateVPCWithHostedZone request to associate a specified VPC with a hosted zone that was created by a different account. You must use the account that created the hosted zone to submit a DeleteVPCAssociationAuthorization request. Sending this request only prevents the Amazon Web Services account that created the VPC from associating the VPC with the Amazon Route 53 hosted zone in the future. If the VPC is already associated with the hosted zone, DeleteVPCAssociationAuthorization won't disassociate the VPC from the hosted zone. If you want to delete an existing association, use DisassociateVPCFromHostedZone.
DELETE FROM aws.route53.vpc_association_authorizations
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;