名前空間: microsoft.graph
重要
Microsoft Graph の /beta
バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
connectorGroup オブジェクトを作成します。
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
委任 (職場または学校のアカウント) |
Directory.ReadWrite.All |
注意事項なし。 |
委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
アプリケーション |
Directory.ReadWrite.All |
注意事項なし。 |
HTTP 要求
POST /onPremisesPublishingProfiles/applicationProxy/connectorGroups
名前 |
説明 |
Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
Content-type |
application/json. 必須です。 |
要求本文
要求本文で、 connectorGroup オブジェクトの JSON 表現を指定します。
次の表に、connectorGroup で使用できるプロパティの一覧を 示します。
name プロパティは必須のプロパティです。
プロパティ |
型 |
説明 |
connectorGroupType |
string |
ハイブリッド エージェントの種類を示します。 このプロパティは、システムによって事前設定されています。 |
id |
string |
この connectorGroup の一意識別子。 読み取り専用です。 |
isDefault |
ブール型 |
connectorGroup が既定であるかどうかを示します。 既定のコネクタ グループにできるのは 1 つのコネクタ グループのみであり、これはシステムによって事前設定されています。 |
name |
string |
connectorGroup に関連付けられている名前。 |
地域 |
string |
connectorGroup が割り当てられているリージョンで、トラフィックが最適化されます。 このリージョンは 、コネクタまたは アプリケーションが connectorGroup に割り当てられていない場合にのみ設定できます。 利用可能なリージョンは、北米、ヨーロッパ、オーストラリア、アジア、インドです。 可能な値は、nam 、eur 、aus 、asia 、ind です。 |
応答
成功した場合、このメソッドは 201 Created
応答コードと、応答本文に connectorGroup オブジェクトを返します。
例
要求
次の例は要求を示しています。
POST https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups
Content-type: application/json
{
"name": "Connector Group Demo"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new ConnectorGroup
{
Name = "Connector Group Demo",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.OnPremisesPublishingProfiles["{onPremisesPublishingProfile-id}"].ConnectorGroups.PostAsync(requestBody);
mgc-beta on-premises-publishing-profiles connector-groups create --on-premises-publishing-profile-id {onPremisesPublishingProfile-id} --body '{\
"name": "Connector Group Demo"\
\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewConnectorGroup()
name := "Connector Group Demo"
requestBody.SetName(&name)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
connectorGroups, err := graphClient.OnPremisesPublishingProfiles().ByOnPremisesPublishingProfileId("onPremisesPublishingProfile-id").ConnectorGroups().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ConnectorGroup connectorGroup = new ConnectorGroup();
connectorGroup.setName("Connector Group Demo");
ConnectorGroup result = graphClient.onPremisesPublishingProfiles().byOnPremisesPublishingProfileId("{onPremisesPublishingProfile-id}").connectorGroups().post(connectorGroup);
const options = {
authProvider,
};
const client = Client.init(options);
const connectorGroup = {
name: 'Connector Group Demo'
};
await client.api('/onPremisesPublishingProfiles/applicationProxy/connectorGroups')
.version('beta')
.post(connectorGroup);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\ConnectorGroup;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ConnectorGroup();
$requestBody->setName('Connector Group Demo');
$result = $graphServiceClient->onPremisesPublishingProfiles()->byOnPremisesPublishingProfileId('onPremisesPublishingProfile-id')->connectorGroups()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Applications
$params = @{
name = "Connector Group Demo"
}
New-MgBetaOnPremisePublishingProfileConnectorGroup -OnPremisesPublishingProfileId $onPremisesPublishingProfileId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.connector_group import ConnectorGroup
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ConnectorGroup(
name = "Connector Group Demo",
)
result = await graph_client.on_premises_publishing_profiles.by_on_premises_publishing_profile_id('onPremisesPublishingProfile-id').connector_groups.post(request_body)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 201 Created
Content-type: application/json
{
"id": "3e6f4c35-a04b-4d03-b98a-66fff89b72e6",
"name": "Connector Group Demo",
"connectorGroupType": "applicationProxy",
"isDefault": true,
"region": "nam"
}