Data structures

更新时间:
复制 MD 格式

Change sets contain JSON changes that describe how ROS modifies a stack. Use change sets to preview the impact before applying changes.

Elements in JSON changes

A change set's JSON changes consist of the following elements, detailed in the data structures section below.

  • Change: the change operation, including the change type and target entity.

  • ResourceChange: the resource to change, including resource name, type, and operation.

  • ResourceChangeDetail: resource change details, including properties and resource status before and after the change.

  • ResourceTargetDefinition: the target resource definition, including properties and configurations.

  • ResourcePropertyChange: property-level change details, including values before and after the change.

  • ModuleInfo: module information for resources created from modules.

Data structures of JSON changes

Change

Parameter

Type

Description

ResourceChange

Structure

The resource to change and the operation to perform.

Type

String

The entity type.

Set to Resource, which indicates the entity is a resource.

ResourceChange

Parameter

Type

Description

Action

String

The operation to perform on the resource. Valid values:

  • Add: creates the resource.

  • Modify: modifies the resource.

  • Remove: releases the resource.

Details

Array

The change details. Takes effect only when Action is set to Modify.

Note

Available only for ROS-type stacks.

LogicalResourceId

String

The logical ID of the resource, which is the resource name defined in the template.

PhysicalResourceId

String

The physical ID of the resource. Takes effect only when Action is set to Modify or Remove.

Replacement

String

Whether ROS replaces the resource by creating a new one and deleting the existing one. Takes effect only when Action is set to Modify.

  • Valid values for stacks of the ROS type:

    • True: ROS replaces the resource. Required when RequiresRecreation is Always and Evaluation is Static.

    • False: ROS does not replace the resource. Required when RequiresRecreation is Never and Evaluation is Static.

    • Conditional: ROS may replace the resource. Required when RequiresRecreation is Always and Evaluation is Dynamic.

    Note

    When multiple RequiresRecreation values apply, Replacement is determined by the highest-impact value. Impact order: Always > Conditional > Never.

  • Valid values for stacks of the Terraform type:

    • True: Terraform replaces the resource.

    • False: Terraform does not replace the resource.

ResourceType

String

The resource type.

Scope

Array of strings

The attribute that triggers an update. Takes effect only when Action is set to Modify. Valid values:

  • Properties: the Properties parameter of the resource

  • Metadata: the Metadata parameter of the resource

  • DeletionPolicy: the DeletionPolicy parameter of the resource

Note

Available only for ROS-type stacks.

PropertyChanges

Structure array of ResourcePropertyChange

Property-level changes. Takes effect only when Action is set to Modify. ResourcePropertyChange.

Note

Available only for Terraform-type stacks.

ModuleInfo

Structure array of ModuleInfo

Module information for the resource. Returned only if the resource is created from modules. ModuleInfo.

Note

Available only for ROS-type stacks.

ResourceChangeDetail

Parameter

Type

Description

ChangeSource

String

The update trigger. Valid values:

  • ResourceReference: the referenced resource's physical ID may change.

  • ParameterReference: a referenced template parameter may change.

  • ResourceAttribute: a referenced resource output property may change.

  • DirectModification: the template was directly modified.

  • Automatic: for unmodified nested stacks (ALIYUN::ROS::Stack), ROS sets ChangeSource to Automatic because the nested template may have changed. ROS does not update the nested template until the parent stack is updated.

  • System: internal mechanisms (such as ALIYUN::ROS::WaitConditionHandle) trigger an update regardless of input changes.

CausingEntity

String

The entity associated with ChangeSource. The mapping between ChangeSource and CausingEntity values:

  • ResourceReference: the resource name.

  • ParameterReference: the parameter name.

  • ResourceAttribute: in the format Resource name.Parameter name.

  • DirectModification: null.

  • Automatic: the resource name.

  • System: the resource name.

Evaluation

String

Whether ROS can determine the target value before change set execution. Valid values:

  • Static: ROS can determine the target value before execution.

  • Dynamic: ROS cannot determine the target value. The value may depend on intrinsic functions such as Ref or Fn::GetAtt.

Target

Structure

The entity that triggers the update.

ResourceTargetDefinition

Parameter

Type

Description

Attribute

String

The attribute that triggers the update. Valid values:

  • Properties: the Properties parameter of the resource

  • Metadata: the Metadata parameter of the resource

  • DeletionPolicy: the DeletionPolicy parameter of the resource

Name

String

When Attribute is Properties, Name is the property name. Otherwise, Name is null.

RequiresRecreation

String

Whether changing this property recreates the resource. Takes effect only when Attribute is Properties. Valid values:

  • Never: the property change does not require recreation.

  • Conditionally: the property change may require recreation.

  • Always: the property change always requires recreation.

ResourcePropertyChange

Parameter

Type

Description

Name

String.

The property name.

BeforeValue

The data type varies based on the property.

The property value before the update.

AfterValue

The data type varies based on the property.

The property value after the update.

Note
  • If the value is <known_after_apply> (String type), the value is available only after creation or update.

  • If the value is <sensitive> (String type), the value contains sensitive data.

ModuleInfo

Parameter

Type

Description

LogicalIdHierarchy

String

The logical IDs of modules containing the resource, concatenated from outermost to innermost and separated by forward slashes (/).

Example: a resource created from Module B nested in Module A:

moduleA/moduleB

TypeHierarchy

String

The types of modules containing the resource, concatenated from outermost to innermost and separated by forward slashes (/).

Example: a resource from MODULE::ROS::Child::Example nested in MODULE::ROS::Parent::Example:

MODULE::ROS::Parent::Example/MODULE::ROS::Child::Example

References

To view JSON changes in a change set, follow View a change set.