crs

package
v1.81.78 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REDIS_VERSION_MASTER_SLAVE_REDIS  = 2
	REDIS_VERSION_MASTER_SLAVE_CKV    = 3
	REDIS_VERSION_CLUSTER_CKV         = 4
	REDIS_VERSION_STANDALONE_REDIS    = 5
	REDIS_VERSION_MASTER_SLAVE_REDIS4 = 6
	REDIS_VERSION_CLUSTER_REDIS       = 7
	REDIS_VERSION_MASTER_SLAVE_REDIS5 = 8
	REDIS_VERSION_CLUSTER_REDIS5      = 9
)

redis version https://cloud.tencent.com/document/api/239/20022#ProductConf

View Source
const (
	REDIS_STATUS_INIT       = 0
	REDIS_STATUS_PROCESSING = 1
	REDIS_STATUS_ONLINE     = 2
	REDIS_STATUS_ISOLATE    = -2
	REDIS_STATUS_TODELETE   = -3
)

redis status https://cloud.tencent.com/document/product/239/20018

View Source
const (
	REDIS_ORDER_SUCCESS_DELIVERY = 4
	REDIS_ORDER_PAYMENT          = 12
)

https://cloud.tencent.com/document/api/239/20022#TradeDealDetail Order status 1: unpaid 2: paid, not shipped 3: in shipment 4: successfully 5: shipped failed 6: refunded 7: closed order 8: expired 9: order no longer valid 10: product no longer valid 11: payment refused 12: in payment

View Source
const (
	REDIS_TASK_PREPARING = "preparing"
	REDIS_TASK_RUNNING   = "running"
	REDIS_TASK_SUCCEED   = "succeed"
	REDIS_TASK_FAILED    = "failed"
	REDIS_TASK_ERROR     = "error"
)

https://cloud.tencent.com/document/api/239/30601

View Source
const (
	REDIS_CHARGE_TYPE_POSTPAID = "POSTPAID"
	REDIS_CHARGE_TYPE_PREPAID  = "PREPAID"
)
View Source
const PRODUCT string = "redis"
View Source
const RedisInstanceNotFound = "ResourceNotFound.InstanceNotExists"

sdk redis not found error

Variables

View Source
var REDIS_CHARGE_TYPE_NAME = map[int64]string{
	0: REDIS_CHARGE_TYPE_POSTPAID,
	1: REDIS_CHARGE_TYPE_PREPAID,
}
View Source
var REDIS_MODIFY_NETWORK_CONFIG = []string{"changeVip", "changeVpc", "changeBaseToVpc", "changeVPort"}
View Source
var REDIS_NAMES = map[int64]string{
	REDIS_VERSION_MASTER_SLAVE_REDIS:  "master_slave_redis",
	REDIS_VERSION_MASTER_SLAVE_CKV:    "master_slave_ckv",
	REDIS_VERSION_CLUSTER_REDIS:       "cluster_redis",
	REDIS_VERSION_CLUSTER_CKV:         "cluster_ckv",
	REDIS_VERSION_STANDALONE_REDIS:    "standalone_redis",
	REDIS_VERSION_MASTER_SLAVE_REDIS4: "master_slave_redis4.0",
	REDIS_VERSION_MASTER_SLAVE_REDIS5: "master_slave_redis5.0",
	REDIS_VERSION_CLUSTER_REDIS5:      "cluster_redis5.0",
}
View Source
var REDIS_PREPAID_PERIOD = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36}
View Source
var REDIS_RECYCLE_TIME = []int{0, 1, 2, 3, 7, 15}
View Source
var REDIS_STATUS = map[int64]string{
	REDIS_STATUS_INIT:       "init",
	REDIS_STATUS_PROCESSING: "processing",
	REDIS_STATUS_ONLINE:     "online",
	REDIS_STATUS_ISOLATE:    "isolate",
	REDIS_STATUS_TODELETE:   "todelete",
}

