All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::PaiDswApi::Instance

Last Updated:Oct 14, 2024

DATASOURCE::PaiDswApi::Instance is used to query the basic information about a Data Science Workshop (DSW) instance.

Syntax

{
  "Type": "DATASOURCE::PaiDswApi::Instance",
  "Properties": {
    "InstanceId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

InstanceId

String

Yes

Yes

The ID of the instance.

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

  • Datasets: the collection of datasets.

  • InstanceName: the name of the instance.

  • Accessibility: the accessibility of the workspace.

  • InstanceId: the ID of the instance.

  • WorkspaceId: the ID of the workspace.

  • ImageUrl: the URL of the image.

  • PaymentType: the billing method of the instance.

  • EcsSpec: the Elastic Compute Service (ECS) instance type.

  • Labels: the custom tags of the instance.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description:
      en: The first ID of the resource.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::PaiDswApi::Instance
    Properties:
      InstanceId:
        Ref: InstanceId
Outputs:
  Datasets:
    Description: A collection of datasets.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Datasets
  InstanceName:
    Description: The instance name.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceName
  Accessibility:
    Description: Whether the workspace is visible to others.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Accessibility
  InstanceId:
    Description: The ID of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InstanceId
  WorkspaceId:
    Description: The Id of the workspace.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - WorkspaceId
  ImageUrl:
    Description: The mirror address.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ImageUrl
  PaymentType:
    Description: The payment type of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PaymentType
  EcsSpec:
    Description: The ECS specification of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EcsSpec
  Labels:
    Description: User-defined labels.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Labels
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The first ID of the resource."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PaiDswApi::Instance",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        }
      }
    }
  },
  "Outputs": {
    "Datasets": {
      "Description": "A collection of datasets.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Datasets"
        ]
      }
    },
    "InstanceName": {
      "Description": "The instance name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceName"
        ]
      }
    },
    "Accessibility": {
      "Description": "Whether the workspace is visible to others.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Accessibility"
        ]
      }
    },
    "InstanceId": {
      "Description": "The ID of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceId"
        ]
      }
    },
    "WorkspaceId": {
      "Description": "The Id of the workspace.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "WorkspaceId"
        ]
      }
    },
    "ImageUrl": {
      "Description": "The mirror address.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ImageUrl"
        ]
      }
    },
    "PaymentType": {
      "Description": "The payment type of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PaymentType"
        ]
      }
    },
    "EcsSpec": {
      "Description": "The ECS specification of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EcsSpec"
        ]
      }
    },
    "Labels": {
      "Description": "User-defined labels.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Labels"
        ]
      }
    }
  }
}