1.16.2. パス

1.16.2.1. DiscoveryConfig の作成

POST /app.k8s.io/v1alpha1/namespaces/{namespace}/discoveryconfigs
1.16.2.1.1. 説明

DiscoveryConfig を作成します。

1.16.2.1.2. パラメーター
タイプ名前説明スキーマ

ヘッダー

COOKIE
必須

Authorization: Bearer {ACCESS_TOKEN}。ACCESS_TOKEN はユーザーのアクセストークンに置き換えます。

文字列

パス

namespace
必須

使用する namespace (例: default)

文字列

本文

body
必須

作成する DiscoveryConfig を記述するパラメーター。

DiscoveryConfig

1.16.2.1.3. 応答
HTTP コード説明スキーマ

200

成功

コンテンツなし

403

アクセス禁止

コンテンツなし

404

リソースが見つからない

コンテンツなし

500

内部サービスエラー

コンテンツなし

503

サービスが利用できない

コンテンツなし

1.16.2.1.4. 消費
  • discoveryconfigs/yaml
1.16.2.1.5. タグ
  • discoveryconfigs.discovery.open-cluster-management.io
1.16.2.1.5.1. 要求のボディー
{
  "apiVersion": "apiextensions.k8s.io/v1",
  "kind": "CustomResourceDefinition",
  "metadata": {
    "annotations": {
      "controller-gen.kubebuilder.io/version": "v0.4.1",
    },
    "creationTimestamp": null,
    "name": "discoveryconfigs.discovery.open-cluster-management.io",
  },
  "spec": {
    "group": "discovery.open-cluster-management.io",
    "names": {
      "kind": "DiscoveryConfig",
      "listKind": "DiscoveryConfigList",
      "plural": "discoveryconfigs",
      "singular": "discoveryconfig"
    },
    "scope": "Namespaced",
    "versions": [
      {
        "name": "v1alpha1",
        "schema": {
          "openAPIV3Schema": {
            "description": "DiscoveryConfig is the Schema for the discoveryconfigs API",
            "properties": {
              "apiVersion": {
                "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
                "type": "string"
              },
              "kind": {
                "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                "type": "string"
              },
              "metadata": {
                "type": "object"
              },
              "spec": {
                "description": "DiscoveryConfigSpec defines the desired state of DiscoveryConfig",
                "properties": {
                  "credential": {
                    "description": "Credential is the secret containing credentials to connect to the OCM api on behalf of a user",
                    "type": "string"
                  },
                  "filters": {
                    "description": "Sets restrictions on what kind of clusters to discover",
                    "properties": {
                      "lastActive": {
                        "description": "LastActive is the last active in days of clusters to discover, determined by activity timestamp",
                        "type": "integer"
                      },
                      "openShiftVersions": {
                        "description": "OpenShiftVersions is the list of release versions of OpenShift of the form \"<Major>.<Minor>\"",
                        "items": {
                          "description": "Semver represents a partial semver string with the major and minor version in the form \"<Major>.<Minor>\". For example: \"4.5\"",
                          "pattern": "^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$",
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "credential"
                ],
                "type": "object"
              },
              "status": {
                "description": "DiscoveryConfigStatus defines the observed state of DiscoveryConfig",
                "type": "object"
              }
            },
            "type": "object"
          }
        },
        "served": true,
        "storage": true,
        "subresources": {
          "status": {}
        }
      }
    ]
  },
  "status": {
    "acceptedNames": {
      "kind": "",
      "plural": ""
    },
    "conditions": [],
    "storedVersions": []
  }
}