Skip to main content

vpc_association_authorizations

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

Overview

Namevpc_association_authorizations
TypeResource
Idaws.route53.vpc_association_authorizations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
vpc_idstring(Private hosted zones only) The ID of an Amazon VPC.
vpc_regionstring(Private hosted zones only) The region that an Amazon VPC was created in.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_vpc_association_authorizationsselectid, regionnexttoken, maxresultsGets 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_authorizationinsertid, regionAuthorizes 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_authorizationdeleteid, regionRemoves 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.

NameDatatypeDescription
idstringWhen 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.
regionstringAWS region (default: us-east-1)
maxresultsstringOptional: 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.
nexttokenstringOptional: 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

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

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
;

DELETE examples

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
;