Skip to content

Commit 10ab085

Browse files
feat(audit_trail): add account user and organization resources (scaleway#2557)
Co-authored-by: Laure-di <[email protected]>
1 parent 5a311d3 commit 10ab085

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

api/audit_trail/v1alpha1/audit_trail_sdk.go

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ const (
9797
ResourceTypeSecretManagerSecret = ResourceType("secret_manager_secret")
9898
ResourceTypeSecretManagerVersion = ResourceType("secret_manager_version")
9999
ResourceTypeKeyManagerKey = ResourceType("key_manager_key")
100+
ResourceTypeAccountUser = ResourceType("account_user")
101+
ResourceTypeAccountOrganization = ResourceType("account_organization")
100102
)
101103

102104
func (enum ResourceType) String() string {
@@ -127,6 +129,8 @@ func (enum ResourceType) Values() []ResourceType {
127129
"secret_manager_secret",
128130
"secret_manager_version",
129131
"key_manager_key",
132+
"account_user",
133+
"account_organization",
130134
}
131135
}
132136

@@ -145,6 +149,14 @@ func (enum *ResourceType) UnmarshalJSON(data []byte) error {
145149
return nil
146150
}
147151

152+
// AccountOrganizationInfo: account organization info.
153+
type AccountOrganizationInfo struct{}
154+
155+
// AccountUserInfo: account user info.
156+
type AccountUserInfo struct {
157+
Email string `json:"email"`
158+
}
159+
148160
// KeyManagerKeyInfo: key manager key info.
149161
type KeyManagerKeyInfo struct{}
150162

@@ -199,37 +211,43 @@ type Resource struct {
199211
Name *string `json:"name"`
200212

201213
// Deprecated
202-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
214+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
203215
SecmSecretInfo *SecretManagerSecretInfo `json:"secm_secret_info,omitempty"`
204216

205217
// Deprecated
206-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
218+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
207219
SecmSecretVersionInfo *SecretManagerSecretVersionInfo `json:"secm_secret_version_info,omitempty"`
208220

209-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
221+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
210222
KubeClusterInfo *KubernetesClusterInfo `json:"kube_cluster_info,omitempty"`
211223

212-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
224+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
213225
KubePoolInfo *KubernetesPoolInfo `json:"kube_pool_info,omitempty"`
214226

215-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
227+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
216228
KubeNodeInfo *KubernetesNodeInfo `json:"kube_node_info,omitempty"`
217229

218-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
230+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
219231
KubeACLInfo *KubernetesACLInfo `json:"kube_acl_info,omitempty"`
220232

221233
// Deprecated
222-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
234+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
223235
KeymKeyInfo *KeyManagerKeyInfo `json:"keym_key_info,omitempty"`
224236

225-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
237+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
226238
SecretManagerSecretInfo *SecretManagerSecretInfo `json:"secret_manager_secret_info,omitempty"`
227239

228-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
240+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
229241
SecretManagerVersionInfo *SecretManagerSecretVersionInfo `json:"secret_manager_version_info,omitempty"`
230242

231-
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo must be set.
243+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
232244
KeyManagerKeyInfo *KeyManagerKeyInfo `json:"key_manager_key_info,omitempty"`
245+
246+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
247+
AccountUserInfo *AccountUserInfo `json:"account_user_info,omitempty"`
248+
249+
// Precisely one of SecmSecretInfo, SecmSecretVersionInfo, KubeClusterInfo, KubePoolInfo, KubeNodeInfo, KubeACLInfo, KeymKeyInfo, SecretManagerSecretInfo, SecretManagerVersionInfo, KeyManagerKeyInfo, AccountUserInfo, AccountOrganizationInfo must be set.
250+
AccountOrganizationInfo *AccountOrganizationInfo `json:"account_organization_info,omitempty"`
233251
}
234252

235253
// ProductService: product service.

0 commit comments

Comments
 (0)