Named Value - Create Or Update

名前付き値を作成または更新します。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}?api-version=2024-05-01

URI パラメーター

Name / 必須 型 説明
namedValueId
path True

string

maxLength: 256
pattern: ^[^*#&+:<>?]+$

NamedValue の識別子。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

リソース グループの名前。 名前では大文字と小文字が区別されません。

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

API Management サービスの名前。

subscriptionId
path True

string (uuid)

ターゲット サブスクリプションの ID。 値は UUID である必要があります。

api-version
query True

string

minLength: 1

この操作に使用する API バージョン。

要求ヘッダー

Name 必須 型 説明
If-Match

string

エンティティの ETag。 エンティティを作成する場合は必要ありませんが、エンティティを更新する場合は必須です。

要求本文

Name 必須 型 説明
properties.displayName True

string

minLength: 1
maxLength: 256
pattern: ^[A-Za-z0-9-._]+$

NamedValue の一意の名前。 文字、数字、ピリオド、ダッシュ、アンダースコアのみを含めることができます。

properties.keyVault

KeyVaultContractCreateProperties

namedValue の KeyVault の場所の詳細。

properties.secret

boolean

値がシークレットであり、暗号化する必要があるかどうかを判断します。 既定値は false です。

properties.tags

string[]

指定された場合に NamedValue リストをフィルター処理するために使用できる省略可能なタグ。

properties.value

string

maxLength: 4096

NamedValue の値。 ポリシー式を含めることができます。 空白ではないか、空白のみで構成されている場合があります。 このプロパティは'GET' 操作では入力されません。 値を取得するには、'/listSecrets' POST 要求を使用します。

応答

Name 型 説明
200 OK

NamedValueContract

名前付き値が正常に更新されました。

ヘッダー

  • ETag: string
  • location: string
  • Azure-AsyncOperation: string
201 Created

NamedValueContract

名前付き値が正常に作成されました。

ヘッダー

  • ETag: string
  • location: string
  • Azure-AsyncOperation: string
Other Status Codes

ErrorResponse

操作が失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

Name 説明
user_impersonation ユーザー アカウントを偽装する

例

ApiManagementCreateNamedValue
ApiManagementCreateNamedValueWithKeyVault

ApiManagementCreateNamedValue

要求のサンプル

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2?api-version=2024-05-01

{
  "properties": {
    "displayName": "prop3name",
    "value": "propValue",
    "tags": [
      "foo",
      "bar"
    ],
    "secret": false
  }
}

応答のサンプル

location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2?api-version=2024-05-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5c730e343244df1b9cb56e85?api-version=2024-05-01
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2",
  "type": "Microsoft.ApiManagement/service/namedValues",
  "name": "testprop2",
  "properties": {
    "displayName": "prop3name",
    "value": "propValue",
    "tags": [
      "foo",
      "bar"
    ],
    "secret": false,
    "provisioningState": "InProgress"
  }
}
location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2?api-version=2024-05-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=200
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5c730e343244df1b9cb56e85?api-version=2024-05-01
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2",
  "type": "Microsoft.ApiManagement/service/namedValues",
  "name": "testprop2",
  "properties": {
    "displayName": "prop3name",
    "value": "propValue",
    "tags": [
      "foo",
      "bar"
    ],
    "secret": false,
    "provisioningState": "InProgress"
  }
}

ApiManagementCreateNamedValueWithKeyVault

要求のサンプル

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6?api-version=2024-05-01

{
  "properties": {
    "displayName": "prop6namekv",
    "keyVault": {
      "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
      "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret"
    },
    "tags": [
      "foo",
      "bar"
    ],
    "secret": true
  }
}

応答のサンプル

location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6?api-version=2024-05-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5c730e343244df1b9cb56e85?api-version=2024-05-01
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6",
  "type": "Microsoft.ApiManagement/service/namedValues",
  "name": "testprop6",
  "properties": {
    "displayName": "prop6namekv",
    "keyVault": {
      "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret",
      "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
      "lastStatus": {
        "code": "Success",
        "timeStampUtc": "2020-09-11T00:54:31.8024882Z"
      }
    },
    "tags": [
      "foo",
      "bar"
    ],
    "secret": true,
    "provisioningState": "InProgress"
  }
}
location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6?api-version=2024-05-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=200
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5c730e343244df1b9cb56e85?api-version=2024-05-01
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6",
  "type": "Microsoft.ApiManagement/service/namedValues",
  "name": "testprop6",
  "properties": {
    "displayName": "prop6namekv",
    "keyVault": {
      "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret",
      "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
      "lastStatus": {
        "code": "Success",
        "timeStampUtc": "2020-09-11T00:54:31.8024882Z"
      }
    },
    "tags": [
      "foo",
      "bar"
    ],
    "secret": true,
    "provisioningState": "InProgress"
  }
}

