次の方法で共有


az apic api definition

手記

このリファレンスは、Azure CLI (バージョン 2.57.0 以降) の apic-extension 拡張機能の一部です。 拡張機能は、az apic api definition コマンドを初めて実行するときに自動的にインストールされます。 拡張機能の詳細については、 を参照してください。

API Center で API 定義を管理するコマンド。

コマンド

名前 説明 状態
az apic api definition create

新しい API 定義を作成するか、既存の API 定義を更新します。

延長 ジョージア 州
az apic api definition delete

指定した API 定義を削除します。

延長 ジョージア 州
az apic api definition export-specification

API 仕様をエクスポートします。

延長 ジョージア 州
az apic api definition import-specification

API 仕様をインポートします。

延長 ジョージア 州
az apic api definition list

API 定義のコレクションを一覧表示します。

延長 ジョージア 州
az apic api definition show

API 定義の詳細を取得します。

延長 ジョージア 州
az apic api definition update

既存の API 定義を更新します。

延長 ジョージア 州

az apic api definition create

新しい API 定義を作成するか、既存の API 定義を更新します。

az apic api definition create --api-id
                              --definition-id
                              --resource-group
                              --service-name
                              --title
                              --version-id
                              [--description]

API 定義を作成する

az apic api definition create -g api-center-test -n contosoeuap --api-id echo-api --version-id 2023-01-01 --definition-id "openapi" --title "OpenAPI"

必須のパラメーター

--api-id

API の ID。

--definition-id

API 定義の ID。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name>を使用して既定のグループを構成できます。

--service-name -n

Azure API Center サービスの名前。

--title

API バージョン。

--version-id

API バージョンの ID。

省略可能のパラメーター

--description

API 定義の説明。

グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

az apic api definition delete

指定した API 定義を削除します。

az apic api definition delete [--api-id]
                              [--definition-id]
                              [--ids]
                              [--resource-group]
                              [--service-name]
                              [--subscription]
                              [--version-id]
                              [--yes]

API 定義の削除

az apic api definition delete -g api-center-test -n contosoeuap --api-id echo-api --version-id 2023-01-01 --definition-id "openapi"

省略可能のパラメーター

--api-id

API の ID。

--definition-id

API 定義の ID。

--ids

1 つ以上のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name>を使用して既定のグループを構成できます。

--service-name -n

Azure API Center サービスの名前。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--version-id

API バージョンの ID。

--yes -y

確認を求めないでください。

規定値: False
グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

az apic api definition export-specification

API 仕様をエクスポートします。

