Documentation ¶
Overview ¶
Package secret provides methods and message types of the secret v1beta1 API.
Index ¶
- Constants
- type API
- func (s *API) AccessSecretVersion(req *AccessSecretVersionRequest, opts ...scw.RequestOption) (*AccessSecretVersionResponse, error)
- func (s *API) AccessSecretVersionByPath(req *AccessSecretVersionByPathRequest, opts ...scw.RequestOption) (*AccessSecretVersionResponse, error)
- func (s *API) AddSecretOwner(req *AddSecretOwnerRequest, opts ...scw.RequestOption) error
- func (s *API) BrowseSecrets(req *BrowseSecretsRequest, opts ...scw.RequestOption) (*BrowseSecretsResponse, 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) DeleteSecretVersion(req *DeleteSecretVersionRequest, opts ...scw.RequestOption) 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) GetSecret(req *GetSecretRequest, opts ...scw.RequestOption) (*Secret, error)
- func (s *API) GetSecretVersion(req *GetSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
- func (s *API) ListSecretTypes(req *ListSecretTypesRequest, opts ...scw.RequestOption) (*ListSecretTypesResponse, error)
- func (s *API) ListSecretVersions(req *ListSecretVersionsRequest, 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 AccessSecretVersionByPathRequest
- type AccessSecretVersionRequest
- type AccessSecretVersionResponse
- type AddSecretOwnerRequest
- type BasicCredentials
- type BrowseSecretsRequest
- type BrowseSecretsRequestOrderBy
- type BrowseSecretsResponse
- type BrowseSecretsResponseItem
- type BrowseSecretsResponseItemFolderDetails
- type BrowseSecretsResponseItemSecretDetails
- type CreateSecretRequest
- type CreateSecretVersionRequest
- type DatabaseCredentials
- type DeleteSecretRequest
- type DeleteSecretVersionRequest
- type DisableSecretVersionRequest
- type EnableSecretVersionRequest
- type EphemeralPolicy
- type EphemeralPolicyAction
- type EphemeralProperties
- type GetSecretRequest
- type GetSecretVersionRequest
- type ListSecretTypesRequest
- type ListSecretTypesResponse
- type ListSecretVersionsRequest
- type ListSecretVersionsResponse
- type ListSecretsRequest
- type ListSecretsRequestOrderBy
- type ListSecretsResponse
- type ListTagsRequest
- type ListTagsResponse
- type Product
- type ProtectSecretRequest
- type SSHKey
- type Secret
- type SecretStatus
- type SecretType
- type SecretVersion
- type SecretVersionStatus
- type UnprotectSecretRequest
- type UpdateSecretRequest
- type UpdateSecretVersionRequest
Constants ¶
const ( BrowseSecretsRequestOrderByNameAsc = BrowseSecretsRequestOrderBy("name_asc") BrowseSecretsRequestOrderByNameDesc = BrowseSecretsRequestOrderBy("name_desc") BrowseSecretsRequestOrderByCreatedAtAsc = BrowseSecretsRequestOrderBy("created_at_asc") BrowseSecretsRequestOrderByCreatedAtDesc = BrowseSecretsRequestOrderBy("created_at_desc") BrowseSecretsRequestOrderByUpdatedAtAsc = BrowseSecretsRequestOrderBy("updated_at_asc") BrowseSecretsRequestOrderByUpdatedAtDesc = BrowseSecretsRequestOrderBy("updated_at_desc") )
const ( EphemeralPolicyActionUnknownAction = EphemeralPolicyAction("unknown_action") // The version is deleted once it expires. EphemeralPolicyActionDelete = EphemeralPolicyAction("delete") // The version is disabled once it expires. EphemeralPolicyActionDisable = EphemeralPolicyAction("disable") )
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 ( ProductUnknownProduct = Product("unknown_product") ProductEdgeServices = Product("edge_services") )
const ( SecretStatusUnknownStatus = SecretStatus("unknown_status") SecretStatusReady = SecretStatus("ready") SecretStatusLocked = SecretStatus("locked") )
const ( SecretTypeUnknownType = SecretType("unknown_type") // Default type. SecretTypeOpaque = SecretType("opaque") // List of concatenated PEM blocks. They can contain certificates, private keys or any other PEM block types. SecretTypeCertificate = SecretType("certificate") // Flat JSON that allows you to set as many first level keys and scalar types as values (string, numeric, boolean) as you need. SecretTypeKeyValue = SecretType("key_value") // Flat JSON that allows you to set a username and a password. SecretTypeBasicCredentials = SecretType("basic_credentials") // Flat JSON that allows you to set an engine, username, password, host, database name, and port. SecretTypeDatabaseCredentials = SecretType("database_credentials") // Flat JSON that allows you to set an SSH key. SecretTypeSSHKey = SecretType("ssh_key") )
const ( SecretVersionStatusUnknownStatus = SecretVersionStatus("unknown_status") SecretVersionStatusEnabled = SecretVersionStatus("enabled") SecretVersionStatusDisabled = SecretVersionStatus("disabled") SecretVersionStatusDeleted = SecretVersionStatus("deleted") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
This API allows you to manage your Secret Manager services, for storing, accessing and sharing sensitive data such as passwords, API keys and certificates.
func (*API) AccessSecretVersion ¶
func (s *API) AccessSecretVersion(req *AccessSecretVersionRequest, opts ...scw.RequestOption) (*AccessSecretVersionResponse, error)
AccessSecretVersion: Access sensitive data in a secret's version specified by the `region`, `secret_id` and `revision` parameters.
func (*API) AccessSecretVersionByPath ¶
func (s *API) AccessSecretVersionByPath(req *AccessSecretVersionByPathRequest, opts ...scw.RequestOption) (*AccessSecretVersionResponse, error)
AccessSecretVersionByPath: Access sensitive data in a secret's version specified by the `region`, `secret_name`, `secret_path` and `revision` parameters.
func (*API) AddSecretOwner ¶
func (s *API) AddSecretOwner(req *AddSecretOwnerRequest, opts ...scw.RequestOption) error
AddSecretOwner: Allow a product to use the secret.
func (*API) BrowseSecrets ¶
func (s *API) BrowseSecrets(req *BrowseSecretsRequest, opts ...scw.RequestOption) (*BrowseSecretsResponse, error)
BrowseSecrets: Retrieve the list of secrets and folders for the given prefix. You must specify either the `organization_id` or the `project_id` and the `region`.
func (*API) CreateSecret ¶
func (s *API) CreateSecret(req *CreateSecretRequest, opts ...scw.RequestOption) (*Secret, error)
CreateSecret: Create a secret in a given region specified by the `region` parameter.
func (*API) CreateSecretVersion ¶
func (s *API) CreateSecretVersion(req *CreateSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
CreateSecretVersion: 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 given secret specified by the `region` and `secret_id` parameters.
func (*API) DeleteSecretVersion ¶
func (s *API) DeleteSecretVersion(req *DeleteSecretVersionRequest, opts ...scw.RequestOption) error
DeleteSecretVersion: 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: 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: Make a specific version accessible. You must specify the `region`, `secret_id` and `revision` parameters.
func (*API) GetSecret ¶
func (s *API) GetSecret(req *GetSecretRequest, opts ...scw.RequestOption) (*Secret, error)
GetSecret: Retrieve the metadata of a secret specified by the `region` and `secret_id` parameters.
func (*API) GetSecretVersion ¶
func (s *API) GetSecretVersion(req *GetSecretVersionRequest, opts ...scw.RequestOption) (*SecretVersion, error)
GetSecretVersion: Retrieve the metadata of a secret's given version specified by the `region`, `secret_id` and `revision` parameters.
func (*API) ListSecretTypes ¶
func (s *API) ListSecretTypes(req *ListSecretTypesRequest, opts ...scw.RequestOption) (*ListSecretTypesResponse, error)
ListSecretTypes: List all secret types created within a given Project.
func (*API) ListSecretVersions ¶
func (s *API) ListSecretVersions(req *ListSecretVersionsRequest, opts ...scw.RequestOption) (*ListSecretVersionsResponse, error)
ListSecretVersions: Retrieve the list of a given secret's versions specified by the `secret_id` and `region` parameters.
func (*API) ListSecrets ¶
func (s *API) ListSecrets(req *ListSecretsRequest, opts ...scw.RequestOption) (*ListSecretsResponse, error)
ListSecrets: 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 all tags associated with secrets within a given Project.
func (*API) ProtectSecret ¶
func (s *API) ProtectSecret(req *ProtectSecretRequest, opts ...scw.RequestOption) (*Secret, error)
ProtectSecret: Enable secret protection for a given secret specified by the `secret_id` parameter. Enabling secret protection means that your secret can be read and modified, but it cannot be deleted.
func (*API) UnprotectSecret ¶
func (s *API) UnprotectSecret(req *UnprotectSecretRequest, opts ...scw.RequestOption) (*Secret, error)
UnprotectSecret: Disable secret protection for a given secret specified by the `secret_id` parameter. Disabling secret protection means that your secret can be read, modified and deleted.
func (*API) UpdateSecret ¶
func (s *API) UpdateSecret(req *UpdateSecretRequest, opts ...scw.RequestOption) (*Secret, error)
UpdateSecret: Edit a secret's metadata such as name, tag(s), description and ephemeral policy. 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: Edit the metadata of a secret's given version, specified by the `region`, `secret_id` and `revision` parameters.
type AccessSecretVersionByPathRequest ¶
type AccessSecretVersionByPathRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // Revision: the first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: // - an integer (the revision number) // - "latest" (the latest revision) // - "latest_enabled" (the latest enabled revision). Revision string `json:"-"` // SecretPath: secret's path. SecretPath string `json:"-"` // SecretName: secret's name. SecretName string `json:"-"` // ProjectID: ID of the Project to target. ProjectID string `json:"-"` }
AccessSecretVersionByPathRequest: access secret version by path request.
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: the first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: // - a number (the revision number) // - "latest" (the latest revision) // - "latest_enabled" (the latest enabled revision). Revision string `json:"-"` }
AccessSecretVersionRequest: access secret version request.
type AccessSecretVersionResponse ¶
type AccessSecretVersionResponse struct { // SecretID: ID of the secret. SecretID string `json:"secret_id"` // Revision: 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: this field is only available if a CRC32 was supplied during the creation of the version. DataCrc32 *uint32 `json:"data_crc32"` // Type: see the `Secret.Type` enum for a description of values. // Default value: unknown_type Type SecretType `json:"type"` }
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:"-"` // Product: see `Product` enum for description of values. // Default value: unknown_product Product Product `json:"product"` }
AddSecretOwnerRequest: add secret owner request.
type BasicCredentials ¶
type BasicCredentials struct { // Username: the username or identifier associated with the credentials. Username string `json:"username"` // Password: the password associated with the credentials. Password string `json:"password"` }
BasicCredentials: basic credentials.
type BrowseSecretsRequest ¶
type BrowseSecretsRequest struct { // Region: region to target. If none is passed will use default region from the config. Region scw.Region `json:"-"` // ProjectID: filter by Project ID (optional). ProjectID *string `json:"-"` // OrderBy: default value: name_asc OrderBy BrowseSecretsRequestOrderBy `json:"-"` // Prefix: filter secrets and folders for a given prefix (default /). Prefix string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` // Tags: filter secrets by tags. Tags []string `json:"-"` // Type: filter by secret type (optional). // Default value: unknown_type Type SecretType `json:"-"` }
BrowseSecretsRequest: browse secrets request.
type BrowseSecretsRequestOrderBy ¶
type BrowseSecretsRequestOrderBy string
func (BrowseSecretsRequestOrderBy) MarshalJSON ¶
func (enum BrowseSecretsRequestOrderBy) MarshalJSON() ([]byte, error)
func (BrowseSecretsRequestOrderBy) String ¶
func (enum BrowseSecretsRequestOrderBy) String() string
func (*BrowseSecretsRequestOrderBy) UnmarshalJSON ¶
func (enum *BrowseSecretsRequestOrderBy) UnmarshalJSON(data []byte) error
func (BrowseSecretsRequestOrderBy) Values ¶
func (enum BrowseSecretsRequestOrderBy) Values() []BrowseSecretsRequestOrderBy
type BrowseSecretsResponse ¶
type BrowseSecretsResponse struct { // Items: repeated item of type secret or folder, sorted by the request parameter. Items []*BrowseSecretsResponseItem `json:"items"` // CurrentPath: current path for the given prefix. CurrentPath string `json:"current_path"` // TotalCount: count of all secrets and folders matching the requested criteria. TotalCount uint64 `json:"total_count"` }
BrowseSecretsResponse: browse secrets response.
func (*BrowseSecretsResponse) UnsafeAppend ¶
func (r *BrowseSecretsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*BrowseSecretsResponse) UnsafeGetTotalCount ¶
func (r *BrowseSecretsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type BrowseSecretsResponseItem ¶
type BrowseSecretsResponseItem struct { Name string `json:"name"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` // Precisely one of Secret, Folder must be set. Secret *BrowseSecretsResponseItemSecretDetails `json:"secret,omitempty"` // Precisely one of Secret, Folder must be set. Folder *BrowseSecretsResponseItemFolderDetails `json:"folder,omitempty"` }
BrowseSecretsResponseItem: browse secrets response item.
type BrowseSecretsResponseItemFolderDetails ¶
type BrowseSecretsResponseItemFolderDetails struct { }
BrowseSecretsResponseItemFolderDetails: browse secrets response item folder details.
type BrowseSecretsResponseItemSecretDetails ¶
type BrowseSecretsResponseItemSecretDetails struct { ID string `json:"id"` Tags []string `json:"tags"` VersionCount uint32 `json:"version_count"` Protected bool `json:"protected"` EphemeralPolicy *EphemeralPolicy `json:"ephemeral_policy"` // Type: default value: unknown_type Type SecretType `json:"type"` }
BrowseSecretsResponseItemSecretDetails: browse secrets response item secret details.
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,omitempty"` // Type: (Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`. // Default value: unknown_type Type SecretType `json:"type"` // Path: (Optional.) Location of the secret in the directory structure. If not specified, the path is `/`. Path *string `json:"path,omitempty"` // EphemeralPolicy: (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions. EphemeralPolicy *EphemeralPolicy `json:"ephemeral_policy,omitempty"` // Protected: a protected secret cannot be deleted. Protected bool `json:"protected"` }
CreateSecretRequest: create secret request.
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,omitempty"` // DisablePrevious: (Optional.) If there is no previous version or if the previous version was already disabled, does nothing. DisablePrevious *bool `json:"disable_previous,omitempty"` // DataCrc32: 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,omitempty"` }
CreateSecretVersionRequest: create secret version request.
type DatabaseCredentials ¶
type DatabaseCredentials struct { // Engine: supported database engines are: 'postgres', 'mysql', 'other'. Engine string `json:"engine"` // Username: the username used to authenticate to the database server. Username string `json:"username"` // Password: the password used to authenticate to the database server. Password string `json:"password"` // Host: the hostname or resolvable DNS name of the database server. Host string `json:"host"` // Dbname: the name of the database to connect to. Dbname string `json:"dbname"` // Port: the port must be an integer ranging from 0 to 65535. Port string `json:"port"` }
DatabaseCredentials: database credentials.
type DeleteSecretRequest ¶
type DeleteSecretRequest 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:"-"` }
DeleteSecretRequest: delete secret request.
type DeleteSecretVersionRequest ¶
type DeleteSecretVersionRequest 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: the first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: // - a number (the revision number) // - "latest" (the latest revision) // - "latest_enabled" (the latest enabled revision). Revision string `json:"-"` }
DeleteSecretVersionRequest: delete secret version request.
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: the first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: // - a number (the revision number) // - "latest" (the latest revision) // - "latest_enabled" (the latest enabled revision). Revision string `json:"-"` }
DisableSecretVersionRequest: disable secret version request.
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: the first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: // - a number (the revision number) // - "latest" (the latest revision) // - "latest_enabled" (the latest enabled revision). Revision string `json:"-"` }
EnableSecretVersionRequest: enable secret version request.
type EphemeralPolicy ¶
type EphemeralPolicy struct { // TimeToLive: time frame, from one second and up to one year, during which the secret's versions are valid. TimeToLive *scw.Duration `json:"time_to_live"` // ExpiresOnceAccessed: returns `true` if the version expires after a single user access. ExpiresOnceAccessed *bool `json:"expires_once_accessed"` // Action: see the `EphemeralPolicy.Action` enum for a description of values. // Default value: unknown_action Action EphemeralPolicyAction `json:"action"` }
EphemeralPolicy: ephemeral policy.
type EphemeralPolicyAction ¶
type EphemeralPolicyAction string
func (EphemeralPolicyAction) MarshalJSON ¶
func (enum EphemeralPolicyAction) MarshalJSON() ([]byte, error)
func (EphemeralPolicyAction) String ¶
func (enum EphemeralPolicyAction) String() string
func (*EphemeralPolicyAction) UnmarshalJSON ¶
func (enum *EphemeralPolicyAction) UnmarshalJSON(data []byte) error
func (EphemeralPolicyAction) Values ¶
func (enum EphemeralPolicyAction) Values() []EphemeralPolicyAction
type EphemeralProperties ¶
type EphemeralProperties struct { // ExpiresAt: (Optional.) If not specified, the version does not have an expiration date. ExpiresAt *time.Time `json:"expires_at"` // ExpiresOnceAccessed: (Optional.) If not specified, the version can be accessed an unlimited amount of times. ExpiresOnceAccessed *bool `json:"expires_once_accessed"` // Action: see `EphemeralPolicy.Action` enum for a description of values. // Default value: unknown_action Action EphemeralPolicyAction `json:"action"` }
EphemeralProperties: ephemeral properties.
type GetSecretRequest ¶
type GetSecretRequest 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:"-"` }
GetSecretRequest: get secret request.
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: the first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: // - a number (the revision number) // - "latest" (the latest revision) // - "latest_enabled" (the latest enabled revision). Revision string `json:"-"` }
GetSecretVersionRequest: get secret version request.
type ListSecretTypesRequest ¶
type ListSecretTypesRequest 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. ProjectID string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` }
ListSecretTypesRequest: list secret types request.
type ListSecretTypesResponse ¶
type ListSecretTypesResponse struct { // Types: list of secret types. Types []SecretType `json:"types"` // TotalCount: count of all secret types matching the requested criteria. TotalCount uint64 `json:"total_count"` }
ListSecretTypesResponse: list secret types response.
func (*ListSecretTypesResponse) UnsafeAppend ¶
func (r *ListSecretTypesResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListSecretTypesResponse) UnsafeGetTotalCount ¶
func (r *ListSecretTypesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
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:"-"` }
ListSecretVersionsRequest: list secret versions request.
type ListSecretVersionsResponse ¶
type ListSecretVersionsResponse struct { // Versions: single page of versions. Versions []*SecretVersion `json:"versions"` // TotalCount: number of versions. TotalCount uint64 `json:"total_count"` }
ListSecretVersionsResponse: list secret versions response.
func (*ListSecretVersionsResponse) UnsafeAppend ¶
func (r *ListSecretVersionsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListSecretVersionsResponse) UnsafeGetTotalCount ¶
func (r *ListSecretVersionsResponse) UnsafeGetTotalCount() uint64
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:"-"` // Path: filter by exact path (optional). Path *string `json:"-"` // Ephemeral: filter by ephemeral / not ephemeral (optional). Ephemeral *bool `json:"-"` // Type: filter by secret type (optional). // Default value: unknown_type Type SecretType `json:"-"` }
ListSecretsRequest: list secrets request.
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
func (ListSecretsRequestOrderBy) Values ¶
func (enum ListSecretsRequestOrderBy) Values() []ListSecretsRequestOrderBy
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 uint64 `json:"total_count"` }
ListSecretsResponse: list secrets response.
func (*ListSecretsResponse) UnsafeAppend ¶
func (r *ListSecretsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListSecretsResponse) UnsafeGetTotalCount ¶
func (r *ListSecretsResponse) UnsafeGetTotalCount() uint64
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. ProjectID string `json:"-"` Page *int32 `json:"-"` PageSize *uint32 `json:"-"` }
ListTagsRequest: list tags request.
type ListTagsResponse ¶
type ListTagsResponse struct { // Tags: list of tags. Tags []string `json:"tags"` // TotalCount: count of all tags matching the requested criteria. TotalCount uint64 `json:"total_count"` }
ListTagsResponse: list tags response.
func (*ListTagsResponse) UnsafeAppend ¶
func (r *ListTagsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListTagsResponse) UnsafeGetTotalCount ¶
func (r *ListTagsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ProtectSecretRequest ¶
type ProtectSecretRequest 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 to enable secret protection for. SecretID string `json:"-"` }
ProtectSecretRequest: protect secret request.
type SSHKey ¶
type SSHKey struct { // SSHPrivateKey: the private SSH key. SSHPrivateKey string `json:"ssh_private_key"` }
SSHKey: ssh key.
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: * `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: unknown_status 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"` // Managed: returns `true` for secrets that are managed by another product. Managed bool `json:"managed"` // Protected: returns `true` for protected secrets that cannot be deleted. Protected bool `json:"protected"` // Type: see the `Secret.Type` enum for a description of values. // Default value: unknown_type Type SecretType `json:"type"` // Path: location of the secret in the directory structure. Path string `json:"path"` // EphemeralPolicy: (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions. EphemeralPolicy *EphemeralPolicy `json:"ephemeral_policy"` // UsedBy: list of Scaleway resources that can access and manage the secret. UsedBy []Product `json:"used_by"` // 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
func (SecretStatus) Values ¶
func (enum SecretStatus) Values() []SecretStatus
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
func (SecretType) Values ¶
func (enum SecretType) Values() []SecretType
type SecretVersion ¶
type SecretVersion struct { // Revision: 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: * `unknown_status`: the version is in an invalid state. // * `enabled`: the version is accessible. // * `disabled`: the version is not accessible but can be enabled. // * `deleted`: the version is permanently deleted. It is not possible to recover it. // Default value: unknown_status 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"` // Latest: returns `true` if the version is the latest. Latest bool `json:"latest"` // EphemeralProperties: returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires. EphemeralProperties *EphemeralProperties `json:"ephemeral_properties"` }
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
func (SecretVersionStatus) Values ¶
func (enum SecretVersionStatus) Values() []SecretVersionStatus
type UnprotectSecretRequest ¶
type UnprotectSecretRequest 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 to disable secret protection for. SecretID string `json:"-"` }
UnprotectSecretRequest: unprotect secret request.
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,omitempty"` // Tags: secret's updated list of tags (optional). Tags *[]string `json:"tags,omitempty"` // Description: description of the secret. Description *string `json:"description,omitempty"` // Path: (Optional.) Location of the folder in the directory structure. If not specified, the path is `/`. Path *string `json:"path,omitempty"` // EphemeralPolicy: (Optional.) Policy that defines whether/when a secret's versions expire. EphemeralPolicy *EphemeralPolicy `json:"ephemeral_policy,omitempty"` }
UpdateSecretRequest: update secret request.
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: the first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: // - a number (the revision number) // - "latest" (the latest revision) // - "latest_enabled" (the latest enabled revision). Revision string `json:"-"` // Description: description of the version. Description *string `json:"description,omitempty"` // EphemeralProperties: (Optional.) Properties that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires. EphemeralProperties *EphemeralProperties `json:"ephemeral_properties,omitempty"` }
UpdateSecretVersionRequest: update secret version request.