1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package rds
4
5import (
6	"context"
7	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
8	"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
9	"github.com/aws/smithy-go/middleware"
10	smithyhttp "github.com/aws/smithy-go/transport/http"
11)
12
13// Deletes a custom endpoint and removes it from an Amazon Aurora DB cluster. This
14// action only applies to Aurora DB clusters.
15func (c *Client) DeleteDBClusterEndpoint(ctx context.Context, params *DeleteDBClusterEndpointInput, optFns ...func(*Options)) (*DeleteDBClusterEndpointOutput, error) {
16	if params == nil {
17		params = &DeleteDBClusterEndpointInput{}
18	}
19
20	result, metadata, err := c.invokeOperation(ctx, "DeleteDBClusterEndpoint", params, optFns, addOperationDeleteDBClusterEndpointMiddlewares)
21	if err != nil {
22		return nil, err
23	}
24
25	out := result.(*DeleteDBClusterEndpointOutput)
26	out.ResultMetadata = metadata
27	return out, nil
28}
29
30type DeleteDBClusterEndpointInput struct {
31
32	// The identifier associated with the custom endpoint. This parameter is stored as
33	// a lowercase string.
34	//
35	// This member is required.
36	DBClusterEndpointIdentifier *string
37}
38
39// This data type represents the information you need to connect to an Amazon
40// Aurora DB cluster. This data type is used as a response element in the following
41// actions:
42//
43// * CreateDBClusterEndpoint
44//
45// * DescribeDBClusterEndpoints
46//
47// *
48// ModifyDBClusterEndpoint
49//
50// * DeleteDBClusterEndpoint
51//
52// For the data structure that
53// represents Amazon RDS DB instance endpoints, see Endpoint.
54type DeleteDBClusterEndpointOutput struct {
55
56	// The type associated with a custom endpoint. One of: READER, WRITER, ANY.
57	CustomEndpointType *string
58
59	// The Amazon Resource Name (ARN) for the endpoint.
60	DBClusterEndpointArn *string
61
62	// The identifier associated with the endpoint. This parameter is stored as a
63	// lowercase string.
64	DBClusterEndpointIdentifier *string
65
66	// A unique system-generated identifier for an endpoint. It remains the same for
67	// the whole life of the endpoint.
68	DBClusterEndpointResourceIdentifier *string
69
70	// The DB cluster identifier of the DB cluster associated with the endpoint. This
71	// parameter is stored as a lowercase string.
72	DBClusterIdentifier *string
73
74	// The DNS address of the endpoint.
75	Endpoint *string
76
77	// The type of the endpoint. One of: READER, WRITER, CUSTOM.
78	EndpointType *string
79
80	// List of DB instance identifiers that aren't part of the custom endpoint group.
81	// All other eligible instances are reachable through the custom endpoint. Only
82	// relevant if the list of static members is empty.
83	ExcludedMembers []string
84
85	// List of DB instance identifiers that are part of the custom endpoint group.
86	StaticMembers []string
87
88	// The current status of the endpoint. One of: creating, available, deleting,
89	// inactive, modifying. The inactive state applies to an endpoint that can't be
90	// used for a certain kind of cluster, such as a writer endpoint for a read-only
91	// secondary cluster in a global database.
92	Status *string
93
94	// Metadata pertaining to the operation's result.
95	ResultMetadata middleware.Metadata
96}
97
98func addOperationDeleteDBClusterEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
99	err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteDBClusterEndpoint{}, middleware.After)
100	if err != nil {
101		return err
102	}
103	err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteDBClusterEndpoint{}, middleware.After)
104	if err != nil {
105		return err
106	}
107	if err = addSetLoggerMiddleware(stack, options); err != nil {
108		return err
109	}
110	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
111		return err
112	}
113	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
114		return err
115	}
116	if err = addResolveEndpointMiddleware(stack, options); err != nil {
117		return err
118	}
119	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
120		return err
121	}
122	if err = addRetryMiddlewares(stack, options); err != nil {
123		return err
124	}
125	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
126		return err
127	}
128	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
129		return err
130	}
131	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
132		return err
133	}
134	if err = addClientUserAgent(stack); err != nil {
135		return err
136	}
137	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
138		return err
139	}
140	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
141		return err
142	}
143	if err = addOpDeleteDBClusterEndpointValidationMiddleware(stack); err != nil {
144		return err
145	}
146	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDBClusterEndpoint(options.Region), middleware.Before); err != nil {
147		return err
148	}
149	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
150		return err
151	}
152	if err = addResponseErrorMiddleware(stack); err != nil {
153		return err
154	}
155	if err = addRequestResponseLogging(stack, options); err != nil {
156		return err
157	}
158	return nil
159}
160
161func newServiceMetadataMiddleware_opDeleteDBClusterEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
162	return &awsmiddleware.RegisterServiceMetadata{
163		Region:        region,
164		ServiceID:     ServiceID,
165		SigningName:   "rds",
166		OperationName: "DeleteDBClusterEndpoint",
167	}
168}
169