updatableAssetGroup:removeMembersById
命名空间:microsoft.graph.windowsUpdates
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
从 updatableAssetGroup 中删除相同类型的成员。
您还可以使用 removeMembers 方法 删除成员。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 |
权限(从最低特权到最高特权) |
| 委派(工作或学校帐户) |
WindowsUpdates.ReadWrite.All |
| 委派(个人 Microsoft 帐户) |
不支持。 |
| 应用程序 |
WindowsUpdates.ReadWrite.All |
HTTP 请求
POST /admin/windows/updates/updatableAssets/{updatableAssetGroupId}/removeMembersById
| 名称 |
说明 |
| Authorization |
Bearer {token}。必需。 |
| Content-Type |
application/json. Required. |
请求正文
在请求正文中,提供参数的 JSON 表示形式。
下表显示了可用于此操作的参数。
| 参数 |
类型 |
说明 |
| ids |
String collection |
与要作为 updatableAssetGroup 成员删除的 updatableAsset 资源对应的标识符列表。 |
| memberEntityType |
String |
updatableAsset 资源的完整 类型。 可能的值是: #microsoft.graph.windowsUpdates.azureADDevice。 |
响应
如果成功,此操作返回 202 Accepted 响应代码。 它不会在响应正文中返回任何内容。
示例
请求
POST https://graph.microsoft.com/beta/admin/windows/updates/updatableAssets/{updatableAssetGroupId}/removeMembersById
Content-Type: application/json
{
"ids": [
"String",
"String",
"String"
],
"memberEntityType": "#microsoft.graph.windowsUpdates.azureADDevice"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var ids = new List<String>()
{
"String",
"String",
"String"
};
var memberEntityType = "#microsoft.graph.windowsUpdates.azureADDevice";
await graphClient.Admin.Windows.Updates.UpdatableAssets["{windowsUpdates.updatableAsset-id}"]
.RemoveMembersById(ids,memberEntityType)
.Request()
.PostAsync();
const options = {
authProvider,
};
const client = Client.init(options);
const removeMembersById = {
ids: [
'String',
'String',
'String'
],
memberEntityType: '#microsoft.graph.windowsUpdates.azureADDevice'
};
await client.api('/admin/windows/updates/updatableAssets/{updatableAssetGroupId}/removeMembersById')
.version('beta')
.post(removeMembersById);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/admin/windows/updates/updatableAssets/{updatableAssetGroupId}/removeMembersById"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
NSMutableArray *idsList = [[NSMutableArray alloc] init];
[idsList addObject: @"String"];
[idsList addObject: @"String"];
[idsList addObject: @"String"];
payloadDictionary[@"ids"] = idsList;
NSString *memberEntityType = @"#microsoft.graph.windowsUpdates.azureADDevice";
payloadDictionary[@"memberEntityType"] = memberEntityType;
NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
[urlRequest setHTTPBody:data];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
LinkedList<String> idsList = new LinkedList<String>();
idsList.add("String");
idsList.add("String");
idsList.add("String");
String memberEntityType = "#microsoft.graph.windowsUpdates.azureADDevice";
graphClient.admin().windows().updates().updatableAssets("{updatableAssetGroupId}")
.removeMembersById(UpdatableAssetRemoveMembersByIdParameterSet
.newBuilder()
.withIds(idsList)
.withMemberEntityType(memberEntityType)
.build())
.buildRequest()
.post();
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.New()
requestBody.SetIds( []String {
"String",
"String",
"String",
}
memberEntityType := "#microsoft.graph.windowsUpdates.azureADDevice"
requestBody.SetMemberEntityType(&memberEntityType)
updatableAssetId := "updatableAsset-id"
graphClient.Admin().Windows().Updates().UpdatableAssetsById(&updatableAssetId).RemoveMembersById(updatableAsset-id).Post(requestBody)
Import-Module Microsoft.Graph.WindowsUpdates
$params = @{
Ids = @(
"String"
"String"
"String"
)
MemberEntityType = "#microsoft.graph.windowsUpdates.azureADDevice"
}
Remove-MgWindowsUpdatesUpdatableAssetMemberById -UpdatableAssetId $updatableAssetId -BodyParameter $params
响应
HTTP/1.1 202 Accepted