All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::VPC::DhcpOptionsSetAttachment

Last Updated:Jul 06, 2025

ALIYUN::VPC::DhcpOptionsSetAttachment digunakan untuk mengaitkan set opsi Dynamic Host Configuration Protocol (DHCP) dengan virtual private cloud (VPC).

Sintaksis

{
  "Type": "ALIYUN::VPC::DhcpOptionsSetAttachment",
  "Properties": {
    "DhcpOptionsSetId": String,
    "VpcId": String
  }
}

Properti

PropertiTipeDiperlukanDapat DieditDeskripsiKendala
DhcpOptionsSetIdStringYaYaID dari set opsi DHCP.

Untuk informasi lebih lanjut tentang set opsi DHCP, lihat set opsi DHCP.

Tidak tersedia
VpcIdStringYaTidakID dari VPC yang dikaitkan dengan set opsi DHCP. Tidak tersedia

Parameter respons

Fn::GetAtt

  • DhcpOptionsSetId: ID dari set opsi DHCP.
  • VpcId: ID dari VPC yang dikaitkan dengan set opsi DHCP.

Contoh

JSON Format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DhcpOptionsSetId": {
      "Type": "String",
      "Description": "ID dari set opsi DHCP."
    },
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    }
  },
  "Resources": {
    "DhcpOptionsSetAttachment": {
      "Type": "ALIYUN::VPC::DhcpOptionsSetAttachment",
      "Properties": {
        "DhcpOptionsSetId": {
          "Ref": "DhcpOptionsSetId"
        },
        "VpcId": {
          "Ref": "VpcId"
        }
      }
    }
  },
  "Outputs": {
    "DhcpOptionsSetId": {
      "Description": "ID dari set opsi DHCP.",
      "Value": {
        "Fn::GetAtt": [
          "DhcpOptionsSetAttachment",
          "DhcpOptionsSetId"
        ]
      }
    },
    "VpcId": {
      "Description": "ID dari jaringan VPC.",
      "Value": {
        "Fn::GetAtt": [
          "DhcpOptionsSetAttachment",
          "VpcId"
        ]
      }
    }
  }
}

YAML Format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DhcpOptionsSetId:
    Type: String
    Description: ID dari set opsi DHCP.
  VpcId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
Resources:
  DhcpOptionsSetAttachment:
    Type: ALIYUN::VPC::DhcpOptionsSetAttachment
    Properties:
      DhcpOptionsSetId:
        Ref: DhcpOptionsSetId
      VpcId:
        Ref: VpcId
Outputs:
  DhcpOptionsSetId:
    Description: ID dari set opsi DHCP.
    Value:
      Fn::GetAtt:
      - DhcpOptionsSetAttachment
      - DhcpOptionsSetId
  VpcId:
    Description: ID dari jaringan VPC.
    Value:
      Fn::GetAtt:
      - DhcpOptionsSetAttachment
      - VpcId