Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
Types ¶
type CreateSecretOpts ¶
type CreateSecretOpts struct { Name string `json:"name" required:"true"` KmsKeyID string `json:"kms_key_id,omitempty"` Description string `json:"description,omitempty"` SecretType string `json:"secret_type,omitempty"` EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` EventSubscriptions []string `json:"event_subscriptions,omitempty"` SecretBinary string `json:"secret_binary,omitempty" xor:"SecretString"` SecretString string `json:"secret_string,omitempty" xor:"SecretBinary"` }
type CreateVersionOpts ¶
type Secret ¶
type Secret struct { ID string `json:"id"` Name string `json:"name"` State string `json:"state"` KmsKeyID string `json:"kms_key_id"` Description string `json:"description"` CreateTime int `json:"create_time"` UpdateTime int `json:"update_time"` ScheduledDeleteTime int `json:"scheduled_delete_time"` SecretType string `json:"secret_type"` EnterpriseProjectID string `json:"enterprise_project_id"` EventSubscriptions []interface{} `json:"event_subscriptions"` }
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateSecretOpts) (*Secret, error)
func Update ¶
func Update(c *golangsdk.ServiceClient, secretName string, opts UpdateSecretOpts) (*Secret, error)
type UpdateSecretOpts ¶
type UpdateVersionOpts ¶
type UpdateVersionOpts struct {
ExpireTime int `json:"expire_time" required:"true"`
}
type Version ¶
type Version struct { VersionMetadata VersionMetadata `json:"version_metadata"` SecretBinary string `json:"secret_binary"` SecretString string `json:"secret_string"` }
func ShowSecretVersion ¶
func UpdateSecretVersion ¶
func UpdateSecretVersion(c *golangsdk.ServiceClient, secretName string, versionId string, opts UpdateVersionOpts) (*Version, error)
UpdateSecretVersion only support update expire_time field. The current method can only update secret in the ENABLED state
type VersionMetadata ¶
type VersionMetadata struct { ID string `json:"id"` CreateTime int `json:"create_time"` KmsKeyID string `json:"kms_key_id"` SecretName string `json:"secret_name"` VersionStages []string `json:"version_stages"` ExpireTime int `json:"expire_time"` }
VersionMetadata 凭据版本被标记的状态。
func CreateSecretVersion ¶
func CreateSecretVersion(c *golangsdk.ServiceClient, secretName string, opts CreateVersionOpts) (*VersionMetadata, error)
func ListSecretVersions ¶
func ListSecretVersions(c *golangsdk.ServiceClient, secretName string) ([]VersionMetadata, error)
ListSecretVersions 查询凭据的版本列表
Click to show internal directories.
Click to hide internal directories.