기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Resource Policy API

v1

지원 가능
​

Resource Policy API

v1

지원 가능
​

이 페이지는 선택한 언어로 제공되지 않습니다.
Unity Services Web APIs
​
​
mdx:openapi:endpoints
  • PlayerPolicy
  • ProjectPolicy

Access Resource Policy API

This service allows customers and administrators to restrict resources (project and player) read/write access for gaming services.
Download OpenAPI specification:

Get a project based policy


A policy consists of multiple policy statements. This endpoint will return a Policy object containing an array of all non-expired policy statements in that policy.
Authorizations
ServiceAccount (unity.project_resource_policy.get)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: unity.project_resource_policy.get
Bearer
HTTP: Bearer
HTTP Authorization Scheme: bearer

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://services.api.unity.com/access/resource-policy/v1/projects/{projectId}/environments/{environmentId}/resource-policy"

Response example

{ "statements": [ { "Sid": "statement_id1", "Action": [ "string" ], "Effect": "string", "Principal": "string", "Resource": "urn:ugs:cloud-save:*", "ExpiresAt": "2020-07-20T18:30:51.243Z", "Version": "string" } ]}

Create or update a project based policy


Create or update a project based policy. A maximum of 500 non-expired statements per policy can be created/updated.
Authorizations
ServiceAccount (unity.project_resource_policy.update)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: unity.project_resource_policy.update
Bearer
HTTP: Bearer
HTTP Authorization Scheme: bearer

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

Request body for "{title}"

Media Type:
application/json

statements

array[object]
No description

Sid

string
필수
example: statement_id1
Statement ID. Consists of alphanumeric characters and hyphen, and must be of length between 6 and 60 chars.

Action

array[string]
필수
User action against which the policy statement will be applicable. Allowable values are "Read", "Write", "*", "Vivox:JoinMuted", "Vivox:JoinAllMuted, "Vivox:JoinWithConsent", "Vivox:JoinWithConsent".

Effect

string
필수
Effect of the policy statement. Allowable values are "Allow" and "Deny"

Principal

string
필수
The principal the statement applies to, Allowed values are "Player" and "Unauthenticated"

Resource

