api_op_DeleteReusableDelegationSet.go (4341B)
1 // Code generated by smithy-go-codegen DO NOT EDIT. 2 3 package route53 4 5 import ( 6 "context" 7 "fmt" 8 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 9 "github.com/aws/smithy-go/middleware" 10 smithyhttp "github.com/aws/smithy-go/transport/http" 11 ) 12 13 // Deletes a reusable delegation set. You can delete a reusable delegation set 14 // only if it isn't associated with any hosted zones. To verify that the reusable 15 // delegation set is not associated with any hosted zones, submit a 16 // GetReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSet.html) 17 // request and specify the ID of the reusable delegation set that you want to 18 // delete. 19 func (c *Client) DeleteReusableDelegationSet(ctx context.Context, params *DeleteReusableDelegationSetInput, optFns ...func(*Options)) (*DeleteReusableDelegationSetOutput, error) { 20 if params == nil { 21 params = &DeleteReusableDelegationSetInput{} 22 } 23 24 result, metadata, err := c.invokeOperation(ctx, "DeleteReusableDelegationSet", params, optFns, c.addOperationDeleteReusableDelegationSetMiddlewares) 25 if err != nil { 26 return nil, err 27 } 28 29 out := result.(*DeleteReusableDelegationSetOutput) 30 out.ResultMetadata = metadata 31 return out, nil 32 } 33 34 // A request to delete a reusable delegation set. 35 type DeleteReusableDelegationSetInput struct { 36 37 // The ID of the reusable delegation set that you want to delete. 38 // 39 // This member is required. 40 Id *string 41 42 noSmithyDocumentSerde 43 } 44 45 // An empty element. 46 type DeleteReusableDelegationSetOutput struct { 47 // Metadata pertaining to the operation's result. 48 ResultMetadata middleware.Metadata 49 50 noSmithyDocumentSerde 51 } 52 53 func (c *Client) addOperationDeleteReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { 54 if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { 55 return err 56 } 57 err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteReusableDelegationSet{}, middleware.After) 58 if err != nil { 59 return err 60 } 61 err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteReusableDelegationSet{}, middleware.After) 62 if err != nil { 63 return err 64 } 65 if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteReusableDelegationSet"); err != nil { 66 return fmt.Errorf("add protocol finalizers: %v", err) 67 } 68 69 if err = addlegacyEndpointContextSetter(stack, options); err != nil { 70 return err 71 } 72 if err = addSetLoggerMiddleware(stack, options); err != nil { 73 return err 74 } 75 if err = addClientRequestID(stack); err != nil { 76 return err 77 } 78 if err = addComputeContentLength(stack); err != nil { 79 return err 80 } 81 if err = addResolveEndpointMiddleware(stack, options); err != nil { 82 return err 83 } 84 if err = addComputePayloadSHA256(stack); err != nil { 85 return err 86 } 87 if err = addRetry(stack, options); err != nil { 88 return err 89 } 90 if err = addRawResponseToMetadata(stack); err != nil { 91 return err 92 } 93 if err = addRecordResponseTiming(stack); err != nil { 94 return err 95 } 96 if err = addClientUserAgent(stack, options); err != nil { 97 return err 98 } 99 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 100 return err 101 } 102 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 103 return err 104 } 105 if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { 106 return err 107 } 108 if err = addOpDeleteReusableDelegationSetValidationMiddleware(stack); err != nil { 109 return err 110 } 111 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReusableDelegationSet(options.Region), middleware.Before); err != nil { 112 return err 113 } 114 if err = addRecursionDetection(stack); err != nil { 115 return err 116 } 117 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 118 return err 119 } 120 if err = addResponseErrorMiddleware(stack); err != nil { 121 return err 122 } 123 if err = addSanitizeURLMiddleware(stack); err != nil { 124 return err 125 } 126 if err = addRequestResponseLogging(stack, options); err != nil { 127 return err 128 } 129 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 130 return err 131 } 132 return nil 133 } 134 135 func newServiceMetadataMiddleware_opDeleteReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata { 136 return &awsmiddleware.RegisterServiceMetadata{ 137 Region: region, 138 ServiceID: ServiceID, 139 OperationName: "DeleteReusableDelegationSet", 140 } 141 }