メインコンテンツにスキップ

Fabric Cloud Routerの管理

前提条件​

認証-ユーザー認証情報、クライアントID、クライアントシークレットを送信してOauth2認証を行います。認証情報を検証および認証するためにOAuth APIを呼び出す方法については、「API認証」を参照してください。

Fabric Cloud Router の検索と取得​

このAPIリクエストは、指定された検索条件に一致するFabric Cloud Routerインスタンスを取得します。リクエストの本文に条件を指定して、エンドポイントにリクエストを/fabric/v4/routers/search送信します。POST

POST /fabric/v4/routers/検索
方法POST
URLまたはエンドポイント/fabric/v4/routers/search
ヘッダーAuthorization、Content-Type
パスパラメータ該当なし
クエリーパラメータ該当なし
ボディパラメータfilter、pagination、sort

サンプルcurlリクエスト:

curl -X POST 'http: //api.equinix.com/fabric/v4/routers/search'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
    "filter": {
        "and": [
            {
                "property": "/name",
                "operator": "LIKE",
                "values": [
                    "%Test%"
                ]
            },
            {
                "property": "/state",
                "operator": "=",
                "values": [
                    "PROVISIONED"
                ]
            },
            {
                "property": "/project/projectId",
                "operator": "=",
                "values": [
                    "995072000433550"
                ]
            },
            {
                "property": "/location/metroCode",
                "operator": "=",
                "values": [
                    "SV"
                ]
            }
        ]
    },
    "pagination": {
        "offset": 0,
        "limit": 20
    },
    "sort": [
        {
            "direction": "DESC",
            "property": "/changeLog/createdDateTime"
        }
    ]
}'

注目すべきボディパラメーター

  • filter (必須) object -検索条件を定義するオブジェクト。

  • and(必須) array[object]-配列内の検索オブジェクトに適用される論理演算子として機能する配列オブジェクト。以下で検索できます。

    • property(必須) string -検索フィールドパラメータ。プロパティ値によって、適用可能な演算子と値のリストが決定されることに注意してください。適用可能な値:"/name"``"/uuid"、、"/state"、、"/location/metroCode"、"/location/metroName"``"/package/code" すべてのカテゴリで検索できます。"\*"
    • operator(必須) string -検索フィールドのパラメータ演算子。適用可能な値: "="``"!="、、">"、、">="、"<"``"<="``BETWEEN、、LIKE、、IN、"NOT BETWEEN"``"NOT LIKE"、。"NOT IN"
    • value(必須) array[string]-検索フィールドのパラメータ値。
  • paginationobject - __ _整数_フィールドとlimit_整数_フィールドを持つ検索結果のページネーション設定を含むオプションオブジェクト。offset

  • sortobject -文字列 __ フィールドとproperty_文字列_フィールドを使用して検索結果のソート設定を定義するオプションのオブジェクト。direction

検索可能なプロパティ、ページ番号の制限、ソート可能なプロパティの完全なリストについては、APIリファレンスを参照してください。

回答例

{
    "pagination": {
        "offset": 0,
        "limit": 20,
        "total": 1,
        "next": "/search?offset=4&limit=2",
        "previous": "/search?offset=0&limit=2"
    },
    "data": [
        {
            "href": "https://api.equinix.com/fabric/v4/routers/201b7346-a9eb-42fe-ae7a-08148c71928d",
            "uuid": "201b7346-a9eb-42fe-ae7a-08148c71928d",
            "state": "PROVISIONED",
            "type": "XF_ROUTER",
            "name": "My-Fabric-Cloud-Router",
            "location": {
                "metroCode": "HH"
            },
            "package": {
                "code": "LAB"
            },
            "order": {
                "purchaseOrderNumber": "1-129105284100"
            },
            "project": {
                "projectId": "12345"
            },
            "notifications": [
                {
                    "type": "ALL",
                    "emails": [
                        "abc@abc.com"
                    ]
                }
            ],
            "account": {
                "accountNumber": 123
            },
            "bgpIpv4RoutesCount": 0,
            "bgpIpv6RoutesCount": 0,
            "connectionsCount": 0,
            "changeLog": {
                "createdBy": "abc@xyz.com",
                "createdByFullName": "abc",
                "createdByEmail": "abc@xyz.com",
                "createdDateTime": "2021-09-24T06:59:46Z"
            }
        }
    ]
}

