Skip to content

Commit 4536b46

Browse files
authored
feat(secret_manager): add secret type messages to simplify deserialization (#1227)
1 parent 97e3793 commit 4536b46

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

packages/clients/src/api/secret/v1beta1/index.gen.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ export type {
3434
Secret,
3535
SecretStatus,
3636
SecretType,
37+
SecretTypeBasicCredentials,
38+
SecretTypeDatabaseCredentials,
39+
SecretTypeSSHKey,
3740
SecretVersion,
3841
SecretVersionStatus,
3942
UnprotectSecretRequest,
4043
UpdateSecretRequest,
4144
UpdateSecretVersionRequest,
4245
} from './types.gen'
46+
export * as ValidationRules from './validation-rules.gen'

packages/clients/src/api/secret/v1beta1/types.gen.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,33 @@ export type ProtectSecretRequest = {
467467
secretId: string
468468
}
469469

470+
export interface SecretTypeBasicCredentials {
471+
/** The username or identifier associated with the credentials. */
472+
username: string
473+
/** The password associated with the credentials. */
474+
password: string
475+
}
476+
477+
export interface SecretTypeDatabaseCredentials {
478+
/** Supported database engines are: 'postgres', 'mysql', 'other'. */
479+
engine: string
480+
/** The username used to authenticate to the database server. */
481+
username: string
482+
/** The password used to authenticate to the database server. */
483+
password: string
484+
/** The hostname or resolvable DNS name of the database server. */
485+
host: string
486+
/** The name of the database to connect to. */
487+
dbname: string
488+
/** The port must be an integer ranging from 0 to 65535. */
489+
port: string
490+
}
491+
492+
export interface SecretTypeSSHKey {
493+
/** The private SSH key. */
494+
sshPrivateKey: string
495+
}
496+
470497
export type UnprotectSecretRequest = {
471498
/**
472499
* Region to target. If none is passed will use default region from the
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file was automatically generated. DO NOT EDIT.
2+
// If you have any remark or suggestion do not hesitate to open an issue.
3+
4+
export const SecretTypeDatabaseCredentials = {
5+
port: {
6+
pattern: /^[0-9]+$/,
7+
},
8+
}

0 commit comments

Comments
 (0)