ebs-20210730/main.tea (5,439 lines of code) (raw):
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = '';
checkConfig(config);
@endpoint = getEndpoint('ebs', @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 AddDiskReplicaPairRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the replication pair-consistent group.
This parameter is required.', example='cn-beijing'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group.
This parameter is required.', example='pg-myreplica****'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query the IDs of existing replication pairs.
This parameter is required.', example='pair-cn-dsa****'),
}
model AddDiskReplicaPairResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model AddDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: AddDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Adds a replication pair to a replication pair-consistent group. You can use a replication pair-consistent group to batch manage replication pairs. When you call this operation, you can specify parameters, such as ReplicaGroupId, ReplicaPairId, and ClientToken, in the request.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * A replication pair and a replication pair-consistent group replicate in the same direction if they have the same primary region (production region), primary zone (production zone), secondary region (disaster recovery region), and secondary zone (disaster recovery zone). A replication pair can be added only to a replication pair-consistent group that replicates in the same direction as the replication pair.
* * Before you can add a replication pair to a replication pair-consistent group, make sure that the pair and the group are in the **Created** (`created`) or **Stopped** (`stopped`) state.
* * Up to 17 replication pairs can be added to a single replication pair-consistent group.
* * After replication pairs are added to a replication pair-consistent group, the recovery point objective (RPO) of the group takes effect on the pairs in place of their original RPOs.
*
* @param request AddDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return AddDiskReplicaPairResponse
*/
async function addDiskReplicaPairWithOptions(request: AddDiskReplicaPairRequest, runtime: Util.RuntimeOptions): AddDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'AddDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Adds a replication pair to a replication pair-consistent group. You can use a replication pair-consistent group to batch manage replication pairs. When you call this operation, you can specify parameters, such as ReplicaGroupId, ReplicaPairId, and ClientToken, in the request.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * A replication pair and a replication pair-consistent group replicate in the same direction if they have the same primary region (production region), primary zone (production zone), secondary region (disaster recovery region), and secondary zone (disaster recovery zone). A replication pair can be added only to a replication pair-consistent group that replicates in the same direction as the replication pair.
* * Before you can add a replication pair to a replication pair-consistent group, make sure that the pair and the group are in the **Created** (`created`) or **Stopped** (`stopped`) state.
* * Up to 17 replication pairs can be added to a single replication pair-consistent group.
* * After replication pairs are added to a replication pair-consistent group, the recovery point objective (RPO) of the group takes effect on the pairs in place of their original RPOs.
*
* @param request AddDiskReplicaPairRequest
* @return AddDiskReplicaPairResponse
*/
async function addDiskReplicaPair(request: AddDiskReplicaPairRequest): AddDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return addDiskReplicaPairWithOptions(request, runtime);
}
model ApplyLensServiceResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
}
model ApplyLensServiceResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ApplyLensServiceResponseBody(name='body'),
}
/**
* @summary Enables CloudLens for EBS.
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @param request ApplyLensServiceRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ApplyLensServiceResponse
*/
async function applyLensServiceWithOptions(runtime: Util.RuntimeOptions): ApplyLensServiceResponse {
var req = new OpenApi.OpenApiRequest{};
var params = new OpenApi.Params{
action = 'ApplyLensService',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Enables CloudLens for EBS.
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @return ApplyLensServiceResponse
*/
async function applyLensService(): ApplyLensServiceResponse {
var runtime = new Util.RuntimeOptions{};
return applyLensServiceWithOptions(runtime);
}
model BindEnterpriseSnapshotPolicyRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
diskTargets?: [ string ](name='DiskTargets', description='The list of disks.'),
policyId?: string(name='PolicyId', description='The id of the policy.
This parameter is required.', example='esp-xxx'),
regionId?: string(name='RegionId', description='The region ID . You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which snapshot policy is supported.
This parameter is required.', example='cn-hangzhou'),
}
model BindEnterpriseSnapshotPolicyResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='EF4CA176-3358-5B74-B317-B1908B4B1F7D'),
}
model BindEnterpriseSnapshotPolicyResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: BindEnterpriseSnapshotPolicyResponseBody(name='body'),
}
/**
* @summary Bind disks into a enterprise-level snapshot policy.
*
* @param request BindEnterpriseSnapshotPolicyRequest
* @param runtime runtime options for this request RuntimeOptions
* @return BindEnterpriseSnapshotPolicyResponse
*/
async function bindEnterpriseSnapshotPolicyWithOptions(request: BindEnterpriseSnapshotPolicyRequest, runtime: Util.RuntimeOptions): BindEnterpriseSnapshotPolicyResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.diskTargets)) {
query['DiskTargets'] = request.diskTargets;
}
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 = 'BindEnterpriseSnapshotPolicy',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Bind disks into a enterprise-level snapshot policy.
*
* @param request BindEnterpriseSnapshotPolicyRequest
* @return BindEnterpriseSnapshotPolicyResponse
*/
async function bindEnterpriseSnapshotPolicy(request: BindEnterpriseSnapshotPolicyRequest): BindEnterpriseSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return bindEnterpriseSnapshotPolicyWithOptions(request, runtime);
}
model CancelLensServiceResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
}
model CancelLensServiceResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CancelLensServiceResponseBody(name='body'),
}
/**
* @summary Disables CloudLens for EBS.
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @param request CancelLensServiceRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CancelLensServiceResponse
*/
async function cancelLensServiceWithOptions(runtime: Util.RuntimeOptions): CancelLensServiceResponse {
var req = new OpenApi.OpenApiRequest{};
var params = new OpenApi.Params{
action = 'CancelLensService',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Disables CloudLens for EBS.
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @return CancelLensServiceResponse
*/
async function cancelLensService(): CancelLensServiceResponse {
var runtime = new Util.RuntimeOptions{};
return cancelLensServiceWithOptions(runtime);
}
model ChangeResourceGroupRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
newResourceGroupId?: string(name='NewResourceGroupId', description='The ID of the new resource group. You can view the available resource groups in the Resource Management console. For more information, see [View basic information of a resource group](https://help.aliyun.com/document_detail/151181.html).
This parameter is required.', example='rg-123'),
regionId?: string(name='RegionId', description='The region ID of the resource. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-hangzhou'),
resourceId?: string(name='ResourceId', description='The ID of the resource. For example, if you set ResourceType to diskreplicapair, set this parameter to the ID of a replication pair.
This parameter is required.', example='pair-123'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* dedicatedblockstoragecluster: dedicated block storage cluster.
* diskreplicapair: replication pair.
* diskreplicagroup: replication pair-consistent group.
This parameter is required.', example='diskreplicapair'),
}
model ChangeResourceGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model ChangeResourceGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ChangeResourceGroupResponseBody(name='body'),
}
/**
* @summary Changes the resource group to which an Elastic Block Storage (EBS) resource belongs.
*
* @param request ChangeResourceGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ChangeResourceGroupResponse
*/
async function changeResourceGroupWithOptions(request: ChangeResourceGroupRequest, runtime: Util.RuntimeOptions): ChangeResourceGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.newResourceGroupId)) {
query['NewResourceGroupId'] = request.newResourceGroupId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ChangeResourceGroup',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Changes the resource group to which an Elastic Block Storage (EBS) resource belongs.
*
* @param request ChangeResourceGroupRequest
* @return ChangeResourceGroupResponse
*/
async function changeResourceGroup(request: ChangeResourceGroupRequest): ChangeResourceGroupResponse {
var runtime = new Util.RuntimeOptions{};
return changeResourceGroupWithOptions(request, runtime);
}
model ClearPairDrillRequest {
drillId?: string(name='DrillId', description='The ID of the drill. You can call the [DescribePairDrills](https://help.aliyun.com/document_detail/2584480.html) operation to query the disaster recovery drills that were performed on replication pairs in a specific region.
This parameter is required.', example='drill-xxxx'),
pairId?: string(name='PairId', description='The ID of the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query the most recent list of replication pairs, including replication pair IDs.
This parameter is required.', example='pair-xxxx'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which async replication is supported.
This parameter is required.', example='cn-hangzhou'),
}
model ClearPairDrillResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='20758A-585D-4A41-A9B2-28DA8F4F****'),
}
model ClearPairDrillResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ClearPairDrillResponseBody(name='body'),
}
/**
* @summary Clears the disaster recovery drills that were initiated from the secondary disk of a replication pair and deletes the auto-created drill disks.
*
* @param request ClearPairDrillRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ClearPairDrillResponse
*/
async function clearPairDrillWithOptions(request: ClearPairDrillRequest, runtime: Util.RuntimeOptions): ClearPairDrillResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.drillId)) {
query['DrillId'] = request.drillId;
}
if (!Util.isUnset(request.pairId)) {
query['PairId'] = request.pairId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ClearPairDrill',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Clears the disaster recovery drills that were initiated from the secondary disk of a replication pair and deletes the auto-created drill disks.
*
* @param request ClearPairDrillRequest
* @return ClearPairDrillResponse
*/
async function clearPairDrill(request: ClearPairDrillRequest): ClearPairDrillResponse {
var runtime = new Util.RuntimeOptions{};
return clearPairDrillWithOptions(request, runtime);
}
model ClearReplicaGroupDrillRequest {
drillId?: string(name='DrillId', description='The ID of the drill. You can call the [DescribeReplicaGroupDrills](https://help.aliyun.com/document_detail/2584481.html) operation to query disaster recovery drills that were performed on replication pairs in a specific region.
This parameter is required.', example='pg-drill-xxxx'),
groupId?: string(name='GroupId', description='The ID of the replication pair-consistent group. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the most recent list of replication pair-consistent groups, including group IDs.
This parameter is required.', example='pg-xxxx'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which async replication is supported.
This parameter is required.', example='cn-hangzhou'),
}
model ClearReplicaGroupDrillResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model ClearReplicaGroupDrillResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ClearReplicaGroupDrillResponseBody(name='body'),
}
/**
* @summary Clears the disaster recovery drills that were initiated from the secondary disks of a replication pair-consistent group and deletes the auto-created drill disks.
*
* @param request ClearReplicaGroupDrillRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ClearReplicaGroupDrillResponse
*/
async function clearReplicaGroupDrillWithOptions(request: ClearReplicaGroupDrillRequest, runtime: Util.RuntimeOptions): ClearReplicaGroupDrillResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.drillId)) {
query['DrillId'] = request.drillId;
}
if (!Util.isUnset(request.groupId)) {
query['GroupId'] = request.groupId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ClearReplicaGroupDrill',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Clears the disaster recovery drills that were initiated from the secondary disks of a replication pair-consistent group and deletes the auto-created drill disks.
*
* @param request ClearReplicaGroupDrillRequest
* @return ClearReplicaGroupDrillResponse
*/
async function clearReplicaGroupDrill(request: ClearReplicaGroupDrillRequest): ClearReplicaGroupDrillResponse {
var runtime = new Util.RuntimeOptions{};
return clearReplicaGroupDrillWithOptions(request, runtime);
}
model CreateDedicatedBlockStorageClusterRequest {
azone?: string(name='Azone', description='The ID of the zone in which to create the dedicated block storage cluster. You can call the [DescribeZones](https://help.aliyun.com/document_detail/25610.html) operation to query the most recent zone list.
This parameter is required.', example='cn-heyuan-b'),
capacity?: long(name='Capacity', description='The capacity of the dedicated block storage cluster. Valid values: 61440 to 2334720. Unit: GiB. 2,334,720 GiB is equal to 2,280 TiB. The capacity increases in a minimum increment of 12,288 GiB.
> If the capacity of a dedicated block storage cluster is less than 576 TiB, the maximum throughput per TiB cannot exceed 52 MB/s. If the capacity of a dedicated block storage cluster is greater than 576 TiB, the maximum throughput per TiB cannot exceed 26 MB/s.
This parameter is required.', example='61440'),
dbscId?: string(name='DbscId', description='This parameter is deprecated.', example='test1233', deprecated=true, nullable=true),
dbscName?: string(name='DbscName', description='The name of the dedicated block storage cluster.
This parameter is required.', example='myDBSCCluster'),
period?: int32(name='Period', description='The subscription duration of the dedicated block storage cluster. Valid values: 6, 7, 8, 9, 10, 11, 12, 24, and 36.', example='12'),
periodUnit?: string(name='PeriodUnit', description='The unit of the subscription duration specified by `Period`. Set the value to Month.', example='Month'),
regionId?: string(name='RegionId', description='The ID of the region in which to create the dedicated block storage cluster. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-heyuan'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which to assign the dedicated block storage cluster.', example='rg-acfmvs*******'),
tag?: [
{
key?: string(name='Key', description='The key of tag N to add to the dedicated block storage cluster.
This parameter is required.', example='tag-key'),
value?: string(name='Value', description='The value of tag N to add to the dedicated block storage cluster.
This parameter is required.', example='tag-value'),
}
](name='Tag', description='The tags to add to the dedicated block storage cluster. You can specify up to 20 tags.'),
type?: string(name='Type', description='The type of the dedicated block storage cluster. Valid values:
* Standard: basic dedicated block storage cluster. Enterprise SSDs (ESSDs) at performance level 0 (PL0 ESSDs) can be created in basic dedicated block storage clusters.
* Premium: performance dedicated block storage cluster. ESSDs at performance level 1 (PL1 ESSDs) can be created in performance dedicated block storage clusters.
Default value: Premium.
For more information about ESSDs, see [ESSDs](https://help.aliyun.com/document_detail/122389.html).
This parameter is required.', example='Premium'),
}
model CreateDedicatedBlockStorageClusterResponseBody = {
dbscId?: string(name='DbscId', description='The ID of the dedicated block storage cluster.', example='dbsc-f8z4d3k4nsgg9okb****'),
orderId?: string(name='OrderId', description='The order ID.', example='50155660025****'),
requestId?: string(name='RequestId', description='The request ID.', example='20758A-585D-4A41-A9B2-28DA8F4F****'),
}
model CreateDedicatedBlockStorageClusterResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateDedicatedBlockStorageClusterResponseBody(name='body'),
}
/**
* @summary Creates a dedicated block storage cluster. When you call this operation, you can specify parameters, such as Azone, Capacity, Type, and PeriodUnit, in the request.
*
* @description ## [](#)Usage notes
* * Dedicated block storage clusters are physically isolated from public block storage clusters. The owner of each dedicated block storage cluster has exclusive access to all resources in the cluster.
* * Disks created in a dedicated block storage cluster can be attached only to Elastic Compute Service (ECS) instances that reside in the same zone as the cluster. Before you create a dedicated block storage cluster, decide the regions and zones in which to deploy your cloud resources.
* * Dedicated block storage clusters are classified into basic and performance types. When you create a dedicated block storage cluster, select a cluster type based on your business requirements.
* * You are charged for creating dedicated block storage clusters.
*
* @param request CreateDedicatedBlockStorageClusterRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateDedicatedBlockStorageClusterResponse
*/
async function createDedicatedBlockStorageClusterWithOptions(request: CreateDedicatedBlockStorageClusterRequest, runtime: Util.RuntimeOptions): CreateDedicatedBlockStorageClusterResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.azone)) {
query['Azone'] = request.azone;
}
if (!Util.isUnset(request.capacity)) {
query['Capacity'] = request.capacity;
}
if (!Util.isUnset(request.dbscId)) {
query['DbscId'] = request.dbscId;
}
if (!Util.isUnset(request.dbscName)) {
query['DbscName'] = request.dbscName;
}
if (!Util.isUnset(request.period)) {
query['Period'] = request.period;
}
if (!Util.isUnset(request.periodUnit)) {
query['PeriodUnit'] = request.periodUnit;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.type)) {
query['Type'] = request.type;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateDedicatedBlockStorageCluster',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates a dedicated block storage cluster. When you call this operation, you can specify parameters, such as Azone, Capacity, Type, and PeriodUnit, in the request.
*
* @description ## [](#)Usage notes
* * Dedicated block storage clusters are physically isolated from public block storage clusters. The owner of each dedicated block storage cluster has exclusive access to all resources in the cluster.
* * Disks created in a dedicated block storage cluster can be attached only to Elastic Compute Service (ECS) instances that reside in the same zone as the cluster. Before you create a dedicated block storage cluster, decide the regions and zones in which to deploy your cloud resources.
* * Dedicated block storage clusters are classified into basic and performance types. When you create a dedicated block storage cluster, select a cluster type based on your business requirements.
* * You are charged for creating dedicated block storage clusters.
*
* @param request CreateDedicatedBlockStorageClusterRequest
* @return CreateDedicatedBlockStorageClusterResponse
*/
async function createDedicatedBlockStorageCluster(request: CreateDedicatedBlockStorageClusterRequest): CreateDedicatedBlockStorageClusterResponse {
var runtime = new Util.RuntimeOptions{};
return createDedicatedBlockStorageClusterWithOptions(request, runtime);
}
model CreateDiskReplicaGroupRequest {
bandwidth?: long(name='Bandwidth', description='The bandwidth value. Unit: Mbit/s.
> This parameter is not publicly available.', example='10240'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
description?: string(name='Description', description='The description of the replication pair-consistent group. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`.', example='This is description.'),
destinationRegionId?: string(name='DestinationRegionId', description='The region ID of the secondary site.
This parameter is required.', example='cn-shanghai'),
destinationZoneId?: string(name='DestinationZoneId', description='The zone ID of the secondary site.
This parameter is required.', example='cn-shanghai-e'),
groupName?: string(name='GroupName', description='The name of the replication pair-consistent group. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with `http://` or `https://`. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).', example='myreplicagrouptest'),
RPO?: long(name='RPO', description='The RPO of the replication pair-consistent group. Unit: seconds. Valid value: 900.', example='900'),
regionId?: string(name='RegionId', description='The ID of the region in which to create the replication pair-consistent group. The primary site is deployed in the specified region.
This parameter is required.', example='cn-beijing'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the replication pair-consistent group belongs.', example='rg-acfmvs*******'),
sourceZoneId?: string(name='SourceZoneId', description='The zone ID of the primary site.
This parameter is required.', example='cn-beijing-f'),
tag?: [
{
key?: string(name='Key', description='The key of tag N of the replication pair-consistent group.', example='tag-key'),
value?: string(name='Value', description='The value of tag N of the replication pair-consistent group.', example='tag-value'),
}
](name='Tag', description='The tags. Up to 20 tags are supported.'),
}
model CreateDiskReplicaGroupResponseBody = {
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group.', example='pg-xxxxxxx'),
requestId?: string(name='RequestId', description='The ID of the request.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model CreateDiskReplicaGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateDiskReplicaGroupResponseBody(name='body'),
}
/**
* @summary Creates a replication pair-consistent group.
*
* @description ## [](#)Usage notes
* The replication pair-consistent group feature allows you to batch manage multiple disks in disaster recovery scenarios. You can restore the data of all disks in the same replication pair-consistent group to the same point in time to allow for disaster recovery of instances.
* Take note of the following items:
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Replication pair-consistent groups can be used to implement disaster recovery across zones within the same region and disaster recovery across regions.
* * A replication pair and a replication pair-consistent group can replicate in the same direction if they have the same primary region (production region), primary zone (production zone), secondary region (disaster recovery region), and secondary zone (disaster recovery zone). A replication pair can be added to only a replication pair-consistent group that replicates in the same direction as the replication pair.
* * After replication pairs are added to a replication pair-consistent group, the recovery point objective (RPO) of the group takes effect on the pairs instead of their original RPOs.
*
* @param request CreateDiskReplicaGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateDiskReplicaGroupResponse
*/
async function createDiskReplicaGroupWithOptions(request: CreateDiskReplicaGroupRequest, runtime: Util.RuntimeOptions): CreateDiskReplicaGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bandwidth)) {
query['Bandwidth'] = request.bandwidth;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.destinationRegionId)) {
query['DestinationRegionId'] = request.destinationRegionId;
}
if (!Util.isUnset(request.destinationZoneId)) {
query['DestinationZoneId'] = request.destinationZoneId;
}
if (!Util.isUnset(request.groupName)) {
query['GroupName'] = request.groupName;
}
if (!Util.isUnset(request.RPO)) {
query['RPO'] = request.RPO;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.sourceZoneId)) {
query['SourceZoneId'] = request.sourceZoneId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateDiskReplicaGroup',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates a replication pair-consistent group.
*
* @description ## [](#)Usage notes
* The replication pair-consistent group feature allows you to batch manage multiple disks in disaster recovery scenarios. You can restore the data of all disks in the same replication pair-consistent group to the same point in time to allow for disaster recovery of instances.
* Take note of the following items:
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Replication pair-consistent groups can be used to implement disaster recovery across zones within the same region and disaster recovery across regions.
* * A replication pair and a replication pair-consistent group can replicate in the same direction if they have the same primary region (production region), primary zone (production zone), secondary region (disaster recovery region), and secondary zone (disaster recovery zone). A replication pair can be added to only a replication pair-consistent group that replicates in the same direction as the replication pair.
* * After replication pairs are added to a replication pair-consistent group, the recovery point objective (RPO) of the group takes effect on the pairs instead of their original RPOs.
*
* @param request CreateDiskReplicaGroupRequest
* @return CreateDiskReplicaGroupResponse
*/
async function createDiskReplicaGroup(request: CreateDiskReplicaGroupRequest): CreateDiskReplicaGroupResponse {
var runtime = new Util.RuntimeOptions{};
return createDiskReplicaGroupWithOptions(request, runtime);
}
model CreateDiskReplicaPairRequest {
bandwidth?: long(name='Bandwidth', description='The bandwidth to use to asynchronously replicate data between the primary disk and secondary disk. Unit: Kbit/s. Valid values:
* 10240 : equal to 10 Mbit/s
* 20480 : equal to 20 Mbit/s
* 51200 : equal to 50 Mbit/s
* 102400 : equal to 100 Mbit/s
Default value: 10240.
When you set the ChargeType parameter to POSTPAY, the Bandwidth parameter is automatically set to 0 and cannot be modified. The value 0 indicates that bandwidth is dynamically allocated based on the volume of data that is asynchronously replicated from the primary disk to the secondary disk.', example='10240'),
chargeType?: string(name='ChargeType', description='The billing method of the replication pair. Valid values:
* PREPAY: subscription
* POSTPAY: pay-as-you-go
Default value: POSTPAY.', example='PREPAY'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
description?: string(name='Description', description='The description of the replication pair. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`.', example='This is description.'),
destinationDiskId?: string(name='DestinationDiskId', description='The ID of the secondary disk.
This parameter is required.', example='d-sa1f82p58p1tdw9g****'),
destinationRegionId?: string(name='DestinationRegionId', description='The region ID of the secondary disk. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which async replication is supported.
This parameter is required.', example='cn-shanghai'),
destinationZoneId?: string(name='DestinationZoneId', description='The zone ID of the secondary disk.
This parameter is required.', example='cn-shanghai-e'),
diskId?: string(name='DiskId', description='The ID of the primary disk.
This parameter is required.', example='d-iq80sgp4d0xbk24q****'),
pairName?: string(name='PairName', description='The name of the replication pair. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with `http://` or `https://`. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).', example='TestReplicaPair'),
period?: long(name='Period', description='The subscription duration of the replication pair. This parameter is required when the `ChargeType` parameter is set to PREPAY. The unit of the subscription duration is specified by the `PeriodUnit` parameter.
* Valid values when the `PeriodUnit` parameter is set to Week: 1, 2, 3, and 4.
* Valid values when the `PeriodUnit` parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.', example='1'),
periodUnit?: string(name='PeriodUnit', description='The unit of the subscription duration of the replication pair. Valid values:
* Week.
* Month
Default value: Month.', example='Month'),
RPO?: long(name='RPO', description='The recovery point objective (RPO) of the replication pair. Unit: seconds. Set the value to 900.', example='900'),
regionId?: string(name='RegionId', description='The ID of the region in which to create the replication pair.
This parameter is required.', example='cn-shanghai'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which to assign the replication group.', example='rg-acfmvs****'),
sourceZoneId?: string(name='SourceZoneId', description='The zone ID of the primary disk.
This parameter is required.', example='cn-beijing-f'),
tag?: [
{
key?: string(name='Key', description='The key of tag N to add to the resource. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain `http://` or `https://`. It cannot start with `acs:` or `aliyun`.', example='TestKey'),
value?: string(name='Value', description='The value of tag N to add to the resource. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with `acs:` or contain `http://` or `https://`.', example='TestValue'),
}
](name='Tag', description='The resource tags. You can specify up to 20 tags.'),
}
model CreateDiskReplicaPairResponseBody = {
orderId?: string(name='OrderId', description='The ID of the order.', example='123456****'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.', example='pair-cn-dsa****'),
requestId?: string(name='RequestId', description='The ID of the request.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model CreateDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Creates a replication pair to asynchronously replicate data between disks.
*
* @description Async replication is a feature that protects data across regions by using the data replication capability of Elastic Block Storage (EBS). This feature can be used to asynchronously replicate data from a disk in one region to a disk in another region for disaster recovery purposes. You can use this feature to implement disaster recovery for critical business to protect data in your databases and improve business continuity.
* Currently, the async replication feature can asynchronously replicate data only between enhanced SSDs (ESSDs). The functionality of disks in replication pairs is limited. You are charged on a subscription basis for the bandwidth that is used by the async replication feature.
* Before you call this operation, take note of the following items:
* * Make sure that the source disk (primary disk) from which to replicate data and the destination disk (secondary disk) to which to replicate data are created. You can call the [CreateDisk](https://help.aliyun.com/document_detail/25513.html) operation to create disks.
* * The secondary disk cannot reside the same region as the primary disk. The async replication feature is supported in the China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Heyuan), China (Chengdu), China (Hong Kong), Singapore, US (Silicon Valley), and US (Virginia) regions.
* * After you call this operation to create a replication pair, you must call the [StartDiskReplicaPair](https://help.aliyun.com/document_detail/354205.html) operation to enable async replication to periodically replicate data from the primary disk to the secondary disk across regions.
*
* @param request CreateDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateDiskReplicaPairResponse
*/
async function createDiskReplicaPairWithOptions(request: CreateDiskReplicaPairRequest, runtime: Util.RuntimeOptions): CreateDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bandwidth)) {
query['Bandwidth'] = request.bandwidth;
}
if (!Util.isUnset(request.chargeType)) {
query['ChargeType'] = request.chargeType;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.destinationDiskId)) {
query['DestinationDiskId'] = request.destinationDiskId;
}
if (!Util.isUnset(request.destinationRegionId)) {
query['DestinationRegionId'] = request.destinationRegionId;
}
if (!Util.isUnset(request.destinationZoneId)) {
query['DestinationZoneId'] = request.destinationZoneId;
}
if (!Util.isUnset(request.diskId)) {
query['DiskId'] = request.diskId;
}
if (!Util.isUnset(request.pairName)) {
query['PairName'] = request.pairName;
}
if (!Util.isUnset(request.period)) {
query['Period'] = request.period;
}
if (!Util.isUnset(request.periodUnit)) {
query['PeriodUnit'] = request.periodUnit;
}
if (!Util.isUnset(request.RPO)) {
query['RPO'] = request.RPO;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.sourceZoneId)) {
query['SourceZoneId'] = request.sourceZoneId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates a replication pair to asynchronously replicate data between disks.
*
* @description Async replication is a feature that protects data across regions by using the data replication capability of Elastic Block Storage (EBS). This feature can be used to asynchronously replicate data from a disk in one region to a disk in another region for disaster recovery purposes. You can use this feature to implement disaster recovery for critical business to protect data in your databases and improve business continuity.
* Currently, the async replication feature can asynchronously replicate data only between enhanced SSDs (ESSDs). The functionality of disks in replication pairs is limited. You are charged on a subscription basis for the bandwidth that is used by the async replication feature.
* Before you call this operation, take note of the following items:
* * Make sure that the source disk (primary disk) from which to replicate data and the destination disk (secondary disk) to which to replicate data are created. You can call the [CreateDisk](https://help.aliyun.com/document_detail/25513.html) operation to create disks.
* * The secondary disk cannot reside the same region as the primary disk. The async replication feature is supported in the China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Heyuan), China (Chengdu), China (Hong Kong), Singapore, US (Silicon Valley), and US (Virginia) regions.
* * After you call this operation to create a replication pair, you must call the [StartDiskReplicaPair](https://help.aliyun.com/document_detail/354205.html) operation to enable async replication to periodically replicate data from the primary disk to the secondary disk across regions.
*
* @param request CreateDiskReplicaPairRequest
* @return CreateDiskReplicaPairResponse
*/
async function createDiskReplicaPair(request: CreateDiskReplicaPairRequest): CreateDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return createDiskReplicaPairWithOptions(request, runtime);
}
model CreateEnterpriseSnapshotPolicyRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
crossRegionCopyInfo?: {
enabled?: boolean(name='Enabled', description='Whether cross-region replication is enabled. The range of values:
- true
- false', example='false'),
regions?: [
{
regionId?: string(name='RegionId', description='The region ID of the destination. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.', example='cn-hangzhou'),
retainDays?: int32(name='RetainDays', description='Number of days to retain the destination snapshot. The range of values is greater than 1.', example='7'),
}
](name='Regions', description='The list of destination regions.'),
}(name='CrossRegionCopyInfo', description='Snapshot replication destination information.'),
desc?: string(name='Desc', description='The description of the policy.', example='xxx'),
name?: string(name='Name', description='The name of the policy.
This parameter is required.', example='xx'),
regionId?: string(name='RegionId', description='The region ID . You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which snapshot policy is supported.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which to assign the snapshot policy.', example='xxx'),
retainRule?: {
number?: int32(name='Number', description='Maximum number of retained snapshots.', example='10'),
timeInterval?: int32(name='TimeInterval', description='The time interval , valid value greater than 1.', example='14'),
timeUnit?: string(name='TimeUnit', description='The unit of time, valid values:
- DAYS
- WEEKS', example='DAYS'),
}(name='RetainRule', description='The snapshot retention rule.
This parameter is required.'),
schedule?: {
cronExpression?: string(name='CronExpression', description='The time when the policy will to be scheduled. Valid values: Set the parameter in a cron expression.
For example, you can use 0 0 4 1/1 * ? to specify 04:00:00 (UTC+8) on the first day of each month.
This parameter is required.'),
}(name='Schedule', description='The rule for scheduling.
This parameter is required.'),
specialRetainRules?: {
enabled?: boolean(name='Enabled', description='Indicates whether the special retention is enabled.
* true: enable
* false: disable', example='true'),
rules?: [
{
specialPeriodUnit?: string(name='SpecialPeriodUnit', description='The periodic unit for specially retained snapshots. If configured to WEEKS, it provides special retention for the first snapshot of each week. The retention period is determined by TimeUnit and TimeInterval. The range of values are:
- WEEKS
- MONTHS
- YEARS', example='WEEKS'),
timeInterval?: int32(name='TimeInterval', description='Retention Time Value. The range of values is greater than 1.', example='14'),
timeUnit?: string(name='TimeUnit', description='Retention time unit for special snapshots. The range of values:
- DAYS
- WEEKS', example='WEEKS'),
}
](name='Rules', description='The special retention rules.'),
}(name='SpecialRetainRules', description='The special snapshot retention rules.'),
state?: string(name='State', description='The status of the policy. Valid values:
- ENABLED: Enable snapshot policy execution.
- DISABLED: Disable snapshot policy execution.', example='ENABLED'),
storageRule?: {
enableImmediateAccess?: boolean(name='EnableImmediateAccess', description='Whether to enable the rapid availability of snapshots. The range of values:
- true
- false', example='false'),
}(name='StorageRule', description='Advanced snapshot features.'),
tag?: [
{
key?: string(name='Key', description='The key of the tag.
This parameter is required.', example='tag-key'),
value?: string(name='Value', description='The tag value.
The tag value can be 0 to 128 characters in length, and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.
Each tag key must have a unique tag value. You can specify at most 20 tag values in each call.
This parameter is required.', example='tag-value'),
}
](name='Tag', description='The list of tags.'),
targetType?: string(name='TargetType', description='Binding target type, valid value:
- DISK
This parameter is required.', example='DISK'),
}
model CreateEnterpriseSnapshotPolicyShrinkRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
crossRegionCopyInfoShrink?: string(name='CrossRegionCopyInfo', description='Snapshot replication destination information.'),
desc?: string(name='Desc', description='The description of the policy.', example='xxx'),
name?: string(name='Name', description='The name of the policy.
This parameter is required.', example='xx'),
regionId?: string(name='RegionId', description='The region ID . You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which snapshot policy is supported.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which to assign the snapshot policy.', example='xxx'),
retainRuleShrink?: string(name='RetainRule', description='The snapshot retention rule.
This parameter is required.'),
scheduleShrink?: string(name='Schedule', description='The rule for scheduling.
This parameter is required.'),
specialRetainRulesShrink?: string(name='SpecialRetainRules', description='The special snapshot retention rules.'),
state?: string(name='State', description='The status of the policy. Valid values:
- ENABLED: Enable snapshot policy execution.
- DISABLED: Disable snapshot policy execution.', example='ENABLED'),
storageRuleShrink?: string(name='StorageRule', description='Advanced snapshot features.'),
tag?: [
{
key?: string(name='Key', description='The key of the tag.
This parameter is required.', example='tag-key'),
value?: string(name='Value', description='The tag value.
The tag value can be 0 to 128 characters in length, and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.
Each tag key must have a unique tag value. You can specify at most 20 tag values in each call.
This parameter is required.', example='tag-value'),
}
](name='Tag', description='The list of tags.'),
targetType?: string(name='TargetType', description='Binding target type, valid value:
- DISK
This parameter is required.', example='DISK'),
}
model CreateEnterpriseSnapshotPolicyResponseBody = {
policyId?: string(name='PolicyId', description='The id of a policy.', example='esp-xxx'),
requestId?: string(name='RequestId', description='The request ID.', example='7A8959DA-1E04-5724-8288-58334031454E'),
}
model CreateEnterpriseSnapshotPolicyResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateEnterpriseSnapshotPolicyResponseBody(name='body'),
}
/**
* @summary Create an enterprise-level snapshot policy
*
* @param tmpReq CreateEnterpriseSnapshotPolicyRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateEnterpriseSnapshotPolicyResponse
*/
async function createEnterpriseSnapshotPolicyWithOptions(tmpReq: CreateEnterpriseSnapshotPolicyRequest, runtime: Util.RuntimeOptions): CreateEnterpriseSnapshotPolicyResponse {
Util.validateModel(tmpReq);
var request = new CreateEnterpriseSnapshotPolicyShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.crossRegionCopyInfo)) {
request.crossRegionCopyInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.crossRegionCopyInfo, 'CrossRegionCopyInfo', 'json');
}
if (!Util.isUnset(tmpReq.retainRule)) {
request.retainRuleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.retainRule, 'RetainRule', 'json');
}
if (!Util.isUnset(tmpReq.schedule)) {
request.scheduleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.schedule, 'Schedule', 'json');
}
if (!Util.isUnset(tmpReq.specialRetainRules)) {
request.specialRetainRulesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.specialRetainRules, 'SpecialRetainRules', 'json');
}
if (!Util.isUnset(tmpReq.storageRule)) {
request.storageRuleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.storageRule, 'StorageRule', 'json');
}
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.crossRegionCopyInfoShrink)) {
query['CrossRegionCopyInfo'] = request.crossRegionCopyInfoShrink;
}
if (!Util.isUnset(request.desc)) {
query['Desc'] = request.desc;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.retainRuleShrink)) {
query['RetainRule'] = request.retainRuleShrink;
}
if (!Util.isUnset(request.scheduleShrink)) {
query['Schedule'] = request.scheduleShrink;
}
if (!Util.isUnset(request.specialRetainRulesShrink)) {
query['SpecialRetainRules'] = request.specialRetainRulesShrink;
}
if (!Util.isUnset(request.state)) {
query['State'] = request.state;
}
if (!Util.isUnset(request.storageRuleShrink)) {
query['StorageRule'] = request.storageRuleShrink;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
if (!Util.isUnset(request.targetType)) {
query['TargetType'] = request.targetType;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateEnterpriseSnapshotPolicy',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Create an enterprise-level snapshot policy
*
* @param request CreateEnterpriseSnapshotPolicyRequest
* @return CreateEnterpriseSnapshotPolicyResponse
*/
async function createEnterpriseSnapshotPolicy(request: CreateEnterpriseSnapshotPolicyRequest): CreateEnterpriseSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return createEnterpriseSnapshotPolicyWithOptions(request, runtime);
}
model DeleteDiskReplicaGroupRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the replication pair-consistent group.
This parameter is required.', example='cn-beijing'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the IDs of replication pair-consistent groups.
This parameter is required.', example='pg-myreplica****'),
}
model DeleteDiskReplicaGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model DeleteDiskReplicaGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteDiskReplicaGroupResponseBody(name='body'),
}
/**
* @summary Deletes a replication pair-consistent group.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Before you can delete a replication pair-consistent group, make sure that no replication pairs exist in the group.
* * The replication pair-consistent group that you want to delete must be in the **Created** (`created`), **Creation Failed** (`create_failed`), **Stopped** (`stopped`), **Failovered** (`failovered`), **Deleting** (`deleting`), **Deletion Failed** (`delete_failed`), or **Invalid** (`invalid`) state.
*
* @param request DeleteDiskReplicaGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteDiskReplicaGroupResponse
*/
async function deleteDiskReplicaGroupWithOptions(request: DeleteDiskReplicaGroupRequest, runtime: Util.RuntimeOptions): DeleteDiskReplicaGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteDiskReplicaGroup',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Deletes a replication pair-consistent group.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Before you can delete a replication pair-consistent group, make sure that no replication pairs exist in the group.
* * The replication pair-consistent group that you want to delete must be in the **Created** (`created`), **Creation Failed** (`create_failed`), **Stopped** (`stopped`), **Failovered** (`failovered`), **Deleting** (`deleting`), **Deletion Failed** (`delete_failed`), or **Invalid** (`invalid`) state.
*
* @param request DeleteDiskReplicaGroupRequest
* @return DeleteDiskReplicaGroupResponse
*/
async function deleteDiskReplicaGroup(request: DeleteDiskReplicaGroupRequest): DeleteDiskReplicaGroupResponse {
var runtime = new Util.RuntimeOptions{};
return deleteDiskReplicaGroupWithOptions(request, runtime);
}
model DeleteDiskReplicaPairRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the primary disk in the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query the region information of replication pairs.
This parameter is required.', example='cn-beijing'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.
This parameter is required.', example='pair-cn-dsa****'),
}
model DeleteDiskReplicaPairResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='A37597A6-BB99-19B3-85EA-4C2B91F0****'),
}
model DeleteDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Deletes replication pairs.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Only replication pairs that are in the **Stopped** (`stopped`), **Invalid** (`invalid`), or **Failovered** (`failovered`) state can be deleted. This operation deletes only replication pairs. The primary and secondary disks in the deleted replication pairs are retained.
* * To delete a replication pair, you must call this operation in the region where the primary disk is located. After the replication pair is deleted, the functionality limits are lifted from the primary and secondary disks. For example, you can attach the secondary disk, resize the disk, or read data from or write data to the disk.
*
* @param request DeleteDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteDiskReplicaPairResponse
*/
async function deleteDiskReplicaPairWithOptions(request: DeleteDiskReplicaPairRequest, runtime: Util.RuntimeOptions): DeleteDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Deletes replication pairs.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Only replication pairs that are in the **Stopped** (`stopped`), **Invalid** (`invalid`), or **Failovered** (`failovered`) state can be deleted. This operation deletes only replication pairs. The primary and secondary disks in the deleted replication pairs are retained.
* * To delete a replication pair, you must call this operation in the region where the primary disk is located. After the replication pair is deleted, the functionality limits are lifted from the primary and secondary disks. For example, you can attach the secondary disk, resize the disk, or read data from or write data to the disk.
*
* @param request DeleteDiskReplicaPairRequest
* @return DeleteDiskReplicaPairResponse
*/
async function deleteDiskReplicaPair(request: DeleteDiskReplicaPairRequest): DeleteDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return deleteDiskReplicaPairWithOptions(request, runtime);
}
model DeleteEnterpriseSnapshotPolicyRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
policyId?: string(name='PolicyId', description='The id of the policy.
This parameter is required.', example='esp-xxx'),
regionId?: string(name='RegionId', description='The region ID . You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which snapshot policy is supported.
This parameter is required.', example='cn-hangzhou'),
}
model DeleteEnterpriseSnapshotPolicyResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='B9F716DF-FAFD-50FD-B962-BCE0C837639A'),
}
model DeleteEnterpriseSnapshotPolicyResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteEnterpriseSnapshotPolicyResponseBody(name='body'),
}
/**
* @summary Delete a enterprise-level snapshot policy.
*
* @param request DeleteEnterpriseSnapshotPolicyRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteEnterpriseSnapshotPolicyResponse
*/
async function deleteEnterpriseSnapshotPolicyWithOptions(request: DeleteEnterpriseSnapshotPolicyRequest, runtime: Util.RuntimeOptions): DeleteEnterpriseSnapshotPolicyResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
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 = 'DeleteEnterpriseSnapshotPolicy',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Delete a enterprise-level snapshot policy.
*
* @param request DeleteEnterpriseSnapshotPolicyRequest
* @return DeleteEnterpriseSnapshotPolicyResponse
*/
async function deleteEnterpriseSnapshotPolicy(request: DeleteEnterpriseSnapshotPolicyRequest): DeleteEnterpriseSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return deleteEnterpriseSnapshotPolicyWithOptions(request, runtime);
}
model DescribeDedicatedBlockStorageClusterDisksRequest {
dbscId?: string(name='DbscId', description='The ID of the dedicated block storage cluster.
This parameter is required.', example='dbsc-cn-od43bf****'),
maxResults?: long(name='MaxResults', description='The maximum number of entries to return on each page. Maximum value: 500.
Default value: 10.', example='10'),
nextToken?: string(name='NextToken', description='The query token. Set the value to the NextToken value returned in the previous call to the DescribeDedicatedBlockStorageClusterDisks operation. Leave this parameter empty the first time you call this operation.', example='AAAAAdDWBF2'),
regionId?: string(name='RegionId', description='The ID of the region where the dedicated block storage cluster resides. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-heyuan'),
}
model DescribeDedicatedBlockStorageClusterDisksResponseBody = {
disks?: {
disk?: [
{
attachedTime?: string(name='AttachedTime', description='The time when the cloud disk was last attached. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mmZ format. The time is displayed in UTC.', example='2021-06-07T06:08:56Z'),
bdfId?: string(name='BdfId', description='This parameter is currently in invitational preview and unavailable for general users.', example='null'),
burstingEnabled?: boolean(name='BurstingEnabled', description='Whether the ESSD AutoPL disk is enabled burst IOPS / BPS. This parameter is available only if the DiskCategory parameter is set to cloud_auto. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html).', example='true'),
category?: string(name='Category', description='The category of the disk. A value of cloud_essd indicates that the disk is an ESSD.', example='cloud_essd'),
deleteAutoSnapshot?: boolean(name='DeleteAutoSnapshot', description='Indicates whether the automatic snapshots of the cloud disk are deleted when the disk is released. Valid values:
* true: The automatic snapshots of the cloud disk are deleted when the disk is released.
* false: The automatic snapshots of the cloud disk are retained when the disk is released.
Snapshots that are created by calling the [CreateSnapshot](https://help.aliyun.com/document_detail/25524.html) operation or by using the Elastic Compute Service (ECS) console are retained and not affected by this parameter.', example='false'),
deleteWithInstance?: boolean(name='DeleteWithInstance', description='Indicates whether the cloud disk is released when its associated instance is released. Valid values:
* true: The cloud disk is released when its associated instance is released.
* false: The cloud disk is retained when its associated instance is released.', example='true'),
description?: string(name='Description', description='The description of the cloud disk.', example='testDescription'),
detachedTime?: string(name='DetachedTime', description='The time when the cloud disk was last detached.', example='2021-06-07T21:01:22Z'),
device?: string(name='Device', description='The device name of the cloud disk on its associated instance. Example: /dev/xvdb. Take note of the following items:
* This parameter has a value only when the `Status` value is `In_use`.
* This parameter is empty for cloud disks that have the multi-attach feature enabled. You can query the attachment information of the cloud disk based on the `Attachment` values.
> This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility.', example='/dev/xvdb'),
diskChargeType?: string(name='DiskChargeType', description='The billing method of the cloud disk. Valid values:
* PrePaid: subscription
* PostPaid: pay-as-you-go', example='PrePaid'),
diskId?: string(name='DiskId', description='The ID of the cloud disk.', example='d-bp67acfmxazb4p****'),
diskName?: string(name='DiskName', description='The name of the cloud disk.', example='testDiskName'),
enableAutoSnapshot?: boolean(name='EnableAutoSnapshot', description='Indicates whether the automatic snapshot policy feature is enabled for the cloud disk.', example='false'),
encrypted?: boolean(name='Encrypted', description='Indicates whether the cloud disk is encrypted.', example='false'),
IOPS?: long(name='IOPS', description='The maximum number of IOPS.', example='4000'),
imageId?: string(name='ImageId', description='The ID of the image that was used to create the instance. This parameter is empty unless the cloud disk was created from an image. The value of this parameter remains unchanged throughout the lifecycle of the cloud disk.', example='m-bp13aqm171qynt3u***'),
instanceId?: string(name='InstanceId', description='The ID of the instance to which the cloud disk is attached. Take note of the following items:
* This parameter has a value only when the `Status` value is `In_use`.
* This parameter is empty for cloud disks that have the multi-attach feature enabled. You can query the attachment information of the cloud disk based on the `Attachment` values.', example='i-bp67acfmxazb4q****'),
KMSKeyId?: string(name='KMSKeyId', description='The ID of the Key Management Service (KMS) key used by the cloud disk.', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
mountInstanceNum?: int32(name='MountInstanceNum', description='The number of instances to which the Shared Block Storage device is attached.', example='1'),
multiAttach?: string(name='MultiAttach', description='Indicates whether the multi-attach feature was enabled for the cloud disk.', example='Disabled'),
performanceLevel?: string(name='PerformanceLevel', description='The performance level of the enhanced SSD (ESSD). Valid values:
* PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
* PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
* PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
* PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.', example='PL0'),
portable?: boolean(name='Portable', description='Indicates whether the cloud disk is removable.', example='false'),
provisionedIops?: long(name='ProvisionedIops', description='The provisioned read/write IOPS of the ESSD AutoPL disk.
> This parameter is available only if the DiskCategory parameter is set to cloud_auto. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html) and [Modify the performance configurations of an ESSD AutoPL disk](https://help.aliyun.com/document_detail/413275.html).', example='50000'),
regionId?: string(name='RegionId', description='The region ID of cloud disk.', example='cn-heyuan'),
size?: int32(name='Size', description='The size of the disk. Unit: GiB.', example='60'),
sourceSnapshotId?: string(name='SourceSnapshotId', description='The ID of the snapshot that was used to create the cloud disk.
This parameter is empty unless the cloud disk was created from a snapshot. The value of this parameter remains unchanged throughout the lifecycle of the cloud disk.', example='s-bp67acfmxazb4p****'),
status?: string(name='Status', description='The state of the cloud disk. For more information, see [Disk states](https://help.aliyun.com/document_detail/25689.html). Valid values:
* In_use
* Available
* Attaching
* Detaching
* Creating
* ReIniting', example='In_use'),
storageClusterId?: string(name='StorageClusterId', description='The ID of the dedicated block storage cluster to which the cloud disk belongs. If your cloud disk belongs to the public block storage cluster, an empty value is returned.', example='dbsc-j5e1sf2vaf5he8m2****'),
storageSetId?: string(name='StorageSetId', description='The ID of the storage set.', example='ss-i-bp1j4i2jdf3owlhe****'),
storageSetPartitionNumber?: int32(name='StorageSetPartitionNumber', description='The maximum number of partitions in the storage set.', example='11'),
tags?: [
{
tagKey?: string(name='TagKey', description='The tag key of the cloud disk.', example='TestKey'),
tagValue?: string(name='TagValue', description='The tag value of the cloud disk.', example='TestValue'),
}
](name='Tags', description='The tags of the cloud disk.'),
throughput?: long(name='Throughput', description='The maximum number of BPS.', example='350'),
type?: string(name='Type', description='The type of the disk. Valid values:
* system: system disk
* data: data disk', example='all'),
zoneId?: string(name='ZoneId', description='The zone ID of cloud disk.', example='cn-heyuan-i'),
}
](name='Disk', description='Details about the cloud disks.'),
}(name='Disks', description='Details about the cloud disks.'),
nextToken?: string(name='NextToken', description='The query token returned in this call.', example='AAAAAdDWBF2'),
requestId?: string(name='RequestId', description='The ID of the request.', example='11B55F58-D3A4-4A9B-9596-342420D0****'),
}
model DescribeDedicatedBlockStorageClusterDisksResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDedicatedBlockStorageClusterDisksResponseBody(name='body'),
}
/**
* @summary Queries the details of one or more disks in a dedicated block storage cluster.
*
* @description * You can use one of the following methods to check the responses:
* * Method 1: Use `NextToken` to configure the query token. Set the value to the `NextToken` value that is returned in the last call to the DescribeDisks operation. Then, use `MaxResults` to specify the maximum number of entries to return on each page.
* * Method 2: Use `PageSize` to specify the number of entries to return on each page and then use `PageNumber` to specify the number of the page to return.
* You can use only one of the preceding methods. If a large number of entries are to be returned, we recommend that you use method 1. When `NextToken` is specified, `PageSize` and `PageNumber` do not take effect and `TotalCount` in the response is invalid.
* * A disk that has the multi-attach feature enabled can be attached to multiple instances. You can query the attachment information of the disk based on the `Attachment` values in the response.
* When you call an API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter format overview](https://help.aliyun.com/document_detail/110340.html).
*
* @param request DescribeDedicatedBlockStorageClusterDisksRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDedicatedBlockStorageClusterDisksResponse
*/
async function describeDedicatedBlockStorageClusterDisksWithOptions(request: DescribeDedicatedBlockStorageClusterDisksRequest, runtime: Util.RuntimeOptions): DescribeDedicatedBlockStorageClusterDisksResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.dbscId)) {
query['DbscId'] = request.dbscId;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDedicatedBlockStorageClusterDisks',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details of one or more disks in a dedicated block storage cluster.
*
* @description * You can use one of the following methods to check the responses:
* * Method 1: Use `NextToken` to configure the query token. Set the value to the `NextToken` value that is returned in the last call to the DescribeDisks operation. Then, use `MaxResults` to specify the maximum number of entries to return on each page.
* * Method 2: Use `PageSize` to specify the number of entries to return on each page and then use `PageNumber` to specify the number of the page to return.
* You can use only one of the preceding methods. If a large number of entries are to be returned, we recommend that you use method 1. When `NextToken` is specified, `PageSize` and `PageNumber` do not take effect and `TotalCount` in the response is invalid.
* * A disk that has the multi-attach feature enabled can be attached to multiple instances. You can query the attachment information of the disk based on the `Attachment` values in the response.
* When you call an API operation by using Alibaba Cloud CLI, you must specify request parameter values of different data types in the required formats. For more information, see [Parameter format overview](https://help.aliyun.com/document_detail/110340.html).
*
* @param request DescribeDedicatedBlockStorageClusterDisksRequest
* @return DescribeDedicatedBlockStorageClusterDisksResponse
*/
async function describeDedicatedBlockStorageClusterDisks(request: DescribeDedicatedBlockStorageClusterDisksRequest): DescribeDedicatedBlockStorageClusterDisksResponse {
var runtime = new Util.RuntimeOptions{};
return describeDedicatedBlockStorageClusterDisksWithOptions(request, runtime);
}
model DescribeDedicatedBlockStorageClustersRequest {
azoneId?: string(name='AzoneId', description='The zone ID of the dedicated block storage cluster. You can call the [DescribeZones](https://help.aliyun.com/document_detail/25610.html) operation to query the most recent zone list.', example='cn-heyuan-b'),
category?: string(name='Category', description='The category of disks that can be created in the dedicated block storage cluster.
Set the value to cloud_essd. Only enhanced SSDs (ESSDs) can be created in dedicated block storage clusters.', example='cloud_essd'),
clientToken?: string(name='ClientToken'),
dedicatedBlockStorageClusterId?: [ string ](name='DedicatedBlockStorageClusterId'),
maxResults?: int32(name='MaxResults'),
nextToken?: string(name='NextToken'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page. Valid values: 1 to 100.', example='10'),
regionId?: string(name='RegionId', description='The region ID of the dedicated block storage cluster. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-heyuan'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the dedicated block storage cluster belongs.', example='rg-acfmvs4****'),
status?: [ string ](name='Status', description='The states of dedicated block storage clusters. Valid values:
* Preparing
* Running
* Expired
* Offline
Multiple states can be specified. Valid values of N: 1, 2, 3, and 4.'),
tag?: [
{
key?: string(name='Key', description='The tag key of the dedicated block storage cluster.', example='TestKey'),
value?: string(name='Value', description='The tag value of the dedicated block storage cluster.', example='TestValue'),
}
](name='Tag', description='The tags. Up to 20 tags are supported.'),
}
model DescribeDedicatedBlockStorageClustersResponseBody = {
dedicatedBlockStorageClusters?: [
{
aliUid?: string(name='AliUid', description='The user ID.', example='12345601234560***'),
category?: string(name='Category', description='The category of disks that can be created in the dedicated block storage cluster.', example='cloud_essd'),
createTime?: string(name='CreateTime', description='The time when the dedicated block storage cluster was created. The value is a UNIX timestamp. Unit: seconds.', example='1657113211'),
dedicatedBlockStorageClusterCapacity?: {
availableCapacity?: long(name='AvailableCapacity', description='The available capacity of the dedicated block storage cluster. Unit: GiB.', example='61440'),
availableDeviceCapacity?: long(name='AvailableDeviceCapacity', description='The total capacity of the dedicated block storage cluster that was delivered in disk creation orders. Unit: GB.', example='61440'),
availableSpaceCapacity?: double(name='AvailableSpaceCapacity', description='This parameter is displayed only if Thin Provision is enabled.', example='40000.3'),
clusterAvailableCapacity?: long(name='ClusterAvailableCapacity', description='The capacity of the dedicated block storage cluster that was delivered in orders. Unit: GB.', example='61440'),
clusterDeliveryCapacity?: long(name='ClusterDeliveryCapacity', description='The capacity of the dedicated block storage cluster that is to be delivered in orders. Unit: GB.', example='0'),
deliveryCapacity?: long(name='DeliveryCapacity', description='The capacity to be delivered for the dedicated block storage cluster. Unit: GiB.', example='0'),
totalCapacity?: long(name='TotalCapacity', description='The total capacity of the dedicated block storage cluster. Unit: GiB.', example='61440'),
totalDeviceCapacity?: long(name='TotalDeviceCapacity', description='The total capacity of the dedicated block storage cluster that is to be delivered in disk creation orders. Unit: GB.', example='61440'),
totalSpaceCapacity?: long(name='TotalSpaceCapacity', description='This parameter is displayed only if Thin Provision is enabled.', example='73728'),
usedCapacity?: long(name='UsedCapacity', description='The used capacity of the dedicated block storage cluster. Unit: GiB.', example='1440'),
usedDeviceCapacity?: long(name='UsedDeviceCapacity', description='The capacity of the dedicated block storage cluster that was used to create disks. Unit: GB.', example='32000'),
usedSpaceCapacity?: double(name='UsedSpaceCapacity', description='This parameter is displayed only if Thin Provision is enabled.', example='33727.7'),
}(name='DedicatedBlockStorageClusterCapacity', description='Details about the storage capacity of the dedicated block storage cluster.'),
dedicatedBlockStorageClusterId?: string(name='DedicatedBlockStorageClusterId', description='The ID of the dedicated block storage cluster.', example='dbsc-f8z4d3k4nsgg9okb****'),
dedicatedBlockStorageClusterName?: string(name='DedicatedBlockStorageClusterName', description='The name of the dedicated block storage cluster.', example='myDBSCCluster'),
description?: string(name='Description', description='The description of the dedicated block storage cluster.', example='This is description.'),
enableThinProvision?: boolean(name='EnableThinProvision', description='Indicates whether Thin Provision is enabled.', example='true'),
expiredTime?: string(name='ExpiredTime', description='The time when the dedicated block storage cluster expires. The value is a UNIX timestamp. Unit: seconds.', example='1673020800'),
performanceLevel?: string(name='PerformanceLevel', description='The performance level of disks. Valid values:
* PL0
* PL1
* PL2
* PL3
> This parameter is valid only when the SupportedCategory value is cloud_essd.', example='PL0'),
regionId?: string(name='RegionId', description='The region ID of the dedicated block storage cluster.', example='cn-heyuan'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the dedicated block storage cluster belongs. You can call the [ListResourceGroups](https://help.aliyun.com/document_detail/158855.html) operation to obtain the ID of the resource group.', example='rg-aekzsoux****'),
sizeOverSoldRatio?: double(name='SizeOverSoldRatio', description='The capacity oversold ratio.', example='1.2'),
status?: string(name='Status', description='The state of the dedicated block storage cluster. Valid values:
* Preparing
* Running
* Expired
* Offline', example='Running'),
storageDomain?: string(name='StorageDomain', description='StorageDomain', example='StorageDomain'),
supportedCategory?: string(name='SupportedCategory', description='This parameter is not supported.', example='cloud_essd'),
tags?: [
{
tagKey?: string(name='TagKey', description='The tag key of the dedicated block storage cluster.', example='testKey'),
tagValue?: string(name='TagValue', description='The tag value of the dedicated block storage cluster.', example='testValue'),
}
](name='Tags', description='The tags of the dedicated block storage cluster.'),
type?: string(name='Type', description='The type of the dedicated block storage cluster. Valid values:
* Standard: basic dedicated block storage cluster. ESSDs at performance level 0 (PL0 ESSDs) can be created in basic dedicated block storage clusters.
* Premium: performance dedicated block storage cluster. ESSDs at performance level 1 (PL1 ESSDs) can be created in performance dedicated block storage clusters.', example='Standard'),
zoneId?: string(name='ZoneId', description='The zone ID of the dedicated block storage cluster.', example='cn-heyuan-b'),
}
](name='DedicatedBlockStorageClusters', description='Details about the dedicated block storage clusters.'),
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results.', example='AAAAAdDWBF2'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
requestId?: string(name='RequestId', description='The request ID.', example='11B55F58-D3A4-4A9B-9596-342420D0****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='20'),
}
model DescribeDedicatedBlockStorageClustersResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDedicatedBlockStorageClustersResponseBody(name='body'),
}
/**
* @summary Queries the dedicated block storage clusters that are created.
*
* @description ## [](#)Usage notes
* > The Dedicated Block Storage Cluster feature is available only in the China (Heyuan), Indonesia (Jakarta), and China (Shenzhen) regions.
* * You can specify multiple request parameters to be queried. Specified parameters are evaluated by using the AND operator. Only the specified parameters are included in the filter conditions.
* * We recommend that you use NextToken and MaxResults to perform paged queries. We recommend that you use MaxResults to specify the maximum number of entries to return in each request. The return value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. When you call the DescribeDedicatedBlockStorageClusters operation to retrieve a new page of results, set NextToken to the NextToken value that is returned in the previous call and specify MaxResults to limit the number of entries returned.
*
* @param request DescribeDedicatedBlockStorageClustersRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDedicatedBlockStorageClustersResponse
*/
async function describeDedicatedBlockStorageClustersWithOptions(request: DescribeDedicatedBlockStorageClustersRequest, runtime: Util.RuntimeOptions): DescribeDedicatedBlockStorageClustersResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.dedicatedBlockStorageClusterId)) {
query['DedicatedBlockStorageClusterId'] = request.dedicatedBlockStorageClusterId;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var body : map[string]any = {};
if (!Util.isUnset(request.azoneId)) {
body['AzoneId'] = request.azoneId;
}
if (!Util.isUnset(request.category)) {
body['Category'] = request.category;
}
if (!Util.isUnset(request.regionId)) {
body['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.status)) {
body['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'DescribeDedicatedBlockStorageClusters',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the dedicated block storage clusters that are created.
*
* @description ## [](#)Usage notes
* > The Dedicated Block Storage Cluster feature is available only in the China (Heyuan), Indonesia (Jakarta), and China (Shenzhen) regions.
* * You can specify multiple request parameters to be queried. Specified parameters are evaluated by using the AND operator. Only the specified parameters are included in the filter conditions.
* * We recommend that you use NextToken and MaxResults to perform paged queries. We recommend that you use MaxResults to specify the maximum number of entries to return in each request. The return value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. When you call the DescribeDedicatedBlockStorageClusters operation to retrieve a new page of results, set NextToken to the NextToken value that is returned in the previous call and specify MaxResults to limit the number of entries returned.
*
* @param request DescribeDedicatedBlockStorageClustersRequest
* @return DescribeDedicatedBlockStorageClustersResponse
*/
async function describeDedicatedBlockStorageClusters(request: DescribeDedicatedBlockStorageClustersRequest): DescribeDedicatedBlockStorageClustersResponse {
var runtime = new Util.RuntimeOptions{};
return describeDedicatedBlockStorageClustersWithOptions(request, runtime);
}
model DescribeDiskEventsRequest {
diskCategory?: string(name='DiskCategory', description='The type of the disk. Valid values:
* cloud_efficiency: ultra disk.
* cloud_ssd: standard SSD.
* cloud_essd: enhanced SSD (ESSD).', example='cloud_essd'),
diskId?: string(name='DiskId', description='The ID of the disk.', example='d-bp67acfmxazb4p****'),
endTime?: string(name='EndTime', description='The end of the time range to query. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.', example='2022-06-01T05:00:00Z'),
maxResults?: long(name='MaxResults', description='The maximum number of entries per page. Valid values: 1 to 100.
Default values:
* If this parameter is not specified or is set to a value smaller than 10, the default value is 10.
* If this parameter is set to a value greater than 100, the default value is 100.', example='10'),
nextToken?: string(name='NextToken', description='The pagination token that is used in this request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of `NextToken`.', example='caeba0bbb2be03f84eb48b699f0a****'),
regionId?: string(name='RegionId', description='The region ID of the disk. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the list of regions that support CloudLens for EBS.', example='cn-hangzhou'),
startTime?: string(name='StartTime', description='The beginning of the time range to query. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.', example='2022-06-01T03:00:00Z'),
type?: string(name='Type', description='The event type. Set the value to DataNeedProtect, which indicates that the disk data needs to be protected.', example='DataNeedProtect'),
}
model DescribeDiskEventsResponseBody = {
diskEvents?: [
{
description?: string(name='Description', description='The description of the event.', example='This is description.'),
diskId?: string(name='DiskId', description='The ID of the disk.', example='d-bp1bq5g3dxxo1x4o****'),
recommendAction?: string(name='RecommendAction', description='The recommended action after the event occurred. Valid values:
* Resize: resizes the disk.
* ModifyDiskSpec: changes the category of the disk.
* NoAction: performs no operation.', example='NoAction'),
regionId?: string(name='RegionId', description='The region ID of the disk.', example='cn-hangzhou'),
status?: string(name='Status', description='The state of the event. Valid values:
* Solved
* UnSolved', example='Solved'),
timestamp?: string(name='Timestamp', description='The time when the event occurred. The time follows the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.', example='2022-06-01T08:00:00Z'),
type?: string(name='Type', description='The type of the event. Only DataNeedProtect can be returned.', example='DataNeedProtect'),
}
](name='DiskEvents', description='The risk events of the disk.'),
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results.', example='caeba0bbb2be03f84eb48b699f0a****'),
requestId?: string(name='RequestId', description='The request ID.', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='20'),
}
model DescribeDiskEventsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDiskEventsResponseBody(name='body'),
}
/**
* @summary Queries the risk events of a disk.
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @param request DescribeDiskEventsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDiskEventsResponse
*/
async function describeDiskEventsWithOptions(request: DescribeDiskEventsRequest, runtime: Util.RuntimeOptions): DescribeDiskEventsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.diskCategory)) {
query['DiskCategory'] = request.diskCategory;
}
if (!Util.isUnset(request.diskId)) {
query['DiskId'] = request.diskId;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
if (!Util.isUnset(request.type)) {
query['Type'] = request.type;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDiskEvents',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the risk events of a disk.
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @param request DescribeDiskEventsRequest
* @return DescribeDiskEventsResponse
*/
async function describeDiskEvents(request: DescribeDiskEventsRequest): DescribeDiskEventsResponse {
var runtime = new Util.RuntimeOptions{};
return describeDiskEventsWithOptions(request, runtime);
}
model DescribeDiskMonitorDataRequest {
diskId?: string(name='DiskId', description='The ID of the disk.
This parameter is required.', example='d-bp67acfmxazb4p****'),
endTime?: string(name='EndTime', description='The end of the time range during which you want to query the near real-time monitoring data of the disk. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the `yyyy-MM-ddTHH:mm:ssZ` format. The time must be in UTC.
This parameter is required.', example='2022-06-01T05:00:00Z'),
period?: long(name='Period', description='The interval at which the near real-time monitoring data is collected. Unit: seconds. Valid values:
* 5
* 60
Default value: 5.', example='5'),
regionId?: string(name='RegionId', description='The region ID of the disk.
This parameter is required.', example='cn-hangzhou'),
startTime?: string(name='StartTime', description='The beginning of the time range during which you want to query the near real-time monitoring data of the disk. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the `yyyy-MM-ddTHH:mm:ssZ` format. The time must be in UTC.
This parameter is required.', example='2022-06-01T03:00:00Z'),
type?: string(name='Type', description='The type of the monitoring data. Valid values:
* basic: baseline performance data.
* pro: burst performance data, such as burst I/O operations.', example='basic'),
}
model DescribeDiskMonitorDataResponseBody = {
monitorData?: [
{
BPSPercent?: long(name='BPSPercent', description='The percentage of BPS.', example='80(%)'),
burstIOCount?: long(name='BurstIOCount', description='The number of burst I/O operations.', example='0'),
diskId?: string(name='DiskId', description='The ID of the disk.', example='d-bp1bq5g3dxxo1x4o****'),
IOPSPercent?: long(name='IOPSPercent', description='The percentage of IOPS.', example='80(%)'),
readBPS?: long(name='ReadBPS', description='The read bandwidth of the disk. Unit: MByte/s.', example='10'),
readBlockSize?: long(name='ReadBlockSize', description='Read IO block size. Unit: Bytes', example='4096'),
readIOPS?: long(name='ReadIOPS', description='The maximum number of read IOPS.', example='2000'),
readLatency?: long(name='ReadLatency', description='Read IO latency. Unit: microsecond', example='100'),
timestamp?: string(name='Timestamp', description='The timestamp that is used to query the near real-time monitoring data of the disk. The time follows the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the `yyyy-MM-ddTHH:mm:ssZ` format. The time is displayed in UTC.', example='2022-06-01T08:00:00Z'),
writeBPS?: long(name='WriteBPS', description='The write bandwidth of the disk. Unit: MByte/s.', example='204'),
writeBlockSize?: long(name='WriteBlockSize', description='Write IO block size. Unit: Bytes', example='4096'),
writeIOPS?: long(name='WriteIOPS', description='The maximum number of write IOPS.', example='2000'),
writeLatency?: long(name='WriteLatency', description='Write IO latency. Unit: microsecond', example='100'),
}
](name='MonitorData', description='The near real-time monitoring data of the disk.'),
requestId?: string(name='RequestId', description='The request ID.', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='15'),
}
model DescribeDiskMonitorDataResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDiskMonitorDataResponseBody(name='body'),
}
/**
* @summary Queries the near real-time monitoring data of a disk.
*
* @description ## Usage notes
* * CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
* * Up to 400 monitoring data entries can be returned at a time. An error is returned if the value calculated based on the following formula is greater than 400: `(EndTime - StartTime)/Period`.
* * You can query the monitoring data collected in the last three days. An error is returned if the time specified by `StartTime` is more than three days prior to the current time.
*
* @param request DescribeDiskMonitorDataRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDiskMonitorDataResponse
*/
async function describeDiskMonitorDataWithOptions(request: DescribeDiskMonitorDataRequest, runtime: Util.RuntimeOptions): DescribeDiskMonitorDataResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.diskId)) {
query['DiskId'] = request.diskId;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.period)) {
query['Period'] = request.period;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
if (!Util.isUnset(request.type)) {
query['Type'] = request.type;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDiskMonitorData',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the near real-time monitoring data of a disk.
*
* @description ## Usage notes
* * CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
* * Up to 400 monitoring data entries can be returned at a time. An error is returned if the value calculated based on the following formula is greater than 400: `(EndTime - StartTime)/Period`.
* * You can query the monitoring data collected in the last three days. An error is returned if the time specified by `StartTime` is more than three days prior to the current time.
*
* @param request DescribeDiskMonitorDataRequest
* @return DescribeDiskMonitorDataResponse
*/
async function describeDiskMonitorData(request: DescribeDiskMonitorDataRequest): DescribeDiskMonitorDataResponse {
var runtime = new Util.RuntimeOptions{};
return describeDiskMonitorDataWithOptions(request, runtime);
}
model DescribeDiskMonitorDataListRequest {
diskIds?: string(name='DiskIds', description='The IDs of the disks. The value is a JSON array that contains multiple disk IDs. Separate the IDs with commas (,).', example='["d-bp67acfmxazb4p****","d-bp67acfmxazs5t****"]'),
endTime?: string(name='EndTime', description='The end of the time range during which you want to query the near real-time monitoring data of the disks. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the `yyyy-MM-ddTHH:mm:ssZ` format. The time must be in UTC.
This parameter is required.', example='2022-06-01T05:00:00Z'),
maxResults?: string(name='MaxResults', description='The number of entries per page. If you specify this parameter, both `MaxResults` and `NextToken` are used for a paged query.
Valid values: 1 to 100.
Default value: 10.', example='10'),
nextToken?: string(name='NextToken', description='The pagination token that is used in this request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.', example='e71d8a535bd9c****'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the list of regions that support CloudLens for EBS.
This parameter is required.', example='cn-hangzhou'),
startTime?: string(name='StartTime', description='The beginning of the time range during which you want to query the near real-time monitoring data of the disks. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the `yyyy-MM-ddTHH:mm:ssZ` format. The time must be in UTC.
This parameter is required.', example='2022-06-01T03:00:00Z'),
type?: string(name='Type', description='The type of the monitoring data. Set the value to pro.
pro: burst performance data, such as burst I/O operations.
This parameter is required.', example='pro'),
}
model DescribeDiskMonitorDataListResponseBody = {
monitorData?: [
{
burstIOCount?: long(name='BurstIOCount', description='The number of burst I/O operations.', example='2000'),
diskId?: string(name='DiskId', description='The ID of the disk.', example='d-bp67acfmxazb4p****'),
timestamp?: string(name='Timestamp', description='The beginning of the time range during which the performance of the disk bursts. The time follows the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the `yyyy-MM-ddTHH:mm:ssZ` format. The time is displayed in UTC.', example='2022-06-01T08:00:00Z'),
}
](name='MonitorData', description='The near real-time monitoring data of the disks.'),
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.', example='e71d8a535bd9c****'),
requestId?: string(name='RequestId', description='The request ID.', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='3'),
}
model DescribeDiskMonitorDataListResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDiskMonitorDataListResponseBody(name='body'),
}
/**
* @summary Queries the near real-time monitoring data of disks. You can query only the burst performance data of ESSD AutoPL disks. The data is aggregated by hour.
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @param request DescribeDiskMonitorDataListRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDiskMonitorDataListResponse
*/
async function describeDiskMonitorDataListWithOptions(request: DescribeDiskMonitorDataListRequest, runtime: Util.RuntimeOptions): DescribeDiskMonitorDataListResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.diskIds)) {
query['DiskIds'] = request.diskIds;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
if (!Util.isUnset(request.type)) {
query['Type'] = request.type;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDiskMonitorDataList',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the near real-time monitoring data of disks. You can query only the burst performance data of ESSD AutoPL disks. The data is aggregated by hour.
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @param request DescribeDiskMonitorDataListRequest
* @return DescribeDiskMonitorDataListResponse
*/
async function describeDiskMonitorDataList(request: DescribeDiskMonitorDataListRequest): DescribeDiskMonitorDataListResponse {
var runtime = new Util.RuntimeOptions{};
return describeDiskMonitorDataListWithOptions(request, runtime);
}
model DescribeDiskReplicaGroupsRequest {
groupIds?: string(name='GroupIds', description='The IDs of the replication pair-consistent groups. You can specify the IDs of one or more replication pair-consistent groups. Separate the IDs with commas (,).
This parameter is empty by default, which indicates that all replication pair-consistent groups in the specified region are queried. You can specify up to the IDs of 100 replication pair-consistent groups.', example='AAAAAdDWBF2****'),
maxResults?: long(name='MaxResults', description='The maximum number of entries per page. You can use this parameter together with NextToken.
Valid values: 1 to 500.
Default value: 10.', example='10'),
name?: string(name='Name', description='The name of the replication pair-consistent group. You can perform a fuzzy search.', example='pg-name***'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. If you specify NextToken, the PageSize and PageNumber request parameters do not take effect, and the TotalCount response parameter is invalid.', example='AAAAAdDWBF2****'),
pageNumber?: int32(name='PageNumber', description='The number of the page to return.', example='5'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Valid values: 1 to 100.', example='10'),
regionId?: string(name='RegionId', description='The ID of the region to which the replication pair-consistent group belongs.
This parameter is required.', example='cn-beijing'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the replication pair-consistent group belongs.', example='rg-aekz*****'),
site?: string(name='Site', description='The type of the site from which the information of replication pair-consistent groups is retrieved. This parameter is used for scenarios where data is replicated across zones in replication pairs.
* If this parameter is not specified, information such as the status of replication pair-consistent groups at the primary site is queried and returned.
* Otherwise, information such as the state of replication pairs at the site specified by the Site parameter is queried and returned. Valid values:
* production: primary site
* backup: secondary site', example='production'),
tag?: [
{
key?: string(name='Key', description='The key of tag N of the replication pair-consistent group.', example='tag-key'),
value?: string(name='Value', description='The value of tag N of the replication pair-consistent group.', example='tag-value'),
}
](name='Tag', description='The tags to add to the replication pair-consistent group. You can specify up to 20 tags.'),
}
model DescribeDiskReplicaGroupsResponseBody = {
nextToken?: string(name='NextToken', description='A pagination token.', example='AAAAAdDWBF2****'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
replicaGroups?: [
{
bandwidth?: long(name='Bandwidth', description='The bandwidth value. Unit: Kbit/s. This parameter is not publicly available and has a system-preset value.', example='0'),
description?: string(name='Description', description='The description of the replication pair-consistent group.', example='This is description.'),
destinationRegionId?: string(name='DestinationRegionId', description='The ID of the region in which the secondary site is deployed.', example='cn-shanghai'),
destinationZoneId?: string(name='DestinationZoneId', description='The ID of the zone in which the secondary site is deployed.', example='cn-shanghai-e'),
groupName?: string(name='GroupName', description='The name of the replication pair-consistent group.', example='myreplicagrouptest'),
lastRecoverPoint?: long(name='LastRecoverPoint', description='The time when data was last replicated from the primary disks to the secondary disks in the replication pair-consistent group. The value of this parameter is a timestamp. Unit: seconds.', example='1637835114'),
pairIds?: [ bytes ](name='PairIds', description='The IDs of replication pairs that belong to the replication pair-consistent group.'),
pairNumber?: long(name='PairNumber', description='The number of replication pairs that belong to the replication pair-consistent group.', example='2'),
primaryRegion?: string(name='PrimaryRegion', description='The initial source region (primary region) of the replication pair-consistent group.', example='cn-beijing'),
primaryZone?: string(name='PrimaryZone', description='The initial source zone (primary zone) of the replication pair-consistent group.', example='cn-beijing-h'),
RPO?: long(name='RPO', description='The recovery point objective (RPO) of the replication pair-consistent group. Unit: seconds.', example='180'),
replicaGroupId?: string(name='ReplicaGroupId', description='The IDs of the replication pair-consistent groups.', example='pg-myreplica****'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the replication pair-consistent group belongs.', example='rg-aek2a*******'),
site?: string(name='Site', description='The type of the site from which the information about the replication pairs and replication pair-consistent group was obtained. Valid values:
* production: primary site
* backup: secondary site', example='production'),
sourceRegionId?: string(name='SourceRegionId', description='The ID of the region in which the primary site is deployed.', example='cn-beijing'),
sourceZoneId?: string(name='SourceZoneId', description='The ID of the zone in which the primary site is deployed.', example='cn-beijing-f'),
standbyRegion?: string(name='StandbyRegion', description='The initial destination region (secondary region) of the replication pair-consistent group.', example='cn-shanghai'),
standbyZone?: string(name='StandbyZone', description='The initial destination zone (secondary zone) of the replication pair-consistent group.', example='cn-shanghai-e'),
status?: string(name='Status', description='The status of the replication pair-consistent group. Valid values:
* invalid: The replication pair-consistent group is invalid, which indicates that abnormal replication pairs are present in the replication pair-consistent group.
* creating: The replication pair-consistent group is being created.
* created: The replication pair-consistent group was created.
* create_failed: The replication pair-consistent group failed to be created.
* manual_syncing: Data was being manually synchronized between the disks in the replication pair-consistent group. When data was being manually synchronized for the first time, the replication pair is in this state.
* syncing: Data was being synchronized between the disks. When data is being asynchronously replicated from the primary disk to the secondary disk again in subsequent operations, the replication pair is in this state.
* normal: The replication pair was working as expected. When the system finishes replicating data from the primary disk to the secondary disk within the current replication cycle, the replication pair enters this state.
* stopping: The replication pair was being stopped.
* stopped: The replication pair was stopped.
* stop_failed: The replication pair failed to be stopped.
* failovering: A failover was being performed.
* failovered: A failover was performed.
* failover_failed: A failover failed to be performed.
* reprotecting: A reverse replication was being performed.
* reprotect_failed: A reverse replication failed to be performed.
* deleting: The replication pair was being deleted.
* delete_failed: The replication pair failed to be deleted.
* deleted: The replication pair was deleted.', example='created'),
tags?: [
{
tagKey?: string(name='TagKey', description='The tag key of the replication pair-consistent group.', example='testKey'),
tagValue?: string(name='TagValue', description='The tag value of the replication pair-consistent group.', example='testValue'),
}
](name='Tags', description='The tags of the replication pair-consistent group.'),
}
](name='ReplicaGroups', description='The information about the replication pair-consistent groups.'),
requestId?: string(name='RequestId', description='The request ID.', example='AAA478A0-BEE6-1D42-BEB6-A9CFEAD6****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='60'),
}
model DescribeDiskReplicaGroupsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDiskReplicaGroupsResponseBody(name='body'),
}
/**
* @summary Queries the details of replication pair-consistent groups in a specific region.
*
* @description ## [](#)Usage notes
* To perform a paged query, specify the MaxResults and NextToken parameters.
* During a paged query, when you call the DescribeDiskReplicaGroups operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token, which can be used in the next call to retrieve a new page of results. When you call the DescribeDiskReplicaGroups operation to retrieve a new page of results, set NextToken to the NextToken value returned in the previous call and set MaxResults to specify the maximum number of entries to return in this call.
*
* @param request DescribeDiskReplicaGroupsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDiskReplicaGroupsResponse
*/
async function describeDiskReplicaGroupsWithOptions(request: DescribeDiskReplicaGroupsRequest, runtime: Util.RuntimeOptions): DescribeDiskReplicaGroupsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.groupIds)) {
query['GroupIds'] = request.groupIds;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
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.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.site)) {
query['Site'] = request.site;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDiskReplicaGroups',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details of replication pair-consistent groups in a specific region.
*
* @description ## [](#)Usage notes
* To perform a paged query, specify the MaxResults and NextToken parameters.
* During a paged query, when you call the DescribeDiskReplicaGroups operation to retrieve the first page of results, set `MaxResults` to specify the maximum number of entries to return in the call. The return value of `NextToken` is a pagination token, which can be used in the next call to retrieve a new page of results. When you call the DescribeDiskReplicaGroups operation to retrieve a new page of results, set NextToken to the NextToken value returned in the previous call and set MaxResults to specify the maximum number of entries to return in this call.
*
* @param request DescribeDiskReplicaGroupsRequest
* @return DescribeDiskReplicaGroupsResponse
*/
async function describeDiskReplicaGroups(request: DescribeDiskReplicaGroupsRequest): DescribeDiskReplicaGroupsResponse {
var runtime = new Util.RuntimeOptions{};
return describeDiskReplicaGroupsWithOptions(request, runtime);
}
model DescribeDiskReplicaPairProgressRequest {
regionId?: string(name='RegionId', description='The region ID of the replication pair.
This parameter is required.', example='cn-beijing'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html)operation to query the IDs of existing replication pairs.
This parameter is required.', example='pair-cn-tl32ribst0z'),
}
model DescribeDiskReplicaPairProgressResponseBody = {
progress?: int32(name='Progress', description='The replication progress of the replication pair.', example='100'),
recoverPoint?: long(name='RecoverPoint', description='The timestamp that indicates the last recovery point in time. The value is returned only after the replication pair works for replicating data.', example='1661917424'),
requestId?: string(name='RequestId', description='The request ID.', example='AAA478A0-BEE6-1D42-BEB6-A9CFEAD6****'),
}
model DescribeDiskReplicaPairProgressResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDiskReplicaPairProgressResponseBody(name='body'),
}
/**
* @summary Queries the replication progress of a replication pair.
*
* @param request DescribeDiskReplicaPairProgressRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDiskReplicaPairProgressResponse
*/
async function describeDiskReplicaPairProgressWithOptions(request: DescribeDiskReplicaPairProgressRequest, runtime: Util.RuntimeOptions): DescribeDiskReplicaPairProgressResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDiskReplicaPairProgress',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the replication progress of a replication pair.
*
* @param request DescribeDiskReplicaPairProgressRequest
* @return DescribeDiskReplicaPairProgressResponse
*/
async function describeDiskReplicaPairProgress(request: DescribeDiskReplicaPairProgressRequest): DescribeDiskReplicaPairProgressResponse {
var runtime = new Util.RuntimeOptions{};
return describeDiskReplicaPairProgressWithOptions(request, runtime);
}
model DescribeDiskReplicaPairsRequest {
maxResults?: long(name='MaxResults', description='The maximum number of entries per page. You can use this parameter together with NextToken.
Valid values: 1 to 500.
Default value: 10.', example='1'),
name?: string(name='Name', description='The name of the replication pair. Fuzzy search is supported.', example='name***'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. If you specify NextToken, the PageSize and PageNumber request parameters do not take effect, and the TotalCount response parameter is invalid.', example='AAAAAdDWBF2****'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='5'),
pageSize?: int32(name='PageSize', description='The number of entries per page. Valid values: 1 to 100.', example='10'),
pairIds?: string(name='PairIds', description='The IDs of replication pairs. You can specify the IDs of one or more replication pairs and separate the IDs with commas (,). Example: `pair-cn-dsa****,pair-cn-asd****`.
This parameter is empty by default, which indicates that all replication pairs in the specified region are queried. You can specify a maximum of 100 replication pair IDs.', example='pair-cn-dsa****'),
regionId?: string(name='RegionId', description='The region ID of the primary or secondary disk in the replication pair. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which async replication is supported.
This parameter is required.', example='cn-beijing'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group. You can specify the ID of a replication pair-consistent group to query the replication pairs in the group. Example: `pg-****`.
This parameter is empty by default, which indicates that all replication pairs in the specified region are queried.
> If this parameter is set to`-`, replication pairs that are not added to any replication pair-consistent groups are returned.', example='pg-****'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the replication pair belongs.', example='rg-acfmvs******'),
site?: string(name='Site', description='The type of the site from which the information of replication pairs is retrieved. Valid value:
* production: primary site
* backup: secondary site
Default value: production.', example='production'),
tag?: [
{
key?: string(name='Key', description='The key of the tag.', example='TestKey'),
value?: string(name='Value', description='The value of the tag.', example='TestValue'),
}
](name='Tag', description='The tags. Up to 20 tags are supported.'),
}
model DescribeDiskReplicaPairsResponseBody = {
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.', example='AAAAAdDWBF2****'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
replicaPairs?: [
{
bandwidth?: long(name='Bandwidth', description='The bandwidth used to asynchronously replicate data from the primary disk to the secondary disk. Unit: Kbit/s.', example='10240'),
chargeType?: string(name='ChargeType', description='The billing method of the replication pair. Valid values:
* PREPAY: subscription
* POSTPAY: pay-as-you-go', example='PREPAY'),
createTime?: long(name='CreateTime', description='The time when the replication pair was created. The value of this parameter is a timestamp. Unit: seconds.', example='1649750977'),
description?: string(name='Description', description='The description of the replication pair.', example='This is description.'),
destinationDiskId?: string(name='DestinationDiskId', description='The ID of the secondary disk.', example='d-asdfjl2342kj2l3k4****'),
destinationRegion?: string(name='DestinationRegion', description='The region ID of the secondary disk.', example='cn-shanghai'),
destinationZoneId?: string(name='DestinationZoneId', description='The zone ID of the secondary disk.', example='cn-shanghai-b'),
expiredTime?: long(name='ExpiredTime', description='The time when the replication pair expires. The value of this parameter is a timestamp. Unit: seconds.', example='1649750977'),
lastRecoverPoint?: long(name='LastRecoverPoint', description='The time when data was last replicated from the primary disk to the secondary disk in the replication pair. The value of this parameter is a timestamp. Unit: seconds. 86,400 seconds is equivalent to 24 hours.', example='1649751977'),
pairName?: string(name='PairName', description='The name of the replication pair.', example='TestReplicaPair'),
primaryRegion?: string(name='PrimaryRegion', description='The initial source region (primary region) of the replication pair.', example='cn-beijing'),
primaryZone?: string(name='PrimaryZone', description='The initial source zone (primary zone) of the replication pair.', example='cn-beijing-a'),
RPO?: long(name='RPO', description='The recovery point objective (RPO) of the replication pair. Unit: seconds.', example='900'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group to which the replication pair belongs.', example='pg-xxxx****'),
replicaGroupName?: string(name='ReplicaGroupName', description='The name of the replication pair-consistent group to which the replication pair belongs.', example='pg-name****'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.', example='pair-cn-dsa****'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the replication pair belongs.', example='rg-acfmvs*****'),
site?: string(name='Site', description='The type of the site from which the information about the replication pairs and replication pair-consistent group was obtained. Valid values:
* production: primary site
* backup: secondary site', example='production'),
sourceDiskId?: string(name='SourceDiskId', description='The ID of the primary disk.', example='d-bp131n0q38u3a4zi****'),
sourceRegion?: string(name='SourceRegion', description='The region ID of the primary disk.', example='cn-beijing'),
sourceZoneId?: string(name='SourceZoneId', description='The zone ID of the primary disk.', example='cn-beijing-a'),
standbyRegion?: string(name='StandbyRegion', description='The initial destination region (secondary region) of the replication pair.', example='cn-shanghai'),
standbyZone?: string(name='StandbyZone', description='The initial destination zone (secondary zone) of the replication pair.', example='cn-shanghai-b'),
status?: string(name='Status', description='The status of the replication pair. Valid values:
* invalid: The replication pair was invalid. When a replication pair becomes abnormal, it enters this state.
* creating: The replication pair was being created.
* created: The replication pair was created.
* create_failed: The replication pair failed to be created.
* initial_syncing: Data was synchronized from the primary disk to the secondary disk for the first time. After a replication pair is created and activated, the replication pair is in this state the first time data is synchronized from the primary disk to the secondary disk.
* manual_syncing: Data was being manually synchronized from the primary disk to the secondary disk. After data is manually synchronized from the primary disk to the secondary disk, the replication pair returns to the stopped state. The first time data is manually synchronized from the primary disk to the secondary disk, the replication pair is in the manual_syncing state during the synchronization.
* syncing: Data was being synchronized from the primary disk to the secondary disk. When data is being asynchronously replicated from the primary disk to the secondary disk again in subsequent operations, the replication pair is in this state.
* normal: The replication pair was working as expected. When the system finishes replicating data from the primary disk to the secondary disk within the current replication cycle, the replication pair enters this state.
* stopping: The replication pair was being stopped.
* stopped: The replication pair was stopped.
* stop_failed: The replication pair failed to be stopped.
* failovering: A failover was being performed.
* failovered: A failover was performed.
* failover_failed: A failover failed to be performed.
* reprotecting: A reverse replication was being performed.
* reprotect_failed: A reverse replication failed to be performed.
* deleting: The replication pair was being deleted.
* delete_failed: The replication pair failed to be deleted.
* deleted: The replication pair was deleted.', example='created'),
statusMessage?: string(name='StatusMessage', description='The message that describes the state of the replication pair. This parameter has a value when `Status` has a value of invalid or `create_failed`. Valid values:
* PrePayOrderExpired: The replication pair has expired.
* PostPayOrderCeaseService: The pay-as-you-go replication pair has been stopped due to an overdue payment.
* DeviceRemoved: The primary or secondary disk has been deleted.
* DeviceKeyChanged: The `DeviceKey` mapping of the primary or secondary disk has changed.
* DeviceSizeChanged: The `DeviceSize` value of the primary or secondary disk has changed.
* OperationDenied.QuotaExceed: The maximum number of replication pairs that can be created has been reached.', example='PrePayOrderExpired'),
tags?: [
{
tagKey?: string(name='TagKey', description='The key of the tag.', example='testKey'),
tagValue?: string(name='TagValue', description='The value of the tag.', example='testValue'),
}
](name='Tags', description='The tags of the replication pair.'),
}
](name='ReplicaPairs', description='Details about the replication pairs.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='AAA478A0-BEE6-1D42-BEB6-A9CFEAD6****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='60'),
}
model DescribeDiskReplicaPairsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDiskReplicaPairsResponseBody(name='body'),
}
/**
* @summary Queries information about replication pairs in a specific region.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * When you call this operation for a specific region, if the primary disk (source disk) or secondary disk (destination disk) of a replication pair resides in the region, information about the replication pair is displayed in the response.
* * If you want to perform a paged query, configure the `NextToken` and `MaxResults` parameters. During a paged query, when you call the DescribeDiskReplicaPairs operation to retrieve the first page of results, set `MaxResults` to limit the maximum number of entries to return in the call. The return value of NextToken is a pagination token, which can be used in the next call to retrieve a new page of results. When you call the DescribeDiskReplicaPairs operation to retrieve a new page of results, set NextToken to the NextToken value returned in the previous call and set MaxResults to specify the maximum number of entries to return in this call.
*
* @param request DescribeDiskReplicaPairsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDiskReplicaPairsResponse
*/
async function describeDiskReplicaPairsWithOptions(request: DescribeDiskReplicaPairsRequest, runtime: Util.RuntimeOptions): DescribeDiskReplicaPairsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.pairIds)) {
query['PairIds'] = request.pairIds;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.site)) {
query['Site'] = request.site;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDiskReplicaPairs',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries information about replication pairs in a specific region.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * When you call this operation for a specific region, if the primary disk (source disk) or secondary disk (destination disk) of a replication pair resides in the region, information about the replication pair is displayed in the response.
* * If you want to perform a paged query, configure the `NextToken` and `MaxResults` parameters. During a paged query, when you call the DescribeDiskReplicaPairs operation to retrieve the first page of results, set `MaxResults` to limit the maximum number of entries to return in the call. The return value of NextToken is a pagination token, which can be used in the next call to retrieve a new page of results. When you call the DescribeDiskReplicaPairs operation to retrieve a new page of results, set NextToken to the NextToken value returned in the previous call and set MaxResults to specify the maximum number of entries to return in this call.
*
* @param request DescribeDiskReplicaPairsRequest
* @return DescribeDiskReplicaPairsResponse
*/
async function describeDiskReplicaPairs(request: DescribeDiskReplicaPairsRequest): DescribeDiskReplicaPairsResponse {
var runtime = new Util.RuntimeOptions{};
return describeDiskReplicaPairsWithOptions(request, runtime);
}
model DescribeEnterpriseSnapshotPolicyRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.', example='123e4567-e89b-12d3-a456-42665544****'),
diskIds?: [ string ](name='DiskIds', description='The IDs of disks.'),
maxResults?: int32(name='MaxResults', description='The maximum number of entries per page.', example='100'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. If you specify NextToken, the PageSize and PageNumber request parameters do not take effect, and the TotalCount response parameter is invalid.', example='xxx'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
policyIds?: [ string ](name='PolicyIds', description='The IDs of enterprise-level snapshot policies.'),
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-hangzhou'),
resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='xxx'),
tag?: [
{
key?: string(name='Key', description='The key of tag N of the enterprise-level snapshot policy.
This parameter is required.', example='tag-key'),
value?: string(name='Value', description='The value of tag N of the enterprise-level snapshot policy.
This parameter is required.', example='tag-value'),
}
](name='Tag', description='The tags of the enterprise-level snapshot policies. Valid values of N: 1 to 20.'),
}
model DescribeEnterpriseSnapshotPolicyResponseBody = {
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.', example='AAAAAdDWBF2'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
policies?: [
{
createTime?: string(name='CreateTime', description='The time when the enterprise-level snapshot policy was created.', example='2023-06-24T06:03:35Z'),
crossRegionCopyInfo?: {
enabled?: boolean(name='Enabled', description='Indicates whether the cross-region replication feature is enabled.', example='true'),
regions?: [
{
regionId?: string(name='RegionId', description='The ID of the destination region.', example='cn-hangzhou'),
retainDays?: int32(name='RetainDays', description='The retention period of snapshot copies in the destination region. Unit: day.', example='7'),
}
](name='Regions', description='The destination regions that store snapshot copies.'),
}(name='CrossRegionCopyInfo', description='The replication rule of snapshots in the enterprise-level snapshot policy.'),
desc?: string(name='Desc', description='The description of the enterprise-level snapshot policy.', example='xxx'),
diskIds?: [ string ](name='DiskIds', description='The disks that are associated with the snapshot policy.'),
managedForEcs?: boolean(name='ManagedForEcs', description='Indicates whether snapshots are managed.', example='false'),
name?: string(name='Name', description='The name of the enterprise-level snapshot policy.', example='xxx'),
policyId?: string(name='PolicyId', description='The ID of the enterprise-level snapshot policy.', example='esp-xxx'),
resourceGroupId?: string(name='ResourceGroupId', description='the resource group', example='rg-xxx'),
retainRule?: {
number?: int32(name='Number', description='The maximum number of snapshots that can be retained.', example='10'),
timeInterval?: int32(name='TimeInterval', description='The value of the retention period of snapshots.', example='14'),
timeUnit?: string(name='TimeUnit', description='The unit of the retention period of snapshots.', example='DAYS'),
}(name='RetainRule', description='The retention rule of the enterprise-level snapshot policy.'),
schedule?: {
cronExpression?: string(name='CronExpression', description='The cron expression of the enterprise-level snapshot policy.'),
}(name='Schedule', description='The scheduling rule of the enterprise-level snapshot policy.'),
specialRetainRules?: {
enabled?: boolean(name='Enabled', description='Indicates whether the special retention period is enabled.', example='true'),
rules?: [
{
specialPeriodUnit?: string(name='SpecialPeriodUnit', description='The unit of the special retention period.', example='WEEKS'),
timeInterval?: int32(name='TimeInterval', description='The value of the retention period.', example='1'),
timeUnit?: string(name='TimeUnit', description='The unit of the retention period.', example='WEEKS'),
}
](name='Rules', description='The special retention rules.'),
}(name='SpecialRetainRules', description='The special retention rules of the enterprise-level snapshot policy.'),
state?: string(name='State', description='The status of the enterprise-level snapshot policy.', example='DISABLED'),
storageRule?: {
enableImmediateAccess?: boolean(name='EnableImmediateAccess', description='Indicates whether the instant access feature is enabled.', example='false'),
}(name='StorageRule', description='The storage rule of snapshots in the enterprise-level snapshot policy.'),
tags?: [
{
tagKey?: string(name='TagKey', description='The key of the tag of the enterprise-level snapshot policy.', example='key'),
tagValue?: string(name='TagValue', description='The value of the tag of the enterprise-level snapshot policy.', example='value'),
}
](name='Tags', description='the pair tags'),
targetCount?: int32(name='TargetCount', description='The number of objects that are associated with the enterprise-level snapshot policy.', example='10'),
targetType?: string(name='TargetType', description='The type of the enterprise-level snapshot policy.', example='DISK'),
}
](name='Policies', description='The returned snapshot policies.'),
requestId?: string(name='RequestId', description='The request ID.', example='5CA35A83-8D8A-5B67-BAA0-2E124F194DA4'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='10'),
}
model DescribeEnterpriseSnapshotPolicyResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeEnterpriseSnapshotPolicyResponseBody(name='body'),
}
/**
* @summary Queries the information about enterprise-level snapshot policies. When you call this operation, you can specify parameters, such as PolicyIds, ResourceGroupId, and Tag, in the request.
*
* @param request DescribeEnterpriseSnapshotPolicyRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeEnterpriseSnapshotPolicyResponse
*/
async function describeEnterpriseSnapshotPolicyWithOptions(request: DescribeEnterpriseSnapshotPolicyRequest, runtime: Util.RuntimeOptions): DescribeEnterpriseSnapshotPolicyResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.diskIds)) {
query['DiskIds'] = request.diskIds;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.policyIds)) {
query['PolicyIds'] = request.policyIds;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceGroupId)) {
query['ResourceGroupId'] = request.resourceGroupId;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeEnterpriseSnapshotPolicy',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the information about enterprise-level snapshot policies. When you call this operation, you can specify parameters, such as PolicyIds, ResourceGroupId, and Tag, in the request.
*
* @param request DescribeEnterpriseSnapshotPolicyRequest
* @return DescribeEnterpriseSnapshotPolicyResponse
*/
async function describeEnterpriseSnapshotPolicy(request: DescribeEnterpriseSnapshotPolicyRequest): DescribeEnterpriseSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return describeEnterpriseSnapshotPolicyWithOptions(request, runtime);
}
model DescribeEventsRequest {
endTime?: string(name='EndTime', description='The end of the time range to query. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.', example='2023-06-01T04:00:00Z'),
eventLevel?: string(name='EventLevel', description='The severity level of the event. Valid values:
* **INFO**
* **WARN**
* **CRITICAL**', example='WARN'),
eventName?: string(name='EventName', description='The name of the event. Valid values:
* NoSnapshot: indicates the event that is triggered because no snapshot is created for a disk to protect data on the disk.
* BurstIOTriggered: indicates the event that is triggered when a burst I/O operation is performed on a disk.
* CostOptimizationNeeded: indicates the event that is triggered when cost optimization is required.
* DiskSpecNotMatchedWithInstance: indicates the event that is triggered because the specifications of a disk do not match the instance to which the disk is attached.
* DiskIONo4kAligned: indicates the event that is triggered because the physical and logical sectors involved in a read or write operation are not 4K aligned.
* DiskIOHang: indicates the event that is triggered when an I/O hang occurs on a disk.
* InstanceIOPSExceedInstanceMaxLimit: indicates the event that is triggered when the number of IOPS on an instance reaches the upper limit.
* InstanceBPSExceedInstanceMaxLimit: indicates the event that is triggered when the number of BPS on an instance reaches the upper limit.
* DiskIOPSExceedInstanceMaxLimit: indicates the event that is triggered when the number of IOPS on a disk reaches the upper limit for the associated instance.
* DiskBPSExceedInstanceMaxLimit: indicates the event that is triggered when the number of BPS on a disk reaches the upper limit for the associated instance.
* DiskIOPSExceedDiskMaxLimit: indicates the event that is triggered when the number of IOPS on a disk reaches the upper limit for the disk.
* DiskBPSExceedDiskMaxLimit: indicates the event that is triggered when the number of BPS on a disk reaches the upper limit for the disk.', example='DiskIOHang'),
maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. If you specify MaxResults, `MaxResults` and `NextToken` are used for a paged query.
Valid values: 1 to 100.
Default value: 10', example='10'),
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results.', example='AAAAAdDWBF2****'),
regionId?: string(name='RegionId', description='The region ID . You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions supported.
This parameter is required.', example='cn-hangzhou'),
resourceId?: string(name='ResourceId', description='The resource ID.', example='d-bp67acfmxazb4p****'),
resourceType?: string(name='ResourceType', description='The type of resource. Valid values:
* disk.
Default value: disk.', example='disk'),
startTime?: string(name='StartTime', description='The beginning of the time range to query. Specify the time in the [ISO 8601](https://help.aliyun.com/document_detail/25696.html) standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.', example='2023-06-01T03:00:00Z'),
status?: string(name='Status', description='The status of event. Valid values:
- WillExecute
- Executing
- Executed
- Ignore
- Expired
- Deleted', example='WillExecute'),
}
model DescribeEventsResponseBody = {
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results.', example='AAAAAdDWBF2****'),
requestId?: string(name='RequestId', description='Id of the request', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
resourceEvents?: [
{
description?: string(name='Description', description='The description of the event.', example='need snapshot'),
endTime?: string(name='EndTime', description='The end time of the event, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.', example='1679538083000'),
eventLevel?: string(name='EventLevel', description='The level of the event. Valid values:
1. INFO
2. WARN
3. CRITICAL', example='INFO'),
eventName?: string(name='EventName', description='The name of the event. Valid values:
* NoSnapshot: indicates the event that is triggered because no snapshot is created for a disk to protect data on the disk.
* BurstIOTriggered: indicates the event that is triggered when a burst I/O operation is performed on a disk.
* CostOptimizationNeeded: indicates the event that is triggered when cost optimization is required.
* DiskSpecNotMatchedWithInstance: indicates the event that is triggered because the specifications of a disk do not match the instance to which the disk is attached.
* DiskIONo4kAligned: indicates the event that is triggered because the physical and logical sectors involved in a read or write operation are not 4K aligned.
* DiskIOHang: indicates the event that is triggered when an I/O hang occurs on a disk.
* InstanceIOPSExceedInstanceMaxLimit: indicates the event that is triggered when the number of IOPS on an instance reaches the upper limit.
* InstanceBPSExceedInstanceMaxLimit: indicates the event that is triggered when the number of BPS on an instance reaches the upper limit.
* DiskIOPSExceedInstanceMaxLimit: indicates the event that is triggered when the number of IOPS on a disk reaches the upper limit for the associated instance.
* DiskBPSExceedInstanceMaxLimit: indicates the event that is triggered when the number of BPS on a disk reaches the upper limit for the associated instance.
* DiskIOPSExceedDiskMaxLimit: indicates the event that is triggered when the number of IOPS on a disk reaches the upper limit for the disk.
* DiskBPSExceedDiskMaxLimit: indicates the event that is triggered when the number of BPS on a disk reaches the upper limit for the disk.', example='DiskIOHang'),
eventType?: string(name='EventType', description='The type of the event. Valid values:
1. Notification
2. SystemException
3. Alert', example='Alert'),
extraAttributes?: string(name='ExtraAttributes', description='Extra attributes of event, possible fields are:
- EcsInstanceId: ECS instance ID where the cloud disk is mounted;
- Adapter: cloud disk mount point.', example='{\\\\"EcsInstanceId\\\\":\\\\"i-uf6dkn9qpcw6y94g7ag7\\\\",\\\\"Adapter\\\\":\\\\"hda\\\\"}'),
recommendAction?: string(name='RecommendAction', description='The recommended action after the event occurred. Valid values:
* ModifyDiskSpec
* CreateSnapshot
* ResizeDisk
* AdjustProvision
* ModifyInstanceSpec', example='AdjustProvision'),
recommendParams?: string(name='RecommendParams', description='The codes of the parameters for the recommended action after the event occurred.', example='4296'),
resourceId?: string(name='ResourceId', description='The ID of the resource.', example='d-bp67acfmxazb4p****'),
resourceType?: string(name='ResourceType', description='The type of the resource.', example='disk'),
startTime?: string(name='StartTime', description='The start time of the event, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.', example='1684204822000'),
status?: string(name='Status', description='The status of the event. Valid values:
1. WillExecute
2. Executing
3. Executed
4. Ignore
5. Expired
6. Deleted', example='WillExecute'),
}
](name='ResourceEvents', description='The events.'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'),
}
model DescribeEventsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeEventsResponseBody(name='body'),
}
/**
* @summary Queries the risk events of a disk.
*
* @param request DescribeEventsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeEventsResponse
*/
async function describeEventsWithOptions(request: DescribeEventsRequest, runtime: Util.RuntimeOptions): DescribeEventsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.eventLevel)) {
query['EventLevel'] = request.eventLevel;
}
if (!Util.isUnset(request.eventName)) {
query['EventName'] = request.eventName;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeEvents',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the risk events of a disk.
*
* @param request DescribeEventsRequest
* @return DescribeEventsResponse
*/
async function describeEvents(request: DescribeEventsRequest): DescribeEventsResponse {
var runtime = new Util.RuntimeOptions{};
return describeEventsWithOptions(request, runtime);
}
model DescribeLensMonitorDisksRequest {
diskCategory?: string(name='DiskCategory', description='The type of the disk. Valid values:
- cloud
- cloud_efficiency
- cloud_ssd
- cloud_essd
- cloud_auto
- cloud_essd_entry', example='cloud_auto'),
diskIdPattern?: string(name='DiskIdPattern', description='Regular matching fuzzy query to filter cloud disk IDs.', example='d-cd40hxfu0v**'),
diskIds?: [ string ](name='DiskIds', description='The list of disks.', example='[\\\\"d-1\\\\", \\\\"d-2\\\\"]'),
lensTags?: [ string ](name='LensTags', description='Event tags of the disk, which are used to filter the disks on which the events associated with the specified tags occurred in the previous 24 hours. Valid values:
* NoSnapshot: specifies the event that is triggered because no snapshot is created for the disk to protect data on the disk.
* BurstIOTriggered: specifies the event that is triggered when a burst I/O operation is performed on the disk.
* CostOptimizationNeeded: specifies the event that is triggered when cost optimization is required.
* DiskSpecNotMatchedWithInstance: specifies the event that is triggered if the disk specifications do not match the instance to which the disk is attached.
* DiskIONo4kAligned: specifies the event that is triggered if the physical and logical sectors involved in a read or write operation are not 4K aligned.
* DiskIOHang: specifies the event that is triggered when an I/O hang occurs on the disk.
* InstanceIOPSExceedInstanceMaxLimit: specifies the event that is triggered when the number of IOPS on the instance reaches the upper limit.
* InstanceBPSExceedInstanceMaxLimit: specifies the event that is triggered when the number of BPS on the instance reaches the upper limit.
* DiskIOPSExceedInstanceMaxLimit: specifies the event that is triggered when the number of IOPS on the disk reaches the upper limit of the instance.
* DiskBPSExceedInstanceMaxLimit: specifies the event that is triggered when the number of BPS on the disk reaches the upper limit of the instance.
* DiskIOPSExceedDiskMaxLimit: specifies the event that is triggered when the number of IOPS on the disk reaches the upper limit of the disk.
* DiskBPSExceedDiskMaxLimit: specifies the event that is triggered when the number of BPS on the disk reaches the upper limit of the disk.'),
maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. Valid values: 1 to 100. Default value: 10.', example='10'),
nextToken?: string(name='NextToken', description='The token used to start the next query to retrieve more results.
>The pagination token that is used in the next request to retrieve a new page of results. You must specify the token that is obtained from the previous query as the value of NextToken.', example='caeba0bbb2be03f84eb48b699f0a****'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-hangzhou'),
}
model DescribeLensMonitorDisksResponseBody = {
diskInfos?: [
{
bps?: int32(name='Bps', description='The BPS.', example='300'),
burstingEnabled?: boolean(name='BurstingEnabled', description='Indicates whether the performance burst feature is enabled. Valid values:
* true
* false
This parameter is available only if you set `DiskCategory` to `cloud_auto`. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html).', example='true'),
diskCategory?: string(name='DiskCategory', description='The type of the disk. Valid values:
- cloud
- cloud_efficiency
- cloud_ssd
- cloud_essd
- cloud_auto
- cloud_essd_entry', example='cloud_essd'),
diskId?: string(name='DiskId', description='The ID of the disk.', example='d-cd401****'),
diskName?: string(name='DiskName', description='The name of the disk.', example='disk-28c6b****'),
diskStatus?: string(name='DiskStatus', description='The disk status. Valid values:
- Available
- Deleted', example='Available'),
diskType?: string(name='DiskType', description='The disk type. Valid values:
* system: system disk
* data: data disk', example='system'),
iops?: int32(name='Iops', description='The IOPS.', example='4000'),
lensTags?: [ string ](name='LensTags', description='Event tags of the disk.'),
performanceLevel?: string(name='PerformanceLevel', description='The new performance level of the ESSD. Valid values:
* PL0: An ESSD can deliver up to 10,000 random read/write IOPS.
* PL1: An ESSD can deliver up to 50,000 random read/write IOPS.
* PL2: An ESSD can deliver up to 100,000 random read/write IOPS.
* PL3: An ESSD delivers up to 1,000,000 random read/write IOPS.', example='PL0'),
provisionedIops?: int32(name='ProvisionedIops', description='The provisioned read/write IOPS of the ESSD AutoPL disk to use as the system disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}.
Baseline performance = min{1,800 + 50 × Capacity, 50,000}
This parameter is available only if you set `DiskCategory` to `cloud_auto`. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html).', example='4000'),
regionId?: string(name='RegionId', description='The region ID of the disk.', example='cn-hangzhou'),
sharingEnabled?: string(name='SharingEnabled'),
size?: int32(name='Size', description='The size of the disk. Unit: GiB.', example='64'),
tags?: [
{
tagKey?: string(name='TagKey', description='The tag key.', example='tag1'),
tagValue?: string(name='TagValue', description='The tag value.', example='user'),
}
](name='Tags', description='Tags of the disk.'),
zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-hangzhou-j'),
}
](name='DiskInfos', description='The information about the disks.'),
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results.', example='caeba0bbb2be03f84eb48b699f0a****'),
requestId?: string(name='RequestId', description='The request ID.', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='6'),
}
model DescribeLensMonitorDisksResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeLensMonitorDisksResponseBody(name='body'),
}
/**
* @summary Queries one or more Elastic Block Storage (EBS) devices that you created.
*
* @param request DescribeLensMonitorDisksRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeLensMonitorDisksResponse
*/
async function describeLensMonitorDisksWithOptions(request: DescribeLensMonitorDisksRequest, runtime: Util.RuntimeOptions): DescribeLensMonitorDisksResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.diskCategory)) {
query['DiskCategory'] = request.diskCategory;
}
if (!Util.isUnset(request.diskIdPattern)) {
query['DiskIdPattern'] = request.diskIdPattern;
}
if (!Util.isUnset(request.diskIds)) {
query['DiskIds'] = request.diskIds;
}
if (!Util.isUnset(request.lensTags)) {
query['LensTags'] = request.lensTags;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeLensMonitorDisks',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries one or more Elastic Block Storage (EBS) devices that you created.
*
* @param request DescribeLensMonitorDisksRequest
* @return DescribeLensMonitorDisksResponse
*/
async function describeLensMonitorDisks(request: DescribeLensMonitorDisksRequest): DescribeLensMonitorDisksResponse {
var runtime = new Util.RuntimeOptions{};
return describeLensMonitorDisksWithOptions(request, runtime);
}
model DescribeLensServiceStatusResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
status?: string(name='Status', description='The state of CloudLens for EBS. Valid values:
* Applying
* UnAvailable
* Available', example='Available'),
}
model DescribeLensServiceStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeLensServiceStatusResponseBody(name='body'),
}
/**
* @summary 查询用户开通ebs数据洞察服务状态
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @param request DescribeLensServiceStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeLensServiceStatusResponse
*/
async function describeLensServiceStatusWithOptions(runtime: Util.RuntimeOptions): DescribeLensServiceStatusResponse {
var req = new OpenApi.OpenApiRequest{};
var params = new OpenApi.Params{
action = 'DescribeLensServiceStatus',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询用户开通ebs数据洞察服务状态
*
* @description ## Usage notes
* CloudLens for EBS is in invitational preview in the China (Hangzhou), China (Shanghai), China (Zhangjiakou), China (Shenzhen), and China (Hong Kong) regions. To use the feature, [submit a ticket](https://workorder-intl.console.aliyun.com/#/ticket/createIndex).
*
* @return DescribeLensServiceStatusResponse
*/
async function describeLensServiceStatus(): DescribeLensServiceStatusResponse {
var runtime = new Util.RuntimeOptions{};
return describeLensServiceStatusWithOptions(runtime);
}
model DescribeMetricDataRequest {
aggreOps?: string(name='AggreOps', description='Aggregation method in time dimension. Valid values:
- SUM
- COUNT
- AVG
- MAX
- MIN', example='SUM'),
aggreOverLineOps?: string(name='AggreOverLineOps'),
dimensions?: string(name='Dimensions', description='The dimension map in the JSON format. A dimension is a key-value pair. Valid dimension key: diskId.', example='{"diskId":["d-bp14xxxx","d-bp11xxxx"]}'),
endTime?: string(name='EndTime', description='The end of the time range to query. The specified time must be later than the current time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.', example='2023-11-21T02:00:00Z'),
metricName?: string(name='MetricName', description='The name of the metric. Valid values:
* disk_bps_percent
* disk_iops_percent
* disk_read_block_size
* disk_read_bps
* disk_read_iops
* disk_read_latency
* disk_write_block_size
* disk_write_bps
* disk_write_iops
* disk_write_latency
This parameter is required.', example='disk_bps_percent'),
period?: int32(name='Period', description='The interval at which metric data is collected. Unit: seconds. Default value: 60. Valid values: 60, 300, 600, and 3600, which support queries for time ranges of up to 2 hours, 2 hours, 1 day, and 7 days, respectively. For example, if you set Period to 60, the end time is less than 2 hours from the end time.', example='60'),
regionId?: string(name='RegionId', description='The region ID.', example='cn-shanghai'),
startTime?: string(name='StartTime', description='The beginning of the time range to query. You can specify a point in time that is up to one year apart from the current time. If StartTime and EndTime are both unspecified, the monitoring metric data of the last Period value is queried. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.', example='2023-11-21T01:50:00Z'),
}
model DescribeMetricDataResponseBody = {
dataList?: [
{
datapoints?: any(name='Datapoints', description='The datapoints that consist of consecutive timestamps in seconds and metric values that were recorded at these time points.', example='{
"1699258861": 1,
"1699259461": 0,
"1699260061": 0,
"1699260661": 0,
"1699261261": 0,
"1699261861": 0,
"1699262461": 0,
"1699263061": 0,
"1699263661": 0,
"1699264261": 0,
"1699264861": 0
}'),
labels?: any(name='Labels', description='The tags.', example='{"DiskId": "d-1234"}'),
}
](name='DataList', description='The disk monitoring data.'),
requestId?: string(name='RequestId', description='The request ID.', example='11B55F58-D3A4-4A9B-9596-342420D0****'),
totalCount?: int32(name='TotalCount', description='The total number of data entries queried.', example='3'),
warnings?: [ string ](name='Warnings'),
}
model DescribeMetricDataResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeMetricDataResponseBody(name='body'),
}
/**
* @summary Queries the statistics about a metric of Elastic Block Storage (EBS) disks.
*
* @param request DescribeMetricDataRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeMetricDataResponse
*/
async function describeMetricDataWithOptions(request: DescribeMetricDataRequest, runtime: Util.RuntimeOptions): DescribeMetricDataResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.aggreOps)) {
query['AggreOps'] = request.aggreOps;
}
if (!Util.isUnset(request.aggreOverLineOps)) {
query['AggreOverLineOps'] = request.aggreOverLineOps;
}
if (!Util.isUnset(request.dimensions)) {
query['Dimensions'] = request.dimensions;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.metricName)) {
query['MetricName'] = request.metricName;
}
if (!Util.isUnset(request.period)) {
query['Period'] = request.period;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeMetricData',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the statistics about a metric of Elastic Block Storage (EBS) disks.
*
* @param request DescribeMetricDataRequest
* @return DescribeMetricDataResponse
*/
async function describeMetricData(request: DescribeMetricDataRequest): DescribeMetricDataResponse {
var runtime = new Util.RuntimeOptions{};
return describeMetricDataWithOptions(request, runtime);
}
model DescribePairDrillsRequest {
drillId?: string(name='DrillId', description='The ID of the drill.', example='drill-xxxx'),
maxResults?: long(name='MaxResults', description='The maximum number of entries to be returned. You can use this parameter together with NextToken.
Valid values: 1 to 500.
Default value: 10.', example='10'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Set the value to the NextToken value returned in the previous call to the DescribeDiskReplicaPairs operation. Leave this parameter empty the first time you call this operation. When you specify NextToken, the PageSize and PageNumber request parameters do not take effect and the TotalCount response parameter is invalid.', example='AAAAAdDWBF2****'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page. Valid values: 1 to 100.', example='10'),
pairId?: string(name='PairId', description='The ID of the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query a list of asynchronous replication pairs, including replication pair IDs.
This parameter is required.', example='pair-xxxx'),
regionId?: string(name='RegionId', description='The region ID of the primary or secondary disk in the async replication pair. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which async replication is supported.
This parameter is required.', example='cn-hangzhou'),
}
model DescribePairDrillsResponseBody = {
drills?: [
{
drillDiskId?: string(name='DrillDiskId', description='The ID of the drill disk.', example='d-xxx'),
drillDiskStatus?: string(name='DrillDiskStatus', description='The status of the drill disk. Valid values:
* created
* deleted
* creating
* deleting
> This parameter can also display error code details if your drill disk fails to be created or deleted.', example='created'),
drillId?: string(name='DrillId', description='The ID of the drill.', example='drill-xxx'),
recoverPoint?: long(name='RecoverPoint', description='The recovery point of the drill. The value of this parameter is a timestamp. Unit: seconds.', example='1690855931'),
startAt?: long(name='StartAt', description='The beginning time of the drill. The value of this parameter is a timestamp. Unit: seconds.', example='1690855888'),
status?: string(name='Status', description='The status of the drill. Valid values:
* execute_failed
* executed
* executing
* clear_failed
* clearing', example='executing'),
statusMessage?: string(name='StatusMessage', description='The error message that was displayed if the drill failed to be executed.', example='PAIR_SYNCPOINT_NOT_FOUND'),
}
](name='Drills', description='The information of disaster recovery drills that were performed on the replication pair.'),
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results.', example='AAAAAdDWBF2****'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
requestId?: string(name='RequestId', description='The request ID.', example='C46FF5A8-C5F0-4024-8262-B16B6392****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='1'),
}
model DescribePairDrillsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribePairDrillsResponseBody(name='body'),
}
/**
* @summary Queries the disaster recovery drills that were performed on the replication pair whose secondary disk resides in a specific region.
*
* @param request DescribePairDrillsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribePairDrillsResponse
*/
async function describePairDrillsWithOptions(request: DescribePairDrillsRequest, runtime: Util.RuntimeOptions): DescribePairDrillsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.drillId)) {
query['DrillId'] = request.drillId;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.pairId)) {
query['PairId'] = request.pairId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribePairDrills',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the disaster recovery drills that were performed on the replication pair whose secondary disk resides in a specific region.
*
* @param request DescribePairDrillsRequest
* @return DescribePairDrillsResponse
*/
async function describePairDrills(request: DescribePairDrillsRequest): DescribePairDrillsResponse {
var runtime = new Util.RuntimeOptions{};
return describePairDrillsWithOptions(request, runtime);
}
model DescribeRegionsRequest {
acceptLanguage?: string(name='AcceptLanguage', description='The language in which the regions and zones are named. This parameter corresponds to the `LocalName` response parameter. Valid values:
* zh-CN: Chinese
* en-US: English
* ja: Japanese
Default value: zh-CN.', example='zh-CN'),
regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
resourceType?: string(name='ResourceType', description='The type of resource. Valid values:
* ear: async replication
* lens: CloudLens for EBS
* dbsc: Dedicated Block Storage Cluster
Default value: ear.', example='ear'),
}
model DescribeRegionsResponseBody = {
regions?: [
{
localName?: string(name='LocalName', description='The name of the region.', example='China (Hangzhou)'),
regionEndpoint?: string(name='RegionEndpoint', description='The endpoint of the region.', example='ebs.cn-hangzhou.aliyuncs.com'),
regionId?: string(name='RegionId', description='The ID of the region.', example='cn-hangzhou'),
zones?: [
{
localName?: string(name='LocalName', description='The name of the zone.', example='Hangzhou Zone H'),
resourceTypes?: [ string ](name='ResourceTypes', description='The type of resource list.'),
zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-hangzhou-h'),
}
](name='Zones', description='Details about the zones.'),
}
](name='Regions', description='Details about the regions.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='17EE62D8-064E-5404-8B0D-72122478****'),
}
model DescribeRegionsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeRegionsResponseBody(name='body'),
}
/**
* @summary Queries the details of regions in which Elastic Block Storage (EBS) features (such as async replication, CloudLens for EBS, and Dedicated Block Storage Cluster) are supported.
*
* @param request DescribeRegionsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeRegionsResponse
*/
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.acceptLanguage)) {
query['AcceptLanguage'] = request.acceptLanguage;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeRegions',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the details of regions in which Elastic Block Storage (EBS) features (such as async replication, CloudLens for EBS, and Dedicated Block Storage Cluster) are supported.
*
* @param request DescribeRegionsRequest
* @return DescribeRegionsResponse
*/
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
var runtime = new Util.RuntimeOptions{};
return describeRegionsWithOptions(request, runtime);
}
model DescribeReplicaGroupDrillsRequest {
drillId?: string(name='DrillId', description='The ID of the drill.', example='pg-drill-xxxx'),
groupId?: string(name='GroupId', description='The ID of the replication pair-consistent group. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query a list of async replication pair-consistent groups, including group IDs.
This parameter is required.', example='pg-xxxx'),
maxResults?: int32(name='MaxResults', description='The maximum number of entries to be returned. You can use this parameter together with NextToken.
Valid values: 1 to 500.
Default value: 10.', example='10'),
nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. When you specify NextToken, the PageSize and PageNumber request parameters do not take effect and the TotalCount response parameter is invalid.', example='AAAAAdDWBF2****'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='5'),
pageSize?: int32(name='PageSize', description='The number of entries per page. Valid values: 1 to 100.', example='10'),
regionId?: string(name='RegionId', description='The region ID of the primary or secondary disk in the async replication pair-consistent group. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which async replication is supported.
This parameter is required.', example='cn-hangzhou'),
}
model DescribeReplicaGroupDrillsResponseBody = {
drills?: [
{
drillId?: string(name='DrillId', description='The ID of the drill.', example='pg-drill-xxx'),
groupId?: string(name='GroupId', description='The ID of the replication pair-consistent group.', example='pg-xxx'),
pairsInfo?: [
{
drillDiskId?: string(name='DrillDiskId', description='The ID of the drill disk.', example='d-xxx'),
drillDiskStatus?: string(name='DrillDiskStatus', description='The status of the drill disk. Valid values:
* created
* deleted
* creating
* deleting
> This parameter can also display error code details if your drill disk fails to be created or deleted.', example='created'),
pairId?: string(name='PairId', description='The ID of the replication pair.', example='pair-xxx'),
}
](name='PairsInfo', description='The information of replication pairs.'),
recoverPoint?: long(name='RecoverPoint', description='The recovery point of the drill. The value of this parameter is a timestamp. Unit: seconds.', example='1691114995'),
startAt?: long(name='StartAt', description='The beginning time of the drill. The value of this parameter is a timestamp. Unit: seconds.', example='1649750977'),
status?: string(name='Status', description='The status of the drill. Valid values:
* execute_failed
* executed
* executing
* clear_failed
* clearing', example='executed'),
statusMessage?: string(name='StatusMessage', description='The error message that appears if the drill fails to be executed.', example='GROUP_SYNCPOINT_NOT_FOUND'),
}
](name='Drills', description='The information of disaster recovery drills that were performed on the replication pair-consistent group.'),
nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.', example='AAAAAdDWBF2****'),
pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
totalCount?: long(name='TotalCount', description='The total number of entries returned.', example='1'),
}
model DescribeReplicaGroupDrillsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeReplicaGroupDrillsResponseBody(name='body'),
}
/**
* @summary Queries the disaster recovery drills that were performed on the replication pair-consistent group whose secondary disk resides in a specific region.
*
* @param request DescribeReplicaGroupDrillsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeReplicaGroupDrillsResponse
*/
async function describeReplicaGroupDrillsWithOptions(request: DescribeReplicaGroupDrillsRequest, runtime: Util.RuntimeOptions): DescribeReplicaGroupDrillsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.drillId)) {
query['DrillId'] = request.drillId;
}
if (!Util.isUnset(request.groupId)) {
query['GroupId'] = request.groupId;
}
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
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 = 'DescribeReplicaGroupDrills',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the disaster recovery drills that were performed on the replication pair-consistent group whose secondary disk resides in a specific region.
*
* @param request DescribeReplicaGroupDrillsRequest
* @return DescribeReplicaGroupDrillsResponse
*/
async function describeReplicaGroupDrills(request: DescribeReplicaGroupDrillsRequest): DescribeReplicaGroupDrillsResponse {
var runtime = new Util.RuntimeOptions{};
return describeReplicaGroupDrillsWithOptions(request, runtime);
}
model DescribeSolutionInstanceConfigurationRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
parameters?: [
{
parameterKey?: string(name='ParameterKey', description='The key of the parameter.
This parameter is required.', example='***'),
parameterValue?: string(name='ParameterValue', description='The value of the parameter.
> The Parameters parameter is optional. If you specify Parameters, you must specify ParameterValue.
This parameter is required.', example='***'),
}
](name='Parameters', description='The parameters.'),
regionId?: string(name='RegionId', description='The region ID.
This parameter is required.', example='cn-shanghai'),
solutionId?: string(name='SolutionId', description='The ID of the solution.
This parameter is required.', example='sln-xxxxx'),
}
model DescribeSolutionInstanceConfigurationResponseBody = {
data?: [ map[string]any ](name='Data', description='The returned data.'),
requestId?: string(name='RequestId', description='The request ID.', example='11B55F58-D3A4-4A9B-9596-342420D0****'),
}
model DescribeSolutionInstanceConfigurationResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeSolutionInstanceConfigurationResponseBody(name='body'),
}
/**
* @summary 查询解决方案实例默认配置
*
* @param request DescribeSolutionInstanceConfigurationRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeSolutionInstanceConfigurationResponse
*/
async function describeSolutionInstanceConfigurationWithOptions(request: DescribeSolutionInstanceConfigurationRequest, runtime: Util.RuntimeOptions): DescribeSolutionInstanceConfigurationResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.parameters)) {
query['Parameters'] = request.parameters;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.solutionId)) {
query['SolutionId'] = request.solutionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeSolutionInstanceConfiguration',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 查询解决方案实例默认配置
*
* @param request DescribeSolutionInstanceConfigurationRequest
* @return DescribeSolutionInstanceConfigurationResponse
*/
async function describeSolutionInstanceConfiguration(request: DescribeSolutionInstanceConfigurationRequest): DescribeSolutionInstanceConfigurationResponse {
var runtime = new Util.RuntimeOptions{};
return describeSolutionInstanceConfigurationWithOptions(request, runtime);
}
model DescribeUserTagKeysRequest {
maxResults?: int32(name='MaxResults', description='Number of items per page in paginated queries. The maximum value is 100.
Default value:
- If no value is set or the set value is less than 10, the default is 10.
- If the set value is greater than 100, the default is 100.', example='10'),
nextToken?: string(name='NextToken', description='The query token returned by this call (Token).', example='f07b150eadfa1d7a'),
regionId?: string(name='RegionId', description='The ID of the region to which the resource belongs. You can call [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) to view the latest list of Alibaba Cloud regions.', example='cn-hangzhou'),
tagFilterKey?: string(name='TagFilterKey', description='The tagKey for filtering the query.', example='tagKey'),
}
model DescribeUserTagKeysResponseBody = {
maxResults?: int32(name='MaxResults', description='Number of items per page in paginated queries. The maximum value is 100.
Default value:
- If no value is set or the set value is less than 10, the default is 10.
- If the set value is greater than 100, the default is 100.', example='10'),
nextToken?: string(name='NextToken', description='The token for the next query. An empty NextToken indicates there are no more results.', example='f07b150eadfa1d7a'),
requestId?: string(name='RequestId', description='Request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
tagKeys?: [ string ](name='TagKeys', description='List of matching tag keys.'),
}
model DescribeUserTagKeysResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeUserTagKeysResponseBody(name='body'),
}
/**
* @summary Centralized Role: Query User Disk Snapshot tagKeys
*
* @description ## Interface Description
* Query the tag key-value pairs of user\\"s cloud disk and snapshot. The search scope can be narrowed down by using filterTagKey.
*
* @param request DescribeUserTagKeysRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeUserTagKeysResponse
*/
async function describeUserTagKeysWithOptions(request: DescribeUserTagKeysRequest, runtime: Util.RuntimeOptions): DescribeUserTagKeysResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
body['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.tagFilterKey)) {
body['TagFilterKey'] = request.tagFilterKey;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'DescribeUserTagKeys',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Centralized Role: Query User Disk Snapshot tagKeys
*
* @description ## Interface Description
* Query the tag key-value pairs of user\\"s cloud disk and snapshot. The search scope can be narrowed down by using filterTagKey.
*
* @param request DescribeUserTagKeysRequest
* @return DescribeUserTagKeysResponse
*/
async function describeUserTagKeys(request: DescribeUserTagKeysRequest): DescribeUserTagKeysResponse {
var runtime = new Util.RuntimeOptions{};
return describeUserTagKeysWithOptions(request, runtime);
}
model DescribeUserTagValuesRequest {
maxResults?: int32(name='MaxResults', description='Number of items per page in a paginated query. The maximum value is 100.
Default value:
- If no value is set or the set value is less than 10, the default value is 10.
- If the set value is greater than 100, the default value is 100.', example='10'),
nextToken?: string(name='NextToken', description='Query token (Token). The value should be the NextToken parameter value from the previous call to this interface. This parameter is not required for the initial call. If NextToken is set, the PageSize and PageNumber request parameters become invalid, and the TotalCount in the response data is also invalid.', example='AAAAAdDWBF2'),
regionId?: string(name='RegionId', description='The region ID of the consistency replication group.', example='cn-beijing'),
tagFilterValue?: string(name='TagFilterValue', description='Tag content filter', example='keyValue'),
tagKey?: string(name='TagKey', description='Tag key.', example='TestKey'),
}
model DescribeUserTagValuesResponseBody = {
maxResults?: int32(name='MaxResults', description='Number of items per page in a paginated query. The maximum value is 100.
Default value:
- If no value is set or the set value is less than 10, the default value is 10.
- If the set value is greater than 100, the default value is 100.', example='10'),
nextToken?: string(name='NextToken', description='Query token (Token). The value should be the NextToken parameter value from the previous call to this interface. This parameter is not required for the initial call. If NextToken is set, the PageSize and PageNumber request parameters become invalid, and the TotalCount in the response data is also invalid.', example='NextToken'),
requestId?: string(name='RequestId', description='Request ID. We return the request ID regardless of whether the API call was successful or not.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
tagValues?: [ string ](name='TagValues', description='Tag values corresponding to the tag key.'),
}
model DescribeUserTagValuesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeUserTagValuesResponseBody(name='body'),
}
/**
* @summary Centralized Role: Query User Disk and Snapshot tagValues
*
* @description ## Interface Description
* > The dedicated block storage cluster feature is currently supported in the following regions: South China 2 (Heyuan), Indonesia (Jakarta), and South China 1 (Shenzhen).
* - The request parameters act as a filter, with a logical AND relationship. If any parameter is empty, the filter does not take effect.
* - For paginated queries, it is recommended to use the MaxResults and NextToken parameters. Usage instructions: When querying the first page, set only MaxResults to limit the number of returned entries. The NextToken in the response will serve as the token for querying subsequent pages. When querying subsequent pages, set the NextToken parameter to the value obtained from the previous response, and set MaxResults to limit the number of returned entries.
*
* @param request DescribeUserTagValuesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeUserTagValuesResponse
*/
async function describeUserTagValuesWithOptions(request: DescribeUserTagValuesRequest, runtime: Util.RuntimeOptions): DescribeUserTagValuesResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.maxResults)) {
body['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
body['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
body['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.tagFilterValue)) {
body['TagFilterValue'] = request.tagFilterValue;
}
if (!Util.isUnset(request.tagKey)) {
body['TagKey'] = request.tagKey;
}
var req = new OpenApi.OpenApiRequest{
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'DescribeUserTagValues',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Centralized Role: Query User Disk and Snapshot tagValues
*
* @description ## Interface Description
* > The dedicated block storage cluster feature is currently supported in the following regions: South China 2 (Heyuan), Indonesia (Jakarta), and South China 1 (Shenzhen).
* - The request parameters act as a filter, with a logical AND relationship. If any parameter is empty, the filter does not take effect.
* - For paginated queries, it is recommended to use the MaxResults and NextToken parameters. Usage instructions: When querying the first page, set only MaxResults to limit the number of returned entries. The NextToken in the response will serve as the token for querying subsequent pages. When querying subsequent pages, set the NextToken parameter to the value obtained from the previous response, and set MaxResults to limit the number of returned entries.
*
* @param request DescribeUserTagValuesRequest
* @return DescribeUserTagValuesResponse
*/
async function describeUserTagValues(request: DescribeUserTagValuesRequest): DescribeUserTagValuesResponse {
var runtime = new Util.RuntimeOptions{};
return describeUserTagValuesWithOptions(request, runtime);
}
model FailoverDiskReplicaGroupRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the secondary site of the replication pair-consistent group.
This parameter is required.', example='cn-shanghai'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group.
This parameter is required.', example='group-myreplica****'),
}
model FailoverDiskReplicaGroupResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model FailoverDiskReplicaGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: FailoverDiskReplicaGroupResponseBody(name='body'),
}
/**
* @summary Enables the failover feature for replication pairs in a replication pair-consistent group. When the primary disks of specific replication pairs in a replication pair-consistent group fail, you can call this operation to enable the read and write permissions on the secondary disks.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group must be in the **One-time Syncing** (`manual_syncing`), **Syncing** (`syncing`), **Normal** (`normal`), **Stopping** (`stopping`), **Stop Failed** (`stop_failed`), **Stopped** (`stopped`), **In Failover** (`failovering`), **Failover Failed** (`failover_failed`), or **Failovered** (`failovered`) state.
* * After a failover is performed, the replication pair-consistent group enters the **Failovered** (`failovered`) state.
* * Before you perform a failover, make sure that the first full data synchronization is completed between the primary site and secondary site.
*
* @param request FailoverDiskReplicaGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return FailoverDiskReplicaGroupResponse
*/
async function failoverDiskReplicaGroupWithOptions(request: FailoverDiskReplicaGroupRequest, runtime: Util.RuntimeOptions): FailoverDiskReplicaGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'FailoverDiskReplicaGroup',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Enables the failover feature for replication pairs in a replication pair-consistent group. When the primary disks of specific replication pairs in a replication pair-consistent group fail, you can call this operation to enable the read and write permissions on the secondary disks.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group must be in the **One-time Syncing** (`manual_syncing`), **Syncing** (`syncing`), **Normal** (`normal`), **Stopping** (`stopping`), **Stop Failed** (`stop_failed`), **Stopped** (`stopped`), **In Failover** (`failovering`), **Failover Failed** (`failover_failed`), or **Failovered** (`failovered`) state.
* * After a failover is performed, the replication pair-consistent group enters the **Failovered** (`failovered`) state.
* * Before you perform a failover, make sure that the first full data synchronization is completed between the primary site and secondary site.
*
* @param request FailoverDiskReplicaGroupRequest
* @return FailoverDiskReplicaGroupResponse
*/
async function failoverDiskReplicaGroup(request: FailoverDiskReplicaGroupRequest): FailoverDiskReplicaGroupResponse {
var runtime = new Util.RuntimeOptions{};
return failoverDiskReplicaGroupWithOptions(request, runtime);
}
model FailoverDiskReplicaPairRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the secondary disk in the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query region IDs of secondary disks in replication pairs.
> The failover feature must be enabled for the region where the secondary disk is located.
This parameter is required.', example='cn-shanghai'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.
This parameter is required.', example='pair-cn-dsa****'),
}
model FailoverDiskReplicaPairResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model FailoverDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: FailoverDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Enables the failover feature for replication pairs.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair for which you want to enable failover cannot be in the **Invalid** (`invalid`) or **Deleted** (`deleted`) state.
* * After a failover is performed, the replication pair enters the **Failovered** (`failovered`) state.
*
* @param request FailoverDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return FailoverDiskReplicaPairResponse
*/
async function failoverDiskReplicaPairWithOptions(request: FailoverDiskReplicaPairRequest, runtime: Util.RuntimeOptions): FailoverDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'FailoverDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Enables the failover feature for replication pairs.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair for which you want to enable failover cannot be in the **Invalid** (`invalid`) or **Deleted** (`deleted`) state.
* * After a failover is performed, the replication pair enters the **Failovered** (`failovered`) state.
*
* @param request FailoverDiskReplicaPairRequest
* @return FailoverDiskReplicaPairResponse
*/
async function failoverDiskReplicaPair(request: FailoverDiskReplicaPairRequest): FailoverDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return failoverDiskReplicaPairWithOptions(request, runtime);
}
model GetReportRequest {
appName?: string(name='AppName', description='Optional, AppName only takes effect when ReportType=present.', example='App1'),
regionId?: string(name='RegionId', description='Region name.', example='cn-hangzhou'),
reportId?: string(name='ReportId', description='When ReportType=history, ReportId is required to query historical reports based on ReportId.', example='report-74fbea80e802xxxx'),
reportType?: string(name='ReportType', description='Optional values: history/present.', example='history'),
}
model GetReportResponseBody = {
datas?: [
{
data?: [
{
dataPoints?: map[string]any(name='DataPoints', description='Data Points.', example='{
"1726416000": 0.44,
"1726502400": 0.44,
"1726588800": 0.44,
"1726675200": 0.44,
"1726761600": 0.43,
"1726848000": 0.43,
"1726934400": 0.43,
"1727020800": 0.43
}'),
labels?: map[string]any(name='Labels', description='Data Labels.', example='{
"category": "cloud"
}'),
}
](name='Data', description='Data.'),
title?: string(name='Title', description='Data Title.', example='disk_count_percent_by_category'),
}
](name='Datas', description='Data Details.'),
requestId?: string(name='RequestId', description='Request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model GetReportResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetReportResponseBody(name='body'),
}
/**
* @summary Centralized Role: Obtain User Usage Report with reportId
*
* @param request GetReportRequest
* @param runtime runtime options for this request RuntimeOptions
* @return GetReportResponse
*/
async function getReportWithOptions(request: GetReportRequest, runtime: Util.RuntimeOptions): GetReportResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.appName)) {
query['AppName'] = request.appName;
}
if (!Util.isUnset(request.reportType)) {
query['ReportType'] = request.reportType;
}
var body : map[string]any = {};
if (!Util.isUnset(request.regionId)) {
body['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.reportId)) {
body['ReportId'] = request.reportId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'GetReport',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Centralized Role: Obtain User Usage Report with reportId
*
* @param request GetReportRequest
* @return GetReportResponse
*/
async function getReport(request: GetReportRequest): GetReportResponse {
var runtime = new Util.RuntimeOptions{};
return getReportWithOptions(request, runtime);
}
model ListReportsRequest {
appName?: string(name='AppName', description='App name.
This parameter is required.', example='App1'),
maxResults?: int32(name='MaxResults', description='Maximum number of items for Token-based pagination.', example='10'),
nextToken?: string(name='NextToken', description='Query token (Token), the value is the NextToken parameter value returned from the previous API call.', example='a6792e832ff0XXXXX'),
pageNumber?: int32(name='PageNumber', description='Page number for paginated queries.', example='1'),
pageSize?: int32(name='PageSize', description='Number of rows per page when performing paginated queries.', example='100'),
regionId?: string(name='RegionId', description='Region ID. You can call [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) to query the list of regions supported by Block Storage Data Insights.', example='cn-hangzhou'),
}
model ListReportsResponseBody = {
historyReports?: [
{
appName?: string(name='AppName', description='Application name.', example='default'),
reportId?: string(name='ReportId', description='Report ID.', example='report-e19c7b597f5fXX'),
reportName?: string(name='ReportName', description='Report name.', example='default-2024-09-30~2024-10-07-Usage Report'),
reportTime?: string(name='ReportTime', description='Report generation time.', example='2024-10-07T02:09:17Z'),
subscribePeriod?: string(name='SubscribePeriod', description='Report subscription period.', example='Weekly'),
}
](name='HistoryReports', description='Historical reports.'),
nextToken?: string(name='NextToken', description='Query token (Token), the value is the NextToken parameter value returned from the previous API call.', example='a6792e832ff0XXXX'),
pageNumber?: int32(name='PageNumber', description='Page number for paginated queries.', example='1'),
pageSize?: int32(name='PageSize', description='Number of records per page for paginated queries.', example='10'),
requestId?: string(name='RequestId', description='Request ID, an identifier generated by Alibaba Cloud for this request.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
totalCount?: long(name='TotalCount', description='Total count.', example='1'),
}
model ListReportsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListReportsResponseBody(name='body'),
}
/**
* @summary Centralized Role: Query Historical Reports
*
* @param request ListReportsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListReportsResponse
*/
async function listReportsWithOptions(request: ListReportsRequest, runtime: Util.RuntimeOptions): ListReportsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.maxResults)) {
query['MaxResults'] = request.maxResults;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.pageNumber)) {
query['PageNumber'] = request.pageNumber;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
var body : map[string]any = {};
if (!Util.isUnset(request.appName)) {
body['AppName'] = request.appName;
}
if (!Util.isUnset(request.regionId)) {
body['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'ListReports',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Centralized Role: Query Historical Reports
*
* @param request ListReportsRequest
* @return ListReportsResponse
*/
async function listReports(request: ListReportsRequest): ListReportsResponse {
var runtime = new Util.RuntimeOptions{};
return listReportsWithOptions(request, runtime);
}
model ListTagResourcesRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that the value is unique among different requests. The **ClientToken** value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='0c593ea1-3bea-11e9-b96b-88e9fe63****'),
nextToken?: string(name='NextToken', description='The token used to start the next query.', example='token123'),
regionId?: string(name='RegionId', description='The region ID of the resource. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-hangzhou'),
resourceId?: [ string ](name='ResourceId', description='The ID list of the resource. You can specify up to 50 resource IDs in each call.', example='disk-123'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* dedicatedblockstoragecluster: dedicated block storage cluster
* diskreplicapair: replication pair
* diskreplicagroup: replication pair-consistent group
This parameter is required.', example='diskreplicagroup'),
tag?: [
{
key?: string(name='Key', description='The key of tag N used for exact search of EBS resources. The tag key must be 1 to 128 characters in length. Valid values of N: 1 to 20.
The `Tag.N` parameter pair (Tag.N.Key and Tag.N.Value) is used for exact search of EBS resources that have specified tags added. Each tag is a key-value pair.
* If you specify only `Tag.N.Key`, all EBS resources whose tags contain the specified tag key are returned.
* If you specify only `Tag.N.Value`, the `InvalidParameter.TagValue` error is returned.
* If you specify multiple tag key-value pairs at the same time, only EBS resources that match all tag key-value pairs are returned.', example='tag-key'),
value?: string(name='Value', description='The value of tag N used for exact search of EBS resources. The tag value must be 1 to 128 characters in length. Valid values of N: 1 to 20.', example='tag-value'),
}
](name='Tag', description='The information about the tags.
You can specify at most 20 tags in each call.'),
}
model ListTagResourcesResponseBody = {
nextToken?: string(name='NextToken', description='The token used to start the next query.', example='caeba0bbb2be03f84eb48b699f0a****'),
requestId?: string(name='RequestId', description='The ID of the request. The request ID is returned regardless of whether the call is successful.', example='484256DA-D816-44D2-9D86-B6EE4D5B****'),
tagResources?: [
{
resourceId?: string(name='ResourceId', description='The ID of the resource.', example='pair-cn-c4d2t7f****'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* dedicatedblockstoragecluster: dedicated block storage cluster
* diskreplicapair: replication pair
* diskreplicagroup: replication pair-consistent group', example='pair'),
tagKey?: string(name='TagKey', description='The tag key of the resource.', example='TestKey'),
tagValue?: string(name='TagValue', description='The tag value of the resource.', example='TestValue'),
}
](name='TagResources', description='Details about the resources and tags, including resource IDs, resource types, and tag key-value pairs.'),
}
model ListTagResourcesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListTagResourcesResponseBody(name='body'),
}
/**
* @summary Queries the tags that are added to one or more Elastic Block Storage (EBS) resources, or queries the IDs and tags of resources in a specified non-default resource group.
*
* @description Specify at least one of the following parameters or parameter pairs in a request to determine a query object:
* * `ResourceId.N`
* * `Tag.N` parameter pair (`Tag.N.Key` and `Tag.N.Value`)
* If you set `Tag.N` and `ResourceId.N` at the same time, the EBS resources that match both the parameters are returned.
*
* @param request ListTagResourcesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ListTagResourcesResponse
*/
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.nextToken)) {
query['NextToken'] = request.nextToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListTagResources',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Queries the tags that are added to one or more Elastic Block Storage (EBS) resources, or queries the IDs and tags of resources in a specified non-default resource group.
*
* @description Specify at least one of the following parameters or parameter pairs in a request to determine a query object:
* * `ResourceId.N`
* * `Tag.N` parameter pair (`Tag.N.Key` and `Tag.N.Value`)
* If you set `Tag.N` and `ResourceId.N` at the same time, the EBS resources that match both the parameters are returned.
*
* @param request ListTagResourcesRequest
* @return ListTagResourcesResponse
*/
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
var runtime = new Util.RuntimeOptions{};
return listTagResourcesWithOptions(request, runtime);
}
model ModifyDedicatedBlockStorageClusterAttributeRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests.
The ClientToken value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How do I ensure idempotence ](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
dbscId?: string(name='DbscId', description='The ID of the dedicated block storage cluster.
This parameter is required.', example='dbsc-cn-od43bf****'),
dbscName?: string(name='DbscName', description='The new name of the dedicated block storage cluster.
This parameter is required.', example='my-test-dbsc'),
description?: string(name='Description', description='The new description of dedicated block storage cluster.', example='test'),
regionId?: string(name='RegionId', description='The region ID of the dedicated block storage cluster. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-heyuan'),
}
model ModifyDedicatedBlockStorageClusterAttributeResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='11B55F58-D3A4-4A9B-9596-342420D0****'),
}
model ModifyDedicatedBlockStorageClusterAttributeResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyDedicatedBlockStorageClusterAttributeResponseBody(name='body'),
}
/**
* @summary 修改专属集群属性OpenApi
*
* @description You can call this operation to modify the information of a dedicated block storage cluster. The information includes the name and description of the cluster.
*
* @param request ModifyDedicatedBlockStorageClusterAttributeRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyDedicatedBlockStorageClusterAttributeResponse
*/
async function modifyDedicatedBlockStorageClusterAttributeWithOptions(request: ModifyDedicatedBlockStorageClusterAttributeRequest, runtime: Util.RuntimeOptions): ModifyDedicatedBlockStorageClusterAttributeResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.dbscId)) {
query['DbscId'] = request.dbscId;
}
if (!Util.isUnset(request.dbscName)) {
query['DbscName'] = request.dbscName;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyDedicatedBlockStorageClusterAttribute',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 修改专属集群属性OpenApi
*
* @description You can call this operation to modify the information of a dedicated block storage cluster. The information includes the name and description of the cluster.
*
* @param request ModifyDedicatedBlockStorageClusterAttributeRequest
* @return ModifyDedicatedBlockStorageClusterAttributeResponse
*/
async function modifyDedicatedBlockStorageClusterAttribute(request: ModifyDedicatedBlockStorageClusterAttributeRequest): ModifyDedicatedBlockStorageClusterAttributeResponse {
var runtime = new Util.RuntimeOptions{};
return modifyDedicatedBlockStorageClusterAttributeWithOptions(request, runtime);
}
model ModifyDiskReplicaGroupRequest {
bandwidth?: long(name='Bandwidth', description='The bandwidth value. Unit: Kbit/s.
> This parameter is not publicly available.', example='-'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
description?: string(name='Description', description='The description of the replication pair-consistent group. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`.', example='This is description.'),
groupName?: string(name='GroupName', description='The name of the replication pair-consistent group. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with `http://` or `https://`. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).', example='myreplicagrouptest'),
RPO?: long(name='RPO', description='The RPO of the replication pair-consistent group. Unit: seconds. Valid value: 900.', example='900'),
regionId?: string(name='RegionId', description='The region ID of the replication pair-consistent group.
This parameter is required.', example='cn-beijing'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the IDs of replication pair-consistent groups.
This parameter is required.', example='pg-myreplica****'),
}
model ModifyDiskReplicaGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model ModifyDiskReplicaGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyDiskReplicaGroupResponseBody(name='body'),
}
/**
* @summary Modifies the name, description, or recovery point objective (RPO) of a replication pair-consistent group.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group must be in the **Created** (`created`) or **Stopped** (`stopped`) state.
*
* @param request ModifyDiskReplicaGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyDiskReplicaGroupResponse
*/
async function modifyDiskReplicaGroupWithOptions(request: ModifyDiskReplicaGroupRequest, runtime: Util.RuntimeOptions): ModifyDiskReplicaGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bandwidth)) {
query['Bandwidth'] = request.bandwidth;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.groupName)) {
query['GroupName'] = request.groupName;
}
if (!Util.isUnset(request.RPO)) {
query['RPO'] = request.RPO;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyDiskReplicaGroup',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Modifies the name, description, or recovery point objective (RPO) of a replication pair-consistent group.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group must be in the **Created** (`created`) or **Stopped** (`stopped`) state.
*
* @param request ModifyDiskReplicaGroupRequest
* @return ModifyDiskReplicaGroupResponse
*/
async function modifyDiskReplicaGroup(request: ModifyDiskReplicaGroupRequest): ModifyDiskReplicaGroupResponse {
var runtime = new Util.RuntimeOptions{};
return modifyDiskReplicaGroupWithOptions(request, runtime);
}
model ModifyDiskReplicaPairRequest {
bandwidth?: long(name='Bandwidth', description='The bandwidth value. Unit: Kbit/s.
> This parameter is not publicly available.', example='10240'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
description?: string(name='Description', description='The description of the replication pair.', example='This is description.'),
pairName?: string(name='PairName', description='The name of the replication pair.', example='TestReplicaPair'),
RPO?: long(name='RPO', description='The recovery point objective (RPO) of the replication pair-consistent group. Unit: seconds. Valid value: 900.', example='900'),
regionId?: string(name='RegionId', description='The region ID of the primary or secondary disk in the replication pair. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which async replication is supported.
This parameter is required.', example='cn-beijing'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.
This parameter is required.', example='pair-cn-dsa****'),
}
model ModifyDiskReplicaPairResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model ModifyDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Modifies a replication pair.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Only replication pairs that are in the **Created** (`created`) or **Stopped** (`stopped`) state can have their names or descriptions modified.
*
* @param request ModifyDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyDiskReplicaPairResponse
*/
async function modifyDiskReplicaPairWithOptions(request: ModifyDiskReplicaPairRequest, runtime: Util.RuntimeOptions): ModifyDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bandwidth)) {
query['Bandwidth'] = request.bandwidth;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.pairName)) {
query['PairName'] = request.pairName;
}
if (!Util.isUnset(request.RPO)) {
query['RPO'] = request.RPO;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Modifies a replication pair.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Only replication pairs that are in the **Created** (`created`) or **Stopped** (`stopped`) state can have their names or descriptions modified.
*
* @param request ModifyDiskReplicaPairRequest
* @return ModifyDiskReplicaPairResponse
*/
async function modifyDiskReplicaPair(request: ModifyDiskReplicaPairRequest): ModifyDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return modifyDiskReplicaPairWithOptions(request, runtime);
}
model QueryDedicatedBlockStorageClusterDiskThroughputStatusRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The ClientToken value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
qosRequestId?: string(name='QosRequestId', description='The ID of the request of SetDedicatedBlockStorageClusterDiskThroughput api.
This parameter is required.', example='A37597B5-BB99-19B3-85EA-4C2B91F0****'),
regionId?: string(name='RegionId', description='The region ID of the dedicated block storage cluster.
This parameter is required.', example='cn-hangzhou'),
}
model QueryDedicatedBlockStorageClusterDiskThroughputStatusResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='A37597A6-BB99-19B3-85EA-4C2B91F0****'),
status?: string(name='Status', description='The status of the throughput after setting the throughput by SetDedicatedBlockStorageClusterDiskThroughput api.
- SUCCESS: The throughput has been successfully set.
- RUNNING: The throughput is currently being set.
- WAIT(): The throughput is waiting to be set.
- FAIL(): The throughput setting has failed.', example='RUNNING'),
}
model QueryDedicatedBlockStorageClusterDiskThroughputStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QueryDedicatedBlockStorageClusterDiskThroughputStatusResponseBody(name='body'),
}
/**
* @summary Query the throughput status of a dedicated block storage cluster disk which has been set through the SetDedicatedBlockStorageClusterDiskThroughput API.
*
* @param request QueryDedicatedBlockStorageClusterDiskThroughputStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return QueryDedicatedBlockStorageClusterDiskThroughputStatusResponse
*/
async function queryDedicatedBlockStorageClusterDiskThroughputStatusWithOptions(request: QueryDedicatedBlockStorageClusterDiskThroughputStatusRequest, runtime: Util.RuntimeOptions): QueryDedicatedBlockStorageClusterDiskThroughputStatusResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
var body : map[string]any = {};
if (!Util.isUnset(request.qosRequestId)) {
body['QosRequestId'] = request.qosRequestId;
}
if (!Util.isUnset(request.regionId)) {
body['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'QueryDedicatedBlockStorageClusterDiskThroughputStatus',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Query the throughput status of a dedicated block storage cluster disk which has been set through the SetDedicatedBlockStorageClusterDiskThroughput API.
*
* @param request QueryDedicatedBlockStorageClusterDiskThroughputStatusRequest
* @return QueryDedicatedBlockStorageClusterDiskThroughputStatusResponse
*/
async function queryDedicatedBlockStorageClusterDiskThroughputStatus(request: QueryDedicatedBlockStorageClusterDiskThroughputStatusRequest): QueryDedicatedBlockStorageClusterDiskThroughputStatusResponse {
var runtime = new Util.RuntimeOptions{};
return queryDedicatedBlockStorageClusterDiskThroughputStatusWithOptions(request, runtime);
}
model QueryDedicatedBlockStorageClusterInventoryDataRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests.
The ClientToken value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How do I ensure idempotence ](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
dbscId?: string(name='DbscId', description='The ID of the dedicated block storage cluster.
This parameter is required.', example='dbsc-xxx'),
endTime?: long(name='EndTime', description='End timestamp of trend data.
This parameter is required.', example='1606403800'),
period?: int32(name='Period', description='The time interval (seconds) between data retrieval points.
This parameter is required.', example='60'),
regionId?: string(name='RegionId', description='The region ID of the dedicated block storage cluster.
This parameter is required.', example='cn-shenzhen'),
startTime?: long(name='StartTime', description='Start timestamp of trend data.
This parameter is required.', example='1606303800'),
}
model QueryDedicatedBlockStorageClusterInventoryDataResponseBody = {
data?: [
{
monitorItems?: {
availableSize?: long(name='AvailableSize', description='Available capacity size of the dedicated block storage cluster.', example='61360'),
totalSize?: long(name='TotalSize', description='Total capacity size of the dedicated block storage cluster.', example='61440'),
}(name='MonitorItems', description='The returned metrics.'),
resourceId?: string(name='ResourceId', description='The ID list of the resource.', example='dbsc-xxx'),
timestamp?: string(name='Timestamp', description='The timestamp when the data is collected.', example='1606403800'),
}
](name='Data', description='The returned data.'),
dbscId?: string(name='DbscId', description='The ID of the dedicated block storage cluster.', example='dbsc-xxx'),
dbscName?: string(name='DbscName', description='The name of the dedicated block storage cluster.', example='myDBSCCluster'),
diskCategory?: string(name='DiskCategory', description='The type of the disk. Valid values:
* cloud_essd: enhanced SSD (ESSD).', example='cloud_essd'),
requestId?: string(name='RequestId', description='The ID of the request.', example='F1A4258A-0C8C-5329-B495-BC5AD7AD****'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='60'),
}
model QueryDedicatedBlockStorageClusterInventoryDataResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: QueryDedicatedBlockStorageClusterInventoryDataResponseBody(name='body'),
}
/**
* @summary Query dedicated block storage cluster capacity trend data, includ available capacity size and total capacity size.
*
* @description Period is the time interval between data retrieval points. When set to 60 (minute interval), a maximum of 1440 data points can be returned; when set to 3600 (hour interval), a maximum of 744 data points can be returned; and when set to 86400 (day interval), a maximum of 366 data points can be returned.
*
* @param request QueryDedicatedBlockStorageClusterInventoryDataRequest
* @param runtime runtime options for this request RuntimeOptions
* @return QueryDedicatedBlockStorageClusterInventoryDataResponse
*/
async function queryDedicatedBlockStorageClusterInventoryDataWithOptions(request: QueryDedicatedBlockStorageClusterInventoryDataRequest, runtime: Util.RuntimeOptions): QueryDedicatedBlockStorageClusterInventoryDataResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
var body : map[string]any = {};
if (!Util.isUnset(request.dbscId)) {
body['DbscId'] = request.dbscId;
}
if (!Util.isUnset(request.endTime)) {
body['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.period)) {
body['Period'] = request.period;
}
if (!Util.isUnset(request.regionId)) {
body['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.startTime)) {
body['StartTime'] = request.startTime;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'QueryDedicatedBlockStorageClusterInventoryData',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Query dedicated block storage cluster capacity trend data, includ available capacity size and total capacity size.
*
* @description Period is the time interval between data retrieval points. When set to 60 (minute interval), a maximum of 1440 data points can be returned; when set to 3600 (hour interval), a maximum of 744 data points can be returned; and when set to 86400 (day interval), a maximum of 366 data points can be returned.
*
* @param request QueryDedicatedBlockStorageClusterInventoryDataRequest
* @return QueryDedicatedBlockStorageClusterInventoryDataResponse
*/
async function queryDedicatedBlockStorageClusterInventoryData(request: QueryDedicatedBlockStorageClusterInventoryDataRequest): QueryDedicatedBlockStorageClusterInventoryDataResponse {
var runtime = new Util.RuntimeOptions{};
return queryDedicatedBlockStorageClusterInventoryDataWithOptions(request, runtime);
}
model RemoveDiskReplicaPairRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the replication pair-consistent group.
This parameter is required.', example='cn-beijing'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group.
You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the IDs of replication pair-consistent groups.
This parameter is required.', example='pg-myreplica****'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.
This parameter is required.', example='pair-cn-dsa****'),
}
model RemoveDiskReplicaPairResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model RemoveDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: RemoveDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Removes a replication pair from a replication pair-consistent group. After a replication pair is removed from a replication pair-consistent group, the pair is disassociated from the group but is not deleted.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group from which you want to remove a replication pair must be in the **Created** (`created`), **Stopped** (`stopped`), or **Invalid** (`invalid`) state.
*
* @param request RemoveDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return RemoveDiskReplicaPairResponse
*/
async function removeDiskReplicaPairWithOptions(request: RemoveDiskReplicaPairRequest, runtime: Util.RuntimeOptions): RemoveDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'RemoveDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Removes a replication pair from a replication pair-consistent group. After a replication pair is removed from a replication pair-consistent group, the pair is disassociated from the group but is not deleted.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group from which you want to remove a replication pair must be in the **Created** (`created`), **Stopped** (`stopped`), or **Invalid** (`invalid`) state.
*
* @param request RemoveDiskReplicaPairRequest
* @return RemoveDiskReplicaPairResponse
*/
async function removeDiskReplicaPair(request: RemoveDiskReplicaPairRequest): RemoveDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return removeDiskReplicaPairWithOptions(request, runtime);
}
model ReprotectDiskReplicaGroupRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The ID of the replication pair-consistent group. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the IDs of replication pair-consistent groups.
This parameter is required.', example='cn-shanghai'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the IDs of replication pair-consistent groups.
This parameter is required.', example='pg-myreplica****'),
reverseReplicate?: boolean(name='ReverseReplicate', description='Specifies whether to enable the reverse replication sub-feature. Valid values: true and false. Default value: true.', example='true'),
}
model ReprotectDiskReplicaGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model ReprotectDiskReplicaGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ReprotectDiskReplicaGroupResponseBody(name='body'),
}
/**
* @summary Enables the reverse replication feature for replication pairs that belong to a replication pair-consistent group. After reverse replication is enabled, data stored on the original secondary disks is replicated to the original primary disks. When a reverse replication is being performed, the primary and secondary sites of the replication pair-consistent group remain unchanged, but data is replicated from the secondary site to the primary site.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group for which you want to enable reverse replication must be in the **Failovered** (`failovered`) state. You can call the `FailoverDiskReplicaPair` operation to enable failover.
* * Before a reverse replication is performed, the primary disks must be detached from its associated Elastic Compute Service (ECS) instance and must be in the Unattached state. You can call the [DetachDisk](https://help.aliyun.com/document_detail/25516.html) operation to detach the disks.
* * After you enable reverse replication, you must call the `StartDiskReplicaPair` operation again to enable the async replication feature before data can be replicated from the original secondary disks to the original primary disks.
* * You can set the ReverseReplicate parameter to false to cancel the **Failovered** (`failovered`) state and restore the original replication direction.
*
* @param request ReprotectDiskReplicaGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ReprotectDiskReplicaGroupResponse
*/
async function reprotectDiskReplicaGroupWithOptions(request: ReprotectDiskReplicaGroupRequest, runtime: Util.RuntimeOptions): ReprotectDiskReplicaGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
if (!Util.isUnset(request.reverseReplicate)) {
query['ReverseReplicate'] = request.reverseReplicate;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ReprotectDiskReplicaGroup',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Enables the reverse replication feature for replication pairs that belong to a replication pair-consistent group. After reverse replication is enabled, data stored on the original secondary disks is replicated to the original primary disks. When a reverse replication is being performed, the primary and secondary sites of the replication pair-consistent group remain unchanged, but data is replicated from the secondary site to the primary site.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group for which you want to enable reverse replication must be in the **Failovered** (`failovered`) state. You can call the `FailoverDiskReplicaPair` operation to enable failover.
* * Before a reverse replication is performed, the primary disks must be detached from its associated Elastic Compute Service (ECS) instance and must be in the Unattached state. You can call the [DetachDisk](https://help.aliyun.com/document_detail/25516.html) operation to detach the disks.
* * After you enable reverse replication, you must call the `StartDiskReplicaPair` operation again to enable the async replication feature before data can be replicated from the original secondary disks to the original primary disks.
* * You can set the ReverseReplicate parameter to false to cancel the **Failovered** (`failovered`) state and restore the original replication direction.
*
* @param request ReprotectDiskReplicaGroupRequest
* @return ReprotectDiskReplicaGroupResponse
*/
async function reprotectDiskReplicaGroup(request: ReprotectDiskReplicaGroupRequest): ReprotectDiskReplicaGroupResponse {
var runtime = new Util.RuntimeOptions{};
return reprotectDiskReplicaGroupWithOptions(request, runtime);
}
model ReprotectDiskReplicaPairRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the secondary disk in the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query region IDs of secondary disks in replication pairs.
> The reverse replication feature must be enabled from the region where the secondary disk is located.
This parameter is required.', example='cn-shanghai'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.
This parameter is required.', example='pair-cn-dsa****'),
reverseReplicate?: boolean(name='ReverseReplicate', description='Specifies whether to enable the reverse replication sub-feature. Valid values: true and false. Default value: true.', example='true'),
}
model ReprotectDiskReplicaPairResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model ReprotectDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ReprotectDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Enables the reverse replication feature for a replication pair.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair for which you want to enable reverse replication must be in the **Failovered** (`failovered`) state. You can call the [FailoverDiskReplicaPair](https://help.aliyun.com/document_detail/354358.html) operation to enable failover.
* * The primary disk must be detached from its associated Elastic Compute Service (ECS) instance and is in the Unattached state. You can call the [DetachDisk](https://help.aliyun.com/document_detail/25516.html) operation to detach the disk.
* * After you enable reverse replication, you must call the [StartDiskReplicaPair](https://help.aliyun.com/document_detail/354205.html) operation again to activate the replication pair before data can be replicated from the original secondary disk to the original primary disk.
* * You can set the ReverseReplicate parameter to false to cancel the **Failovered** (`failovered`) state and restore the original replication direction.
*
* @param request ReprotectDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ReprotectDiskReplicaPairResponse
*/
async function reprotectDiskReplicaPairWithOptions(request: ReprotectDiskReplicaPairRequest, runtime: Util.RuntimeOptions): ReprotectDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
if (!Util.isUnset(request.reverseReplicate)) {
query['ReverseReplicate'] = request.reverseReplicate;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ReprotectDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Enables the reverse replication feature for a replication pair.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair for which you want to enable reverse replication must be in the **Failovered** (`failovered`) state. You can call the [FailoverDiskReplicaPair](https://help.aliyun.com/document_detail/354358.html) operation to enable failover.
* * The primary disk must be detached from its associated Elastic Compute Service (ECS) instance and is in the Unattached state. You can call the [DetachDisk](https://help.aliyun.com/document_detail/25516.html) operation to detach the disk.
* * After you enable reverse replication, you must call the [StartDiskReplicaPair](https://help.aliyun.com/document_detail/354205.html) operation again to activate the replication pair before data can be replicated from the original secondary disk to the original primary disk.
* * You can set the ReverseReplicate parameter to false to cancel the **Failovered** (`failovered`) state and restore the original replication direction.
*
* @param request ReprotectDiskReplicaPairRequest
* @return ReprotectDiskReplicaPairResponse
*/
async function reprotectDiskReplicaPair(request: ReprotectDiskReplicaPairRequest): ReprotectDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return reprotectDiskReplicaPairWithOptions(request, runtime);
}
model SetDedicatedBlockStorageClusterDiskThroughputRequest {
bps?: int32(name='Bps', description='Target throughput.
This parameter is required.', example='100'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The ClientToken value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
diskId?: string(name='DiskId', description='The ID of the disk.
This parameter is required.', example='d-bp67acfmxazb4p****'),
regionId?: string(name='RegionId', description='The region ID of disk.
This parameter is required.', example='cn-hangzhou'),
}
model SetDedicatedBlockStorageClusterDiskThroughputResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='17EE62D8-064E-5404-8B0D-72122478****'),
}
model SetDedicatedBlockStorageClusterDiskThroughputResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: SetDedicatedBlockStorageClusterDiskThroughputResponseBody(name='body'),
}
/**
* @summary In the elastic type dedicated block storage cluster, you can easily achieve the specified throughput (Bps) for the target disk. You only need to set the cloud disk ID and the target throughput, simplifying the process of configuring.
*
* @param request SetDedicatedBlockStorageClusterDiskThroughputRequest
* @param runtime runtime options for this request RuntimeOptions
* @return SetDedicatedBlockStorageClusterDiskThroughputResponse
*/
async function setDedicatedBlockStorageClusterDiskThroughputWithOptions(request: SetDedicatedBlockStorageClusterDiskThroughputRequest, runtime: Util.RuntimeOptions): SetDedicatedBlockStorageClusterDiskThroughputResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
var body : map[string]any = {};
if (!Util.isUnset(request.bps)) {
body['Bps'] = request.bps;
}
if (!Util.isUnset(request.diskId)) {
body['DiskId'] = request.diskId;
}
if (!Util.isUnset(request.regionId)) {
body['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'SetDedicatedBlockStorageClusterDiskThroughput',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary In the elastic type dedicated block storage cluster, you can easily achieve the specified throughput (Bps) for the target disk. You only need to set the cloud disk ID and the target throughput, simplifying the process of configuring.
*
* @param request SetDedicatedBlockStorageClusterDiskThroughputRequest
* @return SetDedicatedBlockStorageClusterDiskThroughputResponse
*/
async function setDedicatedBlockStorageClusterDiskThroughput(request: SetDedicatedBlockStorageClusterDiskThroughputRequest): SetDedicatedBlockStorageClusterDiskThroughputResponse {
var runtime = new Util.RuntimeOptions{};
return setDedicatedBlockStorageClusterDiskThroughputWithOptions(request, runtime);
}
model StartDiskReplicaGroupRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The ClientToken value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
oneShot?: boolean(name='OneShot', description='Specifies whether to immediately synchronize data once. Valid values:
* true: immediately synchronizes data once.
* false: synchronizes data based on the RPO of the replication pair-consistent group.
Default value: false.', example='false'),
regionId?: string(name='RegionId', description='The ID of the replication pair-consistent group.
This parameter is required.', example='cn-beijing'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the IDs of replication pair-consistent groups.
This parameter is required.', example='pg-myreplica****'),
}
model StartDiskReplicaGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model StartDiskReplicaGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StartDiskReplicaGroupResponseBody(name='body'),
}
/**
* @summary Enables the async replication feature for replication pairs that belong to a replication pair-consistent group. When the async replication feature is enabled for the pairs for the first time, the system first performs a full synchronization to synchronize all data from disks at the primary site (primary disks) to disks at the secondary site (secondary disks) and then periodically synchronizes incremental data based on the recovery point objective (RPO) of the replication pair-consistent group.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * If you set the `OneShot` to `false`, the replication pair-consistent group must be in the **Created** (`created` ), **Synchronizing** (`syncing` ), **Normal** (`normal` ), or **Stopped** (`stopped`) state.
* * If you set `OneShot` to `true`, the replication pair-consistent group must be in the **Created** (`created` ), **One-time Syncing** (`manual_syncing` ), or **Stopped** (`stopped`) state. The time interval between two consecutive one-time synchronizations must be longer than one half of the recovery point objective (RPO).
* * After a replication pair-consistent group is activated, the group enters the **Initial Syncing** (`initial_syncing`) state and the system performs the first async replication to replicate all data from the primary disks to secondary disks.
*
* @param request StartDiskReplicaGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StartDiskReplicaGroupResponse
*/
async function startDiskReplicaGroupWithOptions(request: StartDiskReplicaGroupRequest, runtime: Util.RuntimeOptions): StartDiskReplicaGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.oneShot)) {
query['OneShot'] = request.oneShot;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StartDiskReplicaGroup',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Enables the async replication feature for replication pairs that belong to a replication pair-consistent group. When the async replication feature is enabled for the pairs for the first time, the system first performs a full synchronization to synchronize all data from disks at the primary site (primary disks) to disks at the secondary site (secondary disks) and then periodically synchronizes incremental data based on the recovery point objective (RPO) of the replication pair-consistent group.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * If you set the `OneShot` to `false`, the replication pair-consistent group must be in the **Created** (`created` ), **Synchronizing** (`syncing` ), **Normal** (`normal` ), or **Stopped** (`stopped`) state.
* * If you set `OneShot` to `true`, the replication pair-consistent group must be in the **Created** (`created` ), **One-time Syncing** (`manual_syncing` ), or **Stopped** (`stopped`) state. The time interval between two consecutive one-time synchronizations must be longer than one half of the recovery point objective (RPO).
* * After a replication pair-consistent group is activated, the group enters the **Initial Syncing** (`initial_syncing`) state and the system performs the first async replication to replicate all data from the primary disks to secondary disks.
*
* @param request StartDiskReplicaGroupRequest
* @return StartDiskReplicaGroupResponse
*/
async function startDiskReplicaGroup(request: StartDiskReplicaGroupRequest): StartDiskReplicaGroupResponse {
var runtime = new Util.RuntimeOptions{};
return startDiskReplicaGroupWithOptions(request, runtime);
}
model StartDiskReplicaPairRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
oneShot?: boolean(name='OneShot', description='Specifies whether to immediately synchronize data. Valid values:
* true: immediately synchronizes data.
* false: synchronizes data based on the recovery point objective (RPO).
Default value: false.', example='false'),
regionId?: string(name='RegionId', description='The region ID of the primary or secondary disk in the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query the region information of replication pairs.
This parameter is required.', example='cn-beijing'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.
This parameter is required.', example='pair-cn-dsa****'),
}
model StartDiskReplicaPairResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='A37597A6-BB99-19B3-85EA-4C2B91F0****'),
}
model StartDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StartDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Activates a replication pair.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Only replication pairs that are in the **Created** (`created`) or **Stopped** (`stopped`) state can be activated.
* * After a replication pair is activated, it enters the **Initial Syncing** (`initial_syncing`) state and the system performs the first asynchronous replication to replicate all data from the primary disk to the secondary disk.
*
* @param request StartDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StartDiskReplicaPairResponse
*/
async function startDiskReplicaPairWithOptions(request: StartDiskReplicaPairRequest, runtime: Util.RuntimeOptions): StartDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.oneShot)) {
query['OneShot'] = request.oneShot;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StartDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Activates a replication pair.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Only replication pairs that are in the **Created** (`created`) or **Stopped** (`stopped`) state can be activated.
* * After a replication pair is activated, it enters the **Initial Syncing** (`initial_syncing`) state and the system performs the first asynchronous replication to replicate all data from the primary disk to the secondary disk.
*
* @param request StartDiskReplicaPairRequest
* @return StartDiskReplicaPairResponse
*/
async function startDiskReplicaPair(request: StartDiskReplicaPairRequest): StartDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return startDiskReplicaPairWithOptions(request, runtime);
}
model StartPairDrillRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
pairId?: string(name='PairId', description='The ID of the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query a list of replication pairs, including replication pair IDs.
This parameter is required.', example='pair-xxxx'),
regionId?: string(name='RegionId', description='The region ID of the secondary disk in the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query the region in which the secondary disk of the replication pair resides.
> You must enable the disaster recovery drill feature in the region in which the secondary site resides.
This parameter is required.', example='cn-hangzhou'),
}
model StartPairDrillResponseBody = {
drillId?: string(name='DrillId', description='The drill ID.', example='drill-xxx'),
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model StartPairDrillResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StartPairDrillResponseBody(name='body'),
}
/**
* @summary Starts a disaster recovery drill to ensure the continued replication and clone the data from the last recovery point of the secondary disk to a new disk. This helps you test the completeness and correctness of applications that are deployed on the disaster recovery site on a regular basis.
*
* @description After the disaster recovery drill is complete on the secondary disk, a pay-as-you-go drill disk that has the same capacity and category as the secondary disk is created in the zone where the secondary disk resides. The drill disk contains last-recovery-point data that can be used to test the completeness and correctness of applications.
*
* @param request StartPairDrillRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StartPairDrillResponse
*/
async function startPairDrillWithOptions(request: StartPairDrillRequest, runtime: Util.RuntimeOptions): StartPairDrillResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.pairId)) {
query['PairId'] = request.pairId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StartPairDrill',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Starts a disaster recovery drill to ensure the continued replication and clone the data from the last recovery point of the secondary disk to a new disk. This helps you test the completeness and correctness of applications that are deployed on the disaster recovery site on a regular basis.
*
* @description After the disaster recovery drill is complete on the secondary disk, a pay-as-you-go drill disk that has the same capacity and category as the secondary disk is created in the zone where the secondary disk resides. The drill disk contains last-recovery-point data that can be used to test the completeness and correctness of applications.
*
* @param request StartPairDrillRequest
* @return StartPairDrillResponse
*/
async function startPairDrill(request: StartPairDrillRequest): StartPairDrillResponse {
var runtime = new Util.RuntimeOptions{};
return startPairDrillWithOptions(request, runtime);
}
model StartReplicaGroupDrillRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
groupId?: string(name='GroupId', description='The ID of the replication pair-consistent group ID. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation the most recent list of async replication pair-consistent groups, including group IDs.
This parameter is required.', example='pg-xxxx'),
regionId?: string(name='RegionId', description='The ID of the region where the secondary site in the replication pair-consistent group is located. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the region where the secondary site in the replication pair-consistent group is located.
> You must enable the disaster recovery drill feature in the region in which the secondary site resides.
This parameter is required.', example='cn-hangzhou'),
}
model StartReplicaGroupDrillResponseBody = {
drillId?: string(name='DrillId', description='The drill ID.', example='pg-drill-xxxx'),
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model StartReplicaGroupDrillResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StartReplicaGroupDrillResponseBody(name='body'),
}
/**
* @summary Starts a disaster recovery drill in a replication pair-consistent group to ensure the continued replication and restores data from the latest recovery point of secondary disks to new disks. This helps test the completeness and correctness of applications that are deployed on the disaster recovery site on a regular basis.
*
* @description After the disaster recovery drill is complete on secondary disks, a pay-as-you-go drill disk is created in the zone where the secondary disk of each replication pair resides. The latest-recovery-point data is restored to the drill disks to test the completeness and correctness of applications.
*
* @param request StartReplicaGroupDrillRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StartReplicaGroupDrillResponse
*/
async function startReplicaGroupDrillWithOptions(request: StartReplicaGroupDrillRequest, runtime: Util.RuntimeOptions): StartReplicaGroupDrillResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.groupId)) {
query['GroupId'] = request.groupId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StartReplicaGroupDrill',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Starts a disaster recovery drill in a replication pair-consistent group to ensure the continued replication and restores data from the latest recovery point of secondary disks to new disks. This helps test the completeness and correctness of applications that are deployed on the disaster recovery site on a regular basis.
*
* @description After the disaster recovery drill is complete on secondary disks, a pay-as-you-go drill disk is created in the zone where the secondary disk of each replication pair resides. The latest-recovery-point data is restored to the drill disks to test the completeness and correctness of applications.
*
* @param request StartReplicaGroupDrillRequest
* @return StartReplicaGroupDrillResponse
*/
async function startReplicaGroupDrill(request: StartReplicaGroupDrillRequest): StartReplicaGroupDrillResponse {
var runtime = new Util.RuntimeOptions{};
return startReplicaGroupDrillWithOptions(request, runtime);
}
model StopDiskReplicaGroupRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the replication pair-consistent group.
This parameter is required.', example='cn-beijing'),
replicaGroupId?: string(name='ReplicaGroupId', description='The ID of the replication pair-consistent group. You can call the [DescribeDiskReplicaGroups](https://help.aliyun.com/document_detail/426614.html) operation to query the IDs of replication pair-consistent groups.
This parameter is required.', example='pg-myreplica****'),
}
model StopDiskReplicaGroupResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='C123F94F-4E38-19AE-942A-A8D6F44F****'),
}
model StopDiskReplicaGroupResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StopDiskReplicaGroupResponseBody(name='body'),
}
/**
* @summary Stops a replication pair-consistent group. This operation stops all replication pairs in the replication pair-consistent group.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group that you want to stop must be in the **One-time Syncing** (`manual_syncing`), **Syncing** (`syncing`), **Normal** (`normal`), **Stopping** (`stopping`), **Stop Failed** (`stop_failed`), or **Stopped** (`stopped`) state.
* * When a replication pair-consistent group is stopped, it enters the **Stopped** (`stopped`) state. If a replication pair-consistent group cannot be stopped, the state of the group remains unchanged or changes to **Stop Failed** (`stop_failed`). In this case, try again later.
*
* @param request StopDiskReplicaGroupRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StopDiskReplicaGroupResponse
*/
async function stopDiskReplicaGroupWithOptions(request: StopDiskReplicaGroupRequest, runtime: Util.RuntimeOptions): StopDiskReplicaGroupResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaGroupId)) {
query['ReplicaGroupId'] = request.replicaGroupId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StopDiskReplicaGroup',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Stops a replication pair-consistent group. This operation stops all replication pairs in the replication pair-consistent group.
*
* @description ## [](#)Usage notes
* * For information about the regions in which the replication pair-consistent group feature is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * The replication pair-consistent group that you want to stop must be in the **One-time Syncing** (`manual_syncing`), **Syncing** (`syncing`), **Normal** (`normal`), **Stopping** (`stopping`), **Stop Failed** (`stop_failed`), or **Stopped** (`stopped`) state.
* * When a replication pair-consistent group is stopped, it enters the **Stopped** (`stopped`) state. If a replication pair-consistent group cannot be stopped, the state of the group remains unchanged or changes to **Stop Failed** (`stop_failed`). In this case, try again later.
*
* @param request StopDiskReplicaGroupRequest
* @return StopDiskReplicaGroupResponse
*/
async function stopDiskReplicaGroup(request: StopDiskReplicaGroupRequest): StopDiskReplicaGroupResponse {
var runtime = new Util.RuntimeOptions{};
return stopDiskReplicaGroupWithOptions(request, runtime);
}
model StopDiskReplicaPairRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
regionId?: string(name='RegionId', description='The region ID of the primary or secondary disk in the replication pair. You can call the [DescribeDiskReplicaPairs](https://help.aliyun.com/document_detail/354206.html) operation to query the region information of replication pairs.
This parameter is required.', example='cn-hangzhou'),
replicaPairId?: string(name='ReplicaPairId', description='The ID of the replication pair.
This parameter is required.', example='pair-cn-dsa****'),
}
model StopDiskReplicaPairResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='A37597A6-BB99-19B3-85EA-4C2B91F0****'),
}
model StopDiskReplicaPairResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StopDiskReplicaPairResponseBody(name='body'),
}
/**
* @summary Stops a replication pair.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Only replication pairs that are in the **Initial Syncing** (`initial_syncing`), **Syncing** (`syncing`), **One-time Syncing** (`manual_syncing`), or **Normal** (`normal`) state can be stopped. When a replication pair is stopped, it enters the Stopped (`stopped`) state. The secondary disk rolls back to the point in time when the last async replication was complete and drops all the data that is being replicated from the primary disk.
*
* @param request StopDiskReplicaPairRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StopDiskReplicaPairResponse
*/
async function stopDiskReplicaPairWithOptions(request: StopDiskReplicaPairRequest, runtime: Util.RuntimeOptions): StopDiskReplicaPairResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.replicaPairId)) {
query['ReplicaPairId'] = request.replicaPairId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StopDiskReplicaPair',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Stops a replication pair.
*
* @description ## [](#)Usage notes
* * For information about the regions in which async replication is available, see [Overview](https://help.aliyun.com/document_detail/314563.html).
* * Only replication pairs that are in the **Initial Syncing** (`initial_syncing`), **Syncing** (`syncing`), **One-time Syncing** (`manual_syncing`), or **Normal** (`normal`) state can be stopped. When a replication pair is stopped, it enters the Stopped (`stopped`) state. The secondary disk rolls back to the point in time when the last async replication was complete and drops all the data that is being replicated from the primary disk.
*
* @param request StopDiskReplicaPairRequest
* @return StopDiskReplicaPairResponse
*/
async function stopDiskReplicaPair(request: StopDiskReplicaPairRequest): StopDiskReplicaPairResponse {
var runtime = new Util.RuntimeOptions{};
return stopDiskReplicaPairWithOptions(request, runtime);
}
model TagResourcesRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The **ClientToken** value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='0c593ea1-3bea-11e9-b96b-88e9fe63****'),
regionId?: string(name='RegionId', description='The region ID of the resource. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-hangzhou'),
resourceId?: [ string ](name='ResourceId', description='The ID list of the resources. You can specify up to 50 IDs in each request.
This parameter is required.', example='disk-123'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* dedicatedblockstoragecluster: dedicated block storage cluster
* diskreplicapair: replication pair
* diskreplicagroup: replication pair-consistent group
This parameter is required.', example='diskreplicagroup'),
tag?: [
{
key?: string(name='Key', description='The key of tag N to add to the resource. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain `http://` or `https://`. It cannot start with `acs:` or `aliyun`.
This parameter is required.', example='tag-key'),
value?: string(name='Value', description='The value of tag N to add to the resource. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with `acs:` or contain `http://` or `https://`.
This parameter is required.', example='tag-value'),
}
](name='Tag', description='The resource tags. You can specify up to 20 tags.
This parameter is required.'),
}
model TagResourcesResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request. The request ID is returned regardless of whether the call is successful.', example='473469C7-AA6F-4DC5-B3DB-A3DC0DE3****'),
}
model TagResourcesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: TagResourcesResponseBody(name='body'),
}
/**
* @summary Creates tags and adds the tags to Elastic Block Storage (EBS) resources.
*
* @description Before you add tags to a resource, Alibaba Cloud checks the number of existing tags of the resource. If the maximum number of tags is reached, an error message is returned. For more information, see the "Tag limits" section in [Limits](https://help.aliyun.com/document_detail/25412.html).
*
* @param request TagResourcesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return TagResourcesResponse
*/
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.tag)) {
query['Tag'] = request.tag;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'TagResources',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Creates tags and adds the tags to Elastic Block Storage (EBS) resources.
*
* @description Before you add tags to a resource, Alibaba Cloud checks the number of existing tags of the resource. If the maximum number of tags is reached, an error message is returned. For more information, see the "Tag limits" section in [Limits](https://help.aliyun.com/document_detail/25412.html).
*
* @param request TagResourcesRequest
* @return TagResourcesResponse
*/
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
var runtime = new Util.RuntimeOptions{};
return tagResourcesWithOptions(request, runtime);
}
model UnbindEnterpriseSnapshotPolicyRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
diskTargets?: [ string ](name='DiskTargets', description='The list of disks.'),
policyId?: string(name='PolicyId', description='The id of the policy.
This parameter is required.', example='esp-xxs'),
regionId?: string(name='RegionId', description='The region ID . You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which snapshot policy is supported.
This parameter is required.', example='cn-hangzhou'),
}
model UnbindEnterpriseSnapshotPolicyResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='061DE1AB-08BA-5ACD-A03A-440117C6939A'),
}
model UnbindEnterpriseSnapshotPolicyResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UnbindEnterpriseSnapshotPolicyResponseBody(name='body'),
}
/**
* @summary Unbind disks from a enterprise-level snapshot policy.
*
* @param request UnbindEnterpriseSnapshotPolicyRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UnbindEnterpriseSnapshotPolicyResponse
*/
async function unbindEnterpriseSnapshotPolicyWithOptions(request: UnbindEnterpriseSnapshotPolicyRequest, runtime: Util.RuntimeOptions): UnbindEnterpriseSnapshotPolicyResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.diskTargets)) {
query['DiskTargets'] = request.diskTargets;
}
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 = 'UnbindEnterpriseSnapshotPolicy',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Unbind disks from a enterprise-level snapshot policy.
*
* @param request UnbindEnterpriseSnapshotPolicyRequest
* @return UnbindEnterpriseSnapshotPolicyResponse
*/
async function unbindEnterpriseSnapshotPolicy(request: UnbindEnterpriseSnapshotPolicyRequest): UnbindEnterpriseSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return unbindEnterpriseSnapshotPolicyWithOptions(request, runtime);
}
model UntagResourcesRequest {
all?: boolean(name='All', description='Specifies whether to remove all tags from the resource. This parameter is valid only when the TagKey.N parameter is not specified. Valid values:
* true: removes all tags from the resource.
* false: does not remove all tags from the resource.
Default value: false.', example='false'),
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The **ClientToken** value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='0c593ea1-3bea-11e9-b96b-88e9fe63****'),
regionId?: string(name='RegionId', description='The region ID of the resource. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-hangzhou'),
resourceId?: [ string ](name='ResourceId', description='The ID list of the resource. You can specify up to 50 resource IDs in each call.
This parameter is required.', example='disk-123'),
resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:
* dedicatedblockstoragecluster: dedicated block storage cluster
* diskreplicapair: the replication pair.
* diskreplicagroup: replication pair-consistent group
This parameter is required.', example='diskreplicapair'),
tagKey?: [ string ](name='TagKey', description='The list of tag keys. You can specify up to 20 tag keys in the list.', example='disk-123'),
}
model UntagResourcesResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request. The request ID is returned regardless of whether the call is successful.', example='C46FF5A8-C5F0-4024-8262-B16B6392****'),
}
model UntagResourcesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UntagResourcesResponseBody(name='body'),
}
/**
* @summary Removes tags from specified Elastic Block Storage (EBS) resources.
*
* @description * You can remove up to 20 tags at a time.
* * After a tag is removed from an EBS resource, the tag is automatically deleted if the tag is not added to any instance.
*
* @param request UntagResourcesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UntagResourcesResponse
*/
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.all)) {
query['All'] = request.all;
}
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.tagKey)) {
query['TagKey'] = request.tagKey;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UntagResources',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Removes tags from specified Elastic Block Storage (EBS) resources.
*
* @description * You can remove up to 20 tags at a time.
* * After a tag is removed from an EBS resource, the tag is automatically deleted if the tag is not added to any instance.
*
* @param request UntagResourcesRequest
* @return UntagResourcesResponse
*/
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
var runtime = new Util.RuntimeOptions{};
return untagResourcesWithOptions(request, runtime);
}
model UpdateEnterpriseSnapshotPolicyRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
crossRegionCopyInfo?: {
enabled?: boolean(name='Enabled', description='Whether cross-region replication is enabled. The range of values:
- true
- false', example='false'),
regions?: [
{
regionId?: string(name='RegionId', description='The region ID. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which async replication is supported.', example='cn-hangzhou'),
retainDays?: int32(name='RetainDays', description='Number of days to retain the destination snapshot. The range of values is greater than 1.', example='7'),
}
](name='Regions', description='Destination region information.'),
}(name='CrossRegionCopyInfo', description='Snapshot replication destination information.'),
desc?: string(name='Desc', description='The description of the policy.', example='xxx'),
name?: string(name='Name', description='The name of the policy.', example='xxx'),
policyId?: string(name='PolicyId', description='The id of the policy.
This parameter is required.', example='esp-xxx'),
regionId?: string(name='RegionId', description='The region ID . You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which snapshot policy is supported.
This parameter is required.', example='cn-hangzhou'),
retainRule?: {
number?: int32(name='Number', description='Maximum number of retained snapshots.', example='10'),
timeInterval?: int32(name='TimeInterval', description='The time interval , valid value greater than 1.', example='14'),
timeUnit?: string(name='TimeUnit', description='The unit of time, valid values:
- DAYS
- WEEKS', example='DAYS'),
}(name='RetainRule', description='Snapshot retention rule.'),
schedule?: {
cronExpression?: string(name='CronExpression', description='The time when the policy will to be scheduled. Valid values: Set the parameter in a cron expression.
For example, you can use `0 0 4 1/1 * ?` to specify 04:00:00 (UTC+8) on the first day of each month.
This parameter is required.'),
}(name='Schedule', description='The rule for scheduling.'),
specialRetainRules?: {
enabled?: boolean(name='Enabled', description='Indicates whether the special retention is enabled.
* true: enable
* false: disable', example='false'),
rules?: [
{
specialPeriodUnit?: string(name='SpecialPeriodUnit', description='The periodic unit for specially retained snapshots. If configured to WEEKS, it provides special retention for the first snapshot of each week. The retention period is determined by TimeUnit and TimeInterval. The range of values are:
- WEEKS
- MONTHS
- YEARS"', example='WEEKS'),
timeInterval?: int32(name='TimeInterval', description='Retention Time Value. The range of values is greater than 1.', example='30'),
timeUnit?: string(name='TimeUnit', description='Retention time unit for special snapshots. The range of values:
- DAYS
- WEEKS', example='WEEKS'),
}
](name='Rules', description='The special retention rules.'),
}(name='SpecialRetainRules', description='The special snapshot retention rules.'),
state?: string(name='State', description='The status of the policy. Valid values:
* **ENABLED**: Enable snapshot policy execution.
* **DISABLED**: Disable snapshot policy execution.', example='ENABLED'),
storageRule?: {
enableImmediateAccess?: boolean(name='EnableImmediateAccess', description='Whether to enable the rapid availability of snapshots. The range of values:
- true
- false', example='false'),
}(name='StorageRule', description='Advanced snapshot features.'),
}
model UpdateEnterpriseSnapshotPolicyShrinkRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
crossRegionCopyInfoShrink?: string(name='CrossRegionCopyInfo', description='Snapshot replication destination information.'),
desc?: string(name='Desc', description='The description of the policy.', example='xxx'),
name?: string(name='Name', description='The name of the policy.', example='xxx'),
policyId?: string(name='PolicyId', description='The id of the policy.
This parameter is required.', example='esp-xxx'),
regionId?: string(name='RegionId', description='The region ID . You can call the [DescribeRegions](https://help.aliyun.com/document_detail/354276.html) operation to query the most recent list of regions in which snapshot policy is supported.
This parameter is required.', example='cn-hangzhou'),
retainRuleShrink?: string(name='RetainRule', description='Snapshot retention rule.'),
scheduleShrink?: string(name='Schedule', description='The rule for scheduling.'),
specialRetainRulesShrink?: string(name='SpecialRetainRules', description='The special snapshot retention rules.'),
state?: string(name='State', description='The status of the policy. Valid values:
* **ENABLED**: Enable snapshot policy execution.
* **DISABLED**: Disable snapshot policy execution.', example='ENABLED'),
storageRuleShrink?: string(name='StorageRule', description='Advanced snapshot features.'),
}
model UpdateEnterpriseSnapshotPolicyResponseBody = {
requestId?: string(name='RequestId', description='The request ID.', example='BA903E56-48CE-5B81-9611-ED7962EED3DF'),
}
model UpdateEnterpriseSnapshotPolicyResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UpdateEnterpriseSnapshotPolicyResponseBody(name='body'),
}
/**
* @summary Search for a enterprise-level snapshot policy.
*
* @param tmpReq UpdateEnterpriseSnapshotPolicyRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateEnterpriseSnapshotPolicyResponse
*/
async function updateEnterpriseSnapshotPolicyWithOptions(tmpReq: UpdateEnterpriseSnapshotPolicyRequest, runtime: Util.RuntimeOptions): UpdateEnterpriseSnapshotPolicyResponse {
Util.validateModel(tmpReq);
var request = new UpdateEnterpriseSnapshotPolicyShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.crossRegionCopyInfo)) {
request.crossRegionCopyInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.crossRegionCopyInfo, 'CrossRegionCopyInfo', 'json');
}
if (!Util.isUnset(tmpReq.retainRule)) {
request.retainRuleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.retainRule, 'RetainRule', 'json');
}
if (!Util.isUnset(tmpReq.schedule)) {
request.scheduleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.schedule, 'Schedule', 'json');
}
if (!Util.isUnset(tmpReq.specialRetainRules)) {
request.specialRetainRulesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.specialRetainRules, 'SpecialRetainRules', 'json');
}
if (!Util.isUnset(tmpReq.storageRule)) {
request.storageRuleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.storageRule, 'StorageRule', 'json');
}
var query = {};
if (!Util.isUnset(request.clientToken)) {
query['ClientToken'] = request.clientToken;
}
if (!Util.isUnset(request.crossRegionCopyInfoShrink)) {
query['CrossRegionCopyInfo'] = request.crossRegionCopyInfoShrink;
}
if (!Util.isUnset(request.desc)) {
query['Desc'] = request.desc;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.policyId)) {
query['PolicyId'] = request.policyId;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.retainRuleShrink)) {
query['RetainRule'] = request.retainRuleShrink;
}
if (!Util.isUnset(request.scheduleShrink)) {
query['Schedule'] = request.scheduleShrink;
}
if (!Util.isUnset(request.specialRetainRulesShrink)) {
query['SpecialRetainRules'] = request.specialRetainRulesShrink;
}
if (!Util.isUnset(request.state)) {
query['State'] = request.state;
}
if (!Util.isUnset(request.storageRuleShrink)) {
query['StorageRule'] = request.storageRuleShrink;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UpdateEnterpriseSnapshotPolicy',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary Search for a enterprise-level snapshot policy.
*
* @param request UpdateEnterpriseSnapshotPolicyRequest
* @return UpdateEnterpriseSnapshotPolicyResponse
*/
async function updateEnterpriseSnapshotPolicy(request: UpdateEnterpriseSnapshotPolicyRequest): UpdateEnterpriseSnapshotPolicyResponse {
var runtime = new Util.RuntimeOptions{};
return updateEnterpriseSnapshotPolicyWithOptions(request, runtime);
}
model UpdateSolutionInstanceAttributeRequest {
clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The **ClientToken** value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html).', example='123e4567-e89b-12d3-a456-42665544****'),
description?: string(name='Description', description='The description of the instance.', example='defaultDescription'),
name?: string(name='Name', description='The name of the instance.', example='defaultName'),
regionId?: string(name='RegionId', description='The ID of the region where the dedicated block storage cluster resides. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.
This parameter is required.', example='cn-beijing'),
solutionInstanceId?: string(name='SolutionInstanceId', description='The ID of the instance.
This parameter is required.', example='inst-***'),
}
model UpdateSolutionInstanceAttributeResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='20758A-585D-4A41-A9B2-28DA8F4F****'),
}
model UpdateSolutionInstanceAttributeResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UpdateSolutionInstanceAttributeResponseBody(name='body'),
}
/**
* @summary 更新解决方案实例属性
*
* @param request UpdateSolutionInstanceAttributeRequest
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateSolutionInstanceAttributeResponse
*/
async function updateSolutionInstanceAttributeWithOptions(request: UpdateSolutionInstanceAttributeRequest, runtime: Util.RuntimeOptions): UpdateSolutionInstanceAttributeResponse {
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.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.regionId)) {
query['RegionId'] = request.regionId;
}
if (!Util.isUnset(request.solutionInstanceId)) {
query['SolutionInstanceId'] = request.solutionInstanceId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'UpdateSolutionInstanceAttribute',
version = '2021-07-30',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
/**
* @summary 更新解决方案实例属性
*
* @param request UpdateSolutionInstanceAttributeRequest
* @return UpdateSolutionInstanceAttributeResponse
*/
async function updateSolutionInstanceAttribute(request: UpdateSolutionInstanceAttributeRequest): UpdateSolutionInstanceAttributeResponse {
var runtime = new Util.RuntimeOptions{};
return updateSolutionInstanceAttributeWithOptions(request, runtime);
}