- 最新の を
する - 2025-09-01-プレビュー
- 2025-03-01-preview
- 2024-10-01-preview
- 2024-06-01-preview
- 2024-05-01
- 2023-09-01-preview
- 2023-05-01-preview
- 2023-03-01-preview
- 2022-09-01-preview
- 2022-08-01
- 2022-04-01-preview
- 2021-12-01-preview
- 2021-08-01
- 2021-04-01-preview
- 2021-01-01-preview
- 2020-12-01
- 2020-06-01-preview
- 2019-12-01
- 2019-12-01-preview
- 2019-01-01
- 2018-06-01-preview
- 2018-01-01
- 2017-03-01
Bicep リソース定義
サービス/製品/ポリシーのリソースの種類は、次をターゲットとする操作でデプロイできます。
- リソース グループの - リソース グループのデプロイ コマンド 参照
各 API バージョンで変更されたプロパティの一覧については、変更ログの
使用例
Bicep サンプル
API Management サービス製品ポリシーのデプロイの基本的な例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource service 'Microsoft.ApiManagement/service@2021-08-01' = {
name: resourceName
location: location
sku: {
capacity: 0
name: 'Consumption'
}
properties: {
certificates: []
customProperties: {
'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30': 'false'
'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10': 'false'
'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11': 'false'
'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10': 'false'
'Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11': 'false'
}
disableGateway: false
publicNetworkAccess: 'Enabled'
publisherEmail: 'pub1@email.com'
publisherName: 'pub1'
virtualNetworkType: 'None'
}
}
resource product 'Microsoft.ApiManagement/service/products@2021-08-01' = {
name: resourceName
parent: service
properties: {
description: ''
displayName: 'Test Product'
state: 'notPublished'
subscriptionRequired: false
terms: ''
}
}
resource policy2 'Microsoft.ApiManagement/service/products/policies@2021-08-01' = {
name: 'policy'
parent: product
properties: {
format: 'rawxml-link'
value: 'https://gist.githubusercontent.com/riordanp/ca22f8113afae0eb38cc12d718fd048d/raw/d6ac89a2f35a6881a7729f8cb4883179dc88eea1/example.xml'
}
}
Azure 検証済みモジュール
次の Azure 検証済みモジュール を使用して、このリソースの種類をデプロイできます。
| Module | 形容 |
|---|---|
| API管理サービス - プロダクト - ポリシー | API管理サービス用AVMチャイルドモジュール - 製品 - ポリシー |
リソースの形式
Microsoft.ApiManagement/service/products/policies リソースを作成するには、次の Bicep をテンプレートに追加します。
resource symbolicname 'Microsoft.ApiManagement/service/products/policies@2024-06-01-preview' = {
parent: resourceSymbolicName
name: 'string'
properties: {
format: 'string'
value: 'string'
}
}
プロパティ値
Microsoft.ApiManagement/service/products/policies
| 名前 | 形容 | 価値 |
|---|---|---|
| 名前 | リソース名 | 'policy' (必須) |
| 親 | Bicep では、子リソースの親リソースを指定できます。 このプロパティを追加する必要があるのは、子リソースが親リソースの外部で宣言されている場合のみです。 詳細については、「親リソースの外部 |
種類のリソースのシンボリック名: サービス/製品 |
| プロパティ | ポリシーのプロパティ。 | PolicyContractProperties |
PolicyContractProperties
| 名前 | 形容 | 価値 |
|---|---|---|
| 形式 | policyContent の形式。 | 'rawxml' 'rawxml-link' 'xml' 'xml-link' |
| 価値 | 形式で定義されているポリシーの内容。 | string (必須) |
ARM テンプレート リソース定義
サービス/製品/ポリシーのリソースの種類は、次をターゲットとする操作でデプロイできます。
- リソースグループ - リソースグループのデプロイコマンドを参照してください。 各APIバージョンの変更プロパティ一覧は 変更ログをご覧ください。
使用例
リソースの形式
Microsoft.ApiManagement/service/products/policies リソースを作成するには、テンプレートに次の JSON を追加します。
{
"type": "Microsoft.ApiManagement/service/products/policies",
"apiVersion": "2024-06-01-preview",
"name": "string",
"properties": {
"format": "string",
"value": "string"
}
}
プロパティ値
Microsoft.ApiManagement/service/products/policies
| 名前 | 形容 | 価値 |
|---|---|---|
| apiVersion | API のバージョン | '2024-06-01-preview' |
| 名前 | リソース名 | 'policy' (必須) |
| プロパティ | ポリシーのプロパティ。 | PolicyContractProperties |
| 型 | リソースの種類 | 'Microsoft.ApiManagement/service/products/policies' |
PolicyContractProperties
| 名前 | 形容 | 価値 |
|---|---|---|
| 形式 | policyContent の形式。 | 'rawxml' 'rawxml-link' 'xml' 'xml-link' |
| 価値 | 形式で定義されているポリシーの内容。 | string (必須) |
Terraform (AzAPI プロバイダー) リソース定義
サービス/製品/ポリシーのリソースの種類は、次をターゲットとする操作でデプロイできます。
- リソースグループ 各APIバージョンの変更プロパティ一覧については、 変更ログをご覧ください。
使用例
Terraformサンプル
API Management サービス製品ポリシーのデプロイの基本的な例。
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" "service" {
type = "Microsoft.ApiManagement/service@2021-08-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
certificates = [
]
customProperties = {
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30" = "false"
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10" = "false"
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11" = "false"
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10" = "false"
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11" = "false"
}
disableGateway = false
publicNetworkAccess = "Enabled"
publisherEmail = "pub1@email.com"
publisherName = "pub1"
virtualNetworkType = "None"
}
sku = {
capacity = 0
name = "Consumption"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "product" {
type = "Microsoft.ApiManagement/service/products@2021-08-01"
parent_id = azapi_resource.service.id
name = var.resource_name
body = {
properties = {
description = ""
displayName = "Test Product"
state = "notPublished"
subscriptionRequired = false
terms = ""
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "policy2" {
type = "Microsoft.ApiManagement/service/products/policies@2021-08-01"
parent_id = azapi_resource.product.id
name = "policy"
body = {
properties = {
format = "rawxml-link"
value = "https://gist.githubusercontent.com/riordanp/ca22f8113afae0eb38cc12d718fd048d/raw/d6ac89a2f35a6881a7729f8cb4883179dc88eea1/example.xml"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
リソースの形式
Microsoft.ApiManagement/service/products/policies リソースを作成するには、次の Terraform をテンプレートに追加します。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.ApiManagement/service/products/policies@2024-06-01-preview"
name = "string"
parent_id = "string"
body = {
properties = {
format = "string"
value = "string"
}
}
}
プロパティ値
Microsoft.ApiManagement/service/products/policies
| 名前 | 形容 | 価値 |
|---|---|---|
| 名前 | リソース名 | 'policy' (必須) |
| parent_id | このリソースの親であるリソースの ID。 | 種類のリソースの ID: サービス/製品 |
| プロパティ | ポリシーのプロパティ。 | PolicyContractProperties |
| 型 | リソースの種類 | "Microsoft.ApiManagement/service/products/policies@2024-06-01-preview" |
PolicyContractProperties
| 名前 | 形容 | 価値 |
|---|---|---|
| 形式 | policyContent の形式。 | 'rawxml' 'rawxml-link' 'xml' 'xml-link' |
| 価値 | 形式で定義されているポリシーの内容。 | string (必須) |