UNPKG

@canonical/jujulib

Version:
266 lines (263 loc) 7.5 kB
/** Juju SecretsManager version 1. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Models NOTE: This file was generated using the Juju schema from Juju 3.0 at the git SHA deb94d4. Do not manually edit this file. */ import { ConnectionInfo, Transport } from "../../client.js"; import { Facade } from "../../types.js"; export interface CreateSecretArg { UpsertSecretArg: UpsertSecretArg; content?: SecretContentParams; description?: string; "expire-time"?: string; label?: string; "owner-tag": string; params?: AdditionalProperties; "rotate-policy"?: string; uri?: string; } export interface CreateSecretArgs { args: CreateSecretArg[]; } export interface CreateSecretURIsArg { count: number; } export interface DeleteSecretArg { revisions?: number[]; uri: string; } export interface DeleteSecretArgs { args: DeleteSecretArg[]; } export interface Entities { entities: Entity[]; } export interface Entity { tag: string; } export interface Error { code: string; info?: AdditionalProperties; message: string; } export interface ErrorResult { error?: Error; } export interface ErrorResults { results: ErrorResult[]; } export interface GetSecretConsumerInfoArgs { "consumer-tag": string; uris: string[]; } export interface GetSecretContentArg { label?: string; peek?: boolean; update?: boolean; uri: string; } export interface GetSecretContentArgs { args: GetSecretContentArg[]; } export interface GrantRevokeSecretArg { role: string; "scope-tag": string; "subject-tags": string[]; uri: string; } export interface GrantRevokeSecretArgs { args: GrantRevokeSecretArg[]; } export interface ListSecretResult { "create-time": string; description?: string; label?: string; "latest-expire-time"?: string; "latest-revision": number; "next-rotate-time"?: string; "owner-tag": string; revisions: SecretRevision[]; "rotate-policy"?: string; "update-time": string; uri: string; value?: SecretValueResult; version: number; } export interface ListSecretResults { results: ListSecretResult[]; } export interface SecretConsumerInfoResult { error?: Error; label: string; revision: number; } export interface SecretConsumerInfoResults { results: SecretConsumerInfoResult[]; } export interface SecretContentParams { data?: Record<string, string>; "provider-id"?: string; } export interface SecretContentResult { content: SecretContentParams; error?: Error; } export interface SecretContentResults { results: SecretContentResult[]; } export interface SecretRevision { "create-time"?: string; "expire-time"?: string; "provider-id"?: string; revision: number; "update-time"?: string; } export interface SecretRotatedArg { "original-revision": number; skip: boolean; uri: string; } export interface SecretRotatedArgs { args: SecretRotatedArg[]; } export interface SecretStoreConfig { params?: AdditionalProperties; type: string; } export interface SecretTriggerChange { "next-trigger-time": string; revision?: number; uri: string; } export interface SecretTriggerWatchResult { changes: SecretTriggerChange[]; error?: Error; "watcher-id": string; } export interface SecretValueResult { data?: Record<string, string>; error?: Error; } export interface StringResult { error?: Error; result: string; } export interface StringResults { results: StringResult[]; } export interface StringsWatchResult { changes?: string[]; error?: Error; "watcher-id": string; } export interface StringsWatchResults { results: StringsWatchResult[]; } export interface UpdateSecretArg { UpsertSecretArg: UpsertSecretArg; content?: SecretContentParams; description?: string; "expire-time"?: string; label?: string; params?: AdditionalProperties; "rotate-policy"?: string; uri: string; } export interface UpdateSecretArgs { args: UpdateSecretArg[]; } export interface UpsertSecretArg { content?: SecretContentParams; description?: string; "expire-time"?: string; label?: string; params?: AdditionalProperties; "rotate-policy"?: string; } export interface AdditionalProperties { [key: string]: any; } /** SecretsManagerAPI is the implementation for the SecretsManager facade. */ declare class SecretsManagerV1 implements Facade { static NAME: string; static VERSION: number; NAME: string; VERSION: number; _transport: Transport; _info: ConnectionInfo; constructor(transport: Transport, info: ConnectionInfo); /** CreateSecretURIs creates new secret URIs. */ createSecretURIs(params: CreateSecretURIsArg): Promise<StringResults>; /** CreateSecrets creates new secrets. */ createSecrets(params: CreateSecretArgs): Promise<StringResults>; /** GetConsumerSecretsRevisionInfo returns the latest secret revisions for the specified secrets. */ getConsumerSecretsRevisionInfo(params: GetSecretConsumerInfoArgs): Promise<SecretConsumerInfoResults>; /** GetSecretContentInfo returns the secret values for the specified secrets. */ getSecretContentInfo(params: GetSecretContentArgs): Promise<SecretContentResults>; /** GetSecretMetadata returns metadata for the caller's secrets. */ getSecretMetadata(params: any): Promise<ListSecretResults>; /** GetSecretStoreConfig gets the config needed to create a client to the model's secret store. */ getSecretStoreConfig(params: any): Promise<SecretStoreConfig>; /** RemoveSecrets removes the specified secrets. */ removeSecrets(params: DeleteSecretArgs): Promise<ErrorResults>; /** SecretsGrant grants access to a secret for the specified subjects. */ secretsGrant(params: GrantRevokeSecretArgs): Promise<ErrorResults>; /** SecretsRevoke revokes access to a secret for the specified subjects. */ secretsRevoke(params: GrantRevokeSecretArgs): Promise<ErrorResults>; /** SecretsRotated records when secrets were last rotated. */ secretsRotated(params: SecretRotatedArgs): Promise<ErrorResults>; /** UpdateSecrets updates the specified secrets. */ updateSecrets(params: UpdateSecretArgs): Promise<ErrorResults>; /** WatchConsumedSecretsChanges sets up a watcher to notify of changes to secret revisions for the specified consumers. */ watchConsumedSecretsChanges(params: Entities): Promise<StringsWatchResults>; /** WatchObsolete returns a watcher for notifying when: - a secret owned by the entity is deleted - a secret revision owed by the entity no longer has any consumers Obsolete revisions results are "uri/revno" and deleted secret results are "uri". */ watchObsolete(params: Entities): Promise<StringsWatchResult>; /** WatchSecretRevisionsExpiryChanges sets up a watcher to notify of changes to secret revision expiry config. */ watchSecretRevisionsExpiryChanges(params: Entities): Promise<SecretTriggerWatchResult>; /** WatchSecretsRotationChanges sets up a watcher to notify of changes to secret rotation config. */ watchSecretsRotationChanges(params: Entities): Promise<SecretTriggerWatchResult>; } export default SecretsManagerV1;