Functions

func DataSourceTencentCloudRedisBackup

func DataSourceTencentCloudRedisBackup() *schema.Resource

func DataSourceTencentCloudRedisBackupDownloadInfo

func DataSourceTencentCloudRedisBackupDownloadInfo() *schema.Resource

func DataSourceTencentCloudRedisInstanceNodeInfo

func DataSourceTencentCloudRedisInstanceNodeInfo() *schema.Resource

func DataSourceTencentCloudRedisInstanceShards

func DataSourceTencentCloudRedisInstanceShards() *schema.Resource

func DataSourceTencentCloudRedisInstanceTaskList

func DataSourceTencentCloudRedisInstanceTaskList() *schema.Resource

func DataSourceTencentCloudRedisInstanceZoneInfo

func DataSourceTencentCloudRedisInstanceZoneInfo() *schema.Resource

func DataSourceTencentCloudRedisInstances

func DataSourceTencentCloudRedisInstances() *schema.Resource

func DataSourceTencentCloudRedisRecordsParam

func DataSourceTencentCloudRedisRecordsParam() *schema.Resource

func DataSourceTencentCloudRedisZoneConfig

func DataSourceTencentCloudRedisZoneConfig() *schema.Resource

func ResourceTencentCloudRedisAccount

func ResourceTencentCloudRedisAccount() *schema.Resource

func ResourceTencentCloudRedisBackupConfig

func ResourceTencentCloudRedisBackupConfig() *schema.Resource

func ResourceTencentCloudRedisBackupDownloadRestriction

func ResourceTencentCloudRedisBackupDownloadRestriction() *schema.Resource

func ResourceTencentCloudRedisBackupOperation

func ResourceTencentCloudRedisBackupOperation() *schema.Resource

func ResourceTencentCloudRedisClearInstanceOperation

func ResourceTencentCloudRedisClearInstanceOperation() *schema.Resource

func ResourceTencentCloudRedisConnectionConfig

func ResourceTencentCloudRedisConnectionConfig() *schema.Resource

func ResourceTencentCloudRedisInstance

func ResourceTencentCloudRedisInstance() *schema.Resource

func ResourceTencentCloudRedisMaintenanceWindow

func ResourceTencentCloudRedisMaintenanceWindow() *schema.Resource

func ResourceTencentCloudRedisParam added in v1.81.62

func ResourceTencentCloudRedisParam() *schema.Resource

func ResourceTencentCloudRedisParamTemplate

func ResourceTencentCloudRedisParamTemplate() *schema.Resource

func ResourceTencentCloudRedisReadOnly

func ResourceTencentCloudRedisReadOnly() *schema.Resource

func ResourceTencentCloudRedisRenewInstanceOperation

func ResourceTencentCloudRedisRenewInstanceOperation() *schema.Resource

func ResourceTencentCloudRedisReplicaReadonly

func ResourceTencentCloudRedisReplicaReadonly() *schema.Resource

func ResourceTencentCloudRedisReplicateAttachment

func ResourceTencentCloudRedisReplicateAttachment() *schema.Resource

func ResourceTencentCloudRedisSecurityGroupAttachment

func ResourceTencentCloudRedisSecurityGroupAttachment() *schema.Resource

func ResourceTencentCloudRedisSsl

func ResourceTencentCloudRedisSsl() *schema.Resource

func ResourceTencentCloudRedisStartupInstanceOperation

func ResourceTencentCloudRedisStartupInstanceOperation() *schema.Resource

func ResourceTencentCloudRedisSwitchMaster

func ResourceTencentCloudRedisSwitchMaster() *schema.Resource

func ResourceTencentCloudRedisUpgradeCacheVersionOperation

func ResourceTencentCloudRedisUpgradeCacheVersionOperation() *schema.Resource

func ResourceTencentCloudRedisUpgradeMultiZoneOperation

