跳轉到主要內容
POST
Update Policy

授權

X-SecretKey
string
header
必填

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

主體

application/json

Updates permissions for your title. Policies affect what is allowed to happen on your title. Your policy is a collection of statements that, together, govern particular area for your title. Today, the only allowed policy is called 'ApiPolicy' and it governs what API calls are allowed. To verify that you have the latest version always download the current policy from GetPolicy before uploading a new policy. PlayFab updates the base policy periodically and will automatically apply it to the uploaded policy. Overwriting the combined policy blindly may result in unexpected API errors.

Updates permissions for your title. Policies affect what is allowed to happen on your title. Your policy is a collection of statements that, together, govern particular area for your title. Today, the only allowed policy is called 'ApiPolicy' and it governs what API calls are allowed. To verify that you have the latest version always download the current policy from GetPolicy before uploading a new policy. PlayFab updates the base policy periodically and will automatically apply it to the uploaded policy. Overwriting the combined policy blindly may result in unexpected API errors.

OverwritePolicy
boolean
必填

Whether to overwrite or append to the existing policy.

PolicyVersion
number
必填

Version of the policy to update. Must be the latest (as returned by GetPolicy).

Statements
object[]
必填

The new statements to include in the policy.

PolicyName
string

The name of the policy being updated. Only 'ApiPolicy' is supported. This parameter is optional and defaults to 'ApiPolicy' if omitted.

回應

code
integer

The Http status code. If X-ReportErrorAsSuccess header is set to true, this will report the actual http error code.

status
string

The Http status code as a string.

data
object
範例:
最後修改於 2026年10月6日