Microsoft。AppPlatform Spring/buildServices

備註

注意:Azure Spring 應用程式 Build Services(Microsoft.AppPlatform/Spring/buildServices)現已棄用,將於 2028-05-31 正式退休。 如需相關資訊,請參閱 https://aka.ms/asaretirement 。

Bicep 資源定義

Spring/buildServices 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

使用範例

Azure 快速入門範例

下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。

Bicep 檔案 描述
部署簡單的 Azure Spring 應用程式 微服務應用程式 此範本會部署簡單的 Azure Spring 應用程式 微服務應用程式,以在 Azure 上執行。

資源格式

若要建立 Microsoft.AppPlatform/Spring/buildServices 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.AppPlatform/Spring/buildServices@2024-05-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    containerRegistry: 'string'
    resourceRequests: {}
  }
}

屬性值

Microsoft.AppPlatform/Spring/buildServices

名字 描述 價值
名字 資源名稱 字串 (必要)
父代 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源。
類型資源的符號名稱:Spring
性能 組建資源的屬性 BuildServiceProperties

BuildServiceProperties

名字 描述 價值
containerRegistry 此組建服務中使用的容器登錄資源標識碼。 字串
resourceRequests 請求 此組建服務的運行時間資源組態。 BuildServicePropertiesResourceRequests

BuildServicePropertiesResourceRequests

名字 描述 價值

ARM 樣本資源定義

Spring/buildServices 資源類型可以使用目標作業來部署:

使用範例

Azure 快速入門範本

下列 Azure 快速入門範本 部署此資源類型。

範本 描述
部署簡單的 Azure Spring 應用程式 微服務應用程式

部署至 Azure
此範本會部署簡單的 Azure Spring 應用程式 微服務應用程式,以在 Azure 上執行。

資源格式

若要建立 Microsoft.AppPlatform/Spring/buildServices 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.AppPlatform/Spring/buildServices",
  "apiVersion": "2024-05-01-preview",
  "name": "string",
  "properties": {
    "containerRegistry": "string",
    "resourceRequests": {
    }
  }
}

屬性值

Microsoft.AppPlatform/Spring/buildServices

名字 描述 價值
apiVersion API 版本 “2024-05-01-預覽”
名字 資源名稱 字串 (必要)
性能 組建資源的屬性 BuildServiceProperties
型別 資源類型 “Microsoft.AppPlatform/Spring/buildServices”

BuildServiceProperties

名字 描述 價值
containerRegistry 此組建服務中使用的容器登錄資源標識碼。 字串
resourceRequests 請求 此組建服務的運行時間資源組態。 BuildServicePropertiesResourceRequests

BuildServicePropertiesResourceRequests

名字 描述 價值

Terraform (AzAPI 提供者) 資源定義

Spring/buildServices 資源類型可以使用目標作業來部署:

  • 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。

使用範例

Terraform 範例

部署 Spring Cloud Build Service 的基本範例。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "Spring" {
  type      = "Microsoft.AppPlatform/Spring@2023-05-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      zoneRedundant = false
    }
    sku = {
      name = "E0"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

data "azapi_resource_id" "buildService" {
  type      = "Microsoft.AppPlatform/Spring/buildServices@2023-05-01-preview"
  parent_id = azapi_resource.Spring.id
  name      = "default"
}

resource "azapi_resource_action" "buildService" {
  type        = "Microsoft.AppPlatform/Spring/buildServices@2023-05-01-preview"
  resource_id = data.azapi_resource_id.buildService.id
  method      = "PUT"
  body = {
    properties = {
    }
  }
  response_export_values = ["*"]
}

data "azapi_resource" "buildService" {
  type      = "Microsoft.AppPlatform/Spring/buildServices@2023-05-01-preview"
  name      = "default"
  parent_id = azapi_resource.Spring.id

  depends_on = [azapi_resource_action.buildService]
}

資源格式

若要建立 Microsoft.AppPlatform/Spring/buildServices 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.AppPlatform/Spring/buildServices@2024-05-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      containerRegistry = "string"
      resourceRequests = {
      }
    }
  }
}

屬性值

Microsoft.AppPlatform/Spring/buildServices

名字 描述 價值
名字 資源名稱 字串 (必要)
父項識別碼 此資源為父系之資源的標識碼。 類型資源的標識碼:Spring
性能 組建資源的屬性 BuildServiceProperties
型別 資源類型 “Microsoft.AppPlatform/Spring/buildServices@2024-05-01-preview”

BuildServiceProperties

名字 描述 價值
containerRegistry 此組建服務中使用的容器登錄資源標識碼。 字串
resourceRequests 請求 此組建服務的運行時間資源組態。 BuildServicePropertiesResourceRequests

BuildServicePropertiesResourceRequests

名字 描述 價值