Метод | Описание | |
---|---|---|
__construct ( array $policy = [] ) | Create a PolicyBuilder. | |
addBinding ( string $role, array $members ) : |
Add a new binding to the policy. | |
result ( ) : array | Create a policy array with data in the correct format. | |
setBindings ( array $bindings = [] ) : |
Override all stored bindings on the policy. | |
setEtag ( string $etag ) : |
Update the etag on the policy. | |
setVersion ( integer $version ) : |
Update the version of the policy. |
Метод | Описание | |
---|---|---|
validateMember ( string $member ) : void | Validate that each member is in the correct format. |
public __construct ( array $policy = [] ) | ||
$policy | array | A policy array |
public addBinding ( string $role, array $members ) : |
||
$role | string | A valid role for the service |
$members | array | An array of members to assign to the binding |
Результат |
public setBindings ( array $bindings = [] ) : |
||
$bindings | array | [optional] An array of bindings |
Результат |
public setEtag ( string $etag ) : |
||
$etag | string | used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that updates to existing policies make use of the etag to avoid race conditions. |
Результат |
public setVersion ( integer $version ) : |
||
$version | integer | Version of the Policy. **Defaults to** `0`. |
Результат |