你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Connected Environments - Create Or Update

创建或更新 connectedEnvironment。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}?api-version=2024-03-01

URI 参数

名称 必需 类型 说明
connectedEnvironmentName
path True

string

connectedEnvironment 的名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 名称不区分大小写。

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

api-version
query True

string

minLength: 1

用于此操作的 API 版本。

请求正文

名称 必需 类型 说明
location True

string

资源所在的地理位置

extendedLocation

ExtendedLocation

扩展位置的复杂类型。

properties.customDomainConfiguration

CustomDomainConfiguration

环境的自定义域配置

properties.daprAIConnectionString

string

Dapr 用于将服务导出到服务通信遥测的 Application Insights 连接字符串

properties.staticIp

string

connectedEnvironment 的静态 IP

tags

object

资源标记。

响应

名称 类型 说明
200 OK

ConnectedEnvironment

还行

201 Created

ConnectedEnvironment

创建

Other Status Codes

DefaultErrorResponse

常见的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Create kube environments

示例请求

PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testenv?api-version=2024-03-01

{
  "location": "East US",
  "properties": {
    "staticIp": "1.2.3.4",
    "daprAIConnectionString": "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/",
    "customDomainConfiguration": {
      "dnsSuffix": "www.my-name.com",
      "certificateValue": "Y2VydA==",
      "certificatePassword": "private key password"
    }
  }
}

示例响应

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testenv",
  "name": "testenv",
  "type": "Microsoft.App/connectedEnvironments",
  "location": "East US",
  "extendedLocation": {
    "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation",
    "type": "CustomLocation"
  },
  "tags": {},
  "properties": {
    "provisioningState": "Succeeded",
    "deploymentErrors": null,
    "defaultDomain": "testenv.k4apps.io",
    "staticIp": "1.2.3.4",
    "customDomainConfiguration": {
      "customDomainVerificationId": "custom domain verification id",
      "dnsSuffix": "www.my-name.com",
      "subjectName": "CN=www.my-name.com",
      "expirationDate": "2022-11-06T04:00:00Z",
      "thumbprint": "CERTIFICATE_THUMBPRINT"
    }
  }
}
{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testenv",
  "name": "testenv",
  "type": "Microsoft.App/connectedEnvironments",
  "location": "East US",
  "extendedLocation": {
    "name": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation",
    "type": "CustomLocation"
  },
  "tags": {},
  "properties": {
    "provisioningState": "Waiting",
    "deploymentErrors": null,
    "defaultDomain": "testenv.k4apps.io",
    "staticIp": "1.2.3.4"
  }
}

定义

名称 说明
ConnectedEnvironment

Azure 应用服务专用于 Web 工作负荷的 Kubernetes 群集环境

ConnectedEnvironmentProvisioningState

Kubernetes 环境的预配状态。

createdByType

创建资源的标识的类型。

CustomDomainConfiguration

应用环境自定义域的配置属性

DefaultErrorResponse

应用服务错误响应。

Details

详细信息或错误

Error

错误模型。

ExtendedLocation

扩展位置的复杂类型。

ExtendedLocationTypes

扩展位置的类型。

systemData

与创建和上次修改资源相关的元数据。

ConnectedEnvironment

Azure 应用服务专用于 Web 工作负荷的 Kubernetes 群集环境

名称 类型 说明
extendedLocation

ExtendedLocation

扩展位置的复杂类型。

id

string

资源的完全限定资源 ID。 Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

资源所在的地理位置

name

string

资源的名称

properties.customDomainConfiguration

CustomDomainConfiguration

环境的自定义域配置

properties.daprAIConnectionString

string

Dapr 用于将服务导出到服务通信遥测的 Application Insights 连接字符串

properties.defaultDomain

string

群集的默认域名

properties.deploymentErrors

string

部署或部署验证期间发生的任何错误

properties.provisioningState

ConnectedEnvironmentProvisioningState

Kubernetes 环境的预配状态。

properties.staticIp

string

connectedEnvironment 的静态 IP

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

object

资源标记。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

ConnectedEnvironmentProvisioningState

Kubernetes 环境的预配状态。

说明
Canceled
Failed
InfrastructureSetupComplete
InfrastructureSetupInProgress
InitializationInProgress
ScheduledForDelete
Succeeded
Waiting

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

CustomDomainConfiguration

应用环境自定义域的配置属性

名称 类型 说明
certificatePassword

string

证书密码

certificateValue

string (byte)

PFX 或 PEM Blob

customDomainVerificationId

string

用于验证域名所有权的 ID

dnsSuffix

string

环境域的 Dns 后缀

expirationDate

string (date-time)

证书到期日期。

subjectName

string

证书的使用者名称。

thumbprint

string

证书指纹。

DefaultErrorResponse

应用服务错误响应。

名称 类型 说明
error

Error

错误模型。

Details

详细信息或错误

名称 类型 说明
code

string

标准化字符串,以编程方式标识错误。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

Error

错误模型。

名称 类型 说明
code

string

标准化字符串,以编程方式标识错误。

details

Details[]

详细信息或错误

innererror

string

调试错误的详细信息。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

ExtendedLocation

扩展位置的复杂类型。

名称 类型 说明
name

string

扩展位置的名称。

type

ExtendedLocationTypes

扩展位置的类型。

ExtendedLocationTypes

扩展位置的类型。

说明
CustomLocation

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。