func ResourceTencentCloudRedisUpgradeMultiZoneOperation() *schema.Resource

func ResourceTencentCloudRedisUpgradeProxyVersionOperation

func ResourceTencentCloudRedisUpgradeProxyVersionOperation() *schema.Resource

func TencentCloudRedisGetRemoveNodesByIds

func TencentCloudRedisGetRemoveNodesByIds(ids []int, nodes []*redis.RedisNodeInfo) (result []*redis.RedisNodeInfo)

Types

type RedisService

type RedisService struct {
	// contains filtered or unexported fields
}

func NewRedisService

func NewRedisService(client *connectivity.TencentCloudClient) RedisService

func (*RedisService) AddReplicationInstance

func (me *RedisService) AddReplicationInstance(ctx context.Context, groupId, instanceId, instanceRole string) error

func (*RedisService) ApplyParamsTemplate

func (me *RedisService) ApplyParamsTemplate(ctx context.Context, request *redis.ApplyParamsTemplateRequest) (taskIds []*int64, errRet error)

func (*RedisService) CheckRedisDestroyOk

func (me *RedisService) CheckRedisDestroyOk(ctx context.Context, redisId string) (has bool,
	isolated bool,
	errRet error)

func (*RedisService) CheckRedisOnlineOk

func (me *RedisService) CheckRedisOnlineOk(ctx context.Context, redisId string, retryTimeout time.Duration) (has bool,
	online bool,
	info *redis.InstanceSet,
	errRet error)

func (*RedisService) CheckRedisUpdateOk

func (me *RedisService) CheckRedisUpdateOk(ctx context.Context, redisId string) (errRet error)

func (*RedisService) CleanUpInstance

func (me *RedisService) CleanUpInstance(ctx context.Context, redisId string) (taskId int64, errRet error)

func (*RedisService) CreateInstances

func (me *RedisService) CreateInstances(ctx context.Context,
	zoneName string, typeId int64, password, vpcId, subnetId, redisName string,
	memSize, projectId, port int64,
	securityGroups []string,
	redisShardNum,
	redisReplicasNum int,
	chargeTypeID int64,
	chargePeriod uint64,
	nodeInfo []*redis.RedisNodeInfo,
	noAuth bool,
	autoRenewFlag int,
	replicasReadonly bool,
	paramsTemplateId string,
) (instanceIds []*string, errRet error)

func (*RedisService) CreateParamTemplate

func (me *RedisService) CreateParamTemplate(ctx context.Context, request *redis.CreateParamTemplateRequest) (id string, errRet error)

func (*RedisService) DeleteParamTemplate

func (me *RedisService) DeleteParamTemplate(ctx context.Context, request *redis.DeleteParamTemplateRequest) (errRet error)

func (*RedisService) DeleteRedisAccountById

func (me *RedisService) DeleteRedisAccountById(ctx context.Context, instanceId, accountName string) (taskId int64, errRet error)

func (*RedisService) DeleteRedisReplicateAttachmentById

func (me *RedisService) DeleteRedisReplicateAttachmentById(ctx context.Context, instanceId string, groupId string) (errRet error)

func (*RedisService) DeleteRedisSecurityGroupAttachmentById

func (me *RedisService) DeleteRedisSecurityGroupAttachmentById(ctx context.Context, product string, instanceId string, securityGroupId string) (errRet error)

func (*RedisService) DescribeAutoBackupConfig

func (me *RedisService) DescribeAutoBackupConfig(ctx context.Context, redisId string) (weekDays []string, timePeriod string, errRet error)

func (*RedisService) DescribeBandwidthRangeById

func (me *RedisService) DescribeBandwidthRangeById(ctx context.Context, instanceId string) (connectionConfig *redis.DescribeBandwidthRangeResponseParams, errRet error)

func (*RedisService) DescribeDBSecurityGroups

func (me *RedisService) DescribeDBSecurityGroups(ctx context.Context, product string, instanceId string) (sg []string, errRet error)

