kms

package
v0.0.0-...-ab98a91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// KMSDefaultEndpoint is the default API endpoint of KMS services
	KMSDefaultEndpoint = "https://kms.cn-hangzhou.aliyuncs.com"
	KMSAPIVersion      = "2016-01-20"
	KMSServiceCode     = "kms"
)
View Source
const (
	KeySpec_AES_256 = KeySpec("AES_256")
	KeySpec_AES_128 = KeySpec("AES_128")
)
View Source
const (
	KEY_USAGE_ENCRYPT_DECRYPT = KeyUsage("ENCRYPT/DECRYPT")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelKeyDeletionResponse

type CancelKeyDeletionResponse struct {
	common.Response
}

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(accessKeyId, accessKeySecret string) *Client

NewClient creates a new instance of KMS client

func NewClientWithEndpoint

func NewClientWithEndpoint(endpoint string, accessKeyId string, accessKeySecret string) *Client

func NewClientWithRegion

func NewClientWithRegion(accessKeyId string, accessKeySecret string, regionID common.Region) *Client

func NewECSClientWithSecurityToken

func NewECSClientWithSecurityToken(accessKeyId string, accessKeySecret string, securityToken string, regionID common.Region) *Client

func NewKMSClientWithEndpointAndSecurityToken

func NewKMSClientWithEndpointAndSecurityToken(endpoint string, accessKeyId string, accessKeySecret string, securityToken string, regionID common.Region) *Client

func (*Client) CancelKeyDeletion

func (client *Client) CancelKeyDeletion(keyId string) (*CancelKeyDeletionResponse, error)

func (*Client) CreateKey

func (client *Client) CreateKey(args *CreateKeyArgs) (*CreateKeyResponse, error)

func (*Client) Decrypt

func (client *Client) Decrypt(args *DecryptArgs) (*DecryptResponse, error)

func (*Client) DescribeKey

func (client *Client) DescribeKey(keyId string) (*DescribeKeyResponse, error)

func (*Client) DescribeRegions

func (client *Client) DescribeRegions() (*DescribeRegionsResponse, error)

func (*Client) DisableKey

func (client *Client) DisableKey(keyId string) (*DisableKeyResponse, error)

func (*Client) EnableKey

func (client *Client) EnableKey(keyId string) (*EnableKeyResponse, error)

func (*Client) Encrypt

func (client *Client) Encrypt(args *EncryptAgrs) (*EncryptResponse, error)

func (*Client) GenerateDataKey

func (client *Client) GenerateDataKey(args *GenerateDataKeyArgs) (*GenerateDataKeyResponse, error)

func (*Client) ListKeys

func (client *Client) ListKeys(args *ListKeysArgs) (*ListKeysResponse, error)

func (*Client) ScheduleKeyDeletion

func (client *Client) ScheduleKeyDeletion(args *ScheduleKeyDeletionArgs) (*ScheduleKeyDeletionResponse, error)

type CreateKeyArgs

type CreateKeyArgs struct {
	KeyUsage    KeyUsage
	Description string
}

type CreateKeyResponse

type CreateKeyResponse struct {
	common.Response
	KeyMetadata KeyMetadata
}

type DecryptArgs

type DecryptArgs struct {
	CiphertextBlob    string
	EncryptionContext map[string]string
}

https://help.aliyun.com/document_detail/28950.html?spm=5176.doc28947.6.564.JrFZRr

type DecryptResponse

type DecryptResponse struct {
	common.Response
	Plaintext string
	KeyId     string
}

type DescribeKeyResponse

type DescribeKeyResponse struct {
	common.Response
	KeyMetadata KeyMetadata
}

type DescribeRegionsArgs

type DescribeRegionsArgs struct {
}

type DescribeRegionsResponse

type DescribeRegionsResponse struct {
	common.Response
	Regions Regions
}

type DisableKeyResponse

type DisableKeyResponse struct {
	common.Response
}

type EnableKeyResponse

type EnableKeyResponse struct {
	common.Response
}

type EncryptAgrs

type EncryptAgrs struct {
	KeyId             string
	Plaintext         string
	EncryptionContext map[string]string
}

https://help.aliyun.com/document_detail/28949.html?spm=5176.doc28950.6.569.kI1mTw

type EncryptResponse

type EncryptResponse struct {
	common.Response
	CiphertextBlob string
	KeyId          string
}

type GenerateDataKeyArgs

type GenerateDataKeyArgs struct {
	KeyId             string
	KeySpec           KeySpec
	NumberOfBytes     int
	EncryptionContext map[string]string
}

type GenerateDataKeyResponse

type GenerateDataKeyResponse struct {
	common.Response
	CiphertextBlob string
	KeyId          string
	RequestId      string
}

type Key

type Key struct {
	KeyId  string
	KeyArn string
}

type KeyMetadata

type KeyMetadata struct {
	CreationDate string
	Description  string
	KeyId        string
	KeyState     string
	KeyUsage     string
	DeleteDate   string
	Creator      string
	Arn          string
}

type Keys

type Keys struct {
	Key []Key
}

type ListKeysResponse

type ListKeysResponse struct {
	common.Response
	common.PaginationResult
	Keys Keys
}

type Region

type Region struct {
	RegionId string
}

type Regions

type Regions struct {
	Region []Region
}

type ScheduleKeyDeletionArgs

type ScheduleKeyDeletionArgs struct {
	KeyId               string
	PendingWindowInDays int
}

https://help.aliyun.com/document_detail/44196.html?spm=5176.doc28951.6.572.9Oqd9S

type ScheduleKeyDeletionResponse

type ScheduleKeyDeletionResponse struct {
	common.Response
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL