Documentation ¶
Overview ¶
Package secret provides methods and message types of the secret v1alpha1 API.
Index ¶
- Constants
- type API
- func (s *API) AccessSecretVersion(req *AccessSecretVersionRequest, opts ...scw.RequestOption) (*AccessSecretVersionResponse, error)
- func (s *API) AccessSecretVersionByName(req *AccessSecretVersionByNameRequest, opts ...scw.RequestOption) (*AccessSecretVersionResponse, error)
- func (s *API) AddSecretOwner(req *AddSecretOwnerRequest, opts ...scw.RequestOption) error
- func (s *API) CreateSecret(req *CreateSecretRequest, opts ...scw.RequestOption) (*Secret, error)
- func (s *API) CreateSecretVersion(req *CreateSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- func (s *API) DeleteSecret(req *DeleteSecretRequest, opts ...scw.RequestOption) error
- func (s *API) DestroySecretVersion(req *DestroySecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- func (s *API) DisableSecretVersion(req *DisableSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- func (s *API) EnableSecretVersion(req *EnableSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- func (s *API) GeneratePassword(req *GeneratePasswordRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- func (s *API) GetSecret(req *GetSecretRequest, opts ...scw.RequestOption) (*Secret, error)
- func (s *API) GetSecretByName(req *GetSecretByNameRequest, opts ...scw.RequestOption) (*Secret, error)
- func (s *API) GetSecretVersion(req *GetSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- func (s *API) GetSecretVersionByName(req *GetSecretVersionByNameRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- func (s *API) ListSecretVersions(req *ListSecretVersionsRequest, opts ...scw.RequestOption) (*ListSecretVersionsResponse, error)
- func (s *API) ListSecretVersionsByName(req *ListSecretVersionsByNameRequest, opts ...scw.RequestOption) (*ListSecretVersionsResponse, error)
- func (s *API) ListSecrets(req *ListSecretsRequest, opts ...scw.RequestOption) (*ListSecretsResponse, error)
- func (s *API) ListTags(req *ListTagsRequest, opts ...scw.RequestOption) (*ListTagsResponse, error)
- func (s *API) ProtectSecret(req *ProtectSecretRequest, opts ...scw.RequestOption) (*Secret, error)
- func (s *API) Regions() []scw.Region
- func (s *API) UnprotectSecret(req *UnprotectSecretRequest, opts ...scw.RequestOption) (*Secret, error)
- func (s *API) UpdateSecret(req *UpdateSecretRequest, opts ...scw.RequestOption) (*Secret, error)
- func (s *API) UpdateSecretVersion(req *UpdateSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- type AccessSecretVersionByNameRequest
- type AccessSecretVersionRequest
- type AccessSecretVersionResponse
- type AddSecretOwnerRequest
- type CreateSecretRequest
- type CreateSecretVersionRequest
- type DeleteSecretRequest
- type DestroySecretVersionRequest
- type DisableSecretVersionRequest
- type EnableSecretVersionRequest
- type GeneratePasswordRequest
- type GetSecretByNameRequest
- type GetSecretRequest
- type GetSecretVersionByNameRequest
- type GetSecretVersionRequest
- type ListSecretVersionsByNameRequest
- type ListSecretVersionsRequest
- type ListSecretVersionsResponse
- type ListSecretsRequest
- type ListSecretsRequestOrderBy
- type ListSecretsResponse
- type ListTagsRequest
- type ListTagsResponse
- type PasswordGenerationParams
- type Product
- type ProtectSecretRequest
- type Secret
- type SecretStatus
- type SecretType
- type SecretVersion
- type SecretVersionStatus
- type UnprotectSecretRequest
- type UpdateSecretRequest
- type UpdateSecretVersionRequest
Constants ¶
const ( ListSecretsRequestOrderByNameAsc = ListSecretsRequestOrderBy("name_asc") ListSecretsRequestOrderByNameDesc = ListSecretsRequestOrderBy("name_desc") ListSecretsRequestOrderByCreatedAtAsc = ListSecretsRequestOrderBy("created_at_asc") ListSecretsRequestOrderByCreatedAtDesc = ListSecretsRequestOrderBy("created_at_desc") ListSecretsRequestOrderByUpdatedAtAsc = ListSecretsRequestOrderBy("updated_at_asc") ListSecretsRequestOrderByUpdatedAtDesc = ListSecretsRequestOrderBy("updated_at_desc") )
const ( SecretStatusReady = SecretStatus("ready") SecretStatusLocked = SecretStatus("locked") )
const ( SecretTypeUnknownSecretType = SecretType("unknown_secret_type") // default type. SecretTypeOpaque = SecretType("opaque") // Certificates used by load balancers, the format must be PEM concatenated and contains exactly one PKCS8 private key and the certificate full chain containing all intermediates CA. SecretTypeNetworkEdgeCertificate = SecretType("network_edge_certificate") )
const ( SecretVersionStatusUnknown = SecretVersionStatus("unknown") SecretVersionStatusEnabled = SecretVersionStatus("enabled") SecretVersionStatusDisabled = SecretVersionStatus("disabled") SecretVersionStatusDestroyed = SecretVersionStatus("destroyed") )
const (
ProductUnknown = Product("unknown")
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: secret Manager API. This API allows you to conveniently store, access and share sensitive data.
func (*API) AccessSecretVersion ¶
func (s *API) AccessSecretVersion(req *AccessSecretVersionRequest, opts ...scw.RequestOption) (*AccessSecretVersionResponse, error)
AccessSecretVersion: access a secret's version using the secret's ID. Access sensitive data in a secret's version specified by the `region`, `secret_id` and `revision` parameters.
func (*API) AccessSecretVersionByName ¶
func (s *API) AccessSecretVersionByName(req *AccessSecretVersionByNameRequest, opts ...scw.RequestOption) (*AccessSecretVersionResponse, error)
AccessSecretVersionByName: access a secret's version using the secret's name. Access sensitive data in a secret's version specified by the `region`, `secret_name`, `revision` and `project_id` parameters.
func (*API) AddSecretOwner ¶
func (s *API) AddSecretOwner(req *AddSecretOwnerRequest, opts ...scw.RequestOption) error
AddSecretOwner: allow a product to use the secret.
func (*API) CreateSecret ¶
func (s *API) CreateSecret(req *CreateSecretRequest, opts ...scw.RequestOption) (*Secret, error)
CreateSecret: create a secret. You must sepcify the `region` to create a secret.
func (*API) CreateSecretVersion ¶
func (s *API) CreateSecretVersion(req *CreateSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
CreateSecretVersion: create a version. Create a version of a given secret specified by the `region` and `secret_id` parameters.
func (*API) DeleteSecret ¶
func (s *API) DeleteSecret(req *DeleteSecretRequest, opts ...scw.RequestOption) error
DeleteSecret: delete a secret. Delete a given secret specified by the `region` and `secret_id` parameters.
func (*API) DestroySecretVersion ¶
func (s *API) DestroySecretVersion(req *DestroySecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
DestroySecretVersion: delete a version. Delete a secret's version and the sensitive data contained in it. Deleting a version is permanent and cannot be undone.
func (*API) DisableSecretVersion ¶
func (s *API) DisableSecretVersion(req *DisableSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
DisableSecretVersion: disable a version. Make a specific version inaccessible. You must specify the `region`, `secret_id` and `revision` parameters.
func (*API) EnableSecretVersion ¶
func (s *API) EnableSecretVersion(req *EnableSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
EnableSecretVersion: enable a version. Make a specific version accessible. You must specify the `region`, `secret_id` and `revision` parameters.
func (*API) GeneratePassword ¶
func (s *API) GeneratePassword(req *GeneratePasswordRequest, opts ...scw.RequestOption) (*SecretVersion, error)
GeneratePassword: generate a password in a new version. Generate a password for the given secret specified by the `region` and `secret_id` parameters. This will also create a new version of the secret that will store the password.
func (*API) GetSecret ¶
func (s *API) GetSecret(req *GetSecretRequest, opts ...scw.RequestOption) (*Secret, error)
GetSecret: get metadata using the secret's ID. Retrieve the metadata of a secret specified by the `region` and `secret_id` parameters.
func (*API) GetSecretByName ¶
func (s *API) GetSecretByName(req *GetSecretByNameRequest, opts ...scw.RequestOption) (*Secret, error)
GetSecretByName: get metadata using the secret's name. Retrieve the metadata of a secret specified by the `region` and `secret_name` parameters.
func (*API) GetSecretVersion ¶
func (s *API) GetSecretVersion(req *GetSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
GetSecretVersion: get metadata of a secret's version using the secret's ID. Retrieve the metadata of a secret's given version specified by the `region`, `secret_id` and `revision` parameters.
func (*API) GetSecretVersionByName ¶
func (s *API) GetSecretVersionByName(req *GetSecretVersionByNameRequest, opts ...scw.RequestOption) (*SecretVersion, error)
GetSecretVersionByName: get metadata of a secret's version using the secret's name. Retrieve the metadata of a secret's given version specified by the `region`, `secret_name`, `revision` and `project_id` parameters.
func (*API) ListSecretVersions ¶
func (s *API) ListSecretVersions(req *ListSecretVersionsRequest, opts ...scw.RequestOption) (*ListSecretVersionsResponse, error)
ListSecretVersions: list versions of a secret using the secret's ID. Retrieve the list of a given secret's versions specified by the `secret_id` and `region` parameters.
func (*API) ListSecretVersionsByName ¶
func (s *API) ListSecretVersionsByName(req *ListSecretVersionsByNameRequest, opts ...scw.RequestOption) (*ListSecretVersionsResponse, error)
ListSecretVersionsByName: list versions of a secret using the secret's name. Retrieve the list of a given secret's versions specified by the `secret_name`,`region` and `project_id` parameters.
func (*API) ListSecrets ¶
func (s *API) ListSecrets(req *ListSecretsRequest, opts ...scw.RequestOption) (*ListSecretsResponse, error)
ListSecrets: list secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the `organization_id` or the `project_id` and the `region`.
func (*API) ListTags ¶
func (s *API) ListTags(req *ListTagsRequest, opts ...scw.RequestOption) (*ListTagsResponse, error)
ListTags: list tags. List all tags associated with secrets within a given Project.
func (*API) ProtectSecret ¶
func (s *API) ProtectSecret(req *ProtectSecretRequest, opts ...scw.RequestOption) (*Secret, error)
ProtectSecret: protect a secret. Protect a given secret specified by the `secret_id` parameter. A protected secret can be read and modified but cannot be deleted.
func (*API) UnprotectSecret ¶
func (s *API) UnprotectSecret(req *UnprotectSecretRequest, opts ...scw.RequestOption) (*Secret, error)
UnprotectSecret: unprotect a secret. Unprotect a given secret specified by the `secret_id` parameter. An unprotected secret can be read, modified and deleted.
func (*API) UpdateSecret ¶
func (s *API) UpdateSecret(req *UpdateSecretRequest, opts ...scw.RequestOption) (*Secret, error)
UpdateSecret: update metadata of a secret. Edit a secret's metadata such as name, tag(s) and description. The secret to update is specified by the `secret_id` and `region` parameters.
func (*API) UpdateSecretVersion ¶
func (s *API) UpdateSecretVersion(req *UpdateSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
UpdateSecretVersion: update metadata of a version. Edit the metadata of a secret's given version, specified by the `region`, `secret_id` and `revision` parameters.
type AccessSecretVersionByNameRequest ¶
type AccessSecretVersionByNameRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretName: name of the secret. SecretName string `json:"-"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest". Revision string `json:"-"` // ProjectID: ID of the Project to target. // (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. ProjectID *string `json:"-"` }
type AccessSecretVersionRequest ¶
type AccessSecretVersionRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest". Revision string `json:"-"` }
type AccessSecretVersionResponse ¶
type AccessSecretVersionResponse struct { // SecretID: ID of the secret. SecretID string `json:"secret_id"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Revision uint32 `json:"revision"` // Data: the base64-encoded secret payload of the version. Data []byte `json:"data"` // DataCrc32: the CRC32 checksum of the data as a base-10 integer. // This field is only available if a CRC32 was supplied during the creation of the version. DataCrc32 *uint32 `json:"data_crc32"` }
AccessSecretVersionResponse: access secret version response.
type AddSecretOwnerRequest ¶
type AddSecretOwnerRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Deprecated: ProductName: (Deprecated: use `product` field) Name of the product to add. ProductName *string `json:"product_name,omitempty"` // Product: ID of the product to add. // See `Product` enum for description of values. // Default value: unknown Product Product `json:"product"` }
type CreateSecretRequest ¶
type CreateSecretRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ProjectID: ID of the Project containing the secret. ProjectID string `json:"project_id"` // Name: name of the secret. Name string `json:"name"` // Tags: list of the secret's tags. Tags []string `json:"tags"` // Description: description of the secret. Description *string `json:"description"` // Type: type of the secret. // (Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`. // Default value: unknown_secret_type Type SecretType `json:"type"` }
type CreateSecretVersionRequest ¶
type CreateSecretVersionRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Data: the base64-encoded secret payload of the version. Data []byte `json:"data"` // Description: description of the version. Description *string `json:"description"` // DisablePrevious: disable the previous secret version. // (Optional.) If there is no previous version or if the previous version was already disabled, does nothing. DisablePrevious *bool `json:"disable_previous"` // Deprecated: PasswordGeneration: options to generate a password. // (Optional.) If specified, a random password will be generated. The `data` and `data_crc32` fields must be empty. By default, the generator will use upper and lower case letters, and digits. This behavior can be tuned using the generation parameters. // Precisely one of PasswordGeneration must be set. PasswordGeneration *PasswordGenerationParams `json:"password_generation,omitempty"` // DataCrc32: (Optional.) The CRC32 checksum of the data as a base-10 integer. // If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests. DataCrc32 *uint32 `json:"data_crc32"` }
type DeleteSecretRequest ¶
type DestroySecretVersionRequest ¶
type DestroySecretVersionRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest". Revision string `json:"-"` }
type DisableSecretVersionRequest ¶
type DisableSecretVersionRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest". Revision string `json:"-"` }
type EnableSecretVersionRequest ¶
type EnableSecretVersionRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest". Revision string `json:"-"` }
type GeneratePasswordRequest ¶
type GeneratePasswordRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Description: description of the version. Description *string `json:"description"` // DisablePrevious: (Optional.) Disable the previous secret version. // This has no effect if there is no previous version or if the previous version was already disabled. DisablePrevious *bool `json:"disable_previous"` // Length: length of the password to generate (between 1 and 1024 characters). Length uint32 `json:"length"` // NoLowercaseLetters: (Optional.) Exclude lower case letters by default in the password character set. NoLowercaseLetters *bool `json:"no_lowercase_letters"` // NoUppercaseLetters: (Optional.) Exclude upper case letters by default in the password character set. NoUppercaseLetters *bool `json:"no_uppercase_letters"` // NoDigits: (Optional.) Exclude digits by default in the password character set. NoDigits *bool `json:"no_digits"` // AdditionalChars: (Optional.) Additional ASCII characters to be included in the password character set. AdditionalChars *string `json:"additional_chars"` }
type GetSecretByNameRequest ¶
type GetSecretByNameRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretName: name of the secret. SecretName string `json:"-"` // ProjectID: ID of the Project to target. // (Optional.) If not specified, Secret Manager will look for the secret in all Projects. ProjectID *string `json:"-"` }
type GetSecretRequest ¶
type GetSecretVersionByNameRequest ¶
type GetSecretVersionByNameRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretName: name of the secret. SecretName string `json:"-"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest". Revision string `json:"-"` // ProjectID: ID of the Project to target. // (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. ProjectID *string `json:"-"` }
type GetSecretVersionRequest ¶
type GetSecretVersionRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest". Revision string `json:"-"` }
type ListSecretVersionsByNameRequest ¶
type ListSecretVersionsByNameRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretName: name of the secret. SecretName string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` // Status: filter results by status. Status []SecretVersionStatus `json:"-"` // ProjectID: ID of the Project to target. // (Optional.) If not specified, Secret Manager will look for the secret in all Projects. ProjectID *string `json:"-"` }
type ListSecretVersionsRequest ¶
type ListSecretVersionsRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` // Status: filter results by status. Status []SecretVersionStatus `json:"-"` }
type ListSecretVersionsResponse ¶
type ListSecretVersionsResponse struct { // Versions: single page of versions. Versions []*SecretVersion `json:"versions"` // TotalCount: number of versions. TotalCount uint32 `json:"total_count"` }
ListSecretVersionsResponse: list secret versions response.
func (*ListSecretVersionsResponse) UnsafeAppend ¶
func (r *ListSecretVersionsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListSecretVersionsResponse) UnsafeGetTotalCount ¶
func (r *ListSecretVersionsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListSecretsRequest ¶
type ListSecretsRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // OrganizationID: filter by Organization ID (optional). OrganizationID *string `json:"-"` // ProjectID: filter by Project ID (optional). ProjectID *string `json:"-"` // OrderBy: default value: name_asc OrderBy ListSecretsRequestOrderBy `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` // Tags: list of tags to filter on (optional). Tags []string `json:"-"` // Name: filter by secret name (optional). Name *string `json:"-"` // IsManaged: filter by managed / not managed (optional). IsManaged *bool `json:"-"` }
type ListSecretsRequestOrderBy ¶
type ListSecretsRequestOrderBy string
func (ListSecretsRequestOrderBy) MarshalJSON ¶
func (enum ListSecretsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListSecretsRequestOrderBy) String ¶
func (enum ListSecretsRequestOrderBy) String() string
func (*ListSecretsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListSecretsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListSecretsResponse ¶
type ListSecretsResponse struct { // Secrets: single page of secrets matching the requested criteria. Secrets []*Secret `json:"secrets"` // TotalCount: count of all secrets matching the requested criteria. TotalCount uint32 `json:"total_count"` }
ListSecretsResponse: list secrets response.
func (*ListSecretsResponse) UnsafeAppend ¶
func (r *ListSecretsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListSecretsResponse) UnsafeGetTotalCount ¶
func (r *ListSecretsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListTagsRequest ¶
type ListTagsRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ProjectID: ID of the Project to target. // (Optional.) If not specified, Secret Manager will look for tags in all Projects. ProjectID *string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` }
type ListTagsResponse ¶
type ListTagsResponse struct { // Tags: list of tags. Tags []string `json:"tags"` // TotalCount: count of all tags matching the requested criteria. TotalCount uint32 `json:"total_count"` }
ListTagsResponse: list tags response.
func (*ListTagsResponse) UnsafeAppend ¶
func (r *ListTagsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListTagsResponse) UnsafeGetTotalCount ¶
func (r *ListTagsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type PasswordGenerationParams ¶
type PasswordGenerationParams struct { // Length: length of the password to generate (between 1 and 1024). Length uint32 `json:"length"` // NoLowercaseLetters: do not include lower case letters by default in the alphabet. NoLowercaseLetters bool `json:"no_lowercase_letters"` // NoUppercaseLetters: do not include upper case letters by default in the alphabet. NoUppercaseLetters bool `json:"no_uppercase_letters"` // NoDigits: do not include digits by default in the alphabet. NoDigits bool `json:"no_digits"` // AdditionalChars: additional ascii characters to be included in the alphabet. AdditionalChars string `json:"additional_chars"` }
PasswordGenerationParams: password generation params.
type ProtectSecretRequest ¶
type Secret ¶
type Secret struct { // ID: ID of the secret. ID string `json:"id"` // ProjectID: ID of the Project containing the secret. ProjectID string `json:"project_id"` // Name: name of the secret. Name string `json:"name"` // Status: current status of the secret. // * `ready`: the secret can be read, modified and deleted. // * `locked`: no action can be performed on the secret. This status can only be applied and removed by Scaleway. // Default value: ready Status SecretStatus `json:"status"` // CreatedAt: date and time of the secret's creation. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: last update of the secret. UpdatedAt *time.Time `json:"updated_at"` // Tags: list of the secret's tags. Tags []string `json:"tags"` // VersionCount: number of versions for this secret. VersionCount uint32 `json:"version_count"` // Description: updated description of the secret. Description *string `json:"description"` // IsManaged: returns `true` for secrets that are managed by another product. IsManaged bool `json:"is_managed"` // IsProtected: returns `true` for protected secrets that cannot be deleted. IsProtected bool `json:"is_protected"` // Type: type of the secret. // See `Secret.Type` enum for description of values. // Default value: unknown_secret_type Type SecretType `json:"type"` // Region: region of the secret. Region scw.Region `json:"region"` }
Secret: secret.
type SecretStatus ¶
type SecretStatus string
func (SecretStatus) MarshalJSON ¶
func (enum SecretStatus) MarshalJSON() ([]byte, error)
func (SecretStatus) String ¶
func (enum SecretStatus) String() string
func (*SecretStatus) UnmarshalJSON ¶
func (enum *SecretStatus) UnmarshalJSON(data []byte) error
type SecretType ¶
type SecretType string
func (SecretType) MarshalJSON ¶
func (enum SecretType) MarshalJSON() ([]byte, error)
func (SecretType) String ¶
func (enum SecretType) String() string
func (*SecretType) UnmarshalJSON ¶
func (enum *SecretType) UnmarshalJSON(data []byte) error
type SecretVersion ¶
type SecretVersion struct { // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Revision uint32 `json:"revision"` // SecretID: ID of the secret. SecretID string `json:"secret_id"` // Status: current status of the version. // * `unknown`: the version is in an invalid state. // * `enabled`: the version is accessible. // * `disabled`: the version is not accessible but can be enabled. // * `destroyed`: the version is permanently deleted. It is not possible to recover it. // Default value: unknown Status SecretVersionStatus `json:"status"` // CreatedAt: date and time of the version's creation. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: last update of the version. UpdatedAt *time.Time `json:"updated_at"` // Description: description of the version. Description *string `json:"description"` // IsLatest: returns `true` if the version is the latest. IsLatest bool `json:"is_latest"` }
SecretVersion: secret version.
type SecretVersionStatus ¶
type SecretVersionStatus string
func (SecretVersionStatus) MarshalJSON ¶
func (enum SecretVersionStatus) MarshalJSON() ([]byte, error)
func (SecretVersionStatus) String ¶
func (enum SecretVersionStatus) String() string
func (*SecretVersionStatus) UnmarshalJSON ¶
func (enum *SecretVersionStatus) UnmarshalJSON(data []byte) error
type UnprotectSecretRequest ¶
type UpdateSecretRequest ¶
type UpdateSecretRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Name: secret's updated name (optional). Name *string `json:"name"` // Tags: secret's updated list of tags (optional). Tags *[]string `json:"tags"` // Description: description of the secret. Description *string `json:"description"` }
type UpdateSecretVersionRequest ¶
type UpdateSecretVersionRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // SecretID: ID of the secret. SecretID string `json:"-"` // Revision: version number. // The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest". Revision string `json:"-"` // Description: description of the version. Description *string `json:"description"` }