Tüm Ürünler
Search
Belge Merkezi

:ModifyInstanceAutoRenewAttribute

Son Güncelleme:Oct 02, 2026

Bir veya daha fazla abonelik örneğinin otomatik yenileme özniteliklerini değiştirerek kaynakların süresinin dolmasıyla ilgili bakım maliyetlerini azaltmanıza yardımcı olur.

Operation description

Bu API'yi kullanmadan önce, Elastic Compute Service (ECS) faturalandırma yöntemlerini ve fiyatlandırma bilgilerini tam olarak anladığınızdan emin olun.

  • Hesap bakiyenizin veya kredi limitinizin yeterli olduğundan emin olun.

  • Yalnızca abonelik örnekleri desteklenir. Bu API'yi kullandıkça öde örnekleri için çağırırsanız bir hata döndürülür.

  • Otomatik yenileme tahsilat tarihi, örneğin süresinin dolmasından 9 gün öncesidir. Tahsilat işlemi 08:00:00 (UTC+8) saatinde başlar.

  • Önceki gün otomatik tahsilat işlemi başarısız olursa, tahsilat başarılı olana veya örneğin süresinin dolmasından 9 gün sonra kilitlenene kadar ertesi gün belirlenen saatte yeniden denenecektir.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:ModifyInstanceAutoRenewAttribute

update

*Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

Örnek kimliği. Tek seferde en fazla 100 abonelik örneği belirtebilirsiniz. Birden fazla örnek kimliğini virgül (,) ile ayırın.

i-bp67acfmxazb4ph****,i-bp67acfmxazb4pi****

RegionId

string

Yes

Örneğin bölge kimliği. Alibaba Cloud bölgelerinin en son listesini görüntülemek için DescribeRegions API'sini çağırabilirsiniz. DescribeRegions

cn-hangzhou

Duration

integer

No

Örneğin otomatik yenileme süresi.

  • PeriodUnit parametresi Year olarak ayarlandığında, Duration için geçerli değerler şunlardır: {"1", "2", "3", "4", "5"}

  • PeriodUnit parametresi Month olarak ayarlandığında, Duration için geçerli değerler şunlardır: {"1", "2", "3", "6", "12", "24", "36", "48", "60"}

1

AutoRenew

boolean

No

Örneğin süresi dolmadan önce otomatik olarak yenilenip yenilenmeyeceğini belirtir.

  • true: Otomatik yenilemeyi etkinleştirir.

  • false: Otomatik yenilemeyi devre dışı bırakır.

Varsayılan değer: false.

true

RenewalStatus

string

No

Örneğin otomatik yenileme durumu. Geçerli değerler:

  • AutoRenewal: Otomatik yenilemeyi etkinleştirir.

  • Normal: Otomatik yenilemeyi devre dışı bırakır.

  • NotRenewal: Örneği yenilemez. Bu değer ayarlandıktan sonra sistem artık süresi dolma hatırlatmaları göndermez ve yalnızca örneğin süresinin dolmasından üç gün önce yenilememe hatırlatması gönderir. Yenilenmemesi için ayarlanan ECS örnekleri, yenileme bekliyor durumuna (Normal) değiştirilebilir ve ardından manuel olarak yenilenebilir veya otomatik yenilemeye ayarlanabilir.

Not

RenewalStatus parametresi, AutoRenew parametresine göre önceliklidir. RenewalStatus parametresi belirtilmezse, varsayılan olarak AutoRenew parametresi geçerli olur.

AutoRenewal

PeriodUnit

string

No

Yenileme süresinin birimi, yani Duration parametresinin birimi. Geçerli değerler:

  • Month (varsayılan)

  • Year

Month

Response elements

Element

Type

Description

Example

object

RequestId

string

İstek kimliği.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Success response

JSON format

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status code

Error code

Error message

Description

400 OperationDenied.StarterPackage Instance created with a Starter Package plan can not set auto renew.
500 InternalError The request processing has failed due to some unknown error.
403 MissingParameter.InstanceId InstanceId should not be null. The InstanceId parameter is required.
403 InvalidParameter.ToManyInstanceIds InstanceId should be less than 100.
403 InvalidParameter.InvalidInstanceId %s The specified InstanceId parameter is invalid.
403 IncorrectInstanceStatus The current status of the resource does not support this operation.
403 ChargeTypeViolation Pay-As-You-Go instances do not support this operation. The operation is not supported by pay-as-you-go instances. Check the billing method of the instance.
403 InvalidParameter.Duration %s The specified Duration parameter is invalid.
403 InvalidParameter.RenewalStatus %s The specified RenewalStatus parameter is invalid.
403 InvalidPeriodUnit.ValueNotSupported The specified parameter PeriodUnit is not valid.
403 InvalidPeriod.StarterPackage This instance was created by using a Starter Package plan and can only be renewed monthly, not yearly. The instance was created in a Starter Package plan and can only be automatically renewed on a monthly basis.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.