DescribeDBSecurityGroups support query different type of DB by passing product name

func (*RedisService) DescribeInstanceDealDetail

func (me *RedisService) DescribeInstanceDealDetail(ctx context.Context, dealId string) (done bool, redisId string, errRet error)

func (*RedisService) DescribeInstanceSecurityGroup

func (me *RedisService) DescribeInstanceSecurityGroup(ctx context.Context, redisId string) (sg []string, errRet error)

func (*RedisService) DescribeInstances

func (me *RedisService) DescribeInstances(ctx context.Context, zoneName, searchKey string,
	projectId, needLimit int64) (instances []TencentCloudRedisDetail, errRet error)

func (*RedisService) DescribeParamTemplateById

func (me *RedisService) DescribeParamTemplateById(ctx context.Context, id string) (params *redis.ParamTemplateInfo, errRet error)

func (*RedisService) DescribeParamTemplateInfo

func (me *RedisService) DescribeParamTemplateInfo(ctx context.Context, templateId string) (info *redis.DescribeParamTemplateInfoResponseParams, errRet error)

func (*RedisService) DescribeParamTemplates

func (me *RedisService) DescribeParamTemplates(ctx context.Context, request *redis.DescribeParamTemplatesRequest) (params []*redis.ParamTemplateInfo, errRet error)

func (*RedisService) DescribeRedisAccountById

func (me *RedisService) DescribeRedisAccountById(ctx context.Context, instanceId, accountName string) (account *redis.Account, errRet error)

func (*RedisService) DescribeRedisBackupByFilter

func (me *RedisService) DescribeRedisBackupByFilter(ctx context.Context, param map[string]interface{}) (backup []*redis.RedisBackupSet, errRet error)

func (*RedisService) DescribeRedisBackupDownloadInfoByFilter

func (me *RedisService) DescribeRedisBackupDownloadInfoByFilter(ctx context.Context, param map[string]interface{}) (backup []*redis.BackupDownloadInfo, errRet error)

func (*RedisService) DescribeRedisBackupDownloadRestrictionById

func (me *RedisService) DescribeRedisBackupDownloadRestrictionById(ctx context.Context) (backupDownloadRestriction *redis.DescribeBackupDownloadRestrictionResponseParams, errRet error)

func (*RedisService) DescribeRedisInstanceById

func (me *RedisService) DescribeRedisInstanceById(ctx context.Context, instanceId string) (param *redis.InstanceSet, errRet error)

func (*RedisService) DescribeRedisInstanceNodeInfoByFilter

func (me *RedisService) DescribeRedisInstanceNodeInfoByFilter(ctx context.Context, param map[string]interface{}) (instanceNodeInfo *redis.DescribeInstanceNodeInfoResponseParams, errRet error)

func (*RedisService) DescribeRedisInstanceShardsByFilter

func (me *RedisService) DescribeRedisInstanceShardsByFilter(ctx context.Context, param map[string]interface{}) (instanceShards []*redis.InstanceClusterShard, errRet error)

func (*RedisService) DescribeRedisInstanceTaskListByFilter

func (me *RedisService) DescribeRedisInstanceTaskListByFilter(ctx context.Context, param map[string]interface{}) (instanceTaskList []*redis.TaskInfoDetail, errRet error)

func (*RedisService) DescribeRedisInstanceZoneInfoByFilter

func (me *RedisService) DescribeRedisInstanceZoneInfoByFilter(ctx context.Context, param map[string]interface{}) (instanceZoneInfo []*redis.ReplicaGroup, errRet error)

func (*RedisService) DescribeRedisMaintenanceWindowById

func (me *RedisService) DescribeRedisMaintenanceWindowById(ctx context.Context, instanceId string) (maintenanceWindow *redis.DescribeMaintenanceWindowResponseParams, errRet error)

func (*RedisService) DescribeRedisParamById

