Documentation
¶
Index ¶
- type Driver
- func (d *Driver) Create(ctx context.Context, scope, principalID, roleName string) (azapi.RoleAssignment, error)
- func (d *Driver) DefaultScope() string
- func (d *Driver) Delete(ctx context.Context, scope, assignmentName, principalID, roleName string) (string, error)
- func (d *Driver) List(ctx context.Context, scope, principalID string) ([]azapi.RoleAssignment, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
Driver wraps an authenticated ARM client for the Microsoft.Authorization/roleAssignments and roleDefinitions resources.
func (*Driver) Create ¶
func (d *Driver) Create(ctx context.Context, scope, principalID, roleName string) (azapi.RoleAssignment, error)
Create binds principalID to the role identified by roleName at scope. The role name is resolved to a roleDefinition GUID via List on roleDefinitions.
func (*Driver) DefaultScope ¶
DefaultScope returns the canonical subscription-level scope for the first known subscription, or an empty string if no subscription is configured.
func (*Driver) Delete ¶
func (d *Driver) Delete(ctx context.Context, scope, assignmentName, principalID, roleName string) (string, error)
Delete removes a role assignment. Either assignmentName (GUID) or the (principalID, roleName) tuple may be supplied; when principal/role are given the driver lists assignments at scope to resolve the GUID.
Click to show internal directories.
Click to hide internal directories.