指定 Fabric Cloud Router の取得​

このAPIリクエストは、指定されたFabric Cloud Routerの詳細を取得し、リクエストのパスにあるを使用してエンドポイントにuuidリクエストを/fabric/v4/routers/{uuid}送信します。GET

/fabric/v4/routers/{uuid}を取得
方法GET
URLまたはエンドポイント/fabric/v4/routers/{uuid}
ヘッダーAuthorization、Content-Type
パスパラメータuuid
クエリーパラメータ該当なし
ボディパラメータ該当なし

サンプルcurlリクエスト:

curl -X
GET 'https://api.equinix.com/fabric/v4/routers/{router_uuid}'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'

回答例

{
    "href": "https://api.equinix.com/fabric/v4/routers/201b7346-a9eb-42fe-ae7a-08148c71928d",
    "uuid": "201b7346-a9eb-42fe-ae7a-08148c71928d",
    "state": "PROVISIONED",
    "type": "XF_ROUTER",
    "name": "My-Fabric-Cloud-Router",
    "location": {
        "metroCode": "HH"
    },
    "package": {
        "code": "LAB"
    },
    "order": {
        "purchaseOrderNumber": "1-129105284100"
    },
    "project": {
        "projectId": "12345"
    },
    "notifications": [
        {
            "type": "ALL",
            "emails": [
                "abc@abc.com"
            ]
        }
    ],
    "account": {
        "accountNumber": 123
    },
    "bgpIpv4RoutesCount": 0,
    "bgpIpv6RoutesCount": 0,
    "distinctIpv4PrefixesCount": 4,
    "distinctIpv6PrefixesCount": 4,
    "connectionsCount": 0,
    "changeLog": {
        "createdBy": "abc@xyz.com",
        "createdByFullName": "abc",
        "createdByEmail": "abc@xyz.com",
        "createdDateTime": "2021-09-24T06:59:46Z"
    }
}

Fabric Cloud Routerのアップデート​

Fabric Cloud Routerを更新するには、 /fabric/v4/routers/{routerId}更新するパラメータをリクエストの本文でエンドポイントに送信します。PATCH名前を更新するか、パッケージを変更できます。

パッチ/ファブリック/v4/routers/{uuid}
方法パッチ
URLまたはエンドポイント/fabric/v4/routers/{uuid}
ヘッダーAuthorization、Content-Type
パスパラメータuuid
クエリーパラメータ該当なし
ボディパラメータop、path、value

サンプルcurlリクエスト:

curl -X
PATCH 'https: //api.equinix.com/fabric/v4/routers/{router_uuid}'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '[
    {
        "op": "replace",
        "path": "/name",
        "value": "Cloud-Router-2"
    }
]'

注目すべきボディパラメーター

  • op (必須) string -更新リクエストタイプ。適用可能な値:replace、add、、または。remove
  • path(必須) string -更新する値のパラメータパス。適用可能な値:"/name"または。"/package/code"
  • value(必須) string -新しいパラメータ値。

更新可能なフィールドとその値の完全なリストについては、APIリファレンスを参照してください。

Fabric Cloud Routerを削除​

Fabric Cloud Routerを削除するには、エンドポイントにリクエストを/fabric/v4/routers/{uuid}送信します。DELETE削除するルーターをパスで指定します。uuid

/fabric/v4/routers/{uuid}を削除
方法削除
URLまたはエンドポイント/fabric/v4/routers/{uuid}
ヘッダーAuthorization、Content-Type
パスパラメータuuid
クエリーパラメータ該当なし
ボディパラメータ該当なし

サンプルcurlリクエスト:

curl -X
DELETE 'https://api.equinix.com/fabric/v4/routers/{router_uuid}'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
このページは役に立ちましたか?