# hosting.create

Canonical URL: https://developers.iagenify.com/zh/sdk/workflows/steps/hosting-create/
Language: zh

`type: "hosting.create"`

创建一个主机——网站、应用程序或函数。它保留一个地址;部署是一个单独的步骤。

Status: kind and label required · no approval · certificate may wait

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `kind` | string | 必填 | `site` · `app` · `function`. |
| `label` | string | 必填 | 一个人读的名字。 |
| `slug` | string |  | 地址的第一部分,从标签上取出 |

```javascript
{ id: "host", type: "hosting.create", config: { kind: "site", label: "{{input.name}}" } }
```

## 输出 {#output}

```javascript
{{steps.host.output.host}}          // the slug
{{steps.host.output.url}}
{{steps.host.output.certificate}}   // "none" | "pending" | "active"
```

## 尚未准备好的地址 {#certificate}

> **尚未结结结证书是指地址拒绝连接**
>
> 不是停机,而是等待。一个链条创建了一个主机, 并立即获取它将会失败。 在它们之间放一个等待步骤, 或者在依赖地址之前检查证书 。

## 创建不是发布 {#no-approval}

网络上还没有消息, [hosting.deploy](/zh/sdk/workflows/steps/hosting-deploy) 出版的一步, 需要人类的上游。

## 计划决定 {#plan}

计划没有主机,所以拒绝创建,命名计划。在围绕计划建立链条之前,应该知道。

- [hosting.deploy](/zh/sdk/workflows/steps/hosting-deploy): 在上面贴点东西
- [api.hosts](/zh/sdk/ref/hosts): 通过代码。
- [工作流步骤](/zh/sdk/workflows/steps): 全部 23 种类型。

```python
{"id": "host", "type": "hosting.create", "config": {"kind": "site", "label": "{{input.name}}"}}
```

```python
"{{steps.host.output.host}}"          # the slug
"{{steps.host.output.url}}"
"{{steps.host.output.certificate}}"   # "none" | "pending" | "active"
```
