Method: policies.get
Pobiera zasadę kontroli dostępu do zasobu. Zwraca pustą zasadę, jeśli zasób istnieje i nie ma ustawionych zasad.
Żądanie HTTP
POST https://sasportal.googleapis.com/v1alpha1/policies:get
Adres URL używa składni transkodowania gRPC.
Treść żądania
Treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"resource": string
} |
Pola |
resource |
string
Wymagany. Zasób, którego dotyczy zasada.
|
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu Policy
.
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/sasportal
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2022-11-02 UTC.
[null,null,["Ostatnia aktualizacja: 2022-11-02 UTC."],[[["Retrieves the access control policy for a given resource, returning an empty policy if none is set."],["Utilizes a POST request to the `https://sasportal.googleapis.com/v1alpha1/policies:get` endpoint with a JSON request body specifying the resource."],["The response body will contain the policy details within a `Policy` object if successful."],["Requires the `https://www.googleapis.com/auth/sasportal` OAuth scope for authorization."]]],["The core content describes how to retrieve an access control policy for a resource. A `POST` request is sent to `https://sasportal.googleapis.com/v1alpha1/policies:get`. The request body requires a JSON object with a \"resource\" string field, specifying the target resource. A successful response returns a `Policy` object. The process requires the OAuth scope `https://www.googleapis.com/auth/sasportal` for authorization. An empty policy will be returned if no policy is set.\n"]]