string
필수
example: urn:ugs:cloud-save:*
Uniform resource name of the resource(s) being targeted by the policy. The format is
urn:ugs:<service-name>:/<path>
. For example,
urn:ugs:*
targets all services. Some other examples are
  • urn:ugs:cloud-code:/v1/projects/*/scripts/*
  • urn:ugs:economy:/*

ExpiresAt

string
example: 2020-07-20T18:30:51.243Z
UTC time (ISO 8601 extended format) when the policy expires

Version

string
No description

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X PATCH \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "statements": [ { "Sid": "statement_id1", "Action": [ "string" ], "Effect": "string", "Principal": "string", "Resource": "urn:ugs:cloud-save:*", "ExpiresAt": "2020-07-20T18:30:51.243Z", "Version": "string" } ]}' \ "https://services.api.unity.com/access/resource-policy/v1/projects/{projectId}/environments/{environmentId}/resource-policy"

Response example

{ "title": "Bad Request", "status": 400, "detail": "Something is wrong", "details": [ { "code": "ERROR_CODE_123", "path": "nested.value", "message": "Invalid value" } ], "requestId": "aad109f8-033f-4a24-8b77-5032eb3a6158"}

Delete policy statement(s)


Delete policy statement(s) for project-based policy.
Authorizations
ServiceAccount (unity.project_resource_policy.update)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: unity.project_resource_policy.update
Bearer
HTTP: Bearer
HTTP Authorization Scheme: bearer

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

Request body for "{title}"

Media Type:
application/json

statementIDs

array[string]
필수
example: ["statementId1","statementId2"]
Array of statement IDs which are to be deleted from the policy

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "statementIDs": [ "statementId1", "statementId2" ]}' \ "https://services.api.unity.com/access/resource-policy/v1/projects/{projectId}/environments/{environmentId}/resource-policy:delete-statements"

Response example

{ "title": "Bad Request", "status": 400, "detail": "Something is wrong", "details": [ { "code": "ERROR_CODE_123", "path": "nested.value", "message": "Invalid value" } ], "requestId": "aad109f8-033f-4a24-8b77-5032eb3a6158"}

Get a player based policy


A policy consists of multiple policy statements. This endpoint will return a Policy object containing an array of all non-expired policy statements in that policy.
Authorizations
ServiceAccount (unity.player_resource_policy.get)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: unity.player_resource_policy.get
Bearer
HTTP: Bearer
HTTP Authorization Scheme: bearer

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

playerId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0c
ID of the player

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://services.api.unity.com/access/resource-policy/v1/projects/{projectId}/environments/{environmentId}/players/{playerId}/resource-policy"

Response example

{ "playerId": "HgIZuzj0MwDwPO062o0BSVxAcFAV", "statements": [ { "Sid": "statement_id1", "Action": [ "string" ], "Effect": "string", "Principal": "string", "Resource": "urn:ugs:cloud-save:*", "ExpiresAt": "2020-07-20T18:30:51.243Z", "Version": "string" } ]}

Create or update a player based policy


Create or update a player based policy. A maximum of 500 non-expired statements per policy can be created/updated.
Authorizations
ServiceAccount (unity.player_resource_policy.update)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: unity.player_resource_policy.update
Bearer
HTTP: Bearer
HTTP Authorization Scheme: bearer

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

playerId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0c
ID of the player

Request body for "{title}"

Media Type:
application/json

statements

array[object]
No description

Sid

string
필수
example: statement_id1
Statement ID. Consists of alphanumeric characters and hyphen, and must be of length between 6 and 60 chars.

Action

array[string]
필수
User action against which the policy statement will be applicable. Allowable values are "Read", "Write", "*", "Vivox:JoinMuted", "Vivox:JoinAllMuted", "Vivox:JoinWithConsent".

Effect

string
필수
Effect of the policy statement. Allowable values are "Allow" and "Deny"

Principal

string
필수
The principal the statement applies to, Allowed value is "Player"

Resource

string
필수
example: urn:ugs:cloud-save:*
Uniform resource name of the resource(s) being targeted by the policy. The format is
urn:ugs:<service-name>:/<path>
. For example,
urn:ugs:*
targets all services. Some other examples are
  • urn:ugs:cloud-code:/v1/projects/*/scripts/*
  • urn:ugs:economy:/*

ExpiresAt

string
example: 2020-07-20T18:30:51.243Z
UTC time (ISO 8601 extended format) when the policy expires

Version

string
No description

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X PATCH \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "statements": [ { "Sid": "statement_id1", "Action": [ "string" ], "Effect": "string", "Principal": "string", "Resource": "urn:ugs:cloud-save:*", "ExpiresAt": "2020-07-20T18:30:51.243Z", "Version": "string" } ]}' \ "https://services.api.unity.com/access/resource-policy/v1/projects/{projectId}/environments/{environmentId}/players/{playerId}/resource-policy"

Response example

{ "title": "Bad Request", "status": 400, "detail": "Something is wrong", "details": [ { "code": "ERROR_CODE_123", "path": "nested.value", "message": "Invalid value" } ], "requestId": "aad109f8-033f-4a24-8b77-5032eb3a6158"}

Delete policy statement(s)


Delete policy statement(s) for player-based policy.
Authorizations
ServiceAccount (unity.player_resource_policy.update)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: unity.player_resource_policy.update
Bearer
HTTP: Bearer
HTTP Authorization Scheme: bearer

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

playerId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0c
ID of the player

Request body for "{title}"

Media Type:
application/json

statementIDs

array[string]
필수
example: ["statementId1","statementId2"]
Array of statement IDs which are to be deleted from the policy

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "statementIDs": [ "statementId1", "statementId2" ]}' \ "https://services.api.unity.com/access/resource-policy/v1/projects/{projectId}/environments/{environmentId}/players/{playerId}/resource-policy:delete-statements"

Response example

{ "title": "Bad Request", "status": 400, "detail": "Something is wrong", "details": [ { "code": "ERROR_CODE_123", "path": "nested.value", "message": "Invalid value" } ], "requestId": "aad109f8-033f-4a24-8b77-5032eb3a6158"}

Get all player based policies in project


This endpoint returns all player based policies which belong to a specific project and environment.
By default, the API returns 5 results per page. The number of results per page can be customized by including the limit query parameter in the request. To retrieve subsequent pages of results, pass the next query parameter, the value of which will be provided in the response body of the first paginated response.
Authorizations
ServiceAccount (unity.player_resource_policy.get)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: unity.player_resource_policy.get
Bearer
HTTP: Bearer
HTTP Authorization Scheme: bearer

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

Query parameters for "{title}"

limit

integer
example: 5
max results per page - is ignored if
next
query parameter is provided

next

string
example: eyJuZXh0IjoiNTliZDIwYjItMWE5My00Y2YxLWJhZWYtYWY3ZTJiNThmZGY2IiwibGltaXQiOjN9
pagination token for requesting next page of results

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://services.api.unity.com/access/resource-policy/v1/projects/{projectId}/environments/{environmentId}/players/resource-policy"

Response example

{ "next": "eyJuZXh0IjoiNTliZDIwYjItMWE5My00Y2YxLWJhZWYtYWY3ZTJiNThmZGY2IiwibGltaXQiOjN9", "results": [ { "playerId": "HgIZuzj0MwDwPO062o0BSVxAcFAV", "statements": [ { "Sid": "statement_id1", "Action": [ null ], "Effect": "string", "Principal": "string", "Resource": "urn:ugs:cloud-save:*", "ExpiresAt": "2020-07-20T18:30:51.243Z", "Version": "string" } ] } ]}

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.