All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeInstanceAutoRenewalAttribute

Last Updated:Mar 15, 2024

You can call this operation to query whether auto-renewal is enabled for an ApsaraDB for MongoDB instance.

Operation description

This operation is applicable to subscription instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dds:DescribeInstanceAutoRenewalAttributeREAD
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/*
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance.

cn-hangzhou
DBInstanceIdstringNo

The ID of the instance.

dds-bp567b****
DBInstanceTypestringNo

The category of the instance. Valid values:

  • replicate: the standalone or replica set instance
  • sharding: the sharded cluster instance

Default value: replicate.

replicate
PageSizelongNo

The number of entries to return on each page. Valid values: 30, 50, and 100.

Note Default value: 30.
30
PageNumberlongNo

The number of the page to return. The value must be a positive integer that does not exceed the maximum value of the Integer parameter. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object
ItemsNumbersinteger

The total number of entries returned.

2
PageRecordCountinteger

The number of entries that were returned on the current page.

2
RequestIdstring

The ID of the request.

FAB5CB3B-DB9D-473A-9DF1-F57B6B9CB949
PageNumberinteger

The page number of the returned page.

1
Itemsobject []

Details about returned entries.

DBInstanceTypestring

The category of the instance. Valid values:

  • replicate: the standalone or replica set instance
  • sharding: the sharded cluster instance
replicate
AutoRenewstring

Indicates whether auto-renewal is enabled for the instance. Valid values:

  • true: Auto-renewal is enabled for the instance.
  • false: Auto-renewal is disabled for the instance.
true
Durationstring

The auto-renewal period. Unit: months.

Note
  • This parameter is ruturned only when the returned value of the AutoRenew parameter is true.
  • You can call the ModifyInstanceAutoRenewalAttribute operation to modify the auto-renewal period.
  • 1
    DbInstanceIdstring

    The ID of the instance.

    dds-bp2568*****
    RegionIdstring

    The region ID of the instance.

    cn-hangzhou

    Examples

    Sample success responses

    JSONformat

    {
      "ItemsNumbers": 2,
      "PageRecordCount": 2,
      "RequestId": "FAB5CB3B-DB9D-473A-9DF1-F57B6B9CB949",
      "PageNumber": 1,
      "Items": {
        "Item": [
          {
            "DBInstanceType": "replicate",
            "AutoRenew": "true",
            "Duration": "1",
            "DbInstanceId": "dds-bp2568*****",
            "RegionId": "cn-hangzhou"
          }
        ]
      }
    }

    Error codes

    HTTP status codeError codeError messageDescription
    400InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error occurred. Please try again later.

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    No change history