az apic api definition export-specification --file-name
                                            [--api-id]
                                            [--definition-id]
                                            [--ids]
                                            [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                            [--resource-group]
                                            [--service-name]
                                            [--subscription]
                                            [--version-id]

エクスポートの仕様

az apic api definition export-specification -g api-center-test -n contosoeuap --api-id echo-api --version-id 2023-01-01 --definition-id default --file-name filename.json

必須のパラメーター

--file-name

スペックのエクスポート先となるファイルの名前。

省略可能のパラメーター

--api-id

API の ID。

--definition-id

API 定義の ID。

--ids

1 つ以上のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--no-wait

実行時間の長い操作が完了するまで待つ必要はありません。

指定可能な値: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

リソース グループの名前。 az configure --defaults group=<name>を使用して既定のグループを構成できます。

--service-name -n

Azure API Center サービスの名前。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--version-id

API バージョンの ID。

グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

az apic api definition import-specification

API 仕様をインポートします。

az apic api definition import-specification --format {inline, link}
                                            --specification
                                            --value
                                            [--api-id]
                                            [--definition-id]
                                            [--ids]
                                            [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                            [--resource-group]
                                            [--service-name]
                                            [--subscription]
                                            [--version-id]

インポート仕様の例 1

az apic api definition import-specification -g api-center-test -n contosoeuap --api-id echo-api-2 --version-id 2023-08-01 --definition-id openapi3 --format "inline" --value '{"openapi":"3.0.1","info":{"title":"httpbin.org","description":"API Management facade for a very handy and free online HTTP tool.","version":"1.0"}}' --specification '{"name":"openapi","version":"3.0.0"}'

インポート仕様の例 2

az apic api definition import-specification -g api-center-test -n contoso --api-id echo-api --version-id 2023-11-01 --definition-id openapi --format "link" --value 'https://petstore3.swagger.io/api/v3/openapi.json' --specification '{"name":"openapi","version":"3.0.0"}'

ファイルから仕様をインポートする例

az apic api definition import-specification -g api-center-test -n contosoeuap --api-id echo-api --version-id 2023-08-01 --definition-id openapi --format "inline" --value '@petstore.json'

必須のパラメーター

--format

API 仕様ソースの形式。

指定可能な値: inline, link
--specification

API 仕様の詳細。 短縮構文、json-file、yaml-file をサポートします。 詳細を表示するには、"??" を試してください。

--value

API 仕様ソースの値。

省略可能のパラメーター

--api-id

API の ID。

--definition-id

API 定義の ID。

--ids

1 つ以上のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--no-wait

実行時間の長い操作が完了するまで待つ必要はありません。

指定可能な値: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

リソース グループの名前。 az configure --defaults group=<name>を使用して既定のグループを構成できます。

--service-name -n

Azure API Center サービスの名前。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--version-id

API バージョンの ID。

グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

az apic api definition list

API 定義のコレクションを一覧表示します。

az apic api definition list --api-id
                            --resource-group
                            --service-name
                            --version-id
                            [--filter]
                            [--max-items]
                            [--next-token]

API 定義を一覧表示する

az apic api definition list -g api-center-test -n contosoeuap --api-id echo-api --version-id 2023-01-01

必須のパラメーター

--api-id

API の ID。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name>を使用して既定のグループを構成できます。

--service-name -n

Azure API Center サービスの名前。

--version-id

API バージョンの ID。

省略可能のパラメーター

--filter

OData フィルター パラメーター。

--max-items

コマンドの出力で返される項目の合計数。 使用可能な項目の合計数が指定された値を超える場合は、コマンドの出力にトークンが提供されます。 改ページ位置の変更を再開するには、後続のコマンドの引数 --next-token トークン値を指定します。

--next-token

ページ分割を開始する場所を指定するトークン。 これは、以前に切り捨てられた応答からのトークン値です。

グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

az apic api definition show

API 定義の詳細を取得します。

az apic api definition show [--api-id]
                            [--definition-id]
                            [--ids]
                            [--resource-group]
                            [--service-name]
                            [--subscription]
                            [--version-id]

API 定義の詳細を表示する

az apic api definition show -g api-center-test -n contosoeuap --api-id echo-api --version-id 2023-01-01 --definition-id "openapi"

省略可能のパラメーター

--api-id

API の ID。

--definition-id

API 定義の ID。

--ids

1 つ以上のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name>を使用して既定のグループを構成できます。

--service-name -n

Azure API Center サービスの名前。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--version-id

API バージョンの ID。

グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。

az apic api definition update

既存の API 定義を更新します。

az apic api definition update [--add]
                              [--api-id]
                              [--definition-id]
                              [--description]
                              [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                              [--ids]
                              [--remove]
                              [--resource-group]
                              [--service-name]
                              [--set]
                              [--subscription]
                              [--title]
                              [--version-id]

API 定義を更新する

az apic api definition update -g api-center-test -n contosoeuap --api-id echo-api --version-id 2023-01-01 --definition-id "openapi" --title "OpenAPI"

省略可能のパラメーター

--add

パスとキー値のペアを指定して、オブジェクトの一覧にオブジェクトを追加します。 例: --add property.listProperty <key=value, string or JSON string>.

--api-id

API の ID。

--definition-id

API 定義の ID。

--description

API 定義の説明。

--force-string

'set' または 'add' を使用する場合は、JSON に変換するのではなく、文字列リテラルを保持します。

指定可能な値: 0, 1, f, false, n, no, t, true, y, yes
--ids

1 つ以上のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--remove

リストからプロパティまたは要素を削除します。 例: --remove property.list <indexToRemove> OR --remove propertyToRemove

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name>を使用して既定のグループを構成できます。

--service-name -n

Azure API Center サービスの名前。

--set

設定するプロパティ パスと値を指定して、オブジェクトを更新します。 例: --set property1.property2=<value>.

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--title

API バージョンのタイトル。

--version-id

API バージョンの ID。

グローバル パラメーター
--debug

ログの詳細度を上げて、すべてのデバッグ ログを表示します。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告を抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_IDを使用して既定のサブスクリプションを構成できます。

--verbose

ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。