定義

Name 説明
ErrorAdditionalInfo

リソース管理エラーの追加情報。

ErrorDetail

エラーの詳細。

ErrorResponse

エラー応答

KeyVaultContractCreateProperties

keyVault コントラクトの詳細を作成します。

KeyVaultContractProperties

KeyVault コントラクトの詳細。

KeyVaultLastAccessStatusContractProperties

コントラクトの更新プロパティを発行します。

NamedValueContract

NamedValue の詳細。

NamedValueCreateContract

NamedValue の詳細。

ErrorAdditionalInfo

リソース管理エラーの追加情報。

Name 型 説明
info

object

追加情報。

type

string

追加情報の種類。

ErrorDetail

エラーの詳細。

Name 型 説明
additionalInfo

ErrorAdditionalInfo[]

エラーの追加情報。

code

string

エラー コード。

details

ErrorDetail[]

エラーの詳細。

message

string

エラー メッセージ。

target

string

エラーターゲット。

ErrorResponse

エラー応答

Name 型 説明
error

ErrorDetail

エラー オブジェクト。

KeyVaultContractCreateProperties

keyVault コントラクトの詳細を作成します。

Name 型 説明
identityClientId

string

SystemAssignedIdentity の場合は Null、UserAssignedIdentity のクライアント ID はキー コンテナー シークレットへのアクセスに使用されます。

secretIdentifier

string

シークレットをフェッチするためのキー コンテナー シークレット識別子。 バージョン管理されたシークレットを指定すると、自動更新が防止されます。 そのためには、API Management サービスを aka.ms/apimmsi で構成する必要があります

KeyVaultContractProperties

KeyVault コントラクトの詳細。

Name 型 説明
identityClientId

string

SystemAssignedIdentity の場合は Null、UserAssignedIdentity のクライアント ID はキー コンテナー シークレットへのアクセスに使用されます。

lastStatus

KeyVaultLastAccessStatusContractProperties

キー コンテナーからのシークレットの最終同期と更新の状態。

secretIdentifier

string

シークレットをフェッチするためのキー コンテナー シークレット識別子。 バージョン管理されたシークレットを指定すると、自動更新が防止されます。 そのためには、API Management サービスを aka.ms/apimmsi で構成する必要があります

KeyVaultLastAccessStatusContractProperties

コントラクトの更新プロパティを発行します。

Name 型 説明
code

string

キー コンテナーからのシークレットの同期と更新の最後の状態コード。

message

string

エラーの詳細。それ以外は空です。

timeStampUtc

string (date-time)

シークレットが最後にアクセスされた時刻。 日付は、ISO 8601 標準で指定された yyyy-MM-ddTHH:mm:ssZ 形式に準拠しています。

NamedValueContract

NamedValue の詳細。

Name 型 説明
id

string

リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

リソースの名前

properties.displayName

string

minLength: 1
maxLength: 256
pattern: ^[A-Za-z0-9-._]+$

NamedValue の一意の名前。 文字、数字、ピリオド、ダッシュ、アンダースコアのみを含めることができます。

properties.keyVault

KeyVaultContractProperties

namedValue の KeyVault の場所の詳細。

properties.provisioningState

string

プロビジョニングの状態

properties.secret

boolean

値がシークレットであり、暗号化する必要があるかどうかを判断します。 既定値は false です。

properties.tags

string[]

指定された場合に NamedValue リストをフィルター処理するために使用できる省略可能なタグ。

properties.value

string

maxLength: 4096

NamedValue の値。 ポリシー式を含めることができます。 空白ではないか、空白のみで構成されている場合があります。 このプロパティは'GET' 操作では入力されません。 値を取得するには、'/listSecrets' POST 要求を使用します。

type

string

リソースの種類。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"

NamedValueCreateContract

NamedValue の詳細。

Name 型 説明
id

string

リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

リソースの名前

properties.displayName

string

minLength: 1
maxLength: 256
pattern: ^[A-Za-z0-9-._]+$

NamedValue の一意の名前。 文字、数字、ピリオド、ダッシュ、アンダースコアのみを含めることができます。

properties.keyVault

KeyVaultContractCreateProperties

namedValue の KeyVault の場所の詳細。

properties.secret

boolean

値がシークレットであり、暗号化する必要があるかどうかを判断します。 既定値は false です。

properties.tags

string[]

指定された場合に NamedValue リストをフィルター処理するために使用できる省略可能なタグ。

properties.value

string

maxLength: 4096

NamedValue の値。 ポリシー式を含めることができます。 空白ではないか、空白のみで構成されている場合があります。 このプロパティは'GET' 操作では入力されません。 値を取得するには、'/listSecrets' POST 要求を使用します。

type

string

リソースの種類。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"