generated from crossplane/upjet-provider-template
/
zz_throttlingpolicy_types.go
executable file
·213 lines (166 loc) · 9.24 KB
/
zz_throttlingpolicy_types.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/*
Copyright 2022 Upbound Inc.
*/
// Code generated by upjet. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type AppThrottlesObservation struct {
// ID of the API throttling policy.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The object name which the special user throttling policy belongs.
ThrottlingObjectName *string `json:"throttlingObjectName,omitempty" tf:"throttling_object_name,omitempty"`
}
type AppThrottlesParameters struct {
// Specifies the maximum number of times an API can be accessed within a specified
// period.
// +kubebuilder:validation:Required
MaxAPIRequests *float64 `json:"maxApiRequests" tf:"max_api_requests,omitempty"`
// Specifies the object ID which the special throttling policy belongs.
// +crossplane:generate:reference:type=Application
// +kubebuilder:validation:Optional
ThrottlingObjectID *string `json:"throttlingObjectId,omitempty" tf:"throttling_object_id,omitempty"`
// Reference to a Application to populate throttlingObjectId.
// +kubebuilder:validation:Optional
ThrottlingObjectIDRef *v1.Reference `json:"throttlingObjectIdRef,omitempty" tf:"-"`
// Selector for a Application to populate throttlingObjectId.
// +kubebuilder:validation:Optional
ThrottlingObjectIDSelector *v1.Selector `json:"throttlingObjectIdSelector,omitempty" tf:"-"`
}
type ThrottlingPolicyObservation struct {
// Specifies an array of one or more special throttling policies for APP limit.
// The throttle object of the user_throttles structure is documented below.
// +kubebuilder:validation:Optional
AppThrottles []AppThrottlesObservation `json:"appThrottles,omitempty" tf:"app_throttles,omitempty"`
// Time when the API throttling policy was created.
CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"`
// ID of the API throttling policy.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Specifies an array of one or more special throttling policies for IAM user limit.
// The throttle object of the user_throttles structure is documented below.
// +kubebuilder:validation:Optional
UserThrottles []UserThrottlesObservation `json:"userThrottles,omitempty" tf:"user_throttles,omitempty"`
}
type ThrottlingPolicyParameters struct {
// Specifies an array of one or more special throttling policies for APP limit.
// The throttle object of the user_throttles structure is documented below.
// +kubebuilder:validation:Optional
AppThrottles []AppThrottlesParameters `json:"appThrottles,omitempty" tf:"app_throttles,omitempty"`
// Specifies the description about the API throttling policy.
// The description contain a maximum of 255 characters and the angle brackets (< and >) are not allowed.
// Chinese characters must be in UTF-8 or Unicode format.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Specifies an ID of the APIG dedicated instance to which the API
// throttling policy belongs to. Changing this will create a new API throttling policy resource.
// +crossplane:generate:reference:type=Instance
// +kubebuilder:validation:Optional
InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"`
// Reference to a Instance to populate instanceId.
// +kubebuilder:validation:Optional
InstanceIDRef *v1.Reference `json:"instanceIdRef,omitempty" tf:"-"`
// Selector for a Instance to populate instanceId.
// +kubebuilder:validation:Optional
InstanceIDSelector *v1.Selector `json:"instanceIdSelector,omitempty" tf:"-"`
// Specifies the maximum number of times an API can be accessed within a specified
// period. The value of this parameter cannot exceed the default limit 200 TPS.
// +kubebuilder:validation:Required
MaxAPIRequests *float64 `json:"maxApiRequests" tf:"max_api_requests,omitempty"`
// Specifies the maximum number of times the API can be accessed by an app within
// the same period. The value of this parameter must be less than or equal to the value of max_user_requests.
// +kubebuilder:validation:Optional
MaxAppRequests *float64 `json:"maxAppRequests,omitempty" tf:"max_app_requests,omitempty"`
// Specifies the maximum number of times the API can be accessed by an IP address
// within the same period. The value of this parameter must be less than or equal to the value of max_api_requests.
// +kubebuilder:validation:Optional
MaxIPRequests *float64 `json:"maxIpRequests,omitempty" tf:"max_ip_requests,omitempty"`
// Specifies the maximum number of times the API can be accessed by a user within
// the same period. The value of this parameter must be less than or equal to the value of max_api_requests.
// +kubebuilder:validation:Optional
MaxUserRequests *float64 `json:"maxUserRequests,omitempty" tf:"max_user_requests,omitempty"`
// Specifies the name of the API throttling policy.
// The policy name consists of 3 to 64 characters, starting with a letter.
// Only letters, digits and underscores (_) are allowed.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Specifies the period of time for limiting the number of API calls.
// This parameter applies with each of the API call limits: max_api_requests, max_app_requests, max_ip_requests
// and max_user_requests.
// +kubebuilder:validation:Required
Period *float64 `json:"period" tf:"period,omitempty"`
// Specifies the time unit for limiting the number of API calls.
// The valid values are SECOND, MINUTE, HOUR and DAY, default to MINUTE.
// +kubebuilder:validation:Optional
PeriodUnit *string `json:"periodUnit,omitempty" tf:"period_unit,omitempty"`
// Specifies the region in which to create the API throttling policy resource.
// If omitted, the provider-level region will be used. Changing this will create a new API throttling policy resource.
// +kubebuilder:validation:Optional
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// Specifies the type of the request throttling policy.
// The valid values are as follows:
// +kubebuilder:validation:Optional
Type *string `json:"type,omitempty" tf:"type,omitempty"`
// Specifies an array of one or more special throttling policies for IAM user limit.
// The throttle object of the user_throttles structure is documented below.
// +kubebuilder:validation:Optional
UserThrottles []UserThrottlesParameters `json:"userThrottles,omitempty" tf:"user_throttles,omitempty"`
}
type UserThrottlesObservation struct {
// ID of the API throttling policy.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The object name which the special user throttling policy belongs.
ThrottlingObjectName *string `json:"throttlingObjectName,omitempty" tf:"throttling_object_name,omitempty"`
}
type UserThrottlesParameters struct {
// Specifies the maximum number of times an API can be accessed within a specified
// period.
// +kubebuilder:validation:Required
MaxAPIRequests *float64 `json:"maxApiRequests" tf:"max_api_requests,omitempty"`
// Specifies the object ID which the special throttling policy belongs.
// +kubebuilder:validation:Required
ThrottlingObjectID *string `json:"throttlingObjectId" tf:"throttling_object_id,omitempty"`
}
// ThrottlingPolicySpec defines the desired state of ThrottlingPolicy
type ThrottlingPolicySpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ThrottlingPolicyParameters `json:"forProvider"`
}
// ThrottlingPolicyStatus defines the observed state of ThrottlingPolicy.
type ThrottlingPolicyStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ThrottlingPolicyObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// ThrottlingPolicy is the Schema for the ThrottlingPolicys API. ""page_title: "flexibleengine_apig_throttling_policy"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,flexibleengine}
type ThrottlingPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ThrottlingPolicySpec `json:"spec"`
Status ThrottlingPolicyStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ThrottlingPolicyList contains a list of ThrottlingPolicys
type ThrottlingPolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ThrottlingPolicy `json:"items"`
}
// Repository type metadata.
var (
ThrottlingPolicy_Kind = "ThrottlingPolicy"
ThrottlingPolicy_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ThrottlingPolicy_Kind}.String()
ThrottlingPolicy_KindAPIVersion = ThrottlingPolicy_Kind + "." + CRDGroupVersion.String()
ThrottlingPolicy_GroupVersionKind = CRDGroupVersion.WithKind(ThrottlingPolicy_Kind)
)
func init() {
SchemeBuilder.Register(&ThrottlingPolicy{}, &ThrottlingPolicyList{})
}