1 Star 7 Fork 0

tencentcloud/tencentcloud-sdk-go

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
client.go 35.25 KB
Copy Edit Raw Blame History
tencentcloud authored 2024-08-12 04:22 . release v1.0.981
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package v20210712
import (
"context"
"errors"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
)
const APIVersion = "2021-07-12"
type Client struct {
common.Client
}
// Deprecated
func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) {
cpf := profile.NewClientProfile()
client = &Client{}
client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf)
return
}
func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) {
client = &Client{}
client.Init(region).
WithCredential(credential).
WithProfile(clientProfile)
return
}
func NewCreateLibraryRequest() (request *CreateLibraryRequest) {
request = &CreateLibraryRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "CreateLibrary")
return
}
func NewCreateLibraryResponse() (response *CreateLibraryResponse) {
response = &CreateLibraryResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateLibrary
// 创建 PaaS 服务媒体库
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INTERNALERROR_POSTPAIDFAIL = "InternalError.PostpaidFail"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_BUCKETNAMEINVALID = "InvalidParameterValue.BucketNameInvalid"
// INVALIDPARAMETERVALUE_BUCKETNAMENOTBELONGYOU = "InvalidParameterValue.BucketNameNotBelongYou"
// INVALIDPARAMETERVALUE_BUCKETNOTFOUND = "InvalidParameterValue.BucketNotFound"
// INVALIDPARAMETERVALUE_BUCKETNOTSUPPORT = "InvalidParameterValue.BucketNotSupport"
// INVALIDPARAMETERVALUE_BUCKETREGIONINVALID = "InvalidParameterValue.BucketRegionInvalid"
// INVALIDPARAMETERVALUE_COSSTORAGECLASS = "InvalidParameterValue.CosStorageClass"
// INVALIDPARAMETERVALUE_COSSTORAGECLASSINTELLIGENTTIERING = "InvalidParameterValue.CosStorageClassIntelligentTiering"
// UNAUTHORIZEDOPERATION_PASSROLE = "UnauthorizedOperation.PassRole"
// UNAUTHORIZEDOPERATION_SERVICELINKEDROLE = "UnauthorizedOperation.ServiceLinkedRole"
// UNSUPPORTEDOPERATION_BALANCELESS = "UnsupportedOperation.BalanceLess"
func (c *Client) CreateLibrary(request *CreateLibraryRequest) (response *CreateLibraryResponse, err error) {
return c.CreateLibraryWithContext(context.Background(), request)
}
// CreateLibrary
// 创建 PaaS 服务媒体库
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INTERNALERROR_POSTPAIDFAIL = "InternalError.PostpaidFail"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_BUCKETNAMEINVALID = "InvalidParameterValue.BucketNameInvalid"
// INVALIDPARAMETERVALUE_BUCKETNAMENOTBELONGYOU = "InvalidParameterValue.BucketNameNotBelongYou"
// INVALIDPARAMETERVALUE_BUCKETNOTFOUND = "InvalidParameterValue.BucketNotFound"
// INVALIDPARAMETERVALUE_BUCKETNOTSUPPORT = "InvalidParameterValue.BucketNotSupport"
// INVALIDPARAMETERVALUE_BUCKETREGIONINVALID = "InvalidParameterValue.BucketRegionInvalid"
// INVALIDPARAMETERVALUE_COSSTORAGECLASS = "InvalidParameterValue.CosStorageClass"
// INVALIDPARAMETERVALUE_COSSTORAGECLASSINTELLIGENTTIERING = "InvalidParameterValue.CosStorageClassIntelligentTiering"
// UNAUTHORIZEDOPERATION_PASSROLE = "UnauthorizedOperation.PassRole"
// UNAUTHORIZEDOPERATION_SERVICELINKEDROLE = "UnauthorizedOperation.ServiceLinkedRole"
// UNSUPPORTEDOPERATION_BALANCELESS = "UnsupportedOperation.BalanceLess"
func (c *Client) CreateLibraryWithContext(ctx context.Context, request *CreateLibraryRequest) (response *CreateLibraryResponse, err error) {
if request == nil {
request = NewCreateLibraryRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateLibrary require credential")
}
request.SetContext(ctx)
response = NewCreateLibraryResponse()
err = c.Send(request, response)
return
}
func NewCreateUserRequest() (request *CreateUserRequest) {
request = &CreateUserRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "CreateUser")
return
}
func NewCreateUserResponse() (response *CreateUserResponse) {
response = &CreateUserResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateUser
// 新建用户。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER_ONEOFACCOUNTNAMEANDACCOUNTPASSWORDISEMPTY = "InvalidParameter.OneOfAccountNameAndAccountPasswordIsEmpty"
// INVALIDPARAMETER_ONEOFCOUNTRYCODEANDPHONENUMBERISEMPTY = "InvalidParameter.OneOfCountryCodeAndPhoneNumberIsEmpty"
// INVALIDPARAMETERVALUE_ACCOUNTNAMETOOLONG = "InvalidParameterValue.AccountNameTooLong"
// INVALIDPARAMETERVALUE_ACCOUNTPASSWORD = "InvalidParameterValue.AccountPassword"
// INVALIDPARAMETERVALUE_ACCOUNTUSERIDTOOLONG = "InvalidParameterValue.AccountUserIdTooLong"
// INVALIDPARAMETERVALUE_COUNTRYCODETOOLONG = "InvalidParameterValue.CountryCodeTooLong"
// INVALIDPARAMETERVALUE_DUPLICATEACCOUNTNAME = "InvalidParameterValue.DuplicateAccountName"
// INVALIDPARAMETERVALUE_DUPLICATEACCOUNTUSERID = "InvalidParameterValue.DuplicateAccountUserId"
// INVALIDPARAMETERVALUE_DUPLICATEEMAIL = "InvalidParameterValue.DuplicateEmail"
// INVALIDPARAMETERVALUE_DUPLICATEUSERPHONENUMBER = "InvalidParameterValue.DuplicateUserPhoneNumber"
// INVALIDPARAMETERVALUE_EMAILTOOLONG = "InvalidParameterValue.EmailTooLong"
// INVALIDPARAMETERVALUE_INVALIDACCOUNTNAME = "InvalidParameterValue.InvalidAccountName"
// INVALIDPARAMETERVALUE_INVALIDACCOUNTUSERID = "InvalidParameterValue.InvalidAccountUserId"
// INVALIDPARAMETERVALUE_INVALIDCOUNTRYCODE = "InvalidParameterValue.InvalidCountryCode"
// INVALIDPARAMETERVALUE_INVALIDEMAIL = "InvalidParameterValue.InvalidEmail"
// INVALIDPARAMETERVALUE_INVALIDPHONENUMBER = "InvalidParameterValue.InvalidPhoneNumber"
// INVALIDPARAMETERVALUE_PHONENUMBERTOOLONG = "InvalidParameterValue.PhoneNumberTooLong"
// INVALIDPARAMETERVALUE_ROLENOTSUPPORT = "InvalidParameterValue.RoleNotSupport"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) CreateUser(request *CreateUserRequest) (response *CreateUserResponse, err error) {
return c.CreateUserWithContext(context.Background(), request)
}
// CreateUser
// 新建用户。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER_ONEOFACCOUNTNAMEANDACCOUNTPASSWORDISEMPTY = "InvalidParameter.OneOfAccountNameAndAccountPasswordIsEmpty"
// INVALIDPARAMETER_ONEOFCOUNTRYCODEANDPHONENUMBERISEMPTY = "InvalidParameter.OneOfCountryCodeAndPhoneNumberIsEmpty"
// INVALIDPARAMETERVALUE_ACCOUNTNAMETOOLONG = "InvalidParameterValue.AccountNameTooLong"
// INVALIDPARAMETERVALUE_ACCOUNTPASSWORD = "InvalidParameterValue.AccountPassword"
// INVALIDPARAMETERVALUE_ACCOUNTUSERIDTOOLONG = "InvalidParameterValue.AccountUserIdTooLong"
// INVALIDPARAMETERVALUE_COUNTRYCODETOOLONG = "InvalidParameterValue.CountryCodeTooLong"
// INVALIDPARAMETERVALUE_DUPLICATEACCOUNTNAME = "InvalidParameterValue.DuplicateAccountName"
// INVALIDPARAMETERVALUE_DUPLICATEACCOUNTUSERID = "InvalidParameterValue.DuplicateAccountUserId"
// INVALIDPARAMETERVALUE_DUPLICATEEMAIL = "InvalidParameterValue.DuplicateEmail"
// INVALIDPARAMETERVALUE_DUPLICATEUSERPHONENUMBER = "InvalidParameterValue.DuplicateUserPhoneNumber"
// INVALIDPARAMETERVALUE_EMAILTOOLONG = "InvalidParameterValue.EmailTooLong"
// INVALIDPARAMETERVALUE_INVALIDACCOUNTNAME = "InvalidParameterValue.InvalidAccountName"
// INVALIDPARAMETERVALUE_INVALIDACCOUNTUSERID = "InvalidParameterValue.InvalidAccountUserId"
// INVALIDPARAMETERVALUE_INVALIDCOUNTRYCODE = "InvalidParameterValue.InvalidCountryCode"
// INVALIDPARAMETERVALUE_INVALIDEMAIL = "InvalidParameterValue.InvalidEmail"
// INVALIDPARAMETERVALUE_INVALIDPHONENUMBER = "InvalidParameterValue.InvalidPhoneNumber"
// INVALIDPARAMETERVALUE_PHONENUMBERTOOLONG = "InvalidParameterValue.PhoneNumberTooLong"
// INVALIDPARAMETERVALUE_ROLENOTSUPPORT = "InvalidParameterValue.RoleNotSupport"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) CreateUserWithContext(ctx context.Context, request *CreateUserRequest) (response *CreateUserResponse, err error) {
if request == nil {
request = NewCreateUserRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateUser require credential")
}
request.SetContext(ctx)
response = NewCreateUserResponse()
err = c.Send(request, response)
return
}
func NewCreateUserLifecycleRequest() (request *CreateUserLifecycleRequest) {
request = &CreateUserLifecycleRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "CreateUserLifecycle")
return
}
func NewCreateUserLifecycleResponse() (response *CreateUserLifecycleResponse) {
response = &CreateUserLifecycleResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateUserLifecycle
// 设置用户生命周期。如果指定的用户已经设置了生命周期,重复调用此接口将覆盖已有的设置。也可用于清除指定用户的生命周期。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_DESTROYTIME = "InvalidParameterValue.DestroyTime"
// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter"
// INVALIDPARAMETERVALUE_ISOLATETIME = "InvalidParameterValue.IsolateTime"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
// RESOURCENOTFOUND_USER = "ResourceNotFound.User"
func (c *Client) CreateUserLifecycle(request *CreateUserLifecycleRequest) (response *CreateUserLifecycleResponse, err error) {
return c.CreateUserLifecycleWithContext(context.Background(), request)
}
// CreateUserLifecycle
// 设置用户生命周期。如果指定的用户已经设置了生命周期,重复调用此接口将覆盖已有的设置。也可用于清除指定用户的生命周期。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_DESTROYTIME = "InvalidParameterValue.DestroyTime"
// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter"
// INVALIDPARAMETERVALUE_ISOLATETIME = "InvalidParameterValue.IsolateTime"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
// RESOURCENOTFOUND_USER = "ResourceNotFound.User"
func (c *Client) CreateUserLifecycleWithContext(ctx context.Context, request *CreateUserLifecycleRequest) (response *CreateUserLifecycleResponse, err error) {
if request == nil {
request = NewCreateUserLifecycleRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateUserLifecycle require credential")
}
request.SetContext(ctx)
response = NewCreateUserLifecycleResponse()
err = c.Send(request, response)
return
}
func NewDeleteLibraryRequest() (request *DeleteLibraryRequest) {
request = &DeleteLibraryRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "DeleteLibrary")
return
}
func NewDeleteLibraryResponse() (response *DeleteLibraryResponse) {
response = &DeleteLibraryResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// DeleteLibrary
// 删除 PaaS 服务媒体库
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INTERNALERROR_MODIFYRESOURCESTATUSFAIL = "InternalError.ModifyResourceStatusFail"
// RESOURCEINUSE_MULTISPACE = "ResourceInUse.MultiSpace"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) DeleteLibrary(request *DeleteLibraryRequest) (response *DeleteLibraryResponse, err error) {
return c.DeleteLibraryWithContext(context.Background(), request)
}
// DeleteLibrary
// 删除 PaaS 服务媒体库
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INTERNALERROR_MODIFYRESOURCESTATUSFAIL = "InternalError.ModifyResourceStatusFail"
// RESOURCEINUSE_MULTISPACE = "ResourceInUse.MultiSpace"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) DeleteLibraryWithContext(ctx context.Context, request *DeleteLibraryRequest) (response *DeleteLibraryResponse, err error) {
if request == nil {
request = NewDeleteLibraryRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("DeleteLibrary require credential")
}
request.SetContext(ctx)
response = NewDeleteLibraryResponse()
err = c.Send(request, response)
return
}
func NewDeleteUserRequest() (request *DeleteUserRequest) {
request = &DeleteUserRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "DeleteUser")
return
}
func NewDeleteUserResponse() (response *DeleteUserResponse) {
response = &DeleteUserResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// DeleteUser
// 一次删除多个用户。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter"
// INVALIDPARAMETERVALUE_TOOMANYFILTERS = "InvalidParameterValue.TooManyFilters"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) DeleteUser(request *DeleteUserRequest) (response *DeleteUserResponse, err error) {
return c.DeleteUserWithContext(context.Background(), request)
}
// DeleteUser
// 一次删除多个用户。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter"
// INVALIDPARAMETERVALUE_TOOMANYFILTERS = "InvalidParameterValue.TooManyFilters"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) DeleteUserWithContext(ctx context.Context, request *DeleteUserRequest) (response *DeleteUserResponse, err error) {
if request == nil {
request = NewDeleteUserRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("DeleteUser require credential")
}
request.SetContext(ctx)
response = NewDeleteUserResponse()
err = c.Send(request, response)
return
}
func NewDescribeLibrariesRequest() (request *DescribeLibrariesRequest) {
request = &DescribeLibrariesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "DescribeLibraries")
return
}
func NewDescribeLibrariesResponse() (response *DescribeLibrariesResponse) {
response = &DescribeLibrariesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// DescribeLibraries
// 查询 PaaS 服务媒体库列表
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
func (c *Client) DescribeLibraries(request *DescribeLibrariesRequest) (response *DescribeLibrariesResponse, err error) {
return c.DescribeLibrariesWithContext(context.Background(), request)
}
// DescribeLibraries
// 查询 PaaS 服务媒体库列表
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
func (c *Client) DescribeLibrariesWithContext(ctx context.Context, request *DescribeLibrariesRequest) (response *DescribeLibrariesResponse, err error) {
if request == nil {
request = NewDescribeLibrariesRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("DescribeLibraries require credential")
}
request.SetContext(ctx)
response = NewDescribeLibrariesResponse()
err = c.Send(request, response)
return
}
func NewDescribeLibrarySecretRequest() (request *DescribeLibrarySecretRequest) {
request = &DescribeLibrarySecretRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "DescribeLibrarySecret")
return
}
func NewDescribeLibrarySecretResponse() (response *DescribeLibrarySecretResponse) {
response = &DescribeLibrarySecretResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// DescribeLibrarySecret
// 查询 PaaS 服务媒体库密钥
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) DescribeLibrarySecret(request *DescribeLibrarySecretRequest) (response *DescribeLibrarySecretResponse, err error) {
return c.DescribeLibrarySecretWithContext(context.Background(), request)
}
// DescribeLibrarySecret
// 查询 PaaS 服务媒体库密钥
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) DescribeLibrarySecretWithContext(ctx context.Context, request *DescribeLibrarySecretRequest) (response *DescribeLibrarySecretResponse, err error) {
if request == nil {
request = NewDescribeLibrarySecretRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("DescribeLibrarySecret require credential")
}
request.SetContext(ctx)
response = NewDescribeLibrarySecretResponse()
err = c.Send(request, response)
return
}
func NewDescribeOfficialInstancesRequest() (request *DescribeOfficialInstancesRequest) {
request = &DescribeOfficialInstancesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "DescribeOfficialInstances")
return
}
func NewDescribeOfficialInstancesResponse() (response *DescribeOfficialInstancesResponse) {
response = &DescribeOfficialInstancesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// DescribeOfficialInstances
// 查询官方云盘实例
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
func (c *Client) DescribeOfficialInstances(request *DescribeOfficialInstancesRequest) (response *DescribeOfficialInstancesResponse, err error) {
return c.DescribeOfficialInstancesWithContext(context.Background(), request)
}
// DescribeOfficialInstances
// 查询官方云盘实例
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
func (c *Client) DescribeOfficialInstancesWithContext(ctx context.Context, request *DescribeOfficialInstancesRequest) (response *DescribeOfficialInstancesResponse, err error) {
if request == nil {
request = NewDescribeOfficialInstancesRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("DescribeOfficialInstances require credential")
}
request.SetContext(ctx)
response = NewDescribeOfficialInstancesResponse()
err = c.Send(request, response)
return
}
func NewDescribeOfficialOverviewRequest() (request *DescribeOfficialOverviewRequest) {
request = &DescribeOfficialOverviewRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "DescribeOfficialOverview")
return
}
func NewDescribeOfficialOverviewResponse() (response *DescribeOfficialOverviewResponse) {
response = &DescribeOfficialOverviewResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// DescribeOfficialOverview
// 查询官方云盘实例概览数据
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
func (c *Client) DescribeOfficialOverview(request *DescribeOfficialOverviewRequest) (response *DescribeOfficialOverviewResponse, err error) {
return c.DescribeOfficialOverviewWithContext(context.Background(), request)
}
// DescribeOfficialOverview
// 查询官方云盘实例概览数据
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
func (c *Client) DescribeOfficialOverviewWithContext(ctx context.Context, request *DescribeOfficialOverviewRequest) (response *DescribeOfficialOverviewResponse, err error) {
if request == nil {
request = NewDescribeOfficialOverviewRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("DescribeOfficialOverview require credential")
}
request.SetContext(ctx)
response = NewDescribeOfficialOverviewResponse()
err = c.Send(request, response)
return
}
func NewDescribeTrafficPackagesRequest() (request *DescribeTrafficPackagesRequest) {
request = &DescribeTrafficPackagesRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "DescribeTrafficPackages")
return
}
func NewDescribeTrafficPackagesResponse() (response *DescribeTrafficPackagesResponse) {
response = &DescribeTrafficPackagesResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// DescribeTrafficPackages
// 查询流量资源包
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
func (c *Client) DescribeTrafficPackages(request *DescribeTrafficPackagesRequest) (response *DescribeTrafficPackagesResponse, err error) {
return c.DescribeTrafficPackagesWithContext(context.Background(), request)
}
// DescribeTrafficPackages
// 查询流量资源包
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
func (c *Client) DescribeTrafficPackagesWithContext(ctx context.Context, request *DescribeTrafficPackagesRequest) (response *DescribeTrafficPackagesResponse, err error) {
if request == nil {
request = NewDescribeTrafficPackagesRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("DescribeTrafficPackages require credential")
}
request.SetContext(ctx)
response = NewDescribeTrafficPackagesResponse()
err = c.Send(request, response)
return
}
func NewDescribeUserLifecycleRequest() (request *DescribeUserLifecycleRequest) {
request = &DescribeUserLifecycleRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "DescribeUserLifecycle")
return
}
func NewDescribeUserLifecycleResponse() (response *DescribeUserLifecycleResponse) {
response = &DescribeUserLifecycleResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// DescribeUserLifecycle
// 查询用户生命周期。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
// RESOURCENOTFOUND_USER = "ResourceNotFound.User"
func (c *Client) DescribeUserLifecycle(request *DescribeUserLifecycleRequest) (response *DescribeUserLifecycleResponse, err error) {
return c.DescribeUserLifecycleWithContext(context.Background(), request)
}
// DescribeUserLifecycle
// 查询用户生命周期。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
// RESOURCENOTFOUND_USER = "ResourceNotFound.User"
func (c *Client) DescribeUserLifecycleWithContext(ctx context.Context, request *DescribeUserLifecycleRequest) (response *DescribeUserLifecycleResponse, err error) {
if request == nil {
request = NewDescribeUserLifecycleRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("DescribeUserLifecycle require credential")
}
request.SetContext(ctx)
response = NewDescribeUserLifecycleResponse()
err = c.Send(request, response)
return
}
func NewModifyLibraryRequest() (request *ModifyLibraryRequest) {
request = &ModifyLibraryRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "ModifyLibrary")
return
}
func NewModifyLibraryResponse() (response *ModifyLibraryResponse) {
response = &ModifyLibraryResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// ModifyLibrary
// 修改 PaaS 服务媒体库配置项
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) ModifyLibrary(request *ModifyLibraryRequest) (response *ModifyLibraryResponse, err error) {
return c.ModifyLibraryWithContext(context.Background(), request)
}
// ModifyLibrary
// 修改 PaaS 服务媒体库配置项
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETERVALUE_LIMITEXCEEDED = "InvalidParameterValue.LimitExceeded"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
func (c *Client) ModifyLibraryWithContext(ctx context.Context, request *ModifyLibraryRequest) (response *ModifyLibraryResponse, err error) {
if request == nil {
request = NewModifyLibraryRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("ModifyLibrary require credential")
}
request.SetContext(ctx)
response = NewModifyLibraryResponse()
err = c.Send(request, response)
return
}
func NewModifyUserRequest() (request *ModifyUserRequest) {
request = &ModifyUserRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "ModifyUser")
return
}
func NewModifyUserResponse() (response *ModifyUserResponse) {
response = &ModifyUserResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// ModifyUser
// 更新用户信息。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER_ONEOFACCOUNTNAMEANDACCOUNTPASSWORDISEMPTY = "InvalidParameter.OneOfAccountNameAndAccountPasswordIsEmpty"
// INVALIDPARAMETER_ONEOFCOUNTRYCODEANDPHONENUMBERISEMPTY = "InvalidParameter.OneOfCountryCodeAndPhoneNumberIsEmpty"
// INVALIDPARAMETERVALUE_ACCOUNTNAMETOOLONG = "InvalidParameterValue.AccountNameTooLong"
// INVALIDPARAMETERVALUE_ACCOUNTPASSWORD = "InvalidParameterValue.AccountPassword"
// INVALIDPARAMETERVALUE_ACCOUNTUSERIDTOOLONG = "InvalidParameterValue.AccountUserIdTooLong"
// INVALIDPARAMETERVALUE_COUNTRYCODETOOLONG = "InvalidParameterValue.CountryCodeTooLong"
// INVALIDPARAMETERVALUE_DUPLICATEACCOUNTNAME = "InvalidParameterValue.DuplicateAccountName"
// INVALIDPARAMETERVALUE_DUPLICATEACCOUNTUSERID = "InvalidParameterValue.DuplicateAccountUserId"
// INVALIDPARAMETERVALUE_DUPLICATEEMAIL = "InvalidParameterValue.DuplicateEmail"
// INVALIDPARAMETERVALUE_DUPLICATEUSERPHONENUMBER = "InvalidParameterValue.DuplicateUserPhoneNumber"
// INVALIDPARAMETERVALUE_EMAILTOOLONG = "InvalidParameterValue.EmailTooLong"
// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter"
// INVALIDPARAMETERVALUE_INVALIDACCOUNTNAME = "InvalidParameterValue.InvalidAccountName"
// INVALIDPARAMETERVALUE_INVALIDACCOUNTUSERID = "InvalidParameterValue.InvalidAccountUserId"
// INVALIDPARAMETERVALUE_INVALIDCOUNTRYCODE = "InvalidParameterValue.InvalidCountryCode"
// INVALIDPARAMETERVALUE_INVALIDEMAIL = "InvalidParameterValue.InvalidEmail"
// INVALIDPARAMETERVALUE_INVALIDPHONENUMBER = "InvalidParameterValue.InvalidPhoneNumber"
// INVALIDPARAMETERVALUE_PHONENUMBERTOOLONG = "InvalidParameterValue.PhoneNumberTooLong"
// INVALIDPARAMETERVALUE_ROLENOTSUPPORT = "InvalidParameterValue.RoleNotSupport"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
// RESOURCENOTFOUND_USER = "ResourceNotFound.User"
func (c *Client) ModifyUser(request *ModifyUserRequest) (response *ModifyUserResponse, err error) {
return c.ModifyUserWithContext(context.Background(), request)
}
// ModifyUser
// 更新用户信息。
//
// 可能返回的错误码:
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER_ONEOFACCOUNTNAMEANDACCOUNTPASSWORDISEMPTY = "InvalidParameter.OneOfAccountNameAndAccountPasswordIsEmpty"
// INVALIDPARAMETER_ONEOFCOUNTRYCODEANDPHONENUMBERISEMPTY = "InvalidParameter.OneOfCountryCodeAndPhoneNumberIsEmpty"
// INVALIDPARAMETERVALUE_ACCOUNTNAMETOOLONG = "InvalidParameterValue.AccountNameTooLong"
// INVALIDPARAMETERVALUE_ACCOUNTPASSWORD = "InvalidParameterValue.AccountPassword"
// INVALIDPARAMETERVALUE_ACCOUNTUSERIDTOOLONG = "InvalidParameterValue.AccountUserIdTooLong"
// INVALIDPARAMETERVALUE_COUNTRYCODETOOLONG = "InvalidParameterValue.CountryCodeTooLong"
// INVALIDPARAMETERVALUE_DUPLICATEACCOUNTNAME = "InvalidParameterValue.DuplicateAccountName"
// INVALIDPARAMETERVALUE_DUPLICATEACCOUNTUSERID = "InvalidParameterValue.DuplicateAccountUserId"
// INVALIDPARAMETERVALUE_DUPLICATEEMAIL = "InvalidParameterValue.DuplicateEmail"
// INVALIDPARAMETERVALUE_DUPLICATEUSERPHONENUMBER = "InvalidParameterValue.DuplicateUserPhoneNumber"
// INVALIDPARAMETERVALUE_EMAILTOOLONG = "InvalidParameterValue.EmailTooLong"
// INVALIDPARAMETERVALUE_FILTER = "InvalidParameterValue.Filter"
// INVALIDPARAMETERVALUE_INVALIDACCOUNTNAME = "InvalidParameterValue.InvalidAccountName"
// INVALIDPARAMETERVALUE_INVALIDACCOUNTUSERID = "InvalidParameterValue.InvalidAccountUserId"
// INVALIDPARAMETERVALUE_INVALIDCOUNTRYCODE = "InvalidParameterValue.InvalidCountryCode"
// INVALIDPARAMETERVALUE_INVALIDEMAIL = "InvalidParameterValue.InvalidEmail"
// INVALIDPARAMETERVALUE_INVALIDPHONENUMBER = "InvalidParameterValue.InvalidPhoneNumber"
// INVALIDPARAMETERVALUE_PHONENUMBERTOOLONG = "InvalidParameterValue.PhoneNumberTooLong"
// INVALIDPARAMETERVALUE_ROLENOTSUPPORT = "InvalidParameterValue.RoleNotSupport"
// RESOURCENOTFOUND_LIBRARY = "ResourceNotFound.Library"
// RESOURCENOTFOUND_USER = "ResourceNotFound.User"
func (c *Client) ModifyUserWithContext(ctx context.Context, request *ModifyUserRequest) (response *ModifyUserResponse, err error) {
if request == nil {
request = NewModifyUserRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("ModifyUser require credential")
}
request.SetContext(ctx)
response = NewModifyUserResponse()
err = c.Send(request, response)
return
}
func NewSendSmsCodeRequest() (request *SendSmsCodeRequest) {
request = &SendSmsCodeRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "SendSmsCode")
return
}
func NewSendSmsCodeResponse() (response *SendSmsCodeResponse) {
response = &SendSmsCodeResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// SendSmsCode
// 发送用于换绑官方云盘实例的超级管理员账号的短信验证码
//
// 可能返回的错误码:
// INTERNALERROR_SENDSMS = "InternalError.SendSms"
// INVALIDPARAMETERVALUE_COUNTRYCODE = "InvalidParameterValue.CountryCode"
// INVALIDPARAMETERVALUE_NOTMODIFIED = "InvalidParameterValue.NotModified"
// INVALIDPARAMETERVALUE_NOTSUPERADMIN = "InvalidParameterValue.NotSuperAdmin"
// INVALIDPARAMETERVALUE_PHONENUMBER = "InvalidParameterValue.PhoneNumber"
// REQUESTLIMITEXCEEDED_SENDSMS = "RequestLimitExceeded.SendSms"
// RESOURCENOTFOUND_OFFICIALINSTANCE = "ResourceNotFound.OfficialInstance"
// UNSUPPORTEDOPERATION_PURPOSE = "UnsupportedOperation.Purpose"
func (c *Client) SendSmsCode(request *SendSmsCodeRequest) (response *SendSmsCodeResponse, err error) {
return c.SendSmsCodeWithContext(context.Background(), request)
}
// SendSmsCode
// 发送用于换绑官方云盘实例的超级管理员账号的短信验证码
//
// 可能返回的错误码:
// INTERNALERROR_SENDSMS = "InternalError.SendSms"
// INVALIDPARAMETERVALUE_COUNTRYCODE = "InvalidParameterValue.CountryCode"
// INVALIDPARAMETERVALUE_NOTMODIFIED = "InvalidParameterValue.NotModified"
// INVALIDPARAMETERVALUE_NOTSUPERADMIN = "InvalidParameterValue.NotSuperAdmin"
// INVALIDPARAMETERVALUE_PHONENUMBER = "InvalidParameterValue.PhoneNumber"
// REQUESTLIMITEXCEEDED_SENDSMS = "RequestLimitExceeded.SendSms"
// RESOURCENOTFOUND_OFFICIALINSTANCE = "ResourceNotFound.OfficialInstance"
// UNSUPPORTEDOPERATION_PURPOSE = "UnsupportedOperation.Purpose"
func (c *Client) SendSmsCodeWithContext(ctx context.Context, request *SendSmsCodeRequest) (response *SendSmsCodeResponse, err error) {
if request == nil {
request = NewSendSmsCodeRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("SendSmsCode require credential")
}
request.SetContext(ctx)
response = NewSendSmsCodeResponse()
err = c.Send(request, response)
return
}
func NewVerifySmsCodeRequest() (request *VerifySmsCodeRequest) {
request = &VerifySmsCodeRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("smh", APIVersion, "VerifySmsCode")
return
}
func NewVerifySmsCodeResponse() (response *VerifySmsCodeResponse) {
response = &VerifySmsCodeResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// VerifySmsCode
// 验证短信验证码以换绑官方云盘实例的超级管理员账号
//
// 可能返回的错误码:
// INVALIDPARAMETERVALUE_COUNTRYCODE = "InvalidParameterValue.CountryCode"
// INVALIDPARAMETERVALUE_PHONENUMBER = "InvalidParameterValue.PhoneNumber"
// LIMITEXCEEDED_USERLIMIT = "LimitExceeded.UserLimit"
// RESOURCENOTFOUND_OFFICIALINSTANCE = "ResourceNotFound.OfficialInstance"
// UNAUTHORIZEDOPERATION_SMSCODE = "UnauthorizedOperation.SmsCode"
// UNAUTHORIZEDOPERATION_SMSCODEEXCEEDED = "UnauthorizedOperation.SmsCodeExceeded"
// UNSUPPORTEDOPERATION_PURPOSE = "UnsupportedOperation.Purpose"
func (c *Client) VerifySmsCode(request *VerifySmsCodeRequest) (response *VerifySmsCodeResponse, err error) {
return c.VerifySmsCodeWithContext(context.Background(), request)
}
// VerifySmsCode
// 验证短信验证码以换绑官方云盘实例的超级管理员账号
//
// 可能返回的错误码:
// INVALIDPARAMETERVALUE_COUNTRYCODE = "InvalidParameterValue.CountryCode"
// INVALIDPARAMETERVALUE_PHONENUMBER = "InvalidParameterValue.PhoneNumber"
// LIMITEXCEEDED_USERLIMIT = "LimitExceeded.UserLimit"
// RESOURCENOTFOUND_OFFICIALINSTANCE = "ResourceNotFound.OfficialInstance"
// UNAUTHORIZEDOPERATION_SMSCODE = "UnauthorizedOperation.SmsCode"
// UNAUTHORIZEDOPERATION_SMSCODEEXCEEDED = "UnauthorizedOperation.SmsCodeExceeded"
// UNSUPPORTEDOPERATION_PURPOSE = "UnsupportedOperation.Purpose"
func (c *Client) VerifySmsCodeWithContext(ctx context.Context, request *VerifySmsCodeRequest) (response *VerifySmsCodeResponse, err error) {
if request == nil {
request = NewVerifySmsCodeRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("VerifySmsCode require credential")
}
request.SetContext(ctx)
response = NewVerifySmsCodeResponse()
err = c.Send(request, response)
return
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tencentcloud/tencentcloud-sdk-go.git
git@gitee.com:tencentcloud/tencentcloud-sdk-go.git
tencentcloud
tencentcloud-sdk-go
tencentcloud-sdk-go
master

Search