All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::BastionHost::PasswordTask

更新時間:Apr 09, 2026

The ALIYUN::BastionHost::PasswordTask resource creates a password task.

Syntax

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

Properties

Parameter

Type

Required

Update Allowed

Description

Constraints

InstanceId

String

Yes

No

The ID of the BastionHost instance.

None

Name

String

Yes

No

The name of the password task.

None

TaskScheduleType

String

Yes

No

The schedule type of the password task.

None

Comment

String

No

No

The comment for the task.

None

CredentialType

String

No

No

The credential type.

None

KeyPairGenerateConfig

String

No

No

The configuration for key pair generation.

None

PasswordGenerateConfig

Map

No

No

The configuration for password generation.

None

PasswordGenerateType

String

No

No

The type of password generation.

None

TaskScheduleConfig

Map

No

No

The configuration for the task schedule.

None

Return value

To get the value of an attribute for this resource, pass its logical ID to the Fn::GetAtt intrinsic function. The following attribute is available:

TaskId: The ID of the password task.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  TaskScheduleType:
    Type: String
    Description: The schedule type of the password task.
    Required: true
  InstanceId:
    Type: String
    Description: The ID of the BastionHost instance.
    Required: true
  Name:
    Type: String
    Description: The name of the password task.
    Required: true
Resources:
  PasswordTask:
    Type: ALIYUN::BastionHost::PasswordTask
    Properties:
      TaskScheduleType:
        Ref: TaskScheduleType
      InstanceId:
        Ref: InstanceId
      Name:
        Ref: Name
Outputs:
  TaskId:
    Description: The ID of the password task.
    Value:
      Fn::GetAtt:
        - PasswordTask
        - TaskId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "TaskScheduleType": {
      "Type": "String",
      "Description": "The schedule type of the password task.",
      "Required": true
    },
    "InstanceId": {
      "Type": "String",
      "Description": "The ID of the BastionHost instance.",
      "Required": true
    },
    "Name": {
      "Type": "String",
      "Description": "The name of the password task.",
      "Required": true
    }
  },
  "Resources": {
    "PasswordTask": {
      "Type": "ALIYUN::BastionHost::PasswordTask",
      "Properties": {
        "TaskScheduleType": {
          "Ref": "TaskScheduleType"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "TaskId": {
      "Description": "The ID of the password task.",
      "Value": {
        "Fn::GetAtt": [
          "PasswordTask",
          "TaskId"
        ]
      }
    }
  }
}