Documentation ¶
Index ¶
- type Client
- func (client *Client) CreateOrUpdateRoleDefinition(ctx context.Context, scope RoleScope, roleDefinitionName string, ...) (CreateOrUpdateRoleDefinitionResponse, error)
- func (client *Client) CreateRoleAssignment(ctx context.Context, scope RoleScope, roleAssignmentName string, ...) (CreateRoleAssignmentResponse, error)
- func (client *Client) DeleteRoleAssignment(ctx context.Context, scope RoleScope, roleAssignmentName string, ...) (DeleteRoleAssignmentResponse, error)
- func (client *Client) DeleteRoleDefinition(ctx context.Context, scope RoleScope, roleDefinitionName string, ...) (DeleteRoleDefinitionResponse, error)
- func (client *Client) GetRoleAssignment(ctx context.Context, scope RoleScope, roleAssignmentName string, ...) (GetRoleAssignmentResponse, error)
- func (client *Client) GetRoleDefinition(ctx context.Context, scope RoleScope, roleDefinitionName string, ...) (GetRoleDefinitionResponse, error)
- func (client *Client) NewListRoleAssignmentsPager(scope RoleScope, options *ListRoleAssignmentsOptions) *runtime.Pager[ListRoleAssignmentsResponse]
- func (client *Client) NewListRoleDefinitionsPager(scope RoleScope, options *ListRoleDefinitionsOptions) *runtime.Pager[ListRoleDefinitionsResponse]
- type ClientOptions
- type CreateOrUpdateRoleDefinitionOptions
- type CreateOrUpdateRoleDefinitionResponse
- type CreateRoleAssignmentOptions
- type CreateRoleAssignmentResponse
- type DataAction
- type DeleteRoleAssignmentOptions
- type DeleteRoleAssignmentResponse
- type DeleteRoleDefinitionOptions
- type DeleteRoleDefinitionResponse
- type GetRoleAssignmentOptions
- type GetRoleAssignmentResponse
- type GetRoleDefinitionOptions
- type GetRoleDefinitionResponse
- type ListRoleAssignmentsOptions
- type ListRoleAssignmentsResponse
- type ListRoleDefinitionsOptions
- type ListRoleDefinitionsResponse
- type Permission
- type RoleAssignment
- type RoleAssignmentCreateParameters
- type RoleAssignmentListResult
- type RoleAssignmentProperties
- type RoleAssignmentPropertiesWithScope
- type RoleDefinition
- type RoleDefinitionCreateParameters
- type RoleDefinitionListResult
- type RoleDefinitionProperties
- type RoleDefinitionType
- type RoleScope
- type RoleType
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the Client group. Don't use this type directly, use a constructor function instead.
func NewClient ¶
func NewClient(vaultURL string, credential azcore.TokenCredential, options *ClientOptions) (*Client, error)
NewClient creates a client that manages role-based access for a Managed HSM. You should validate that vaultURL references a valid Managed HSM. See https://aka.ms/azsdk/blog/vault-uri for details.
Example ¶
package main import ( "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" ) func main() { vaultURL := "https://<TODO: your vault name>.managedhsm.azure.net/" cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { // TODO: handle error } client, err := rbac.NewClient(vaultURL, cred, nil) if err != nil { // TODO: handle error } _ = client }
Output:
func (*Client) CreateOrUpdateRoleDefinition ¶
func (client *Client) CreateOrUpdateRoleDefinition(ctx context.Context, scope RoleScope, roleDefinitionName string, parameters RoleDefinitionCreateParameters, options *CreateOrUpdateRoleDefinitionOptions) (CreateOrUpdateRoleDefinitionResponse, error)
CreateOrUpdateRoleDefinition - Creates or updates a custom role definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- scope - The scope of the role definition to create or update. Managed HSM only supports '/'.
- roleDefinitionName - The name of the role definition to create or update. It can be any valid GUID.
- parameters - Parameters for the role definition.
- options - CreateOrUpdateRoleDefinitionOptions contains the optional parameters for the Client.CreateOrUpdateRoleDefinition method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" "github.com/google/uuid" ) var client rbac.Client func main() { scope := rbac.RoleScopeGlobal name := uuid.New().String() roleType := rbac.RoleTypeCustomRole roleName := "<role name>" parameters := rbac.RoleDefinitionCreateParameters{ Properties: &rbac.RoleDefinitionProperties{ AssignableScopes: []*rbac.RoleScope{to.Ptr(scope)}, Description: to.Ptr("<description>"), Permissions: []*rbac.Permission{{DataActions: []*rbac.DataAction{to.Ptr(rbac.DataActionBackupHsmKeys), to.Ptr(rbac.DataActionCreateHsmKey)}}}, RoleName: to.Ptr(roleName), RoleType: to.Ptr(roleType), }, } roleDefinition, err := client.CreateOrUpdateRoleDefinition(context.TODO(), scope, name, parameters, nil) if err != nil { // TODO: handle error } fmt.Printf("Role Definition Name: %s", *roleDefinition.Name) }
Output:
func (*Client) CreateRoleAssignment ¶
func (client *Client) CreateRoleAssignment(ctx context.Context, scope RoleScope, roleAssignmentName string, parameters RoleAssignmentCreateParameters, options *CreateRoleAssignmentOptions) (CreateRoleAssignmentResponse, error)
CreateRoleAssignment - Creates a role assignment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- scope - The scope of the role assignment to create.
- roleAssignmentName - The name of the role assignment to create. It can be any valid GUID.
- parameters - Parameters for the role assignment.
- options - CreateRoleAssignmentOptions contains the optional parameters for the Client.CreateRoleAssignment method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" "github.com/google/uuid" ) var client rbac.Client func main() { scope := rbac.RoleScopeGlobal name := uuid.New().String() parameters := rbac.RoleAssignmentCreateParameters{ Properties: &rbac.RoleAssignmentProperties{ PrincipalID: to.Ptr("d26e28bc-991f-11ed-a8fc-0242ac120002"), // example principal ID RoleDefinitionID: to.Ptr("Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/c368d8da-991f-11ed-a8fc-0242ac120002"), // example role definition ID }, } roleAssignment, err := client.CreateRoleAssignment(context.TODO(), scope, name, parameters, nil) if err != nil { // TODO: handle error } fmt.Printf("Role Assignment Name: %s", *roleAssignment.Name) }
Output:
func (*Client) DeleteRoleAssignment ¶
func (client *Client) DeleteRoleAssignment(ctx context.Context, scope RoleScope, roleAssignmentName string, options *DeleteRoleAssignmentOptions) (DeleteRoleAssignmentResponse, error)
DeleteRoleAssignment - Deletes a role assignment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- scope - The scope of the role assignment to delete.
- roleAssignmentName - The name of the role assignment to delete.
- options - DeleteRoleAssignmentOptions contains the optional parameters for the Client.DeleteRoleAssignment method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" ) var client rbac.Client func main() { deletedRoleAssignment, err := client.DeleteRoleAssignment(context.Background(), rbac.RoleScopeGlobal, "<role assignment name>", nil) if err != nil { // TODO: handle error } fmt.Printf("Deleted Role Assignment Name: %s", *deletedRoleAssignment.Name) }
Output:
func (*Client) DeleteRoleDefinition ¶
func (client *Client) DeleteRoleDefinition(ctx context.Context, scope RoleScope, roleDefinitionName string, options *DeleteRoleDefinitionOptions) (DeleteRoleDefinitionResponse, error)
DeleteRoleDefinition - Deletes a custom role definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- scope - The scope of the role definition to delete. Managed HSM only supports '/'.
- roleDefinitionName - The name (GUID) of the role definition to delete.
- options - DeleteRoleDefinitionOptions contains the optional parameters for the Client.DeleteRoleDefinition method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" ) var client rbac.Client func main() { deletedRoleDefinition, err := client.DeleteRoleDefinition(context.Background(), rbac.RoleScopeGlobal, "<role definition name>", nil) if err != nil { // TODO: handle error } fmt.Printf("Deleted Role Definition Name: %s", *deletedRoleDefinition.Name) }
Output:
func (*Client) GetRoleAssignment ¶
func (client *Client) GetRoleAssignment(ctx context.Context, scope RoleScope, roleAssignmentName string, options *GetRoleAssignmentOptions) (GetRoleAssignmentResponse, error)
GetRoleAssignment - Get the specified role assignment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- scope - The scope of the role assignment.
- roleAssignmentName - The name of the role assignment to get.
- options - GetRoleAssignmentOptions contains the optional parameters for the Client.GetRoleAssignment method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" ) var client rbac.Client func main() { roleAssignment, err := client.GetRoleAssignment(context.Background(), rbac.RoleScopeGlobal, "<role assignment name>", nil) if err != nil { // TODO: handle error } fmt.Printf("Role Assignment Name: %s", *roleAssignment.Name) }
Output:
func (*Client) GetRoleDefinition ¶
func (client *Client) GetRoleDefinition(ctx context.Context, scope RoleScope, roleDefinitionName string, options *GetRoleDefinitionOptions) (GetRoleDefinitionResponse, error)
GetRoleDefinition - Get the specified role definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 7.5
- scope - The scope of the role definition to get. Managed HSM only supports '/'.
- roleDefinitionName - The name of the role definition to get.
- options - GetRoleDefinitionOptions contains the optional parameters for the Client.GetRoleDefinition method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" ) var client rbac.Client func main() { roleDefinition, err := client.GetRoleDefinition(context.Background(), rbac.RoleScopeGlobal, "<role definition name>", nil) if err != nil { // TODO: handle error } fmt.Printf("Role Definition Name: %s", *roleDefinition.Name) }
Output:
func (*Client) NewListRoleAssignmentsPager ¶
func (client *Client) NewListRoleAssignmentsPager(scope RoleScope, options *ListRoleAssignmentsOptions) *runtime.Pager[ListRoleAssignmentsResponse]
NewListRoleAssignmentsPager - Gets role assignments for a scope.
Generated from API version 7.5
- scope - The scope of the role assignments.
- options - ListRoleAssignmentsOptions contains the optional parameters for the Client.NewListRoleAssignmentsPager method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" ) var client rbac.Client func main() { pager := client.NewListRoleAssignmentsPager(rbac.RoleScopeGlobal, nil) for pager.More() { nextResult, err := pager.NextPage(context.TODO()) if err != nil { //TODO: handle error } fmt.Println("Role Assignment Name List") for index, roleAssignment := range nextResult.Value { fmt.Printf("%d) %s\n", index, *roleAssignment.Name) } } }
Output:
func (*Client) NewListRoleDefinitionsPager ¶
func (client *Client) NewListRoleDefinitionsPager(scope RoleScope, options *ListRoleDefinitionsOptions) *runtime.Pager[ListRoleDefinitionsResponse]
NewListRoleDefinitionsPager - Get all role definitions that are applicable at scope and above.
Generated from API version 7.5
- scope - The scope of the role definition.
- options - ListRoleDefinitionsOptions contains the optional parameters for the Client.NewListRoleDefinitionsPager method.
Example ¶
package main import ( "context" "fmt" "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin/rbac" ) var client rbac.Client func main() { pager := client.NewListRoleAssignmentsPager(rbac.RoleScopeGlobal, nil) for pager.More() { nextResult, err := pager.NextPage(context.TODO()) if err != nil { //TODO: handle error } fmt.Println("Role Definition Name List") for index, roleDefinition := range nextResult.Value { fmt.Printf("%d) %s\n", index, *roleDefinition.Name) } } }
Output:
type ClientOptions ¶
type ClientOptions struct { azcore.ClientOptions // DisableChallengeResourceVerification controls whether the policy requires the // authentication challenge resource to match the Key Vault or Managed HSM domain. // See https://aka.ms/azsdk/blog/vault-uri for more information. DisableChallengeResourceVerification bool }
ClientOptions contains optional settings for Client.
type CreateOrUpdateRoleDefinitionOptions ¶
type CreateOrUpdateRoleDefinitionOptions struct { }
CreateOrUpdateRoleDefinitionOptions contains the optional parameters for the Client.CreateOrUpdateRoleDefinition method.
type CreateOrUpdateRoleDefinitionResponse ¶
type CreateOrUpdateRoleDefinitionResponse struct { // Role definition. RoleDefinition }
CreateOrUpdateRoleDefinitionResponse contains the response from method Client.CreateOrUpdateRoleDefinition.
type CreateRoleAssignmentOptions ¶
type CreateRoleAssignmentOptions struct { }
CreateRoleAssignmentOptions contains the optional parameters for the Client.CreateRoleAssignment method.
type CreateRoleAssignmentResponse ¶
type CreateRoleAssignmentResponse struct { // Role Assignments RoleAssignment }
CreateRoleAssignmentResponse contains the response from method Client.CreateRoleAssignment.
type DataAction ¶
type DataAction string
DataAction - Supported permissions for data actions.
const ( // DataActionBackupHsmKeys - Backup HSM keys. DataActionBackupHsmKeys DataAction = "Microsoft.KeyVault/managedHsm/keys/backup/action" // DataActionCreateHsmKey - Create an HSM key. DataActionCreateHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/create" // DataActionDecryptHsmKey - Decrypt using an HSM key. DataActionDecryptHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/decrypt/action" // DataActionDeleteHsmKey - Delete an HSM key. DataActionDeleteHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/delete" // DataActionDeleteRoleAssignment - Delete role assignment. DataActionDeleteRoleAssignment DataAction = "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action" // DataActionDeleteRoleDefinition - Delete role definition. DataActionDeleteRoleDefinition DataAction = "Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action" // DataActionDownloadHsmSecurityDomain - Download an HSM security domain. DataActionDownloadHsmSecurityDomain DataAction = "Microsoft.KeyVault/managedHsm/securitydomain/download/action" // DataActionDownloadHsmSecurityDomainStatus - Check status of HSM security domain download. DataActionDownloadHsmSecurityDomainStatus DataAction = "Microsoft.KeyVault/managedHsm/securitydomain/download/read" // DataActionEncryptHsmKey - Encrypt using an HSM key. DataActionEncryptHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/encrypt/action" // DataActionExportHsmKey - Export an HSM key. DataActionExportHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/export/action" // DataActionGetRoleAssignment - Get role assignment. DataActionGetRoleAssignment DataAction = "Microsoft.KeyVault/managedHsm/roleAssignments/read/action" // DataActionImportHsmKey - Import an HSM key. DataActionImportHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/import/action" // DataActionPurgeDeletedHsmKey - Purge a deleted HSM key. DataActionPurgeDeletedHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" // DataActionRandomNumbersGenerate - Generate random numbers. DataActionRandomNumbersGenerate DataAction = "Microsoft.KeyVault/managedHsm/rng/action" // DataActionReadDeletedHsmKey - Read deleted HSM key. DataActionReadDeletedHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action" // DataActionReadHsmBackupStatus - Read an HSM backup status. DataActionReadHsmBackupStatus DataAction = "Microsoft.KeyVault/managedHsm/backup/status/action" // DataActionReadHsmKey - Read HSM key metadata. DataActionReadHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/read/action" // DataActionReadHsmRestoreStatus - Read an HSM restore status. DataActionReadHsmRestoreStatus DataAction = "Microsoft.KeyVault/managedHsm/restore/status/action" // DataActionReadHsmSecurityDomainStatus - Check the status of the HSM security domain exchange file. DataActionReadHsmSecurityDomainStatus DataAction = "Microsoft.KeyVault/managedHsm/securitydomain/upload/read" // DataActionReadHsmSecurityDomainTransferKey - Download an HSM security domain transfer key. DataActionReadHsmSecurityDomainTransferKey DataAction = "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read" // DataActionReadRoleDefinition - Get role definition. DataActionReadRoleDefinition DataAction = "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action" // DataActionRecoverDeletedHsmKey - Recover deleted HSM key. DataActionRecoverDeletedHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action" // DataActionReleaseKey - Release an HSM key using Secure Key Release. DataActionReleaseKey DataAction = "Microsoft.KeyVault/managedHsm/keys/release/action" // DataActionRestoreHsmKeys - Restore HSM keys. DataActionRestoreHsmKeys DataAction = "Microsoft.KeyVault/managedHsm/keys/restore/action" // DataActionSignHsmKey - Sign using an HSM key. DataActionSignHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/sign/action" // DataActionStartHsmBackup - Start an HSM backup. DataActionStartHsmBackup DataAction = "Microsoft.KeyVault/managedHsm/backup/start/action" // DataActionStartHsmRestore - Start an HSM restore. DataActionStartHsmRestore DataAction = "Microsoft.KeyVault/managedHsm/restore/start/action" // DataActionUnwrapHsmKey - Unwrap using an HSM key. DataActionUnwrapHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/unwrap/action" // DataActionUploadHsmSecurityDomain - Upload an HSM security domain. DataActionUploadHsmSecurityDomain DataAction = "Microsoft.KeyVault/managedHsm/securitydomain/upload/action" // DataActionVerifyHsmKey - Verify using an HSM key. DataActionVerifyHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/verify/action" // DataActionWrapHsmKey - Wrap using an HSM key. DataActionWrapHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/wrap/action" // DataActionWriteHsmKey - Update an HSM key. DataActionWriteHsmKey DataAction = "Microsoft.KeyVault/managedHsm/keys/write/action" // DataActionWriteRoleAssignment - Create or update role assignment. DataActionWriteRoleAssignment DataAction = "Microsoft.KeyVault/managedHsm/roleAssignments/write/action" // DataActionWriteRoleDefinition - Create or update role definition. DataActionWriteRoleDefinition DataAction = "Microsoft.KeyVault/managedHsm/roleDefinitions/write/action" )
func PossibleDataActionValues ¶
func PossibleDataActionValues() []DataAction
PossibleDataActionValues returns the possible values for the DataAction const type.
type DeleteRoleAssignmentOptions ¶
type DeleteRoleAssignmentOptions struct { }
DeleteRoleAssignmentOptions contains the optional parameters for the Client.DeleteRoleAssignment method.
type DeleteRoleAssignmentResponse ¶
type DeleteRoleAssignmentResponse struct { // Role Assignments RoleAssignment }
DeleteRoleAssignmentResponse contains the response from method Client.DeleteRoleAssignment.
type DeleteRoleDefinitionOptions ¶
type DeleteRoleDefinitionOptions struct { }
DeleteRoleDefinitionOptions contains the optional parameters for the Client.DeleteRoleDefinition method.
type DeleteRoleDefinitionResponse ¶
type DeleteRoleDefinitionResponse struct { // Role definition. RoleDefinition }
DeleteRoleDefinitionResponse contains the response from method Client.DeleteRoleDefinition.
type GetRoleAssignmentOptions ¶
type GetRoleAssignmentOptions struct { }
GetRoleAssignmentOptions contains the optional parameters for the Client.GetRoleAssignment method.
type GetRoleAssignmentResponse ¶
type GetRoleAssignmentResponse struct { // Role Assignments RoleAssignment }
GetRoleAssignmentResponse contains the response from method Client.GetRoleAssignment.
type GetRoleDefinitionOptions ¶
type GetRoleDefinitionOptions struct { }
GetRoleDefinitionOptions contains the optional parameters for the Client.GetRoleDefinition method.
type GetRoleDefinitionResponse ¶
type GetRoleDefinitionResponse struct { // Role definition. RoleDefinition }
GetRoleDefinitionResponse contains the response from method Client.GetRoleDefinition.
type ListRoleAssignmentsOptions ¶
type ListRoleAssignmentsOptions struct { // The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId // eq {id} to return all role assignments at, above or below the // scope for the specified principal. Filter *string }
ListRoleAssignmentsOptions contains the optional parameters for the Client.NewListRoleAssignmentsPager method.
type ListRoleAssignmentsResponse ¶
type ListRoleAssignmentsResponse struct { // Role assignment list operation result. RoleAssignmentListResult }
ListRoleAssignmentsResponse contains the response from method Client.NewListRoleAssignmentsPager.
type ListRoleDefinitionsOptions ¶
type ListRoleDefinitionsOptions struct { // The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. Filter *string }
ListRoleDefinitionsOptions contains the optional parameters for the Client.NewListRoleDefinitionsPager method.
type ListRoleDefinitionsResponse ¶
type ListRoleDefinitionsResponse struct { // Role definition list operation result. RoleDefinitionListResult }
ListRoleDefinitionsResponse contains the response from method Client.NewListRoleDefinitionsPager.
type Permission ¶
type Permission struct { // Action permissions that are granted. Actions []*string // Data action permissions that are granted. DataActions []*DataAction // Action permissions that are excluded but not denied. They may be granted by other role definitions assigned to a principal. NotActions []*string // Data action permissions that are excluded but not denied. They may be granted by other role definitions assigned to a principal. NotDataActions []*DataAction }
Permission - Role definition permissions.
func (Permission) MarshalJSON ¶
func (p Permission) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Permission.
func (*Permission) UnmarshalJSON ¶
func (p *Permission) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Permission.
type RoleAssignment ¶
type RoleAssignment struct { // Role assignment properties. Properties *RoleAssignmentPropertiesWithScope // READ-ONLY; The role assignment ID. ID *string // READ-ONLY; The role assignment name. Name *string // READ-ONLY; The role assignment type. Type *string }
RoleAssignment - Role Assignments
func (RoleAssignment) MarshalJSON ¶
func (r RoleAssignment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignment.
func (*RoleAssignment) UnmarshalJSON ¶
func (r *RoleAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignment.
type RoleAssignmentCreateParameters ¶
type RoleAssignmentCreateParameters struct { // REQUIRED; Role assignment properties. Properties *RoleAssignmentProperties }
RoleAssignmentCreateParameters - Role assignment create parameters.
func (RoleAssignmentCreateParameters) MarshalJSON ¶
func (r RoleAssignmentCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentCreateParameters.
func (*RoleAssignmentCreateParameters) UnmarshalJSON ¶
func (r *RoleAssignmentCreateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentCreateParameters.
type RoleAssignmentListResult ¶
type RoleAssignmentListResult struct { // The URL to use for getting the next set of results. NextLink *string // Role assignment list. Value []*RoleAssignment }
RoleAssignmentListResult - Role assignment list operation result.
func (RoleAssignmentListResult) MarshalJSON ¶
func (r RoleAssignmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentListResult.
func (*RoleAssignmentListResult) UnmarshalJSON ¶
func (r *RoleAssignmentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentListResult.
type RoleAssignmentProperties ¶
type RoleAssignmentProperties struct { // REQUIRED; The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, // service principal, or security group. PrincipalID *string // REQUIRED; The role definition ID used in the role assignment. RoleDefinitionID *string }
RoleAssignmentProperties - Role assignment properties.
func (RoleAssignmentProperties) MarshalJSON ¶
func (r RoleAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentProperties.
func (*RoleAssignmentProperties) UnmarshalJSON ¶
func (r *RoleAssignmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentProperties.
type RoleAssignmentPropertiesWithScope ¶
type RoleAssignmentPropertiesWithScope struct { // The principal ID. PrincipalID *string // The role definition ID. RoleDefinitionID *string // The role scope. Scope *RoleScope }
RoleAssignmentPropertiesWithScope - Role assignment properties with scope.
func (RoleAssignmentPropertiesWithScope) MarshalJSON ¶
func (r RoleAssignmentPropertiesWithScope) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentPropertiesWithScope.
func (*RoleAssignmentPropertiesWithScope) UnmarshalJSON ¶
func (r *RoleAssignmentPropertiesWithScope) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentPropertiesWithScope.
type RoleDefinition ¶
type RoleDefinition struct { // Role definition properties. Properties *RoleDefinitionProperties // READ-ONLY; The role definition ID. ID *string // READ-ONLY; The role definition name. Name *string // READ-ONLY; The role definition type. Type *RoleDefinitionType }
RoleDefinition - Role definition.
func (RoleDefinition) MarshalJSON ¶
func (r RoleDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleDefinition.
func (*RoleDefinition) UnmarshalJSON ¶
func (r *RoleDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleDefinition.
type RoleDefinitionCreateParameters ¶
type RoleDefinitionCreateParameters struct { // REQUIRED; Role definition properties. Properties *RoleDefinitionProperties }
RoleDefinitionCreateParameters - Role definition create parameters.
func (RoleDefinitionCreateParameters) MarshalJSON ¶
func (r RoleDefinitionCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleDefinitionCreateParameters.
func (*RoleDefinitionCreateParameters) UnmarshalJSON ¶
func (r *RoleDefinitionCreateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleDefinitionCreateParameters.
type RoleDefinitionListResult ¶
type RoleDefinitionListResult struct { // The URL to use for getting the next set of results. NextLink *string // Role definition list. Value []*RoleDefinition }
RoleDefinitionListResult - Role definition list operation result.
func (RoleDefinitionListResult) MarshalJSON ¶
func (r RoleDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleDefinitionListResult.
func (*RoleDefinitionListResult) UnmarshalJSON ¶
func (r *RoleDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleDefinitionListResult.
type RoleDefinitionProperties ¶
type RoleDefinitionProperties struct { // Role definition assignable scopes. AssignableScopes []*RoleScope // The role definition description. Description *string // Role definition permissions. Permissions []*Permission // The role name. RoleName *string // The role type. RoleType *RoleType }
RoleDefinitionProperties - Role definition properties.
func (RoleDefinitionProperties) MarshalJSON ¶
func (r RoleDefinitionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleDefinitionProperties.
func (*RoleDefinitionProperties) UnmarshalJSON ¶
func (r *RoleDefinitionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleDefinitionProperties.
type RoleDefinitionType ¶
type RoleDefinitionType string
RoleDefinitionType - The role definition type.
const (
RoleDefinitionTypeMicrosoftAuthorizationRoleDefinitions RoleDefinitionType = "Microsoft.Authorization/roleDefinitions"
)
func PossibleRoleDefinitionTypeValues ¶
func PossibleRoleDefinitionTypeValues() []RoleDefinitionType
PossibleRoleDefinitionTypeValues returns the possible values for the RoleDefinitionType const type.
type RoleScope ¶
type RoleScope string
RoleScope - The role scope.
func PossibleRoleScopeValues ¶
func PossibleRoleScopeValues() []RoleScope
PossibleRoleScopeValues returns the possible values for the RoleScope const type.