All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::Activations

最終更新日:Nov 01, 2024

DATASOURCE::ECS::Activations is used to query activation codes.

Syntax

{
  "Type": "DATASOURCE::ECS::Activations",
  "Properties": {
    "InstanceName": String,
    "ActivationId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

InstanceName

String

No

Yes

The default prefix of the instance name.

None.

ActivationId

String

No

Yes

The ID of the activation code.

None.

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.

Return values

Fn::GetAtt

  • Activations: details of activation codes.

  • ActivationIds: the IDs of activation codes.

Property

Type

Description

Constraint

ActivationIds

List

The IDs of the activation codes.

None.

Activations

List

Details of the activation codes.

None.

TimeToLiveInHours

Integer

The validity period of the activation code.

Unit: hour.

RegisteredCount

Integer

The number of registered instances.

None.

ActivationId

String

The ID of the activation code.

None.

Description

String

The description of the activation code.

None.

IpAddressRange

String

The IP addresses of the hosts that can use the activation code.

None.

InstanceName

String

The default prefix of the instance name.

None.

Disabled

Boolean

Indicates whether the activation code is disabled.

Valid values:

  • true

  • false

DeregisteredCount

Integer

The number of deregistered instances.

None.

InstanceCount

Integer

The maximum number of times that you can use the activation code to register managed instances.

None.

CreateTime

String

The creation time.

None.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ActivationId:
    Description:
      en: Activation code ID.
    Type: String
  InstanceName:
    Description:
      en: The default prefix of the instance name.
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      ActivationId:
        Ref: ActivationId
      InstanceName:
        Ref: InstanceName
    Type: DATASOURCE::ECS::Activations
Outputs:
  ActivationIds:
    Description: The list of activation IDs.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - ActivationIds
  Activations:
    Description: The list of activations.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Activations
                        

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Description": {
        "en": "The default prefix of the instance name."
      }
    },
    "ActivationId": {
      "Type": "String",
      "Description": {
        "en": "Activation code ID."
      }
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::Activations",
      "Properties": {
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "ActivationId": {
          "Ref": "ActivationId"
        }
      }
    }
  },
  "Outputs": {
    "Activations": {
      "Description": "The list of activations.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Activations"
        ]
      }
    },
    "ActivationIds": {
      "Description": "The list of activation IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ActivationIds"
        ]
      }
    }
  }
}