Não forneça um corpo de solicitação para esse método.
Resposta
Se for bem-sucedido, esse método retornará um 200 OK código de resposta e um objeto printerShare no corpo da resposta.
Por padrão, a resposta não conterá impressoraCapabilities. Para obter impressoraCapabilities, use o $select parâmetro de consulta.
GET https://graph.microsoft.com/v1.0/print/shares/{printerShareId}
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Print.Shares["{printerShare-id}"].GetAsync();
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
shares, err := graphClient.Print().Shares().ByPrinterShareId("printerShare-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
PrinterShare result = graphClient.print().shares().byPrinterShareId("{printerShare-id}").get();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.print.shares.by_printer_share_id('printerShare-id').get()
GET https://graph.microsoft.com/v1.0/print/shares/{printerShareId}?$select=id,displayName,capabilities
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Print.Shares["{printerShare-id}"].GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Select = new string []{ "id","displayName","capabilities" };
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphprint "github.com/microsoftgraph/msgraph-sdk-go/print"
//other-imports
)
requestParameters := &graphprint.SharesItemRequestBuilderGetQueryParameters{
Select: [] string {"id","displayName","capabilities"},
}
configuration := &graphprint.SharesItemRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
shares, err := graphClient.Print().Shares().ByPrinterShareId("printerShare-id").Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
PrinterShare result = graphClient.print().shares().byPrinterShareId("{printerShare-id}").get(requestConfiguration -> {
requestConfiguration.queryParameters.select = new String []{"id", "displayName", "capabilities"};
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.print.shares.item.printer_share_item_request_builder import PrinterShareItemRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = PrinterShareItemRequestBuilder.PrinterShareItemRequestBuilderGetQueryParameters(
select = ["id","displayName","capabilities"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.print.shares.by_printer_share_id('printerShare-id').get(request_configuration = request_configuration)