src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

api_op_DeleteVPCAssociationAuthorization.go (3943B)


      1 // Code generated by smithy-go-codegen DO NOT EDIT.
      2 
      3 package route53
      4 
      5 import (
      6 	"context"
      7 
      8 	"github.com/aws/aws-sdk-go-v2/service/route53/types"
      9 	"github.com/aws/smithy-go/middleware"
     10 )
     11 
     12 // Removes authorization to submit an AssociateVPCWithHostedZone request to
     13 // associate a specified VPC with a hosted zone that was created by a different
     14 // account. You must use the account that created the hosted zone to submit a
     15 // DeleteVPCAssociationAuthorization request.
     16 //
     17 // Sending this request only prevents the Amazon Web Services account that created
     18 // the VPC from associating the VPC with the Amazon Route 53 hosted zone in the
     19 // future. If the VPC is already associated with the hosted zone,
     20 // DeleteVPCAssociationAuthorization won't disassociate the VPC from the hosted
     21 // zone. If you want to delete an existing association, use
     22 // DisassociateVPCFromHostedZone .
     23 func (c *Client) DeleteVPCAssociationAuthorization(ctx context.Context, params *DeleteVPCAssociationAuthorizationInput, optFns ...func(*Options)) (*DeleteVPCAssociationAuthorizationOutput, error) {
     24 	if params == nil {
     25 		params = &DeleteVPCAssociationAuthorizationInput{}
     26 	}
     27 
     28 	result, metadata, err := c.invokeOperation(ctx, "DeleteVPCAssociationAuthorization", params, optFns, c.addOperationDeleteVPCAssociationAuthorizationMiddlewares)
     29 	if err != nil {
     30 		return nil, err
     31 	}
     32 
     33 	out := result.(*DeleteVPCAssociationAuthorizationOutput)
     34 	out.ResultMetadata = metadata
     35 	return out, nil
     36 }
     37 
     38 // A complex type that contains information about the request to remove
     39 // authorization to associate a VPC that was created by one Amazon Web Services
     40 // account with a hosted zone that was created with a different Amazon Web Services
     41 // account.
     42 type DeleteVPCAssociationAuthorizationInput struct {
     43 
     44 	// When removing authorization to associate a VPC that was created by one Amazon
     45 	// Web Services account with a hosted zone that was created with a different Amazon
     46 	// Web Services account, the ID of the hosted zone.
     47 	//
     48 	// This member is required.
     49 	HostedZoneId *string
     50 
     51 	// When removing authorization to associate a VPC that was created by one Amazon
     52 	// Web Services account with a hosted zone that was created with a different Amazon
     53 	// Web Services account, a complex type that includes the ID and region of the VPC.
     54 	//
     55 	// This member is required.
     56 	VPC *types.VPC
     57 
     58 	noSmithyDocumentSerde
     59 }
     60 
     61 // Empty response for the request.
     62 type DeleteVPCAssociationAuthorizationOutput struct {
     63 	// Metadata pertaining to the operation's result.
     64 	ResultMetadata middleware.Metadata
     65 
     66 	noSmithyDocumentSerde
     67 }
     68 
     69 func (c *Client) addOperationDeleteVPCAssociationAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
     70 	err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteVPCAssociationAuthorization{}, middleware.After)
     71 	if err != nil {
     72 		return err
     73 	}
     74 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteVPCAssociationAuthorization{}, middleware.After)
     75 	if err != nil {
     76 		return err
     77 	}
     78 
     79 	if err = addComputeContentLength(stack); err != nil {
     80 		return err
     81 	}
     82 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
     83 		return err
     84 	}
     85 	if err = addComputePayloadSHA256(stack); err != nil {
     86 		return err
     87 	}
     88 	if err = addRecordResponseTiming(stack, options); err != nil {
     89 		return err
     90 	}
     91 	if err = addCredentialSource(stack, options); err != nil {
     92 		return err
     93 	}
     94 	if err = addOpDeleteVPCAssociationAuthorizationValidationMiddleware(stack); err != nil {
     95 		return err
     96 	}
     97 	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
     98 		return err
     99 	}
    100 	if err = addResponseErrorMiddleware(stack); err != nil {
    101 		return err
    102 	}
    103 	if err = addSanitizeURLMiddleware(stack); err != nil {
    104 		return err
    105 	}
    106 	if err = addRequestResponseLogging(stack, options); err != nil {
    107 		return err
    108 	}
    109 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
    110 		return err
    111 	}
    112 	if err = addInterceptors(stack, options); err != nil {
    113 		return err
    114 	}
    115 	return nil
    116 }