-
Notifications
You must be signed in to change notification settings - Fork 3
/
resolver_rule.go
139 lines (131 loc) · 6.67 KB
/
resolver_rule.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file accompanying this file. This file is distributed
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.
// Code generated by ack-generate. DO NOT EDIT.
package v1alpha1
import (
ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ResolverRuleSpec defines the desired state of ResolverRule.
//
// For queries that originate in your VPC, detailed information about a Resolver
// rule, which specifies how to route DNS queries out of the VPC. The ResolverRule
// parameter appears in the response to a CreateResolverRule (https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverRule.html),
// DeleteResolverRule (https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_DeleteResolverRule.html),
// GetResolverRule (https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverRule.html),
// ListResolverRules (https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html),
// or UpdateResolverRule (https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_UpdateResolverRule.html)
// request.
type ResolverRuleSpec struct {
Associations []*ResolverRuleAssociation `json:"associations,omitempty"`
// DNS queries for this domain name are forwarded to the IP addresses that you
// specify in TargetIps. If a query matches multiple Resolver rules (example.com
// and www.example.com), outbound DNS queries are routed using the Resolver
// rule that contains the most specific domain name (www.example.com).
// +kubebuilder:validation:Required
DomainName *string `json:"domainName"`
// A friendly name that lets you easily find a rule in the Resolver dashboard
// in the Route 53 console.
Name *string `json:"name,omitempty"`
// The ID of the outbound Resolver endpoint that you want to use to route DNS
// queries to the IP addresses that you specify in TargetIps.
ResolverEndpointID *string `json:"resolverEndpointID,omitempty"`
// When you want to forward DNS queries for specified domain name to resolvers
// on your network, specify FORWARD.
//
// When you have a forwarding rule to forward DNS queries for a domain to your
// network and you want Resolver to process queries for a subdomain of that
// domain, specify SYSTEM.
//
// For example, to forward DNS queries for example.com to resolvers on your
// network, you create a rule and specify FORWARD for RuleType. To then have
// Resolver process queries for apex.example.com, you create a rule and specify
// SYSTEM for RuleType.
//
// Currently, only Resolver can create rules that have a value of RECURSIVE
// for RuleType.
// +kubebuilder:validation:Required
RuleType *string `json:"ruleType"`
// A list of the tag keys and values that you want to associate with the endpoint.
Tags []*Tag `json:"tags,omitempty"`
// The IPs that you want Resolver to forward DNS queries to. You can specify
// only IPv4 addresses. Separate IP addresses with a space.
//
// TargetIps is available only when the value of Rule type is FORWARD.
TargetIPs []*TargetAddress `json:"targetIPs,omitempty"`
}
// ResolverRuleStatus defines the observed state of ResolverRule
type ResolverRuleStatus struct {
// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
// that is used to contain resource sync state, account ownership,
// constructed ARN for the resource
// +kubebuilder:validation:Optional
ACKResourceMetadata *ackv1alpha1.ResourceMetadata `json:"ackResourceMetadata"`
// All CRS managed by ACK have a common `Status.Conditions` member that
// contains a collection of `ackv1alpha1.Condition` objects that describe
// the various terminal states of the CR and its backend AWS service API
// resource
// +kubebuilder:validation:Optional
Conditions []*ackv1alpha1.Condition `json:"conditions"`
// The date and time that the Resolver rule was created, in Unix time format
// and Coordinated Universal Time (UTC).
// +kubebuilder:validation:Optional
CreationTime *string `json:"creationTime,omitempty"`
// A unique string that you specified when you created the Resolver rule. CreatorRequestId
// identifies the request and allows failed requests to be retried without the
// risk of running the operation twice.
// +kubebuilder:validation:Optional
CreatorRequestID *string `json:"creatorRequestID"`
// The ID that Resolver assigned to the Resolver rule when you created it.
// +kubebuilder:validation:Optional
ID *string `json:"id,omitempty"`
// The date and time that the Resolver rule was last updated, in Unix time format
// and Coordinated Universal Time (UTC).
// +kubebuilder:validation:Optional
ModificationTime *string `json:"modificationTime,omitempty"`
// When a rule is shared with another Amazon Web Services account, the account
// ID of the account that the rule is shared with.
// +kubebuilder:validation:Optional
OwnerID *string `json:"ownerID,omitempty"`
// Whether the rule is shared and, if so, whether the current account is sharing
// the rule with another account, or another account is sharing the rule with
// the current account.
// +kubebuilder:validation:Optional
ShareStatus *string `json:"shareStatus,omitempty"`
// A code that specifies the current status of the Resolver rule.
// +kubebuilder:validation:Optional
Status *string `json:"status,omitempty"`
// A detailed description of the status of a Resolver rule.
// +kubebuilder:validation:Optional
StatusMessage *string `json:"statusMessage,omitempty"`
}
// ResolverRule is the Schema for the ResolverRules API
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="ID",type=string,priority=0,JSONPath=`.status.id`
type ResolverRule struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ResolverRuleSpec `json:"spec,omitempty"`
Status ResolverRuleStatus `json:"status,omitempty"`
}
// ResolverRuleList contains a list of ResolverRule
// +kubebuilder:object:root=true
type ResolverRuleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ResolverRule `json:"items"`
}
func init() {
SchemeBuilder.Register(&ResolverRule{}, &ResolverRuleList{})
}