Method: policies.set
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
지정된 리소스의 액세스 제어 정책을 설정합니다. 기존 정책을 대체합니다.
HTTP 요청
POST https://sasportal.googleapis.com/v1alpha1/policies:set
URL은 gRPC 트랜스코딩 구문을 사용합니다.
요청 본문
요청 본문에는 다음과 같은 구조의 데이터가 포함됩니다.
JSON 표현 |
{
"resource": string,
"policy": {
object (Policy )
},
"disableNotification": boolean
} |
필드 |
resource |
string
필수입니다. 정책을 지정할 리소스입니다. 이 정책은 기존 정책을 대체합니다.
|
policy |
object (Policy )
필수입니다. resource 에 적용할 정책입니다.
|
disableNotification |
boolean
선택사항입니다. 온보딩 알림을 사용 중지하려면 필드를 true 로 설정합니다.
|
응답 본문
성공한 경우 응답 본문에 Policy
의 인스턴스가 포함됩니다.
승인 범위
다음과 같은 OAuth 범위가 필요합니다.
https://www.googleapis.com/auth/sasportal
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eSets the access control policy on a specified resource, replacing any existing policy.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires the resource, the policy to be applied, and optionally allows disabling onboarding notifications.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the applied policy.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003ehttps://www.googleapis.com/auth/sasportal\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],["The core function is to set an access control policy on a resource via a `POST` HTTP request to `https://sasportal.googleapis.com/v1alpha1/policies:set`. The request body, in JSON format, requires a `resource` string and a `policy` object. Optionally, `disableNotification` can be set to `true`. A successful request returns a `Policy` instance. This process requires the `https://www.googleapis.com/auth/sasportal` OAuth scope. Existing policies are replaced.\n"],null,["# Method: policies.set\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n\nSets the access control policy on the specified resource. Replaces any existing policy.\n\n### HTTP request\n\n`POST https://sasportal.googleapis.com/v1alpha1/policies:set`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"resource\": string, \"policy\": { object (/spectrum-access-system/reference/rest/v1alpha1/Policy) }, \"disableNotification\": boolean } ``` |\n\n| Fields ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `resource` | `string` Required. The resource for which the policy is being specified. This policy replaces any existing policy. |\n| `policy` | `object (`[Policy](/spectrum-access-system/reference/rest/v1alpha1/Policy)`)` Required. The policy to be applied to the `resource`. |\n| `disableNotification` | `boolean` Optional. Set the field as `true` to disable the onboarding notification. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Policy](/spectrum-access-system/reference/rest/v1alpha1/Policy).\n\n### Authorization Scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/sasportal`"]]