All Products
Search
Document Center

Resource Orchestration Service:Data structures

Last Updated:Jan 24, 2024

You can view a change set of a stack to understand the impacts of changes that Resource Orchestration Service (ROS) will apply to the stack by executing the change set. This topic describes JSON changes that are contained in a change set.

Elements in JSON changes

The JSON changes of a change set consists of the following elements. For more information about the elements, see the "Data structures of JSON changes" section of this topic.

  • Change: the details of the change operation that you want ROS to perform, including the change type and the entity.

  • ResourceChange: the details of the resource that you want ROS to change and the change operation, including the resource name, resource type, and change operation.

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

  • ResourceTargetDefinition: the definition of the resource that you want ROS to change, including the properties and configurations of the resource.

  • ResourcePropertyChange: the details of a change to a resource property, including the property values and names of before and after the change.

  • ModuleInfo: the information about the modules.

Data structures of JSON changes

Change

Parameter

Type

Description

ResourceChange

Structure

The resource that you want ROS to change and the operation that you want ROS to perform on the resource.

Type

String

The type of the entity that you want ROS to change.

Set the value to Resource. A value of Resource specifies that the entity is a resource.

ResourceChange

Parameter

Type

Description

Action

String

The operation that you want ROS to perform on the resource. Valid values:

  • Add: creates the resource.

  • Modify: modifies the resource.

  • Remove: releases the resource.

Details

Array

The details of changes to the resource. This parameter takes effect only when the Action parameter is set to Modify.

Note

This parameter is available only for stacks of the ROS type.

LogicalResourceId

String

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

PhysicalResourceId

String

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

Replacement

String

Specifies whether to change the resource by creating a new resource and deleting the existing resource. This parameter takes effect only when the Action parameter is set to Modify.

  • Valid values for stacks of the ROS type:

    • True: ROS changes the resource by creating a new resource and deleting the existing resource. If you set the RequiresRecreation parameter to Always and the Evaluation parameter to Static, you must set the Replacement parameter to True.

    • False: ROS does not change the resource by creating a new resource and deleting the existing resource. If you set the RequiresRecreation parameter to Never and the Evaluation parameter to Static, you must set the Replacement parameter to False.

    • Conditional: ROS may change the resource by creating a new resource and deleting the existing resource. If you set the RequiresRecreation parameter to Always and the Evaluation parameter to Dynamic, you must set the Replacement parameter to Conditional.

    Note

    If you specify multiple values for the RequiresRecreation parameter, the value of the Replacement parameter varies based on the RequiresRecreation value that has the greatest impact. The impacts of the RequiresRecreation values decrease in the following order: Always, Conditional, and Never.

  • Valid values for stacks of the Terraform type:

    • True: Terraform changes the resource by creating a new resource and deleting the existing resource.

    • False: Terraform does not change the resource by creating a new resource and deleting the existing resource.

ResourceType

String

The resource type.

Scope

Array of strings

The parameter for which ROS triggers an update. This parameter takes effect only when the Action parameter 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

This parameter is available only for stacks of the ROS type.

PropertyChanges

Structure array of ResourcePropertyChange

The changes to a resource property. This parameter takes effect only when the Action parameter is set to Modify. For more information, see ResourcePropertyChange.

Note

This parameter is available only for stacks of the Terraform type.

ModuleInfo

Structure array of ModuleInfo

The information about the modules from which the resource is created. This parameter is returned only if the resource is created from modules. For more information, see ModuleInfo.

Note

This parameter is available only for stacks of the ROS type.

ResourceChangeDetail

Parameter

Type

Description

ChangeSource

String

The reason why ROS triggers an update. Valid values:

  • ResourceReference: The physical ID of the referenced resource may be changed.

  • ParameterReference: The referenced parameter in the template may be changed.

  • ResourceAttribute: The referenced output property of a resource may be changed.

  • DirectModification: The template is modified.

  • Automatic: If the nested stack that is created by using the ALIYUN::ROS::Stack resource type is not modified, ROS sets the ChangeSource parameter to Automatic. This is because the template of the nested stack may have been changed. ROS does not change the template of the nested stack before you update the parent stack.

  • System: Even if the input values of resources remain unchanged, specific conditions or internal mechanisms, such as ALIYUN::ROS::WaitConditionHandle, trigger an update.

CausingEntity

String

The entity that is associated with the ChangeSource parameter. The following information describes the relationship between the values of the ChangeSource and CausingEntity parameters:

  • If you set the ChangeSource parameter to ResourceReference, the value of the CausingEntity parameter is the resource name.

  • If you set the ChangeSource parameter to ParameterReference, the value of the CausingEntity parameter is the parameter name.

  • If you set the ChangeSource parameter to ResourceAttribute, the value of the CausingEntity parameter is in the following format: Resource name.Parameter name.

  • If you set the ChangeSource parameter to DirectModification, the value of the CausingEntity parameter is null.

  • If you set the ChangeSource parameter to Automatic, the value of the CausingEntity parameter is the resource name.

  • If you set the ChangeSource parameter to System, the value of the CausingEntity parameter is the resource name.

Evaluation

String

Specifies whether ROS can determine the desired value, and whether the desired value is changed before you execute a change set. Valid values:

  • Static: ROS can determine the desired value, and that the desired value is changed before you execute a change set.

  • Dynamic: ROS cannot determine the desired value. When ROS updates a stack, the desired value may vary based on the result of an internal function, such as Ref or Fn::GetAtt.

Target

Structure

The details of the entity for which ROS triggers an update.

ResourceTargetDefinition

Parameter

Type

Description

Attribute

String

The parameter for which ROS triggers an 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

If you set the Attribute parameter to Properties, the value of the Name parameter is the property name. In other cases, the value of the Name parameter is null.

RequiresRecreation

String

Specifies whether a change to the property causes the resource to be recreated. This parameter takes effect only when the Attribute parameter is set to Properties. Valid values:

  • Never: A change to the property does not cause the resource to be recreated.

  • Conditionally: A change to the property may cause the resource to be recreated.

  • Always: A change to the property causes the resource to be recreated.

ResourcePropertyChange

Parameter

Type

Description

Name

String.

The property name.

BeforeValue

The data type varies based on the property.

The value of the property before ROS updates the property.

AfterValue

The data type varies based on the property.

The value of the property after the property is updated.

Note
  • If you set the value to <known_after_apply> and the value is of the String type, you can query the value only after the property is created or updated.

  • If you set the value to <sensitive> and the value is of the String type, the value is sensitive data.

ModuleInfo

Parameter

Type

Description

LogicalIdHierarchy

String

The concatenated logical IDs of one or more modules that contain the resource. The modules are listed from the outermost layer and are separated by forward slashes (/).

In the following example, the resource is created from Module B nested within Parent Module A:

moduleA/moduleB

TypeHierarchy

String

The concatenated types of one or more modules that contain the resource. The module types are listed from the outermost layer and are separated by forward slashes (/).

In the following example, the resource is created from a module of the MODULE::ROS::Child::Example type that is nested within a parent module of the MODULE::ROS::Parent::Example type:

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

References

For more information about how to view JSON changes, see View a change set.