func (me *RedisService) DescribeRedisParamById(ctx context.Context, instanceId string) (params map[string]interface{}, errRet error)

func (*RedisService) DescribeRedisParamRecordsByFilter

func (me *RedisService) DescribeRedisParamRecordsByFilter(ctx context.Context, param map[string]interface{}) (params []*redis.InstanceParamHistory, errRet error)

func (*RedisService) DescribeRedisReplicateInstanceById

func (me *RedisService) DescribeRedisReplicateInstanceById(ctx context.Context, groupId string) (replicateGroup *redis.Groups, errRet error)

func (*RedisService) DescribeRedisSecurityGroupAttachmentById

func (me *RedisService) DescribeRedisSecurityGroupAttachmentById(ctx context.Context, product string, instanceId string, securityGroupId string) (securityGroupAttachment *redis.SecurityGroup, errRet error)

func (*RedisService) DescribeRedisSslById

func (me *RedisService) DescribeRedisSslById(ctx context.Context, instanceId string) (ssl *redis.DescribeSSLStatusResponseParams, errRet error)

func (*RedisService) DescribeRedisZoneConfig

func (me *RedisService) DescribeRedisZoneConfig(ctx context.Context) (sellConfigures []*redis.RegionConf, errRet error)

func (*RedisService) DescribeTaskInfo

func (me *RedisService) DescribeTaskInfo(ctx context.Context, redisId string, taskId int64) (ok bool, errRet error)

func (*RedisService) DestroyPostpaidInstance

func (me *RedisService) DestroyPostpaidInstance(ctx context.Context, redisId string) (taskId int64, errRet error)

func (*RedisService) DestroyPrepaidInstance

func (me *RedisService) DestroyPrepaidInstance(ctx context.Context, redisId string) (dealId string, errRet error)

func (*RedisService) ModifyAutoBackupConfig

func (me *RedisService) ModifyAutoBackupConfig(ctx context.Context, redisId string, weekDays []string, timePeriod string) (errRet error)

func (*RedisService) ModifyDBInstanceSecurityGroups

func (me *RedisService) ModifyDBInstanceSecurityGroups(ctx context.Context, product string, instanceId string, securityGroupIds []*string) (errRet error)

func (*RedisService) ModifyInstanceName

func (me *RedisService) ModifyInstanceName(ctx context.Context, redisId string, name string) (errRet error)

func (*RedisService) ModifyInstanceProjectId

func (me *RedisService) ModifyInstanceProjectId(ctx context.Context, redisId string, projectId int64) (errRet error)

func (*RedisService) ModifyParamTemplate

func (me *RedisService) ModifyParamTemplate(ctx context.Context, request *redis.ModifyParamTemplateRequest) (errRet error)

func (*RedisService) RedisAccountStateRefreshFunc

func (me *RedisService) RedisAccountStateRefreshFunc(instanceId, accountName string, failStates []string) resource.StateRefreshFunc

func (*RedisService) ResetPassword

func (me *RedisService) ResetPassword(ctx context.Context, redisId string, newPassword string, noAuth bool) (taskId int64, errRet error)

func (*RedisService) UpgradeInstance

func (me *RedisService) UpgradeInstance(ctx context.Context, redisId string, newMemSize, redisShardNum, redisReplicasNum int, nodeSet []*redis.RedisNodeInfo) (dealId string, errRet error)

type TencentCloudRedisDetail

type TencentCloudRedisDetail struct {
	RedisId          string
	Name             string
	Zone             string
	ProjectId        int64
	TypeId           int64
	Type             string
	MemSize          int64
	Status           string
	VpcId            string
	SubnetId         string
	Ip               string
	Port             int64
	RedisShardNum    int64
	RedisReplicasNum int64
	CreateTime       string
	Tags             map[string]string
	BillingMode      string
	NodeInfo         []map[string]interface{}
}

Jump to

Keyboard shortcuts

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