dbfs-20200418/main.tea (2,106 lines of code) (raw):
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = 'regional';
@endpointMap = {
ap-northeast-2-pop = 'dbfs.aliyuncs.com',
cn-beijing-finance-1 = 'dbfs.aliyuncs.com',
cn-beijing-finance-pop = 'dbfs.aliyuncs.com',
cn-beijing-gov-1 = 'dbfs.aliyuncs.com',
cn-beijing-nu16-b01 = 'dbfs.aliyuncs.com',
cn-edge-1 = 'dbfs.aliyuncs.com',
cn-fujian = 'dbfs.aliyuncs.com',
cn-haidian-cm12-c01 = 'dbfs.aliyuncs.com',
cn-hangzhou-bj-b01 = 'dbfs.aliyuncs.com',
cn-hangzhou-finance = 'dbfs.aliyuncs.com',
cn-hangzhou-internal-prod-1 = 'dbfs.aliyuncs.com',
cn-hangzhou-internal-test-1 = 'dbfs.aliyuncs.com',
cn-hangzhou-internal-test-2 = 'dbfs.aliyuncs.com',
cn-hangzhou-internal-test-3 = 'dbfs.aliyuncs.com',
cn-hangzhou-test-306 = 'dbfs.aliyuncs.com',
cn-hongkong-finance-pop = 'dbfs.aliyuncs.com',
cn-huhehaote-nebula-1 = 'dbfs.aliyuncs.com',
cn-north-2-gov-1 = 'dbfs.aliyuncs.com',
cn-qingdao-nebula = 'dbfs.aliyuncs.com',
cn-shanghai-et15-b01 = 'dbfs.aliyuncs.com',
cn-shanghai-et2-b01 = 'dbfs.aliyuncs.com',
cn-shanghai-finance-1 = 'dbfs.aliyuncs.com',
cn-shanghai-inner = 'dbfs.aliyuncs.com',
cn-shanghai-internal-test-1 = 'dbfs.aliyuncs.com',
cn-shenzhen-finance-1 = 'dbfs.aliyuncs.com',
cn-shenzhen-inner = 'dbfs.aliyuncs.com',
cn-shenzhen-st4-d01 = 'dbfs.aliyuncs.com',
cn-shenzhen-su18-b01 = 'dbfs.aliyuncs.com',
cn-wuhan = 'dbfs.aliyuncs.com',
cn-wulanchabu = 'dbfs.aliyuncs.com',
cn-yushanfang = 'dbfs.aliyuncs.com',
cn-zhangbei = 'dbfs.aliyuncs.com',
cn-zhangbei-na61-b01 = 'dbfs.aliyuncs.com',
cn-zhangjiakou-na62-a01 = 'dbfs.aliyuncs.com',
cn-zhengzhou-nebula-1 = 'dbfs.aliyuncs.com',
eu-west-1-oxs = 'dbfs.aliyuncs.com',
rus-west-1-pop = 'dbfs.aliyuncs.com',
};
checkConfig(config);
@endpoint = getEndpoint('dbfs', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
if (!Util.empty(endpoint)) {
return endpoint;
}
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
return endpointMap[regionId];
}
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model AddTagsBatchRequest {
clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-426655440000'),
dbfsList?: string(name='DbfsList', example='["dbfs-nUy1tb********BQ4X8Gpw","dbfs-v0WvA********tVEVcgJLg"]'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
tags?: string(name='Tags', example='[{"TagKey":"k1","TagValue":"v1"},{"TagKey":"k2","TagValue":"v2"}]'),
}
model AddTagsBatchResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model AddTagsBatchResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: AddTagsBatchResponseBody(name='body'),
}
async function addTagsBatchWithOptions(request: AddTagsBatchRequest, runtime: Util.RuntimeOptions): AddTagsBatchResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.dbfsList)) {
query['DbfsList'] = request.dbfsList;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.tags)) {
query['Tags'] = request.tags;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'AddTagsBatch',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function addTagsBatch(request: AddTagsBatchRequest): AddTagsBatchResponse {
var runtime = new Util.RuntimeOptions{};
return addTagsBatchWithOptions(request, runtime);
}
model ApplyAutoSnapshotPolicyRequest {
dbfsIds?: [ string ](name='DbfsIds'),
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ApplyAutoSnapshotPolicyShrinkRequest {
dbfsIdsShrink?: string(name='DbfsIds'),
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ApplyAutoSnapshotPolicyResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model ApplyAutoSnapshotPolicyResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ApplyAutoSnapshotPolicyResponseBody(name='body'),
}
async function applyAutoSnapshotPolicyWithOptions(tmpReq: ApplyAutoSnapshotPolicyRequest, runtime: Util.RuntimeOptions): ApplyAutoSnapshotPolicyResponse {
Util.validateModel(tmpReq);
var request = new ApplyAutoSnapshotPolicyShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.dbfsIds)) {
request.dbfsIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.dbfsIds, 'DbfsIds', 'json');
}
var query = {};
if (!Util.isUnset(request.dbfsIdsShrink)) {
query['DbfsIds'] = request.dbfsIdsShrink;
}
if (!Util.isUnset(request.policyId)) {
query['PolicyId'] = request.policyId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ApplyAutoSnapshotPolicy',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function applyAutoSnapshotPolicy(request: ApplyAutoSnapshotPolicyRequest): ApplyAutoSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return applyAutoSnapshotPolicyWithOptions(request, runtime);
}
model AttachDbfsRequest {
attachMode?: string(name='AttachMode', example='create_new_mount_point'),
attachPoint?: string(name='AttachPoint', example='/mnt/dbfs/dbfs-001'),
ECSInstanceId?: string(name='ECSInstanceId', example='i-bp1ecr********5go2go'),
fsId?: string(name='FsId', example='dbfs-v0WvA********tVEVcgJLg'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
serverUrl?: string(name='ServerUrl', example='dbfs-pkg-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com'),
}
model AttachDbfsResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model AttachDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: AttachDbfsResponseBody(name='body'),
}
async function attachDbfsWithOptions(request: AttachDbfsRequest, runtime: Util.RuntimeOptions): AttachDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.attachMode)) {
query['AttachMode'] = request.attachMode;
}
if (!Util.isUnset(request.attachPoint)) {
query['AttachPoint'] = request.attachPoint;
}
if (!Util.isUnset(request.ECSInstanceId)) {
query['ECSInstanceId'] = request.ECSInstanceId;
}
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.serverUrl)) {
query['ServerUrl'] = request.serverUrl;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'AttachDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function attachDbfs(request: AttachDbfsRequest): AttachDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return attachDbfsWithOptions(request, runtime);
}
model CancelAutoSnapshotPolicyRequest {
dbfsIds?: [ string ](name='DbfsIds'),
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model CancelAutoSnapshotPolicyShrinkRequest {
dbfsIdsShrink?: string(name='DbfsIds'),
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model CancelAutoSnapshotPolicyResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model CancelAutoSnapshotPolicyResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: CancelAutoSnapshotPolicyResponseBody(name='body'),
}
async function cancelAutoSnapshotPolicyWithOptions(tmpReq: CancelAutoSnapshotPolicyRequest, runtime: Util.RuntimeOptions): CancelAutoSnapshotPolicyResponse {
Util.validateModel(tmpReq);
var request = new CancelAutoSnapshotPolicyShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.dbfsIds)) {
request.dbfsIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.dbfsIds, 'DbfsIds', 'json');
}
var query = {};
if (!Util.isUnset(request.dbfsIdsShrink)) {
query['DbfsIds'] = request.dbfsIdsShrink;
}
if (!Util.isUnset(request.policyId)) {
query['PolicyId'] = request.policyId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CancelAutoSnapshotPolicy',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function cancelAutoSnapshotPolicy(request: CancelAutoSnapshotPolicyRequest): CancelAutoSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return cancelAutoSnapshotPolicyWithOptions(request, runtime);
}
model CreateAutoSnapshotPolicyRequest {
policyName?: string(name='PolicyName', example='policyTest'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
repeatWeekdays?: [ string ](name='RepeatWeekdays'),
retentionDays?: int32(name='RetentionDays', example='30'),
timePoints?: [ string ](name='TimePoints'),
}
model CreateAutoSnapshotPolicyShrinkRequest {
policyName?: string(name='PolicyName', example='policyTest'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
repeatWeekdaysShrink?: string(name='RepeatWeekdays'),
retentionDays?: int32(name='RetentionDays', example='30'),
timePointsShrink?: string(name='TimePoints'),
}
model CreateAutoSnapshotPolicyResponseBody = {
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model CreateAutoSnapshotPolicyResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: CreateAutoSnapshotPolicyResponseBody(name='body'),
}
async function createAutoSnapshotPolicyWithOptions(tmpReq: CreateAutoSnapshotPolicyRequest, runtime: Util.RuntimeOptions): CreateAutoSnapshotPolicyResponse {
Util.validateModel(tmpReq);
var request = new CreateAutoSnapshotPolicyShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.repeatWeekdays)) {
request.repeatWeekdaysShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.repeatWeekdays, 'RepeatWeekdays', 'json');
}
if (!Util.isUnset(tmpReq.timePoints)) {
request.timePointsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.timePoints, 'TimePoints', 'json');
}
var query = {};
if (!Util.isUnset(request.policyName)) {
query['PolicyName'] = request.policyName;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.repeatWeekdaysShrink)) {
query['RepeatWeekdays'] = request.repeatWeekdaysShrink;
}
if (!Util.isUnset(request.retentionDays)) {
query['RetentionDays'] = request.retentionDays;
}
if (!Util.isUnset(request.timePointsShrink)) {
query['TimePoints'] = request.timePointsShrink;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateAutoSnapshotPolicy',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function createAutoSnapshotPolicy(request: CreateAutoSnapshotPolicyRequest): CreateAutoSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return createAutoSnapshotPolicyWithOptions(request, runtime);
}
model CreateDbfsRequest {
advancedFeatures?: string(name='AdvancedFeatures', example='{"cpuCoreCount":0.5,"memorySize":512,"pageCacheSize":128}'),
category?: string(name='Category', example='standard'),
clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-426655440000'),
deleteSnapshot?: boolean(name='DeleteSnapshot', example='false'),
enableRaid?: boolean(name='EnableRaid', example='false'),
encryption?: boolean(name='Encryption', example='false'),
fsName?: string(name='FsName', example='testdbfs-001'),
instanceType?: string(name='InstanceType', example='dbfs.small'),
KMSKeyId?: string(name='KMSKeyId', example='0e478b7a-4262-4802-b8cb-00d3fb40826X'),
performanceLevel?: string(name='PerformanceLevel', example='PL1'),
raidStripeUnitNumber?: int32(name='RaidStripeUnitNumber', example='2'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
sizeG?: int32(name='SizeG', example='200'),
snapshotId?: string(name='SnapshotId', example='s-y2vZ3********vvMilZ2hQ'),
usedScene?: string(name='UsedScene', example='PostgreSQL'),
zoneId?: string(name='ZoneId', example='cn-hangzhou-i'),
}
model CreateDbfsResponseBody = {
fsId?: string(name='FsId', example='dbfs-GOrr********Yd0VLOyBpg'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model CreateDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: CreateDbfsResponseBody(name='body'),
}
async function createDbfsWithOptions(request: CreateDbfsRequest, runtime: Util.RuntimeOptions): CreateDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.advancedFeatures)) {
query['AdvancedFeatures'] = request.advancedFeatures;
}
if (!Util.isUnset(request.category)) {
query['Category'] = request.category;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.deleteSnapshot)) {
query['DeleteSnapshot'] = request.deleteSnapshot;
}
if (!Util.isUnset(request.enableRaid)) {
query['EnableRaid'] = request.enableRaid;
}
if (!Util.isUnset(request.encryption)) {
query['Encryption'] = request.encryption;
}
if (!Util.isUnset(request.fsName)) {
query['FsName'] = request.fsName;
}
if (!Util.isUnset(request.instanceType)) {
query['InstanceType'] = request.instanceType;
}
if (!Util.isUnset(request.KMSKeyId)) {
query['KMSKeyId'] = request.KMSKeyId;
}
if (!Util.isUnset(request.performanceLevel)) {
query['PerformanceLevel'] = request.performanceLevel;
}
if (!Util.isUnset(request.raidStripeUnitNumber)) {
query['RaidStripeUnitNumber'] = request.raidStripeUnitNumber;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sizeG)) {
query['SizeG'] = request.sizeG;
}
if (!Util.isUnset(request.snapshotId)) {
query['SnapshotId'] = request.snapshotId;
}
if (!Util.isUnset(request.usedScene)) {
query['UsedScene'] = request.usedScene;
}
if (!Util.isUnset(request.zoneId)) {
query['ZoneId'] = request.zoneId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function createDbfs(request: CreateDbfsRequest): CreateDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return createDbfsWithOptions(request, runtime);
}
model CreateServiceLinkedRoleRequest {
clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-426655440000'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model CreateServiceLinkedRoleResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model CreateServiceLinkedRoleResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: CreateServiceLinkedRoleResponseBody(name='body'),
}
async function createServiceLinkedRoleWithOptions(request: CreateServiceLinkedRoleRequest, runtime: Util.RuntimeOptions): CreateServiceLinkedRoleResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateServiceLinkedRole',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function createServiceLinkedRole(request: CreateServiceLinkedRoleRequest): CreateServiceLinkedRoleResponse {
var runtime = new Util.RuntimeOptions{};
return createServiceLinkedRoleWithOptions(request, runtime);
}
model CreateSnapshotRequest {
clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-426655440000'),
description?: string(name='Description', example='testDescription'),
fsId?: string(name='FsId', example='d-bp131n0q38u3a4zi*****'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
retentionDays?: int32(name='RetentionDays', example='30'),
snapshotName?: string(name='SnapshotName', example='testSnapshotName'),
}
model CreateSnapshotResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
snapshotId?: string(name='SnapshotId', example='s-Q2greuDZTvWeS8bfKZ****'),
}
model CreateSnapshotResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: CreateSnapshotResponseBody(name='body'),
}
async function createSnapshotWithOptions(request: CreateSnapshotRequest, runtime: Util.RuntimeOptions): CreateSnapshotResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.retentionDays)) {
query['RetentionDays'] = request.retentionDays;
}
if (!Util.isUnset(request.snapshotName)) {
query['SnapshotName'] = request.snapshotName;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateSnapshot',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function createSnapshot(request: CreateSnapshotRequest): CreateSnapshotResponse {
var runtime = new Util.RuntimeOptions{};
return createSnapshotWithOptions(request, runtime);
}
model DeleteAutoSnapshotPolicyRequest {
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model DeleteAutoSnapshotPolicyResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC********'),
}
model DeleteAutoSnapshotPolicyResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: DeleteAutoSnapshotPolicyResponseBody(name='body'),
}
async function deleteAutoSnapshotPolicyWithOptions(request: DeleteAutoSnapshotPolicyRequest, runtime: Util.RuntimeOptions): DeleteAutoSnapshotPolicyResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.policyId)) {
query['PolicyId'] = request.policyId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteAutoSnapshotPolicy',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function deleteAutoSnapshotPolicy(request: DeleteAutoSnapshotPolicyRequest): DeleteAutoSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return deleteAutoSnapshotPolicyWithOptions(request, runtime);
}
model DeleteDbfsRequest {
force?: boolean(name='Force'),
fsId?: string(name='FsId', example='d-bp131n0q38u3a4zi*****'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model DeleteDbfsResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model DeleteDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: DeleteDbfsResponseBody(name='body'),
}
async function deleteDbfsWithOptions(request: DeleteDbfsRequest, runtime: Util.RuntimeOptions): DeleteDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.force)) {
query['Force'] = request.force;
}
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function deleteDbfs(request: DeleteDbfsRequest): DeleteDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return deleteDbfsWithOptions(request, runtime);
}
model DeleteSnapshotRequest {
force?: boolean(name='Force', example='false'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
snapshotId?: string(name='SnapshotId'),
}
model DeleteSnapshotResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model DeleteSnapshotResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: DeleteSnapshotResponseBody(name='body'),
}
async function deleteSnapshotWithOptions(request: DeleteSnapshotRequest, runtime: Util.RuntimeOptions): DeleteSnapshotResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.force)) {
query['Force'] = request.force;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.snapshotId)) {
query['SnapshotId'] = request.snapshotId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteSnapshot',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function deleteSnapshot(request: DeleteSnapshotRequest): DeleteSnapshotResponse {
var runtime = new Util.RuntimeOptions{};
return deleteSnapshotWithOptions(request, runtime);
}
model DeleteTagsBatchRequest {
dbfsList?: string(name='DbfsList', example='["dbfs-nUy1tb********BQ4X8Gpw","dbfs-v0WvA********tVEVcgJLg"]'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
tags?: string(name='Tags', example='[{"TagKey":"k1","TagValue":"v1"},{"TagKey":"k2","TagValue":"v2"}]'),
}
model DeleteTagsBatchResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model DeleteTagsBatchResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: DeleteTagsBatchResponseBody(name='body'),
}
async function deleteTagsBatchWithOptions(request: DeleteTagsBatchRequest, runtime: Util.RuntimeOptions): DeleteTagsBatchResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.dbfsList)) {
query['DbfsList'] = request.dbfsList;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.tags)) {
query['Tags'] = request.tags;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteTagsBatch',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function deleteTagsBatch(request: DeleteTagsBatchRequest): DeleteTagsBatchResponse {
var runtime = new Util.RuntimeOptions{};
return deleteTagsBatchWithOptions(request, runtime);
}
model DescribeDbfsSpecificationsRequest {
category?: string(name='Category', example='enterprise'),
ecsInstanceType?: string(name='EcsInstanceType', example='ecs.g7se'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model DescribeDbfsSpecificationsResponseBody = {
maxDbfsNumberPerEcs?: map[string]any(name='MaxDbfsNumberPerEcs', example='4'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
supportedEcsInstanceTypeFamily?: [ string ](name='SupportedEcsInstanceTypeFamily'),
}
model DescribeDbfsSpecificationsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: DescribeDbfsSpecificationsResponseBody(name='body'),
}
async function describeDbfsSpecificationsWithOptions(request: DescribeDbfsSpecificationsRequest, runtime: Util.RuntimeOptions): DescribeDbfsSpecificationsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.category)) {
query['Category'] = request.category;
}
if (!Util.isUnset(request.ecsInstanceType)) {
query['EcsInstanceType'] = request.ecsInstanceType;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDbfsSpecifications',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function describeDbfsSpecifications(request: DescribeDbfsSpecificationsRequest): DescribeDbfsSpecificationsResponse {
var runtime = new Util.RuntimeOptions{};
return describeDbfsSpecificationsWithOptions(request, runtime);
}
model DescribeInstanceTypesRequest {
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model DescribeInstanceTypesResponseBody = {
instanceTypes?: [
{
cpuCoreCount?: float(name='CpuCoreCount', example='0.25'),
instanceTypeDescription?: string(name='InstanceTypeDescription', example='dbfs.small'),
instanceTypeId?: string(name='InstanceTypeId', example='dbfs.small'),
memorySize?: float(name='MemorySize', example='0.5'),
}
](name='InstanceTypes'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model DescribeInstanceTypesResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: DescribeInstanceTypesResponseBody(name='body'),
}
async function describeInstanceTypesWithOptions(request: DescribeInstanceTypesRequest, runtime: Util.RuntimeOptions): DescribeInstanceTypesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeInstanceTypes',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function describeInstanceTypes(request: DescribeInstanceTypesRequest): DescribeInstanceTypesResponse {
var runtime = new Util.RuntimeOptions{};
return describeInstanceTypesWithOptions(request, runtime);
}
model DetachDbfsRequest {
ECSInstanceId?: string(name='ECSInstanceId', example='i-bp67acfmxazb4ph***'),
fsId?: string(name='FsId', example='d-bp131n0q38u3a4zi*****'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model DetachDbfsResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model DetachDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: DetachDbfsResponseBody(name='body'),
}
async function detachDbfsWithOptions(request: DetachDbfsRequest, runtime: Util.RuntimeOptions): DetachDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.ECSInstanceId)) {
query['ECSInstanceId'] = request.ECSInstanceId;
}
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DetachDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function detachDbfs(request: DetachDbfsRequest): DetachDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return detachDbfsWithOptions(request, runtime);
}
model GetAutoSnapshotPolicyRequest {
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model GetAutoSnapshotPolicyResponseBody = {
data?: {
accountId?: string(name='AccountId', example='13523459********'),
appliedDbfsNumber?: int32(name='AppliedDbfsNumber', example='1'),
createdTime?: string(name='CreatedTime', example='1670998784000'),
lastModified?: string(name='LastModified', example='1670998784000'),
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
policyName?: string(name='PolicyName', example='PolicyTest'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
repeatWeekdays?: [ string ](name='RepeatWeekdays'),
retentionDays?: int32(name='RetentionDays', example='30'),
status?: string(name='Status', example='Normal'),
statusDetail?: string(name='StatusDetail', example='-'),
timePoints?: [ string ](name='TimePoints'),
}(name='Data'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model GetAutoSnapshotPolicyResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: GetAutoSnapshotPolicyResponseBody(name='body'),
}
async function getAutoSnapshotPolicyWithOptions(request: GetAutoSnapshotPolicyRequest, runtime: Util.RuntimeOptions): GetAutoSnapshotPolicyResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.policyId)) {
query['PolicyId'] = request.policyId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetAutoSnapshotPolicy',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function getAutoSnapshotPolicy(request: GetAutoSnapshotPolicyRequest): GetAutoSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return getAutoSnapshotPolicyWithOptions(request, runtime);
}
model GetDbfsRequest {
fsId?: string(name='FsId', example='dbfs-GOrr********Yd0VLOyBpg'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model GetDbfsResponseBody = {
DBFSInfo?: {
attachNodeNumber?: int32(name='AttachNodeNumber', example='1'),
category?: string(name='Category', example='standard'),
createdTime?: string(name='CreatedTime', example='1609330367000'),
DBFSClusterId?: string(name='DBFSClusterId', example='c39EcDBf-2Ecb-C3C6-6526-018d4Dcf63eD'),
description?: string(name='Description', example='desc'),
ebsList?: [
{
ebsId?: string(name='EbsId', example='d-bp1hq4******qi7gy1th'),
sizeG?: int32(name='SizeG', example='20'),
}
](name='EbsList'),
ecsList?: [
{
ecsId?: string(name='EcsId', example='i-y2vZ3********vvMilZ2hQ'),
}
](name='EcsList'),
enableRaid?: boolean(name='EnableRaid', example='false'),
encryption?: boolean(name='Encryption', example='false'),
fsId?: string(name='FsId', example='dbfs-GOrr********Yd0VLOyBpg'),
fsName?: string(name='FsName', example='dbfs-test-01'),
instanceType?: string(name='InstanceType', example='dbfs.small'),
KMSKeyId?: string(name='KMSKeyId', example='c39EcDBf-2Ecb-C3C6-6526-018d4D******'),
lastFailed?: string(name='LastFailed', example='TargetIsBusy.DBFS'),
lastMountTime?: string(name='LastMountTime', example='1644915400000'),
lastUmountTime?: string(name='LastUmountTime', example='1644915319000'),
payType?: string(name='PayType', example='postpaid'),
performanceLevel?: string(name='PerformanceLevel', example='PL1'),
raidStrip?: int32(name='RaidStrip', example='2'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
sizeG?: int32(name='SizeG', example='20'),
snapshotInfo?: {
linkId?: string(name='LinkId'),
policyId?: string(name='PolicyId'),
snapshotCount?: int32(name='SnapshotCount'),
totalSize?: long(name='TotalSize'),
}(name='SnapshotInfo'),
status?: string(name='Status', example='attached'),
tags?: [
{
id?: int32(name='Id', example='1'),
tagKey?: string(name='TagKey', example='TestTagKey1'),
tagValue?: string(name='TagValue', example='TestTagValue1'),
}
](name='Tags'),
usedScene?: string(name='UsedScene', example='MySQL 5.7'),
zoneId?: string(name='ZoneId', example='cn-hangzhou-i'),
}(name='DBFSInfo'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model GetDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: GetDbfsResponseBody(name='body'),
}
async function getDbfsWithOptions(request: GetDbfsRequest, runtime: Util.RuntimeOptions): GetDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function getDbfs(request: GetDbfsRequest): GetDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return getDbfsWithOptions(request, runtime);
}
model GetServiceLinkedRoleRequest {
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model GetServiceLinkedRoleResponseBody = {
accountId?: string(name='AccountId', example='1352345930******'),
dbfsLinkedRole?: boolean(name='DbfsLinkedRole', example='true'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model GetServiceLinkedRoleResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: GetServiceLinkedRoleResponseBody(name='body'),
}
async function getServiceLinkedRoleWithOptions(request: GetServiceLinkedRoleRequest, runtime: Util.RuntimeOptions): GetServiceLinkedRoleResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetServiceLinkedRole',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function getServiceLinkedRole(request: GetServiceLinkedRoleRequest): GetServiceLinkedRoleResponse {
var runtime = new Util.RuntimeOptions{};
return getServiceLinkedRoleWithOptions(request, runtime);
}
model GetSnapshotLinkRequest {
linkId?: string(name='LinkId', example='sl-b3zlgraysgcs9jy********'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model GetSnapshotLinkResponseBody = {
data?: {
category?: string(name='Category', example='standard'),
ecsList?: [
{
ecsId?: string(name='EcsId', example='i-bp19mogqud1w1*******'),
}
](name='EcsList'),
fsId?: string(name='FsId', example='dbfs-194j6u20sp2gisx*******'),
fsName?: string(name='FsName', example='test'),
linkId?: string(name='LinkId', example='sl-b3zlgraysgcs9jy*******'),
snapshotCount?: int32(name='SnapshotCount', example='1'),
sourceSize?: int32(name='SourceSize', example='20'),
status?: string(name='Status', example='attached'),
totalSize?: long(name='TotalSize', example='50331648'),
}(name='Data'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model GetSnapshotLinkResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: GetSnapshotLinkResponseBody(name='body'),
}
async function getSnapshotLinkWithOptions(request: GetSnapshotLinkRequest, runtime: Util.RuntimeOptions): GetSnapshotLinkResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetSnapshotLink',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'GET',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function getSnapshotLink(request: GetSnapshotLinkRequest): GetSnapshotLinkResponse {
var runtime = new Util.RuntimeOptions{};
return getSnapshotLinkWithOptions(request, runtime);
}
model ListAutoSnapshotPoliciesRequest {
filterKey?: string(name='FilterKey', example='PolicyName'),
filterValue?: string(name='FilterValue', example='policyTest'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ListAutoSnapshotPoliciesResponseBody = {
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
snapshotPolicies?: [
{
accountId?: string(name='AccountId', example='13523459********'),
appliedDbfsNumber?: int32(name='AppliedDbfsNumber', example='1'),
createdTime?: string(name='CreatedTime', example='1670998784000'),
lastModified?: string(name='LastModified', example='1670998784000'),
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
policyName?: string(name='PolicyName', example='policyTest'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
repeatWeekdays?: [ string ](name='RepeatWeekdays'),
retentionDays?: int32(name='RetentionDays', example='30'),
status?: string(name='Status', example='Normal'),
statusDetail?: string(name='StatusDetail', example='-'),
timePoints?: [ string ](name='TimePoints'),
}
](name='SnapshotPolicies'),
totalCount?: int32(name='TotalCount', example='1'),
}
model ListAutoSnapshotPoliciesResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListAutoSnapshotPoliciesResponseBody(name='body'),
}
async function listAutoSnapshotPoliciesWithOptions(request: ListAutoSnapshotPoliciesRequest, runtime: Util.RuntimeOptions): ListAutoSnapshotPoliciesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.filterKey)) {
query['FilterKey'] = request.filterKey;
}
if (!Util.isUnset(request.filterValue)) {
query['FilterValue'] = request.filterValue;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListAutoSnapshotPolicies',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listAutoSnapshotPolicies(request: ListAutoSnapshotPoliciesRequest): ListAutoSnapshotPoliciesResponse {
var runtime = new Util.RuntimeOptions{};
return listAutoSnapshotPoliciesWithOptions(request, runtime);
}
model ListAutoSnapshotPolicyAppliedDbfsRequest {
filterKey?: string(name='FilterKey', example='FsName'),
filterValue?: string(name='FilterValue', example='DBFS1'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ListAutoSnapshotPolicyAppliedDbfsResponseBody = {
dbfsList?: [
{
fsId?: string(name='FsId', example='dbfs-ejdvesb0qvuywvg*******'),
fsName?: string(name='FsName', example='test'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
sizeG?: long(name='SizeG', example='20'),
snapshotCount?: int32(name='SnapshotCount'),
status?: string(name='Status', example='attached'),
totalSize?: long(name='TotalSize'),
}
](name='DbfsList'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
totalCount?: int32(name='TotalCount', example='1'),
}
model ListAutoSnapshotPolicyAppliedDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListAutoSnapshotPolicyAppliedDbfsResponseBody(name='body'),
}
async function listAutoSnapshotPolicyAppliedDbfsWithOptions(request: ListAutoSnapshotPolicyAppliedDbfsRequest, runtime: Util.RuntimeOptions): ListAutoSnapshotPolicyAppliedDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.filterKey)) {
query['FilterKey'] = request.filterKey;
}
if (!Util.isUnset(request.filterValue)) {
query['FilterValue'] = request.filterValue;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.policyId)) {
query['PolicyId'] = request.policyId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListAutoSnapshotPolicyAppliedDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listAutoSnapshotPolicyAppliedDbfs(request: ListAutoSnapshotPolicyAppliedDbfsRequest): ListAutoSnapshotPolicyAppliedDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return listAutoSnapshotPolicyAppliedDbfsWithOptions(request, runtime);
}
model ListAutoSnapshotPolicyUnappliedDbfsRequest {
filterKey?: string(name='FilterKey', example='FsName'),
filterValue?: string(name='FilterValue', example='DBFS1'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ListAutoSnapshotPolicyUnappliedDbfsResponseBody = {
dbfsList?: [
{
fsId?: string(name='FsId', example='dbfs-ejdvesb0qvuywvg*******'),
fsName?: string(name='FsName', example='test'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
sizeG?: long(name='SizeG', example='20'),
snapshotCount?: int32(name='SnapshotCount'),
status?: string(name='Status', example='attached'),
totalSize?: long(name='TotalSize'),
}
](name='DbfsList'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
totalCount?: int32(name='TotalCount', example='1'),
}
model ListAutoSnapshotPolicyUnappliedDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListAutoSnapshotPolicyUnappliedDbfsResponseBody(name='body'),
}
async function listAutoSnapshotPolicyUnappliedDbfsWithOptions(request: ListAutoSnapshotPolicyUnappliedDbfsRequest, runtime: Util.RuntimeOptions): ListAutoSnapshotPolicyUnappliedDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.filterKey)) {
query['FilterKey'] = request.filterKey;
}
if (!Util.isUnset(request.filterValue)) {
query['FilterValue'] = request.filterValue;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListAutoSnapshotPolicyUnappliedDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listAutoSnapshotPolicyUnappliedDbfs(request: ListAutoSnapshotPolicyUnappliedDbfsRequest): ListAutoSnapshotPolicyUnappliedDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return listAutoSnapshotPolicyUnappliedDbfsWithOptions(request, runtime);
}
model ListDbfsRequest {
filterKey?: string(name='FilterKey', example='FsName'),
filterValue?: string(name='FilterValue', example='dbfs-test-01'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
sortKey?: string(name='SortKey', example='SizeG'),
sortType?: string(name='SortType', example='desc'),
tags?: string(name='Tags', example='[{"TagKey":"k1","TagValue":"v1"},{"TagKey":"k2","TagValue":"v2"}]'),
}
model ListDbfsResponseBody = {
DBFSInfo?: [
{
attachNodeNumber?: int32(name='AttachNodeNumber', example='1'),
category?: string(name='Category', example='standard'),
createdTime?: string(name='CreatedTime', example='1609330367000'),
DBFSClusterId?: string(name='DBFSClusterId', example='c39EcDBf-2Ecb-C3C6-6526-018d4Dcf63eD'),
ebsList?: [
{
ebsId?: string(name='EbsId', example='d-bp1383******3uir001r'),
sizeG?: int32(name='SizeG', example='20'),
}
](name='EbsList'),
ecsList?: [
{
ecsId?: string(name='EcsId', example='i-y2vZ3********vvMilZ2hQ'),
}
](name='EcsList'),
enableRaid?: boolean(name='EnableRaid', example='false'),
encryption?: boolean(name='Encryption', example='false'),
fsId?: string(name='FsId', example='dbfs-GOrr********Yd0VLOyBpg'),
fsName?: string(name='FsName', example='dbfs-test-01'),
instanceType?: string(name='InstanceType', example='dbfs.small'),
KMSKeyId?: string(name='KMSKeyId', example='0e478b7a-4262-4802-b8cb-00d3fb408***'),
lastFailed?: string(name='LastFailed', example='TargetIsBusy.DBFS'),
lastMountTime?: string(name='LastMountTime', example='1644915400000'),
lastUmountTime?: string(name='LastUmountTime', example='1644915319000'),
payType?: string(name='PayType', example='postpaid'),
performanceLevel?: string(name='PerformanceLevel', example='PL1'),
raidStrip?: int32(name='RaidStrip', example='2'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
sizeG?: int32(name='SizeG', example='20'),
snapshotInfo?: {
linkId?: string(name='LinkId'),
policyId?: string(name='PolicyId'),
snapshotCount?: int32(name='SnapshotCount'),
totalSize?: long(name='TotalSize'),
}(name='SnapshotInfo'),
status?: string(name='Status', example='attached'),
tags?: [
{
id?: long(name='Id', example='1'),
tagKey?: string(name='TagKey', example='TestTagKey1'),
tagValue?: string(name='TagValue', example='TestTagValue1'),
}
](name='Tags'),
usedScene?: string(name='UsedScene', example='MySQL 5.7'),
zoneId?: string(name='ZoneId', example='cn-hangzhou-i'),
}
](name='DBFSInfo'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
totalCount?: int32(name='TotalCount', example='32'),
}
model ListDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListDbfsResponseBody(name='body'),
}
async function listDbfsWithOptions(request: ListDbfsRequest, runtime: Util.RuntimeOptions): ListDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.filterKey)) {
query['FilterKey'] = request.filterKey;
}
if (!Util.isUnset(request.filterValue)) {
query['FilterValue'] = request.filterValue;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.sortKey)) {
query['SortKey'] = request.sortKey;
}
if (!Util.isUnset(request.sortType)) {
query['SortType'] = request.sortType;
}
if (!Util.isUnset(request.tags)) {
query['Tags'] = request.tags;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listDbfs(request: ListDbfsRequest): ListDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return listDbfsWithOptions(request, runtime);
}
model ListDbfsAttachableEcsInstancesRequest {
filterKey?: string(name='FilterKey', example='InstanceName'),
filterValue?: string(name='FilterValue', example='autotest1'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ListDbfsAttachableEcsInstancesResponseBody = {
ecsLabelInfo?: [
{
imageId?: string(name='ImageId'),
instanceTypeFamily?: string(name='InstanceTypeFamily', example='ecs.g7se'),
OSName?: string(name='OSName', example='Alibaba Cloud Linux 2.1903 LTS 64 bit'),
status?: string(name='Status', example='Running'),
zoneId?: string(name='ZoneId', example='cn-hangzhou-i'),
label?: string(name='label', example='dbfs-test-01'),
value?: string(name='value', example='i-bp10jb8mqajkmrejgo00'),
}
](name='EcsLabelInfo'),
requestId?: string(name='RequestId', example='3724CFEF-02DA-578B-AED6-67EE80671B4A'),
totalCount?: int32(name='TotalCount', example='32'),
}
model ListDbfsAttachableEcsInstancesResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListDbfsAttachableEcsInstancesResponseBody(name='body'),
}
async function listDbfsAttachableEcsInstancesWithOptions(request: ListDbfsAttachableEcsInstancesRequest, runtime: Util.RuntimeOptions): ListDbfsAttachableEcsInstancesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.filterKey)) {
query['FilterKey'] = request.filterKey;
}
if (!Util.isUnset(request.filterValue)) {
query['FilterValue'] = request.filterValue;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListDbfsAttachableEcsInstances',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listDbfsAttachableEcsInstances(request: ListDbfsAttachableEcsInstancesRequest): ListDbfsAttachableEcsInstancesResponse {
var runtime = new Util.RuntimeOptions{};
return listDbfsAttachableEcsInstancesWithOptions(request, runtime);
}
model ListDbfsAttachedEcsInstancesRequest {
fsId?: string(name='FsId', example='dbfs-nUy1tb********BQ4X8Gpw'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ListDbfsAttachedEcsInstancesResponseBody = {
ecsLabelInfo?: [
{
instanceTypeFamily?: string(name='InstanceTypeFamily', example='ecs.g7se'),
mountPoint?: string(name='MountPoint', example='/mnt/dbfs/dbfs-nUy1tb********BQ4X8Gpw'),
mountedTime?: string(name='MountedTime', example='1606290930000'),
OSName?: string(name='OSName', example='Alibaba Cloud Linux 2.1903 LTS 64 bit'),
label?: string(name='label', example='dbfs-test-01'),
value?: string(name='value', example='i-bp10jb8mqajkmrejgo00'),
}
](name='EcsLabelInfo'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model ListDbfsAttachedEcsInstancesResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListDbfsAttachedEcsInstancesResponseBody(name='body'),
}
async function listDbfsAttachedEcsInstancesWithOptions(request: ListDbfsAttachedEcsInstancesRequest, runtime: Util.RuntimeOptions): ListDbfsAttachedEcsInstancesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListDbfsAttachedEcsInstances',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listDbfsAttachedEcsInstances(request: ListDbfsAttachedEcsInstancesRequest): ListDbfsAttachedEcsInstancesResponse {
var runtime = new Util.RuntimeOptions{};
return listDbfsAttachedEcsInstancesWithOptions(request, runtime);
}
model ListSnapshotRequest {
filterKey?: string(name='FilterKey', example='SnapshotId'),
filterValue?: string(name='FilterValue', example='s-bp67acfmxazb4p****'),
fsId?: string(name='FsId', example='dbfs-GOrr********Yd0VLOyBpg'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
snapshotIds?: string(name='SnapshotIds', example='["s-bp67acfmxazb4p****", "s-bp67acfmxazb5p****", … "s-bp67acfmxazb6p****"]'),
snapshotName?: string(name='SnapshotName', example='testSnapshotName'),
snapshotType?: string(name='SnapshotType', example='user'),
sortKey?: string(name='SortKey', example='SnapshotSize'),
sortType?: string(name='SortType', example='desc'),
status?: string(name='Status', example='accomplished'),
}
model ListSnapshotResponseBody = {
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
snapshots?: [
{
category?: string(name='Category', example='standard'),
creationTime?: string(name='CreationTime', example='1609330367000'),
description?: string(name='Description', example='testDescription'),
lastModifiedTime?: string(name='LastModifiedTime', example='1609330367000'),
progress?: string(name='Progress', example='100%'),
remainTime?: int32(name='RemainTime', example='38'),
retentionDays?: int32(name='RetentionDays', example='30'),
snapshotId?: string(name='SnapshotId', example='s-bp67acfmxazb4p****'),
snapshotName?: string(name='SnapshotName', example='testSnapshotName'),
snapshotType?: string(name='SnapshotType', example='user'),
sourceFsId?: string(name='SourceFsId', example='dbfs-bp67acfmxazb4p****'),
sourceFsSize?: int32(name='SourceFsSize', example='20'),
sourceFsStripeWidth?: int32(name='SourceFsStripeWidth', example='1'),
status?: string(name='Status', example='accomplished'),
}
](name='Snapshots'),
totalCount?: int32(name='TotalCount', example='32'),
}
model ListSnapshotResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListSnapshotResponseBody(name='body'),
}
async function listSnapshotWithOptions(request: ListSnapshotRequest, runtime: Util.RuntimeOptions): ListSnapshotResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.filterKey)) {
query['FilterKey'] = request.filterKey;
}
if (!Util.isUnset(request.filterValue)) {
query['FilterValue'] = request.filterValue;
}
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.snapshotIds)) {
query['SnapshotIds'] = request.snapshotIds;
}
if (!Util.isUnset(request.snapshotName)) {
query['SnapshotName'] = request.snapshotName;
}
if (!Util.isUnset(request.snapshotType)) {
query['SnapshotType'] = request.snapshotType;
}
if (!Util.isUnset(request.sortKey)) {
query['SortKey'] = request.sortKey;
}
if (!Util.isUnset(request.sortType)) {
query['SortType'] = request.sortType;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListSnapshot',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listSnapshot(request: ListSnapshotRequest): ListSnapshotResponse {
var runtime = new Util.RuntimeOptions{};
return listSnapshotWithOptions(request, runtime);
}
model ListSnapshotLinksRequest {
filterKey?: string(name='FilterKey', example='FsId'),
filterValue?: string(name='FilterValue', example='dbfs-kwziq4dpsle********'),
fsIds?: string(name='FsIds'),
linkIds?: string(name='LinkIds'),
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ListSnapshotLinksResponseBody = {
pageNumber?: int32(name='PageNumber', example='1'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
snapshotLinks?: [
{
ecsList?: [
{
ecsId?: string(name='EcsId', example='i-bp1f4eo2biro*******'),
}
](name='EcsList'),
fsId?: string(name='FsId', example='dbfs-q7qsgyqptjk******'),
fsName?: string(name='FsName', example='test'),
linkId?: string(name='LinkId', example='sl-b3zlgraysgcs9jy*******'),
snapshotCount?: int32(name='SnapshotCount', example='1'),
sourceSize?: int32(name='SourceSize', example='20'),
status?: string(name='Status', example='attached'),
totalSize?: long(name='TotalSize', example='50331648'),
}
](name='SnapshotLinks'),
totalCount?: int32(name='TotalCount', example='10'),
}
model ListSnapshotLinksResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListSnapshotLinksResponseBody(name='body'),
}
async function listSnapshotLinksWithOptions(request: ListSnapshotLinksRequest, runtime: Util.RuntimeOptions): ListSnapshotLinksResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.filterKey)) {
query['FilterKey'] = request.filterKey;
}
if (!Util.isUnset(request.filterValue)) {
query['FilterValue'] = request.filterValue;
}
if (!Util.isUnset(request.fsIds)) {
query['FsIds'] = request.fsIds;
}
if (!Util.isUnset(request.linkIds)) {
query['LinkIds'] = request.linkIds;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListSnapshotLinks',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listSnapshotLinks(request: ListSnapshotLinksRequest): ListSnapshotLinksResponse {
var runtime = new Util.RuntimeOptions{};
return listSnapshotLinksWithOptions(request, runtime);
}
model ListTagKeysRequest {
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ListTagKeysResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
tagKeys?: [ string ](name='TagKeys'),
}
model ListTagKeysResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListTagKeysResponseBody(name='body'),
}
async function listTagKeysWithOptions(request: ListTagKeysRequest, runtime: Util.RuntimeOptions): ListTagKeysResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListTagKeys',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listTagKeys(request: ListTagKeysRequest): ListTagKeysResponse {
var runtime = new Util.RuntimeOptions{};
return listTagKeysWithOptions(request, runtime);
}
model ListTagValuesRequest {
regionId?: string(name='RegionId', example='cn-hangzhou'),
tagKey?: string(name='TagKey', example='tagKey1'),
}
model ListTagValuesResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
tagValues?: [ string ](name='TagValues'),
}
model ListTagValuesResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ListTagValuesResponseBody(name='body'),
}
async function listTagValuesWithOptions(request: ListTagValuesRequest, runtime: Util.RuntimeOptions): ListTagValuesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.tagKey)) {
query['TagKey'] = request.tagKey;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListTagValues',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listTagValues(request: ListTagValuesRequest): ListTagValuesResponse {
var runtime = new Util.RuntimeOptions{};
return listTagValuesWithOptions(request, runtime);
}
model ModifyAutoSnapshotPolicyRequest {
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
policyName?: string(name='PolicyName', example='policyTest'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
repeatWeekdays?: [ string ](name='RepeatWeekdays'),
retentionDays?: int32(name='RetentionDays', example='30'),
timePoints?: [ string ](name='TimePoints'),
}
model ModifyAutoSnapshotPolicyShrinkRequest {
policyId?: string(name='PolicyId', example='sp-z5siir3iq3m**********'),
policyName?: string(name='PolicyName', example='policyTest'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
repeatWeekdaysShrink?: string(name='RepeatWeekdays'),
retentionDays?: int32(name='RetentionDays', example='30'),
timePointsShrink?: string(name='TimePoints'),
}
model ModifyAutoSnapshotPolicyResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model ModifyAutoSnapshotPolicyResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ModifyAutoSnapshotPolicyResponseBody(name='body'),
}
async function modifyAutoSnapshotPolicyWithOptions(tmpReq: ModifyAutoSnapshotPolicyRequest, runtime: Util.RuntimeOptions): ModifyAutoSnapshotPolicyResponse {
Util.validateModel(tmpReq);
var request = new ModifyAutoSnapshotPolicyShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.repeatWeekdays)) {
request.repeatWeekdaysShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.repeatWeekdays, 'RepeatWeekdays', 'json');
}
if (!Util.isUnset(tmpReq.timePoints)) {
request.timePointsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.timePoints, 'TimePoints', 'json');
}
var query = {};
if (!Util.isUnset(request.policyId)) {
query['PolicyId'] = request.policyId;
}
if (!Util.isUnset(request.policyName)) {
query['PolicyName'] = request.policyName;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.repeatWeekdaysShrink)) {
query['RepeatWeekdays'] = request.repeatWeekdaysShrink;
}
if (!Util.isUnset(request.retentionDays)) {
query['RetentionDays'] = request.retentionDays;
}
if (!Util.isUnset(request.timePointsShrink)) {
query['TimePoints'] = request.timePointsShrink;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyAutoSnapshotPolicy',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function modifyAutoSnapshotPolicy(request: ModifyAutoSnapshotPolicyRequest): ModifyAutoSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return modifyAutoSnapshotPolicyWithOptions(request, runtime);
}
model ModifySnapshotAttributeRequest {
description?: string(name='Description', example='testDescription'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
snapshotId?: string(name='SnapshotId', example='s-y2vZ3********vvMilZ2hQ'),
snapshotName?: string(name='SnapshotName', example='testSnapshotName'),
}
model ModifySnapshotAttributeResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model ModifySnapshotAttributeResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ModifySnapshotAttributeResponseBody(name='body'),
}
async function modifySnapshotAttributeWithOptions(request: ModifySnapshotAttributeRequest, runtime: Util.RuntimeOptions): ModifySnapshotAttributeResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.snapshotId)) {
query['SnapshotId'] = request.snapshotId;
}
if (!Util.isUnset(request.snapshotName)) {
query['SnapshotName'] = request.snapshotName;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifySnapshotAttribute',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function modifySnapshotAttribute(request: ModifySnapshotAttributeRequest): ModifySnapshotAttributeResponse {
var runtime = new Util.RuntimeOptions{};
return modifySnapshotAttributeWithOptions(request, runtime);
}
model RenameDbfsRequest {
fsId?: string(name='FsId', example='dbfs-GOrr********Yd0VLOyBpg'),
fsName?: string(name='FsName', example='NewDbfsName'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model RenameDbfsResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model RenameDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: RenameDbfsResponseBody(name='body'),
}
async function renameDbfsWithOptions(request: RenameDbfsRequest, runtime: Util.RuntimeOptions): RenameDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.fsName)) {
query['FsName'] = request.fsName;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'RenameDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function renameDbfs(request: RenameDbfsRequest): RenameDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return renameDbfsWithOptions(request, runtime);
}
model ResizeDbfsRequest {
fsId?: string(name='FsId', example='dbfs-GOrr********Yd0VLOyBpg'),
newSizeG?: int32(name='NewSizeG', example='40'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
}
model ResizeDbfsResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model ResizeDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: ResizeDbfsResponseBody(name='body'),
}
async function resizeDbfsWithOptions(request: ResizeDbfsRequest, runtime: Util.RuntimeOptions): ResizeDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.newSizeG)) {
query['NewSizeG'] = request.newSizeG;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ResizeDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function resizeDbfs(request: ResizeDbfsRequest): ResizeDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return resizeDbfsWithOptions(request, runtime);
}
model TagDbfsRequest {
dbfsId?: string(name='DbfsId', example='dbfs-nUy1tb********BQ4X8Gpw'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
tags?: string(name='Tags', example='[{"TagKey":"k1","TagValue":"v1"},{"TagKey":"k2","TagValue":"v2"}]'),
}
model TagDbfsResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model TagDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: TagDbfsResponseBody(name='body'),
}
async function tagDbfsWithOptions(request: TagDbfsRequest, runtime: Util.RuntimeOptions): TagDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.dbfsId)) {
query['DbfsId'] = request.dbfsId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.tags)) {
query['Tags'] = request.tags;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'TagDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function tagDbfs(request: TagDbfsRequest): TagDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return tagDbfsWithOptions(request, runtime);
}
model UpdateDbfsRequest {
advancedFeatures?: string(name='AdvancedFeatures', example='{"cpuCoreCount":0.5,"memorySize":512,"pageCacheSize":128}'),
fsId?: string(name='FsId', example='dbfs-GOrr********Yd0VLOyBpg'),
instanceType?: string(name='InstanceType', example='dbfs.medium'),
regionId?: string(name='RegionId', example='cn-hangzhou'),
usedScene?: string(name='UsedScene', example='MySQL 5.7'),
}
model UpdateDbfsResponseBody = {
requestId?: string(name='RequestId', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'),
}
model UpdateDbfsResponse = {
headers: map[string]string(name='headers'),
statusCode: int32(name='statusCode'),
body: UpdateDbfsResponseBody(name='body'),
}
async function updateDbfsWithOptions(request: UpdateDbfsRequest, runtime: Util.RuntimeOptions): UpdateDbfsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.advancedFeatures)) {
query['AdvancedFeatures'] = request.advancedFeatures;
}
if (!Util.isUnset(request.fsId)) {
query['FsId'] = request.fsId;
}
if (!Util.isUnset(request.instanceType)) {
query['InstanceType'] = request.instanceType;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.usedScene)) {
query['UsedScene'] = request.usedScene;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UpdateDbfs',
version = '2020-04-18',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function updateDbfs(request: UpdateDbfsRequest): UpdateDbfsResponse {
var runtime = new Util.RuntimeOptions{};
return updateDbfsWithOptions(request, runtime);
}