全部产品
Search
文档中心

资源编排:ALIYUN::BastionHost::PasswordTask

更新时间:Mar 30, 2026

ALIYUN::BastionHost::PasswordTask类型用于创建密码任务。

语法

{
  "Type": "ALIYUN::BastionHost::PasswordTask",
  "Properties": {
    "InstanceId": String,
    "Name": String,
    "TaskScheduleType": String,
    "Comment": String,
    "CredentialType": String,
    "KeyPairGenerateConfig": String,
    "PasswordGenerateConfig": Map,
    "PasswordGenerateType": String,
    "TaskScheduleConfig": Map
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceId

String

堡垒主机实例的ID。

Name

String

密码任务的名称。

TaskScheduleType

String

密码任务的调度类型。

Comment

String

密码任务的备注。

CredentialType

String

密码任务的凭证类型。

KeyPairGenerateConfig

String

密码任务的密钥对生成配置。

PasswordGenerateConfig

Map

密码任务的密码生成配置。

PasswordGenerateType

String

密码任务的密码生成类型。

TaskScheduleConfig

Map

密码任务的调度配置。

返回值

Fn::GetAtt

TaskId:密码任务的ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  TaskScheduleType:
    Type: String
    Description:
      en: The schedule type of the password task.
      zh: 密码任务的调度类型。
    Required: true
  InstanceId:
    Type: String
    Description:
      en: The ID of the BastionHost instance.
      zh: 堡垒主机实例的ID。
    Required: true
  Name:
    Type: String
    Description:
      en: The name of the password task.
      zh: 密码任务的名称。
    Required: true
Resources:
  PasswordTask:
    Type: ALIYUN::BastionHost::PasswordTask
    Properties:
      TaskScheduleType:
        Ref: TaskScheduleType
      InstanceId:
        Ref: InstanceId
      Name:
        Ref: Name
Outputs:
  TaskId:
    Description:
      en: The ID of the password task.
      zh: 密码任务的ID。
    Value:
      Fn::GetAtt:
        - PasswordTask
        - TaskId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "TaskScheduleType": {
      "Type": "String",
      "Description": {
        "en": "The schedule type of the password task.",
        "zh": "密码任务的调度类型。"
      },
      "Required": true
    },
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the BastionHost instance.",
        "zh": "堡垒主机实例的ID。"
      },
      "Required": true
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the password task.",
        "zh": "密码任务的名称。"
      },
      "Required": true
    }
  },
  "Resources": {
    "PasswordTask": {
      "Type": "ALIYUN::BastionHost::PasswordTask",
      "Properties": {
        "TaskScheduleType": {
          "Ref": "TaskScheduleType"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "TaskId": {
      "Description": {
        "en": "The ID of the password task.",
        "zh": "密码任务的ID。"
      },
      "Value": {
        "Fn::GetAtt": [
          "PasswordTask",
          "TaskId"
        ]
      }
    }
  }
}