All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::ManagedInstances

最終更新日:Nov 26, 2024

DATASOURCE::ECS::ManagedInstances is used to query managed instances.

Syntax

{
  "Type": "DATASOURCE::ECS::ManagedInstances",
  "Properties": {
    "InstanceName": String,
    "InstanceId": List,
    "OsType": String,
    "ActivationId": String,
    "InstanceIp": String,
    "Tags": List,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

InstanceName

String

No

Yes

The name of the managed instance.

None.

InstanceId

List

No

Yes

The ID of the managed instance.

{'Length': {'Max': 50}}

OsType

String

No

Yes

The OS type of the managed instance.

Valid values:

  • windows

  • linux

ActivationId

String

No

Yes

The ID of the activation code.

None.

InstanceIp

String

No

Yes

The private or public IP address of the managed instance.

None.

Tags

List

No

Yes

The tags.

{'Length': {'Max': 20}}

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags properties

Property

Type

Required

Editable

Description

Constraint

Value

String

No

No

The tag value of the managed instance.

The tag value can be up to 128 characters in length and cannot contain http:// or https://.

Key

String

Yes

No

The tag key of the managed instance.

The tag key can be up to 64 characters in length and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • Instances: details of the managed instances.

  • InstanceIds: the IDs of the managed instances.

Property

Type

Description

Constraint

InstanceIds

List

The IDs of the managed instances.

None.

Instances

List

Details of the managed instances.

None.

LastInvokedTime

String

The most recent time when the Cloud Assistant task was executed.

None.

Connected

Boolean

Indicates whether the managed instance is connected.

Valid values:

  • true: The managed instance is connected. You can manage the instance by using Cloud Assistant.

  • false: The managed instance is not connected because the managed instance is stopped or because Cloud Assistant Agent is not validly installed.

Hostname

String

The hostname of the managed instance.

None.

InstanceId

String

The ID of the managed instance.

None.

ActivationId

String

The ID of the activation code.

None.

IntranetIp

String

The private IP address of the managed instance.

None.

AgentVersion

String

The version number of Cloud Assistant Agent.

None.

RegistrationTime

String

The time when the managed instance was registered.

None.

InstanceName

String

The name of the managed instance.

None.

OsType

String

The OS type of the managed instance.

None.

OsVersion

String

The version information about the OS.

None.

InvocationCount

Number

The number of times that Cloud Assistant tasks are executed on the managed instance.

None.

MachineId

String

The machine code of the managed instance.

None.

Tags

Map

The tags.

Example:

[{"TagKey": "ccc","TagValue": "bbb"}]

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ECS::ManagedInstances
    Properties:
      InstanceName: TestEcs
      OsType: linux
Outputs:
  Instances:
    Description: The list of managed instances.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Instances
  InstanceIds:
    Description: The list of managed instance ids.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceIds
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::ManagedInstances",
      "Properties": {
        "InstanceName": "TestEcs",
        "OsType": "linux"
      }
    }
  },
  "Outputs": {
    "Instances": {
      "Description": "The list of managed instances.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Instances"
        ]
      }
    },
    "InstanceIds": {
      "Description": "The list of managed instance ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceIds"
        ]
      }
    }
  }
}