armauthorization

package module
v2.0.0-...-4d4c553 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 16 Imported by: 0

README

Azure Authorization Module for Go

PkgGoDev

The armauthorization module provides operations for working with Azure Authorization.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Authorization module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Authorization. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Authorization modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armauthorization.NewAccessReviewInstancesClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
	ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armauthorization.NewAccessReviewInstancesClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Authorization label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalMode

type ApprovalMode string

ApprovalMode - The type of rule

const (
	ApprovalModeNoApproval  ApprovalMode = "NoApproval"
	ApprovalModeParallel    ApprovalMode = "Parallel"
	ApprovalModeSerial      ApprovalMode = "Serial"
	ApprovalModeSingleStage ApprovalMode = "SingleStage"
)

func PossibleApprovalModeValues

func PossibleApprovalModeValues() []ApprovalMode

PossibleApprovalModeValues returns the possible values for the ApprovalMode const type.

type ApprovalSettings

type ApprovalSettings struct {
	// The type of rule
	ApprovalMode *ApprovalMode `json:"approvalMode,omitempty"`

	// The approval stages of the request.
	ApprovalStages []*ApprovalStage `json:"approvalStages,omitempty"`

	// Determines whether approval is required or not.
	IsApprovalRequired *bool `json:"isApprovalRequired,omitempty"`

	// Determines whether approval is required for assignment extension.
	IsApprovalRequiredForExtension *bool `json:"isApprovalRequiredForExtension,omitempty"`

	// Determine whether requestor justification is required.
	IsRequestorJustificationRequired *bool `json:"isRequestorJustificationRequired,omitempty"`
}

ApprovalSettings - The approval settings.

func (ApprovalSettings) MarshalJSON

func (a ApprovalSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApprovalSettings.

func (*ApprovalSettings) UnmarshalJSON

func (a *ApprovalSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApprovalSettings.

type ApprovalStage

type ApprovalStage struct {
	// The time in days when approval request would be timed out
	ApprovalStageTimeOutInDays *int32 `json:"approvalStageTimeOutInDays,omitempty"`

	// The escalation approver of the request.
	EscalationApprovers []*UserSet `json:"escalationApprovers,omitempty"`

	// The time in minutes when the approval request would be escalated if the primary approver does not approve
	EscalationTimeInMinutes *int32 `json:"escalationTimeInMinutes,omitempty"`

	// Determines whether approver need to provide justification for his decision.
	IsApproverJustificationRequired *bool `json:"isApproverJustificationRequired,omitempty"`

	// The value determine whether escalation feature is enabled.
	IsEscalationEnabled *bool `json:"isEscalationEnabled,omitempty"`

	// The primary approver of the request.
	PrimaryApprovers []*UserSet `json:"primaryApprovers,omitempty"`
}

ApprovalStage - The approval stage.

func (ApprovalStage) MarshalJSON

func (a ApprovalStage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApprovalStage.

func (*ApprovalStage) UnmarshalJSON

func (a *ApprovalStage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApprovalStage.

type AssignmentType

type AssignmentType string

AssignmentType - Assignment type of the role assignment schedule

const (
	AssignmentTypeActivated AssignmentType = "Activated"
	AssignmentTypeAssigned  AssignmentType = "Assigned"
)

func PossibleAssignmentTypeValues

func PossibleAssignmentTypeValues() []AssignmentType

PossibleAssignmentTypeValues returns the possible values for the AssignmentType const type.

type ClassicAdministrator

type ClassicAdministrator struct {
	// The ID of the administrator.
	ID *string `json:"id,omitempty"`

	// The name of the administrator.
	Name *string `json:"name,omitempty"`

	// Properties for the classic administrator.
	Properties *ClassicAdministratorProperties `json:"properties,omitempty"`

	// The type of the administrator.
	Type *string `json:"type,omitempty"`
}

ClassicAdministrator - Classic Administrators

func (ClassicAdministrator) MarshalJSON

func (c ClassicAdministrator) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClassicAdministrator.

func (*ClassicAdministrator) UnmarshalJSON

func (c *ClassicAdministrator) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClassicAdministrator.

type ClassicAdministratorListResult

type ClassicAdministratorListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// An array of administrators.
	Value []*ClassicAdministrator `json:"value,omitempty"`
}

ClassicAdministratorListResult - ClassicAdministrator list result information.

func (ClassicAdministratorListResult) MarshalJSON

func (c ClassicAdministratorListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClassicAdministratorListResult.

func (*ClassicAdministratorListResult) UnmarshalJSON

func (c *ClassicAdministratorListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClassicAdministratorListResult.

type ClassicAdministratorProperties

type ClassicAdministratorProperties struct {
	// The email address of the administrator.
	EmailAddress *string `json:"emailAddress,omitempty"`

	// The role of the administrator.
	Role *string `json:"role,omitempty"`
}

ClassicAdministratorProperties - Classic Administrator properties.

func (ClassicAdministratorProperties) MarshalJSON

func (c ClassicAdministratorProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClassicAdministratorProperties.

func (*ClassicAdministratorProperties) UnmarshalJSON

func (c *ClassicAdministratorProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClassicAdministratorProperties.

type ClassicAdministratorsClient

type ClassicAdministratorsClient struct {
	// contains filtered or unexported fields
}

ClassicAdministratorsClient contains the methods for the ClassicAdministrators group. Don't use this type directly, use NewClassicAdministratorsClient() instead.

func NewClassicAdministratorsClient

func NewClassicAdministratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClassicAdministratorsClient, error)

NewClassicAdministratorsClient creates a new instance of ClassicAdministratorsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ClassicAdministratorsClient) NewListPager

NewListPager - Gets service administrator, account administrator, and co-administrators for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 options - ClassicAdministratorsClientListOptions contains the optional parameters for the ClassicAdministratorsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetClassicAdministrators.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewClassicAdministratorsClient("subId", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type ClassicAdministratorsClientListOptions

type ClassicAdministratorsClientListOptions struct {
}

ClassicAdministratorsClientListOptions contains the optional parameters for the ClassicAdministratorsClient.List method.

type ClassicAdministratorsClientListResponse

type ClassicAdministratorsClientListResponse struct {
	ClassicAdministratorListResult
}

ClassicAdministratorsClientListResponse contains the response from method ClassicAdministratorsClient.List.

type CloudError

type CloudError struct {
	// An error response from the service.
	Error *CloudErrorBody `json:"error,omitempty"`
}

CloudError - An error response from the service.

func (CloudError) MarshalJSON

func (c CloudError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudError.

func (*CloudError) UnmarshalJSON

func (c *CloudError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudError.

type CloudErrorBody

type CloudErrorBody struct {
	// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string `json:"code,omitempty"`

	// A message describing the error, intended to be suitable for display in a user interface.
	Message *string `json:"message,omitempty"`
}

CloudErrorBody - An error response from the service.

func (CloudErrorBody) MarshalJSON

func (c CloudErrorBody) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudErrorBody.

func (*CloudErrorBody) UnmarshalJSON

func (c *CloudErrorBody) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudErrorBody.

type DenyAssignment

type DenyAssignment struct {
	// Deny assignment properties.
	Properties *DenyAssignmentProperties `json:"properties,omitempty"`

	// READ-ONLY; The deny assignment ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The deny assignment name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The deny assignment type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

DenyAssignment - Deny Assignment

func (DenyAssignment) MarshalJSON

func (d DenyAssignment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DenyAssignment.

func (*DenyAssignment) UnmarshalJSON

func (d *DenyAssignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DenyAssignment.

type DenyAssignmentFilter

type DenyAssignmentFilter struct {
	// Return deny assignment with specified name.
	DenyAssignmentName *string `json:"denyAssignmentName,omitempty"`

	// Return all deny assignments where the specified principal is listed either in the principals list or exclude principals
	// list of deny assignments.
	GdprExportPrincipalID *string `json:"gdprExportPrincipalId,omitempty"`

	// Return all deny assignments where the specified principal is listed in the principals list of deny assignments.
	PrincipalID *string `json:"principalId,omitempty"`
}

DenyAssignmentFilter - Deny Assignments filter

func (DenyAssignmentFilter) MarshalJSON

func (d DenyAssignmentFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DenyAssignmentFilter.

func (*DenyAssignmentFilter) UnmarshalJSON

func (d *DenyAssignmentFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DenyAssignmentFilter.

type DenyAssignmentListResult

type DenyAssignmentListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Deny assignment list.
	Value []*DenyAssignment `json:"value,omitempty"`
}

DenyAssignmentListResult - Deny assignment list operation result.

func (DenyAssignmentListResult) MarshalJSON

func (d DenyAssignmentListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DenyAssignmentListResult.

func (*DenyAssignmentListResult) UnmarshalJSON

func (d *DenyAssignmentListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DenyAssignmentListResult.

type DenyAssignmentPermission

type DenyAssignmentPermission struct {
	// Actions to which the deny assignment does not grant access.
	Actions []*string `json:"actions,omitempty"`

	// The conditions on the Deny assignment permission. This limits the resources it applies to.
	Condition *string `json:"condition,omitempty"`

	// Version of the condition.
	ConditionVersion *string `json:"conditionVersion,omitempty"`

	// Data actions to which the deny assignment does not grant access.
	DataActions []*string `json:"dataActions,omitempty"`

	// Actions to exclude from that the deny assignment does not grant access.
	NotActions []*string `json:"notActions,omitempty"`

	// Data actions to exclude from that the deny assignment does not grant access.
	NotDataActions []*string `json:"notDataActions,omitempty"`
}

DenyAssignmentPermission - Deny assignment permissions.

func (DenyAssignmentPermission) MarshalJSON

func (d DenyAssignmentPermission) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DenyAssignmentPermission.

func (*DenyAssignmentPermission) UnmarshalJSON

func (d *DenyAssignmentPermission) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DenyAssignmentPermission.

type DenyAssignmentProperties

type DenyAssignmentProperties struct {
	// The display name of the deny assignment.
	DenyAssignmentName *string `json:"denyAssignmentName,omitempty"`

	// The description of the deny assignment.
	Description *string `json:"description,omitempty"`

	// Determines if the deny assignment applies to child scopes. Default value is false.
	DoNotApplyToChildScopes *bool `json:"doNotApplyToChildScopes,omitempty"`

	// Array of principals to which the deny assignment does not apply.
	ExcludePrincipals []*Principal `json:"excludePrincipals,omitempty"`

	// Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.
	IsSystemProtected *bool `json:"isSystemProtected,omitempty"`

	// An array of permissions that are denied by the deny assignment.
	Permissions []*DenyAssignmentPermission `json:"permissions,omitempty"`

	// Array of principals to which the deny assignment applies.
	Principals []*Principal `json:"principals,omitempty"`

	// The deny assignment scope.
	Scope *string `json:"scope,omitempty"`
}

DenyAssignmentProperties - Deny assignment properties.

func (DenyAssignmentProperties) MarshalJSON

func (d DenyAssignmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DenyAssignmentProperties.

func (*DenyAssignmentProperties) UnmarshalJSON

func (d *DenyAssignmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DenyAssignmentProperties.

type DenyAssignmentsClient

type DenyAssignmentsClient struct {
	// contains filtered or unexported fields
}

DenyAssignmentsClient contains the methods for the DenyAssignments group. Don't use this type directly, use NewDenyAssignmentsClient() instead.

func NewDenyAssignmentsClient

func NewDenyAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DenyAssignmentsClient, error)

NewDenyAssignmentsClient creates a new instance of DenyAssignmentsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DenyAssignmentsClient) Get

Get - Get the specified deny assignment. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the deny assignment. denyAssignmentID - The ID of the deny assignment to get. options - DenyAssignmentsClientGetOptions contains the optional parameters for the DenyAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetDenyAssignmentByNameId.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewDenyAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "subscriptions/subId/resourcegroups/rgname", "denyAssignmentId", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*DenyAssignmentsClient) GetByID

GetByID - Gets a deny assignment by ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 denyAssignmentID - The fully qualified deny assignment ID. For example, use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for subscription level deny assignments, or /providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for tenant level deny assignments. options - DenyAssignmentsClientGetByIDOptions contains the optional parameters for the DenyAssignmentsClient.GetByID method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetDenyAssignmentById.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewDenyAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.GetByID(ctx, "subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/daId", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*DenyAssignmentsClient) NewListForResourceGroupPager

NewListForResourceGroupPager - Gets deny assignments for a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group. The name is case insensitive. options - DenyAssignmentsClientListForResourceGroupOptions contains the optional parameters for the DenyAssignmentsClient.ListForResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetDenyAssignmentsForResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewDenyAssignmentsClient("subId", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourceGroupPager("rgname", &armauthorization.DenyAssignmentsClientListForResourceGroupOptions{Filter: nil})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*DenyAssignmentsClient) NewListForResourcePager

func (client *DenyAssignmentsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, options *DenyAssignmentsClientListForResourceOptions) *runtime.Pager[DenyAssignmentsClientListForResourceResponse]

NewListForResourcePager - Gets deny assignments for a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceProviderNamespace - The namespace of the resource provider. parentResourcePath - The parent resource identity. resourceType - The resource type of the resource. resourceName - The name of the resource to get deny assignments for. options - DenyAssignmentsClientListForResourceOptions contains the optional parameters for the DenyAssignmentsClient.ListForResource method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetDenyAssignmentsForResource.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewDenyAssignmentsClient("subId", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourcePager("rgname", "resourceProviderNamespace", "parentResourcePath", "resourceType", "resourceName", &armauthorization.DenyAssignmentsClientListForResourceOptions{Filter: nil})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*DenyAssignmentsClient) NewListForScopePager

NewListForScopePager - Gets deny assignments for a scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the deny assignments. options - DenyAssignmentsClientListForScopeOptions contains the optional parameters for the DenyAssignmentsClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetDenyAssignmentByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewDenyAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("subscriptions/subId", &armauthorization.DenyAssignmentsClientListForScopeOptions{Filter: nil})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*DenyAssignmentsClient) NewListPager

NewListPager - Gets all deny assignments for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 options - DenyAssignmentsClientListOptions contains the optional parameters for the DenyAssignmentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetAllDenyAssignments.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewDenyAssignmentsClient("subId", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(&armauthorization.DenyAssignmentsClientListOptions{Filter: nil})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type DenyAssignmentsClientGetByIDOptions

type DenyAssignmentsClientGetByIDOptions struct {
}

DenyAssignmentsClientGetByIDOptions contains the optional parameters for the DenyAssignmentsClient.GetByID method.

type DenyAssignmentsClientGetByIDResponse

type DenyAssignmentsClientGetByIDResponse struct {
	DenyAssignment
}

DenyAssignmentsClientGetByIDResponse contains the response from method DenyAssignmentsClient.GetByID.

type DenyAssignmentsClientGetOptions

type DenyAssignmentsClientGetOptions struct {
}

DenyAssignmentsClientGetOptions contains the optional parameters for the DenyAssignmentsClient.Get method.

type DenyAssignmentsClientGetResponse

type DenyAssignmentsClientGetResponse struct {
	DenyAssignment
}

DenyAssignmentsClientGetResponse contains the response from method DenyAssignmentsClient.Get.

type DenyAssignmentsClientListForResourceGroupOptions

type DenyAssignmentsClientListForResourceGroupOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName
	// eq '{name}' to search deny assignments by name at
	// specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the
	// specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all
	// deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId
	// filter as it returns not only those deny assignments that contain the
	// specified principal is the Principals list but also those deny assignments that contain the specified principal is the
	// ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used,
	// only the deny assignment name and description properties are returned.
	Filter *string
}

DenyAssignmentsClientListForResourceGroupOptions contains the optional parameters for the DenyAssignmentsClient.ListForResourceGroup method.

type DenyAssignmentsClientListForResourceGroupResponse

type DenyAssignmentsClientListForResourceGroupResponse struct {
	DenyAssignmentListResult
}

DenyAssignmentsClientListForResourceGroupResponse contains the response from method DenyAssignmentsClient.ListForResourceGroup.

type DenyAssignmentsClientListForResourceOptions

type DenyAssignmentsClientListForResourceOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName
	// eq '{name}' to search deny assignments by name at
	// specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the
	// specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all
	// deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId
	// filter as it returns not only those deny assignments that contain the
	// specified principal is the Principals list but also those deny assignments that contain the specified principal is the
	// ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used,
	// only the deny assignment name and description properties are returned.
	Filter *string
}

DenyAssignmentsClientListForResourceOptions contains the optional parameters for the DenyAssignmentsClient.ListForResource method.

type DenyAssignmentsClientListForResourceResponse

type DenyAssignmentsClientListForResourceResponse struct {
	DenyAssignmentListResult
}

DenyAssignmentsClientListForResourceResponse contains the response from method DenyAssignmentsClient.ListForResource.

type DenyAssignmentsClientListForScopeOptions

type DenyAssignmentsClientListForScopeOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName
	// eq '{name}' to search deny assignments by name at
	// specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the
	// specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all
	// deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId
	// filter as it returns not only those deny assignments that contain the
	// specified principal is the Principals list but also those deny assignments that contain the specified principal is the
	// ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used,
	// only the deny assignment name and description properties are returned.
	Filter *string
}

DenyAssignmentsClientListForScopeOptions contains the optional parameters for the DenyAssignmentsClient.ListForScope method.

type DenyAssignmentsClientListForScopeResponse

type DenyAssignmentsClientListForScopeResponse struct {
	DenyAssignmentListResult
}

DenyAssignmentsClientListForScopeResponse contains the response from method DenyAssignmentsClient.ListForScope.

type DenyAssignmentsClientListOptions

type DenyAssignmentsClientListOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName
	// eq '{name}' to search deny assignments by name at
	// specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the
	// specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all
	// deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId
	// filter as it returns not only those deny assignments that contain the
	// specified principal is the Principals list but also those deny assignments that contain the specified principal is the
	// ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used,
	// only the deny assignment name and description properties are returned.
	Filter *string
}

DenyAssignmentsClientListOptions contains the optional parameters for the DenyAssignmentsClient.List method.

type DenyAssignmentsClientListResponse

type DenyAssignmentsClientListResponse struct {
	DenyAssignmentListResult
}

DenyAssignmentsClientListResponse contains the response from method DenyAssignmentsClient.List.

type EligibleChildResource

type EligibleChildResource struct {
	// READ-ONLY; The resource scope Id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

EligibleChildResource - Eligible child resource

func (EligibleChildResource) MarshalJSON

func (e EligibleChildResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EligibleChildResource.

func (*EligibleChildResource) UnmarshalJSON

func (e *EligibleChildResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EligibleChildResource.

type EligibleChildResourcesClient

type EligibleChildResourcesClient struct {
	// contains filtered or unexported fields
}

EligibleChildResourcesClient contains the methods for the EligibleChildResources group. Don't use this type directly, use NewEligibleChildResourcesClient() instead.

func NewEligibleChildResourcesClient

func NewEligibleChildResourcesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EligibleChildResourcesClient, error)

NewEligibleChildResourcesClient creates a new instance of EligibleChildResourcesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*EligibleChildResourcesClient) NewGetPager

NewGetPager - Get the child resources of a resource on which user has eligible access If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. options - EligibleChildResourcesClientGetOptions contains the optional parameters for the EligibleChildResourcesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetEligibleChildResourcesByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewEligibleChildResourcesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewGetPager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.EligibleChildResourcesClientGetOptions{Filter: to.Ptr("resourceType+eq+'resourcegroup'")})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type EligibleChildResourcesClientGetOptions

type EligibleChildResourcesClientGetOptions struct {
	// The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'.
	// Use
	// $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription'
	// or 'ResourceGroup'
	Filter *string
}

EligibleChildResourcesClientGetOptions contains the optional parameters for the EligibleChildResourcesClient.Get method.

type EligibleChildResourcesClientGetResponse

type EligibleChildResourcesClientGetResponse struct {
	EligibleChildResourcesListResult
}

EligibleChildResourcesClientGetResponse contains the response from method EligibleChildResourcesClient.Get.

type EligibleChildResourcesListResult

type EligibleChildResourcesListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Eligible child resource list.
	Value []*EligibleChildResource `json:"value,omitempty"`
}

EligibleChildResourcesListResult - Eligible child resources list operation result.

func (EligibleChildResourcesListResult) MarshalJSON

func (e EligibleChildResourcesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EligibleChildResourcesListResult.

func (*EligibleChildResourcesListResult) UnmarshalJSON

func (e *EligibleChildResourcesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EligibleChildResourcesListResult.

type EnablementRules

type EnablementRules string

EnablementRules - The type of enablement rule

const (
	EnablementRulesJustification             EnablementRules = "Justification"
	EnablementRulesMultiFactorAuthentication EnablementRules = "MultiFactorAuthentication"
	EnablementRulesTicketing                 EnablementRules = "Ticketing"
)

func PossibleEnablementRulesValues

func PossibleEnablementRulesValues() []EnablementRules

PossibleEnablementRulesValues returns the possible values for the EnablementRules const type.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info interface{} `json:"info,omitempty" azure:"ro"`

	// READ-ONLY; The additional info type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"`

	// READ-ONLY; The error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The error details.
	Details []*ErrorDetail `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; The error message.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The error target.
	Target *string `json:"target,omitempty" azure:"ro"`
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

func (e ErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON

func (e *ErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail `json:"error,omitempty"`
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ExpandedProperties

type ExpandedProperties struct {
	// Details of the principal
	Principal *ExpandedPropertiesPrincipal `json:"principal,omitempty"`

	// Details of role definition
	RoleDefinition *ExpandedPropertiesRoleDefinition `json:"roleDefinition,omitempty"`

	// Details of the resource scope
	Scope *ExpandedPropertiesScope `json:"scope,omitempty"`
}

func (ExpandedProperties) MarshalJSON

func (e ExpandedProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExpandedProperties.

func (*ExpandedProperties) UnmarshalJSON

func (e *ExpandedProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExpandedProperties.

type ExpandedPropertiesPrincipal

type ExpandedPropertiesPrincipal struct {
	// Display name of the principal
	DisplayName *string `json:"displayName,omitempty"`

	// Email id of the principal
	Email *string `json:"email,omitempty"`

	// Id of the principal
	ID *string `json:"id,omitempty"`

	// Type of the principal
	Type *string `json:"type,omitempty"`
}

ExpandedPropertiesPrincipal - Details of the principal

func (ExpandedPropertiesPrincipal) MarshalJSON

func (e ExpandedPropertiesPrincipal) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExpandedPropertiesPrincipal.

func (*ExpandedPropertiesPrincipal) UnmarshalJSON

func (e *ExpandedPropertiesPrincipal) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExpandedPropertiesPrincipal.

type ExpandedPropertiesRoleDefinition

type ExpandedPropertiesRoleDefinition struct {
	// Display name of the role definition
	DisplayName *string `json:"displayName,omitempty"`

	// Id of the role definition
	ID *string `json:"id,omitempty"`

	// Type of the role definition
	Type *string `json:"type,omitempty"`
}

ExpandedPropertiesRoleDefinition - Details of role definition

func (ExpandedPropertiesRoleDefinition) MarshalJSON

func (e ExpandedPropertiesRoleDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExpandedPropertiesRoleDefinition.

func (*ExpandedPropertiesRoleDefinition) UnmarshalJSON

func (e *ExpandedPropertiesRoleDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExpandedPropertiesRoleDefinition.

type ExpandedPropertiesScope

type ExpandedPropertiesScope struct {
	// Display name of the resource
	DisplayName *string `json:"displayName,omitempty"`

	// Scope id of the resource
	ID *string `json:"id,omitempty"`

	// Type of the resource
	Type *string `json:"type,omitempty"`
}

ExpandedPropertiesScope - Details of the resource scope

func (ExpandedPropertiesScope) MarshalJSON

func (e ExpandedPropertiesScope) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExpandedPropertiesScope.

func (*ExpandedPropertiesScope) UnmarshalJSON

func (e *ExpandedPropertiesScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExpandedPropertiesScope.

type GlobalAdministratorClient

type GlobalAdministratorClient struct {
	// contains filtered or unexported fields
}

GlobalAdministratorClient contains the methods for the GlobalAdministrator group. Don't use this type directly, use NewGlobalAdministratorClient() instead.

func NewGlobalAdministratorClient

func NewGlobalAdministratorClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalAdministratorClient, error)

NewGlobalAdministratorClient creates a new instance of GlobalAdministratorClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GlobalAdministratorClient) ElevateAccess

ElevateAccess - Elevates access for a Global Administrator. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 options - GlobalAdministratorClientElevateAccessOptions contains the optional parameters for the GlobalAdministratorClient.ElevateAccess method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/ElevateAccess.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewGlobalAdministratorClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.ElevateAccess(ctx, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

type GlobalAdministratorClientElevateAccessOptions

type GlobalAdministratorClientElevateAccessOptions struct {
}

GlobalAdministratorClientElevateAccessOptions contains the optional parameters for the GlobalAdministratorClient.ElevateAccess method.

type GlobalAdministratorClientElevateAccessResponse

type GlobalAdministratorClientElevateAccessResponse struct {
}

GlobalAdministratorClientElevateAccessResponse contains the response from method GlobalAdministratorClient.ElevateAccess.

type MemberType

type MemberType string

MemberType - Membership type of the role assignment schedule

const (
	MemberTypeDirect    MemberType = "Direct"
	MemberTypeGroup     MemberType = "Group"
	MemberTypeInherited MemberType = "Inherited"
)

func PossibleMemberTypeValues

func PossibleMemberTypeValues() []MemberType

PossibleMemberTypeValues returns the possible values for the MemberType const type.

type NotificationDeliveryMechanism

type NotificationDeliveryMechanism string

NotificationDeliveryMechanism - The type of notification.

const (
	NotificationDeliveryMechanismEmail NotificationDeliveryMechanism = "Email"
)

func PossibleNotificationDeliveryMechanismValues

func PossibleNotificationDeliveryMechanismValues() []NotificationDeliveryMechanism

PossibleNotificationDeliveryMechanismValues returns the possible values for the NotificationDeliveryMechanism const type.

type NotificationLevel

type NotificationLevel string

NotificationLevel - The notification level.

const (
	NotificationLevelAll      NotificationLevel = "All"
	NotificationLevelCritical NotificationLevel = "Critical"
	NotificationLevelNone     NotificationLevel = "None"
)

func PossibleNotificationLevelValues

func PossibleNotificationLevelValues() []NotificationLevel

PossibleNotificationLevelValues returns the possible values for the NotificationLevel const type.

type Permission

type Permission struct {
	// Allowed actions.
	Actions []*string `json:"actions,omitempty"`

	// Allowed Data actions.
	DataActions []*string `json:"dataActions,omitempty"`

	// Denied actions.
	NotActions []*string `json:"notActions,omitempty"`

	// Denied Data actions.
	NotDataActions []*string `json:"notDataActions,omitempty"`
}

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 PermissionGetResult

type PermissionGetResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// An array of permissions.
	Value []*Permission `json:"value,omitempty"`
}

PermissionGetResult - Permissions information.

func (PermissionGetResult) MarshalJSON

func (p PermissionGetResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PermissionGetResult.

func (*PermissionGetResult) UnmarshalJSON

func (p *PermissionGetResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PermissionGetResult.

type PermissionsClient

type PermissionsClient struct {
	// contains filtered or unexported fields
}

PermissionsClient contains the methods for the Permissions group. Don't use this type directly, use NewPermissionsClient() instead.

func NewPermissionsClient

func NewPermissionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PermissionsClient, error)

NewPermissionsClient creates a new instance of PermissionsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PermissionsClient) NewListForResourceGroupPager

NewListForResourceGroupPager - Gets all permissions the caller has for a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group. The name is case insensitive. options - PermissionsClientListForResourceGroupOptions contains the optional parameters for the PermissionsClient.ListForResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetPermissions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewPermissionsClient("subID", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourceGroupPager("rgname", nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*PermissionsClient) NewListForResourcePager

func (client *PermissionsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, options *PermissionsClientListForResourceOptions) *runtime.Pager[PermissionsClientListForResourceResponse]

NewListForResourcePager - Gets all permissions the caller has for a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceProviderNamespace - The namespace of the resource provider. parentResourcePath - The parent resource identity. resourceType - The resource type of the resource. resourceName - The name of the resource to get the permissions for. options - PermissionsClientListForResourceOptions contains the optional parameters for the PermissionsClient.ListForResource method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetResourcePermissions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewPermissionsClient("subId", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourcePager("rgname", "rpnamespace", "parentResourcePath", "resourceType", "resourceName", nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type PermissionsClientListForResourceGroupOptions

type PermissionsClientListForResourceGroupOptions struct {
}

PermissionsClientListForResourceGroupOptions contains the optional parameters for the PermissionsClient.ListForResourceGroup method.

type PermissionsClientListForResourceGroupResponse

type PermissionsClientListForResourceGroupResponse struct {
	PermissionGetResult
}

PermissionsClientListForResourceGroupResponse contains the response from method PermissionsClient.ListForResourceGroup.

type PermissionsClientListForResourceOptions

type PermissionsClientListForResourceOptions struct {
}

PermissionsClientListForResourceOptions contains the optional parameters for the PermissionsClient.ListForResource method.

type PermissionsClientListForResourceResponse

type PermissionsClientListForResourceResponse struct {
	PermissionGetResult
}

PermissionsClientListForResourceResponse contains the response from method PermissionsClient.ListForResource.

type PolicyAssignmentProperties

type PolicyAssignmentProperties struct {
	// Details of the policy
	Policy *PolicyAssignmentPropertiesPolicy `json:"policy,omitempty"`

	// Details of role definition
	RoleDefinition *PolicyAssignmentPropertiesRoleDefinition `json:"roleDefinition,omitempty"`

	// Details of the resource scope
	Scope *PolicyAssignmentPropertiesScope `json:"scope,omitempty"`
}

PolicyAssignmentProperties - Expanded info of resource scope, role definition and policy

func (PolicyAssignmentProperties) MarshalJSON

func (p PolicyAssignmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentProperties.

func (*PolicyAssignmentProperties) UnmarshalJSON

func (p *PolicyAssignmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentProperties.

type PolicyAssignmentPropertiesPolicy

type PolicyAssignmentPropertiesPolicy struct {
	// Id of the policy
	ID *string `json:"id,omitempty"`

	// The last modified date time.
	LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`

	// READ-ONLY; The name of the entity last modified it
	LastModifiedBy *Principal `json:"lastModifiedBy,omitempty" azure:"ro"`
}

PolicyAssignmentPropertiesPolicy - Details of the policy

func (PolicyAssignmentPropertiesPolicy) MarshalJSON

func (p PolicyAssignmentPropertiesPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentPropertiesPolicy.

func (*PolicyAssignmentPropertiesPolicy) UnmarshalJSON

func (p *PolicyAssignmentPropertiesPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentPropertiesPolicy.

type PolicyAssignmentPropertiesRoleDefinition

type PolicyAssignmentPropertiesRoleDefinition struct {
	// Display name of the role definition
	DisplayName *string `json:"displayName,omitempty"`

	// Id of the role definition
	ID *string `json:"id,omitempty"`

	// Type of the role definition
	Type *string `json:"type,omitempty"`
}

PolicyAssignmentPropertiesRoleDefinition - Details of role definition

func (PolicyAssignmentPropertiesRoleDefinition) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentPropertiesRoleDefinition.

func (*PolicyAssignmentPropertiesRoleDefinition) UnmarshalJSON

func (p *PolicyAssignmentPropertiesRoleDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentPropertiesRoleDefinition.

type PolicyAssignmentPropertiesScope

type PolicyAssignmentPropertiesScope struct {
	// Display name of the resource
	DisplayName *string `json:"displayName,omitempty"`

	// Scope id of the resource
	ID *string `json:"id,omitempty"`

	// Type of the resource
	Type *string `json:"type,omitempty"`
}

PolicyAssignmentPropertiesScope - Details of the resource scope

func (PolicyAssignmentPropertiesScope) MarshalJSON

func (p PolicyAssignmentPropertiesScope) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentPropertiesScope.

func (*PolicyAssignmentPropertiesScope) UnmarshalJSON

func (p *PolicyAssignmentPropertiesScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentPropertiesScope.

type PolicyProperties

type PolicyProperties struct {
	// READ-ONLY; Details of the resource scope
	Scope *PolicyPropertiesScope `json:"scope,omitempty" azure:"ro"`
}

PolicyProperties - Expanded info of resource scope

func (PolicyProperties) MarshalJSON

func (p PolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyProperties.

func (*PolicyProperties) UnmarshalJSON

func (p *PolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProperties.

type PolicyPropertiesScope

type PolicyPropertiesScope struct {
	// Display name of the resource
	DisplayName *string `json:"displayName,omitempty"`

	// Scope id of the resource
	ID *string `json:"id,omitempty"`

	// Type of the resource
	Type *string `json:"type,omitempty"`
}

PolicyPropertiesScope - Details of the resource scope

func (PolicyPropertiesScope) MarshalJSON

func (p PolicyPropertiesScope) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyPropertiesScope.

func (*PolicyPropertiesScope) UnmarshalJSON

func (p *PolicyPropertiesScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyPropertiesScope.

type Principal

type Principal struct {
	// The name of the principal made changes
	DisplayName *string `json:"displayName,omitempty"`

	// Email of principal
	Email *string `json:"email,omitempty"`

	// The id of the principal made changes
	ID *string `json:"id,omitempty"`

	// Type of principal such as user , group etc
	Type *string `json:"type,omitempty"`
}

Principal - The name of the entity last modified it

func (Principal) MarshalJSON

func (p Principal) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Principal.

func (*Principal) UnmarshalJSON

func (p *Principal) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Principal.

type PrincipalType

type PrincipalType string

PrincipalType - The principal type of the assigned principal ID.

const (
	PrincipalTypeDevice           PrincipalType = "Device"
	PrincipalTypeForeignGroup     PrincipalType = "ForeignGroup"
	PrincipalTypeGroup            PrincipalType = "Group"
	PrincipalTypeServicePrincipal PrincipalType = "ServicePrincipal"
	PrincipalTypeUser             PrincipalType = "User"
)

func PossiblePrincipalTypeValues

func PossiblePrincipalTypeValues() []PrincipalType

PossiblePrincipalTypeValues returns the possible values for the PrincipalType const type.

type ProviderOperation

type ProviderOperation struct {
	// The operation description.
	Description *string `json:"description,omitempty"`

	// The operation display name.
	DisplayName *string `json:"displayName,omitempty"`

	// The dataAction flag to specify the operation type.
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// The operation name.
	Name *string `json:"name,omitempty"`

	// The operation origin.
	Origin *string `json:"origin,omitempty"`

	// The operation properties.
	Properties interface{} `json:"properties,omitempty"`
}

ProviderOperation - Operation

func (ProviderOperation) MarshalJSON

func (p ProviderOperation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProviderOperation.

func (*ProviderOperation) UnmarshalJSON

func (p *ProviderOperation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProviderOperation.

type ProviderOperationsMetadata

type ProviderOperationsMetadata struct {
	// The provider display name.
	DisplayName *string `json:"displayName,omitempty"`

	// The provider id.
	ID *string `json:"id,omitempty"`

	// The provider name.
	Name *string `json:"name,omitempty"`

	// The provider operations.
	Operations []*ProviderOperation `json:"operations,omitempty"`

	// The provider resource types
	ResourceTypes []*ResourceType `json:"resourceTypes,omitempty"`

	// The provider type.
	Type *string `json:"type,omitempty"`
}

ProviderOperationsMetadata - Provider Operations metadata

func (ProviderOperationsMetadata) MarshalJSON

func (p ProviderOperationsMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProviderOperationsMetadata.

func (*ProviderOperationsMetadata) UnmarshalJSON

func (p *ProviderOperationsMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProviderOperationsMetadata.

type ProviderOperationsMetadataClient

type ProviderOperationsMetadataClient struct {
	// contains filtered or unexported fields
}

ProviderOperationsMetadataClient contains the methods for the ProviderOperationsMetadata group. Don't use this type directly, use NewProviderOperationsMetadataClient() instead.

func NewProviderOperationsMetadataClient

func NewProviderOperationsMetadataClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderOperationsMetadataClient, error)

NewProviderOperationsMetadataClient creates a new instance of ProviderOperationsMetadataClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ProviderOperationsMetadataClient) Get

Get - Gets provider operations metadata for the specified resource provider. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceProviderNamespace - The namespace of the resource provider. options - ProviderOperationsMetadataClientGetOptions contains the optional parameters for the ProviderOperationsMetadataClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetProviderOperationsRP.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewProviderOperationsMetadataClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "resourceProviderNamespace", &armauthorization.ProviderOperationsMetadataClientGetOptions{Expand: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*ProviderOperationsMetadataClient) NewListPager

NewListPager - Gets provider operations metadata for all resource providers. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 options - ProviderOperationsMetadataClientListOptions contains the optional parameters for the ProviderOperationsMetadataClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetAllProviderOperations.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewProviderOperationsMetadataClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(&armauthorization.ProviderOperationsMetadataClientListOptions{Expand: nil})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type ProviderOperationsMetadataClientGetOptions

type ProviderOperationsMetadataClientGetOptions struct {
	// Specifies whether to expand the values.
	Expand *string
}

ProviderOperationsMetadataClientGetOptions contains the optional parameters for the ProviderOperationsMetadataClient.Get method.

type ProviderOperationsMetadataClientGetResponse

type ProviderOperationsMetadataClientGetResponse struct {
	ProviderOperationsMetadata
}

ProviderOperationsMetadataClientGetResponse contains the response from method ProviderOperationsMetadataClient.Get.

type ProviderOperationsMetadataClientListOptions

type ProviderOperationsMetadataClientListOptions struct {
	// Specifies whether to expand the values.
	Expand *string
}

ProviderOperationsMetadataClientListOptions contains the optional parameters for the ProviderOperationsMetadataClient.List method.

type ProviderOperationsMetadataClientListResponse

type ProviderOperationsMetadataClientListResponse struct {
	ProviderOperationsMetadataListResult
}

ProviderOperationsMetadataClientListResponse contains the response from method ProviderOperationsMetadataClient.List.

type ProviderOperationsMetadataListResult

type ProviderOperationsMetadataListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of providers.
	Value []*ProviderOperationsMetadata `json:"value,omitempty"`
}

ProviderOperationsMetadataListResult - Provider operations metadata list

func (ProviderOperationsMetadataListResult) MarshalJSON

func (p ProviderOperationsMetadataListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProviderOperationsMetadataListResult.

func (*ProviderOperationsMetadataListResult) UnmarshalJSON

func (p *ProviderOperationsMetadataListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProviderOperationsMetadataListResult.

type RecipientType

type RecipientType string

RecipientType - The recipient type.

const (
	RecipientTypeAdmin     RecipientType = "Admin"
	RecipientTypeApprover  RecipientType = "Approver"
	RecipientTypeRequestor RecipientType = "Requestor"
)

func PossibleRecipientTypeValues

func PossibleRecipientTypeValues() []RecipientType

PossibleRecipientTypeValues returns the possible values for the RecipientType const type.

type RequestType

type RequestType string

RequestType - The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc

const (
	RequestTypeAdminAssign    RequestType = "AdminAssign"
	RequestTypeAdminExtend    RequestType = "AdminExtend"
	RequestTypeAdminRemove    RequestType = "AdminRemove"
	RequestTypeAdminRenew     RequestType = "AdminRenew"
	RequestTypeAdminUpdate    RequestType = "AdminUpdate"
	RequestTypeSelfActivate   RequestType = "SelfActivate"
	RequestTypeSelfDeactivate RequestType = "SelfDeactivate"
	RequestTypeSelfExtend     RequestType = "SelfExtend"
	RequestTypeSelfRenew      RequestType = "SelfRenew"
)

func PossibleRequestTypeValues

func PossibleRequestTypeValues() []RequestType

PossibleRequestTypeValues returns the possible values for the RequestType const type.

type ResourceType

type ResourceType struct {
	// The resource type display name.
	DisplayName *string `json:"displayName,omitempty"`

	// The resource type name.
	Name *string `json:"name,omitempty"`

	// The resource type operations.
	Operations []*ProviderOperation `json:"operations,omitempty"`
}

ResourceType - Resource Type

func (ResourceType) MarshalJSON

func (r ResourceType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceType.

func (*ResourceType) UnmarshalJSON

func (r *ResourceType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceType.

type RoleAssignment

type RoleAssignment struct {
	// Role assignment properties.
	Properties *RoleAssignmentProperties `json:"properties,omitempty"`

	// READ-ONLY; The role assignment ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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 `json:"properties,omitempty"`
}

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 RoleAssignmentFilter

type RoleAssignmentFilter struct {
	// Returns role assignment of the specific principal.
	PrincipalID *string `json:"principalId,omitempty"`
}

RoleAssignmentFilter - Role Assignments filter

func (RoleAssignmentFilter) MarshalJSON

func (r RoleAssignmentFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentFilter.

func (*RoleAssignmentFilter) UnmarshalJSON

func (r *RoleAssignmentFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentFilter.

type RoleAssignmentListResult

type RoleAssignmentListResult struct {
	// Role assignment list.
	Value []*RoleAssignment `json:"value,omitempty"`

	// READ-ONLY; The skipToken to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

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.
	PrincipalID *string `json:"principalId,omitempty"`

	// REQUIRED; The role definition ID.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
	// StringEqualsIgnoreCase
	// 'foostoragecontainer'
	Condition *string `json:"condition,omitempty"`

	// Version of the condition. Currently the only accepted value is '2.0'
	ConditionVersion *string `json:"conditionVersion,omitempty"`

	// Id of the delegated managed identity resource
	DelegatedManagedIdentityResourceID *string `json:"delegatedManagedIdentityResourceId,omitempty"`

	// Description of role assignment
	Description *string `json:"description,omitempty"`

	// The principal type of the assigned principal ID.
	PrincipalType *PrincipalType `json:"principalType,omitempty"`

	// READ-ONLY; Id of the user who created the assignment
	CreatedBy *string `json:"createdBy,omitempty" azure:"ro"`

	// READ-ONLY; Time it was created
	CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment scope.
	Scope *string `json:"scope,omitempty" azure:"ro"`

	// READ-ONLY; Id of the user who updated the assignment
	UpdatedBy *string `json:"updatedBy,omitempty" azure:"ro"`

	// READ-ONLY; Time it was updated
	UpdatedOn *time.Time `json:"updatedOn,omitempty" azure:"ro"`
}

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 RoleAssignmentSchedule

type RoleAssignmentSchedule struct {
	// Role assignment schedule properties.
	Properties *RoleAssignmentScheduleProperties `json:"properties,omitempty"`

	// READ-ONLY; The role assignment schedule Id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment schedule name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment schedule type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

RoleAssignmentSchedule - Role Assignment schedule

func (RoleAssignmentSchedule) MarshalJSON

func (r RoleAssignmentSchedule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentSchedule.

func (*RoleAssignmentSchedule) UnmarshalJSON

func (r *RoleAssignmentSchedule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentSchedule.

type RoleAssignmentScheduleFilter

type RoleAssignmentScheduleFilter struct {
	// Returns role assignment schedule of the specific principal.
	PrincipalID *string `json:"principalId,omitempty"`

	// Returns role assignment schedule of the specific role definition.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// Returns role assignment schedule instances of the specific status.
	Status *string `json:"status,omitempty"`
}

RoleAssignmentScheduleFilter - Role assignment schedule filter

func (RoleAssignmentScheduleFilter) MarshalJSON

func (r RoleAssignmentScheduleFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleFilter.

func (*RoleAssignmentScheduleFilter) UnmarshalJSON

func (r *RoleAssignmentScheduleFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleFilter.

type RoleAssignmentScheduleInstance

type RoleAssignmentScheduleInstance struct {
	// Role assignment schedule instance properties.
	Properties *RoleAssignmentScheduleInstanceProperties `json:"properties,omitempty"`

	// READ-ONLY; The role assignment schedule instance ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment schedule instance name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment schedule instance type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

RoleAssignmentScheduleInstance - Information about current or upcoming role assignment schedule instance

func (RoleAssignmentScheduleInstance) MarshalJSON

func (r RoleAssignmentScheduleInstance) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleInstance.

func (*RoleAssignmentScheduleInstance) UnmarshalJSON

func (r *RoleAssignmentScheduleInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleInstance.

type RoleAssignmentScheduleInstanceFilter

type RoleAssignmentScheduleInstanceFilter struct {
	// Returns role assignment schedule instances of the specific principal.
	PrincipalID *string `json:"principalId,omitempty"`

	// Returns role assignment schedule instances belonging to a specific role assignment schedule.
	RoleAssignmentScheduleID *string `json:"roleAssignmentScheduleId,omitempty"`

	// Returns role assignment schedule instances of the specific role definition.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// Returns role assignment schedule instances of the specific status.
	Status *string `json:"status,omitempty"`
}

RoleAssignmentScheduleInstanceFilter - Role assignment schedule instance filter

func (RoleAssignmentScheduleInstanceFilter) MarshalJSON

func (r RoleAssignmentScheduleInstanceFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleInstanceFilter.

func (*RoleAssignmentScheduleInstanceFilter) UnmarshalJSON

func (r *RoleAssignmentScheduleInstanceFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleInstanceFilter.

type RoleAssignmentScheduleInstanceListResult

type RoleAssignmentScheduleInstanceListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Role assignment schedule instance list.
	Value []*RoleAssignmentScheduleInstance `json:"value,omitempty"`
}

RoleAssignmentScheduleInstanceListResult - Role assignment schedule instance list operation result.

func (RoleAssignmentScheduleInstanceListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleInstanceListResult.

func (*RoleAssignmentScheduleInstanceListResult) UnmarshalJSON

func (r *RoleAssignmentScheduleInstanceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleInstanceListResult.

type RoleAssignmentScheduleInstanceProperties

type RoleAssignmentScheduleInstanceProperties struct {
	// Assignment type of the role assignment schedule
	AssignmentType *AssignmentType `json:"assignmentType,omitempty"`

	// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
	// StringEqualsIgnoreCase
	// 'foostoragecontainer'
	Condition *string `json:"condition,omitempty"`

	// Version of the condition. Currently accepted value is '2.0'
	ConditionVersion *string `json:"conditionVersion,omitempty"`

	// DateTime when role assignment schedule was created
	CreatedOn *time.Time `json:"createdOn,omitempty"`

	// The endDateTime of the role assignment schedule instance
	EndDateTime *time.Time `json:"endDateTime,omitempty"`

	// Additional properties of principal, scope and role definition
	ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty"`

	// roleEligibilityScheduleId used to activate
	LinkedRoleEligibilityScheduleID *string `json:"linkedRoleEligibilityScheduleId,omitempty"`

	// roleEligibilityScheduleInstanceId linked to this roleAssignmentScheduleInstance
	LinkedRoleEligibilityScheduleInstanceID *string `json:"linkedRoleEligibilityScheduleInstanceId,omitempty"`

	// Membership type of the role assignment schedule
	MemberType *MemberType `json:"memberType,omitempty"`

	// Role Assignment Id in external system
	OriginRoleAssignmentID *string `json:"originRoleAssignmentId,omitempty"`

	// The principal ID.
	PrincipalID *string `json:"principalId,omitempty"`

	// The principal type of the assigned principal ID.
	PrincipalType *PrincipalType `json:"principalType,omitempty"`

	// Id of the master role assignment schedule
	RoleAssignmentScheduleID *string `json:"roleAssignmentScheduleId,omitempty"`

	// The role definition ID.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// The role assignment schedule scope.
	Scope *string `json:"scope,omitempty"`

	// The startDateTime of the role assignment schedule instance
	StartDateTime *time.Time `json:"startDateTime,omitempty"`

	// The status of the role assignment schedule instance.
	Status *Status `json:"status,omitempty"`
}

RoleAssignmentScheduleInstanceProperties - Role assignment schedule properties with scope.

func (RoleAssignmentScheduleInstanceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleInstanceProperties.

func (*RoleAssignmentScheduleInstanceProperties) UnmarshalJSON

func (r *RoleAssignmentScheduleInstanceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleInstanceProperties.

type RoleAssignmentScheduleInstancesClient

type RoleAssignmentScheduleInstancesClient struct {
	// contains filtered or unexported fields
}

RoleAssignmentScheduleInstancesClient contains the methods for the RoleAssignmentScheduleInstances group. Don't use this type directly, use NewRoleAssignmentScheduleInstancesClient() instead.

func NewRoleAssignmentScheduleInstancesClient

func NewRoleAssignmentScheduleInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentScheduleInstancesClient, error)

NewRoleAssignmentScheduleInstancesClient creates a new instance of RoleAssignmentScheduleInstancesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleAssignmentScheduleInstancesClient) Get

Get - Gets the specified role assignment schedule instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignments schedules. roleAssignmentScheduleInstanceName - The name (hash of schedule name + time) of the role assignment schedule to get. options - RoleAssignmentScheduleInstancesClientGetOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleInstanceByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleInstancesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "ed9b8180-cef7-4c77-a63c-b8566ecfc412", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentScheduleInstancesClient) NewListForScopePager

NewListForScopePager - Gets role assignment schedule instances of a role assignment schedule. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment schedule. options - RoleAssignmentScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleInstancesByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleInstancesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleAssignmentScheduleInstancesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type RoleAssignmentScheduleInstancesClientGetOptions

type RoleAssignmentScheduleInstancesClientGetOptions struct {
}

RoleAssignmentScheduleInstancesClientGetOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.Get method.

type RoleAssignmentScheduleInstancesClientGetResponse

type RoleAssignmentScheduleInstancesClientGetResponse struct {
	RoleAssignmentScheduleInstance
}

RoleAssignmentScheduleInstancesClientGetResponse contains the response from method RoleAssignmentScheduleInstancesClient.Get.

type RoleAssignmentScheduleInstancesClientListForScopeOptions

type RoleAssignmentScheduleInstancesClientListForScopeOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope.
	// Use $filter=principalId eq {id} to return all role assignment schedules at,
	// above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment
	// schedule instances for the user. Use $filter=asTarget() to return all role
	// assignment schedule instances created for the current user.
	Filter *string
}

RoleAssignmentScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.ListForScope method.

type RoleAssignmentScheduleInstancesClientListForScopeResponse

type RoleAssignmentScheduleInstancesClientListForScopeResponse struct {
	RoleAssignmentScheduleInstanceListResult
}

RoleAssignmentScheduleInstancesClientListForScopeResponse contains the response from method RoleAssignmentScheduleInstancesClient.ListForScope.

type RoleAssignmentScheduleListResult

type RoleAssignmentScheduleListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Role assignment schedule list.
	Value []*RoleAssignmentSchedule `json:"value,omitempty"`
}

RoleAssignmentScheduleListResult - Role assignment schedule list operation result.

func (RoleAssignmentScheduleListResult) MarshalJSON

func (r RoleAssignmentScheduleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleListResult.

func (*RoleAssignmentScheduleListResult) UnmarshalJSON

func (r *RoleAssignmentScheduleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleListResult.

type RoleAssignmentScheduleProperties

type RoleAssignmentScheduleProperties struct {
	// Assignment type of the role assignment schedule
	AssignmentType *AssignmentType `json:"assignmentType,omitempty"`

	// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
	// StringEqualsIgnoreCase
	// 'foostoragecontainer'
	Condition *string `json:"condition,omitempty"`

	// Version of the condition. Currently accepted value is '2.0'
	ConditionVersion *string `json:"conditionVersion,omitempty"`

	// DateTime when role assignment schedule was created
	CreatedOn *time.Time `json:"createdOn,omitempty"`

	// End DateTime when role assignment schedule
	EndDateTime *time.Time `json:"endDateTime,omitempty"`

	// Additional properties of principal, scope and role definition
	ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty"`

	// The id of roleEligibilitySchedule used to activated this roleAssignmentSchedule
	LinkedRoleEligibilityScheduleID *string `json:"linkedRoleEligibilityScheduleId,omitempty"`

	// Membership type of the role assignment schedule
	MemberType *MemberType `json:"memberType,omitempty"`

	// The principal ID.
	PrincipalID *string `json:"principalId,omitempty"`

	// The principal type of the assigned principal ID.
	PrincipalType *PrincipalType `json:"principalType,omitempty"`

	// The id of roleAssignmentScheduleRequest used to create this roleAssignmentSchedule
	RoleAssignmentScheduleRequestID *string `json:"roleAssignmentScheduleRequestId,omitempty"`

	// The role definition ID.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// The role assignment schedule scope.
	Scope *string `json:"scope,omitempty"`

	// Start DateTime when role assignment schedule
	StartDateTime *time.Time `json:"startDateTime,omitempty"`

	// The status of the role assignment schedule.
	Status *Status `json:"status,omitempty"`

	// DateTime when role assignment schedule was modified
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

RoleAssignmentScheduleProperties - Role assignment schedule properties with scope.

func (RoleAssignmentScheduleProperties) MarshalJSON

func (r RoleAssignmentScheduleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleProperties.

func (*RoleAssignmentScheduleProperties) UnmarshalJSON

func (r *RoleAssignmentScheduleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleProperties.

type RoleAssignmentScheduleRequest

type RoleAssignmentScheduleRequest struct {
	// Role assignment schedule request properties.
	Properties *RoleAssignmentScheduleRequestProperties `json:"properties,omitempty"`

	// READ-ONLY; The role assignment schedule request ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment schedule request name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment schedule request type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

RoleAssignmentScheduleRequest - Role Assignment schedule request

func (RoleAssignmentScheduleRequest) MarshalJSON

func (r RoleAssignmentScheduleRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequest.

func (*RoleAssignmentScheduleRequest) UnmarshalJSON

func (r *RoleAssignmentScheduleRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequest.

type RoleAssignmentScheduleRequestFilter

type RoleAssignmentScheduleRequestFilter struct {
	// Returns role assignment requests of the specific principal.
	PrincipalID *string `json:"principalId,omitempty"`

	// Returns role assignment requests created by specific principal.
	RequestorID *string `json:"requestorId,omitempty"`

	// Returns role assignment requests of the specific role definition.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// Returns role assignment requests of specific status.
	Status *string `json:"status,omitempty"`
}

RoleAssignmentScheduleRequestFilter - Role assignment schedule request filter

func (RoleAssignmentScheduleRequestFilter) MarshalJSON

func (r RoleAssignmentScheduleRequestFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestFilter.

func (*RoleAssignmentScheduleRequestFilter) UnmarshalJSON

func (r *RoleAssignmentScheduleRequestFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestFilter.

type RoleAssignmentScheduleRequestListResult

type RoleAssignmentScheduleRequestListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Role assignment schedule request list.
	Value []*RoleAssignmentScheduleRequest `json:"value,omitempty"`
}

RoleAssignmentScheduleRequestListResult - Role assignment schedule request list operation result.

func (RoleAssignmentScheduleRequestListResult) MarshalJSON

func (r RoleAssignmentScheduleRequestListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestListResult.

func (*RoleAssignmentScheduleRequestListResult) UnmarshalJSON

func (r *RoleAssignmentScheduleRequestListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestListResult.

type RoleAssignmentScheduleRequestProperties

type RoleAssignmentScheduleRequestProperties struct {
	// REQUIRED; The principal ID.
	PrincipalID *string `json:"principalId,omitempty"`

	// REQUIRED; The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc
	RequestType *RequestType `json:"requestType,omitempty"`

	// REQUIRED; The role definition ID.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
	// StringEqualsIgnoreCase
	// 'foostoragecontainer'
	Condition *string `json:"condition,omitempty"`

	// Version of the condition. Currently accepted value is '2.0'
	ConditionVersion *string `json:"conditionVersion,omitempty"`

	// Justification for the role assignment
	Justification *string `json:"justification,omitempty"`

	// The linked role eligibility schedule id - to activate an eligibility.
	LinkedRoleEligibilityScheduleID *string `json:"linkedRoleEligibilityScheduleId,omitempty"`

	// Schedule info of the role assignment schedule
	ScheduleInfo *RoleAssignmentScheduleRequestPropertiesScheduleInfo `json:"scheduleInfo,omitempty"`

	// The resultant role assignment schedule id or the role assignment schedule id being updated
	TargetRoleAssignmentScheduleID *string `json:"targetRoleAssignmentScheduleId,omitempty"`

	// The role assignment schedule instance id being updated
	TargetRoleAssignmentScheduleInstanceID *string `json:"targetRoleAssignmentScheduleInstanceId,omitempty"`

	// Ticket Info of the role assignment
	TicketInfo *RoleAssignmentScheduleRequestPropertiesTicketInfo `json:"ticketInfo,omitempty"`

	// READ-ONLY; The approvalId of the role assignment schedule request.
	ApprovalID *string `json:"approvalId,omitempty" azure:"ro"`

	// READ-ONLY; DateTime when role assignment schedule request was created
	CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"`

	// READ-ONLY; Additional properties of principal, scope and role definition
	ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty" azure:"ro"`

	// READ-ONLY; The principal type of the assigned principal ID.
	PrincipalType *PrincipalType `json:"principalType,omitempty" azure:"ro"`

	// READ-ONLY; Id of the user who created this request
	RequestorID *string `json:"requestorId,omitempty" azure:"ro"`

	// READ-ONLY; The role assignment schedule request scope.
	Scope *string `json:"scope,omitempty" azure:"ro"`

	// READ-ONLY; The status of the role assignment schedule request.
	Status *Status `json:"status,omitempty" azure:"ro"`
}

RoleAssignmentScheduleRequestProperties - Role assignment schedule request properties with scope.

func (RoleAssignmentScheduleRequestProperties) MarshalJSON

func (r RoleAssignmentScheduleRequestProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestProperties.

func (*RoleAssignmentScheduleRequestProperties) UnmarshalJSON

func (r *RoleAssignmentScheduleRequestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestProperties.

type RoleAssignmentScheduleRequestPropertiesScheduleInfo

type RoleAssignmentScheduleRequestPropertiesScheduleInfo struct {
	// Expiration of the role assignment schedule
	Expiration *RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration `json:"expiration,omitempty"`

	// Start DateTime of the role assignment schedule.
	StartDateTime *time.Time `json:"startDateTime,omitempty"`
}

RoleAssignmentScheduleRequestPropertiesScheduleInfo - Schedule info of the role assignment schedule

func (RoleAssignmentScheduleRequestPropertiesScheduleInfo) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestPropertiesScheduleInfo.

func (*RoleAssignmentScheduleRequestPropertiesScheduleInfo) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestPropertiesScheduleInfo.

type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration

type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration struct {
	// Duration of the role assignment schedule in TimeSpan.
	Duration *string `json:"duration,omitempty"`

	// End DateTime of the role assignment schedule.
	EndDateTime *time.Time `json:"endDateTime,omitempty"`

	// Type of the role assignment schedule expiration
	Type *Type `json:"type,omitempty"`
}

RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration - Expiration of the role assignment schedule

func (RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration.

func (*RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration.

type RoleAssignmentScheduleRequestPropertiesTicketInfo

type RoleAssignmentScheduleRequestPropertiesTicketInfo struct {
	// Ticket number for the role assignment
	TicketNumber *string `json:"ticketNumber,omitempty"`

	// Ticket system name for the role assignment
	TicketSystem *string `json:"ticketSystem,omitempty"`
}

RoleAssignmentScheduleRequestPropertiesTicketInfo - Ticket Info of the role assignment

func (RoleAssignmentScheduleRequestPropertiesTicketInfo) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestPropertiesTicketInfo.

func (*RoleAssignmentScheduleRequestPropertiesTicketInfo) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestPropertiesTicketInfo.

type RoleAssignmentScheduleRequestsClient

type RoleAssignmentScheduleRequestsClient struct {
	// contains filtered or unexported fields
}

RoleAssignmentScheduleRequestsClient contains the methods for the RoleAssignmentScheduleRequests group. Don't use this type directly, use NewRoleAssignmentScheduleRequestsClient() instead.

func NewRoleAssignmentScheduleRequestsClient

func NewRoleAssignmentScheduleRequestsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentScheduleRequestsClient, error)

NewRoleAssignmentScheduleRequestsClient creates a new instance of RoleAssignmentScheduleRequestsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleAssignmentScheduleRequestsClient) Cancel

Cancel - Cancels a pending role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment request to cancel. roleAssignmentScheduleRequestName - The name of the role assignment request to cancel. options - RoleAssignmentScheduleRequestsClientCancelOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Cancel method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/CancelRoleAssignmentScheduleRequestByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.Cancel(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "fea7a502-9a96-4806-a26f-eee560e52045", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*RoleAssignmentScheduleRequestsClient) Create

Create - Creates a role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment schedule request to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource. roleAssignmentScheduleRequestName - A GUID for the role assignment to create. The name must be unique and different for each role assignment. parameters - Parameters for the role assignment schedule request. options - RoleAssignmentScheduleRequestsClientCreateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PutRoleAssignmentScheduleRequest.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.Create(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "fea7a502-9a96-4806-a26f-eee560e52045", armauthorization.RoleAssignmentScheduleRequest{
	Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{
		Condition:                       to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
		ConditionVersion:                to.Ptr("1.0"),
		LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
		PrincipalID:                     to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
		RequestType:                     to.Ptr(armauthorization.RequestTypeSelfActivate),
		RoleDefinitionID:                to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
		ScheduleInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesScheduleInfo{
			Expiration: &armauthorization.RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration{
				Type:     to.Ptr(armauthorization.TypeAfterDuration),
				Duration: to.Ptr("PT8H"),
			},
			StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t }()),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*RoleAssignmentScheduleRequestsClient) Get

Get - Get the specified role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment schedule request. roleAssignmentScheduleRequestName - The name (guid) of the role assignment schedule request to get. options - RoleAssignmentScheduleRequestsClientGetOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleRequestByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "fea7a502-9a96-4806-a26f-eee560e52045", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentScheduleRequestsClient) NewListForScopePager

NewListForScopePager - Gets role assignment schedule requests for a scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignments schedule requests. options - RoleAssignmentScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleRequestByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleAssignmentScheduleRequestsClientListForScopeOptions{Filter: to.Ptr("assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')")})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*RoleAssignmentScheduleRequestsClient) Validate

Validate - Validates a new role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment request to validate. roleAssignmentScheduleRequestName - The name of the role assignment request to validate. parameters - Parameters for the role assignment schedule request. options - RoleAssignmentScheduleRequestsClientValidateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Validate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/ValidateRoleAssignmentScheduleRequestByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Validate(ctx, "subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "fea7a502-9a96-4806-a26f-eee560e52045", armauthorization.RoleAssignmentScheduleRequest{
	Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{
		Condition:                       to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
		ConditionVersion:                to.Ptr("1.0"),
		LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
		PrincipalID:                     to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
		RequestType:                     to.Ptr(armauthorization.RequestTypeSelfActivate),
		RoleDefinitionID:                to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
		ScheduleInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesScheduleInfo{
			Expiration: &armauthorization.RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration{
				Type:     to.Ptr(armauthorization.TypeAfterDuration),
				Duration: to.Ptr("PT8H"),
			},
			StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t }()),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

type RoleAssignmentScheduleRequestsClientCancelOptions

type RoleAssignmentScheduleRequestsClientCancelOptions struct {
}

RoleAssignmentScheduleRequestsClientCancelOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Cancel method.

type RoleAssignmentScheduleRequestsClientCancelResponse

type RoleAssignmentScheduleRequestsClientCancelResponse struct {
}

RoleAssignmentScheduleRequestsClientCancelResponse contains the response from method RoleAssignmentScheduleRequestsClient.Cancel.

type RoleAssignmentScheduleRequestsClientCreateOptions

type RoleAssignmentScheduleRequestsClientCreateOptions struct {
}

RoleAssignmentScheduleRequestsClientCreateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Create method.

type RoleAssignmentScheduleRequestsClientCreateResponse

type RoleAssignmentScheduleRequestsClientCreateResponse struct {
	RoleAssignmentScheduleRequest
}

RoleAssignmentScheduleRequestsClientCreateResponse contains the response from method RoleAssignmentScheduleRequestsClient.Create.

type RoleAssignmentScheduleRequestsClientGetOptions

type RoleAssignmentScheduleRequestsClientGetOptions struct {
}

RoleAssignmentScheduleRequestsClientGetOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Get method.

type RoleAssignmentScheduleRequestsClientGetResponse

type RoleAssignmentScheduleRequestsClientGetResponse struct {
	RoleAssignmentScheduleRequest
}

RoleAssignmentScheduleRequestsClientGetResponse contains the response from method RoleAssignmentScheduleRequestsClient.Get.

type RoleAssignmentScheduleRequestsClientListForScopeOptions

type RoleAssignmentScheduleRequestsClientListForScopeOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above
	// the scope. Use $filter=principalId eq {id} to return all role assignment
	// schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role
	// assignment schedule requests requested by the current user. Use
	// $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover()
	// to return all role assignment schedule requests where the current user is an
	// approver.
	Filter *string
}

RoleAssignmentScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.ListForScope method.

type RoleAssignmentScheduleRequestsClientListForScopeResponse

type RoleAssignmentScheduleRequestsClientListForScopeResponse struct {
	RoleAssignmentScheduleRequestListResult
}

RoleAssignmentScheduleRequestsClientListForScopeResponse contains the response from method RoleAssignmentScheduleRequestsClient.ListForScope.

type RoleAssignmentScheduleRequestsClientValidateOptions

type RoleAssignmentScheduleRequestsClientValidateOptions struct {
}

RoleAssignmentScheduleRequestsClientValidateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Validate method.

type RoleAssignmentScheduleRequestsClientValidateResponse

type RoleAssignmentScheduleRequestsClientValidateResponse struct {
	RoleAssignmentScheduleRequest
}

RoleAssignmentScheduleRequestsClientValidateResponse contains the response from method RoleAssignmentScheduleRequestsClient.Validate.

type RoleAssignmentSchedulesClient

type RoleAssignmentSchedulesClient struct {
	// contains filtered or unexported fields
}

RoleAssignmentSchedulesClient contains the methods for the RoleAssignmentSchedules group. Don't use this type directly, use NewRoleAssignmentSchedulesClient() instead.

func NewRoleAssignmentSchedulesClient

func NewRoleAssignmentSchedulesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentSchedulesClient, error)

NewRoleAssignmentSchedulesClient creates a new instance of RoleAssignmentSchedulesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleAssignmentSchedulesClient) Get

Get - Get the specified role assignment schedule for a resource scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment schedule. roleAssignmentScheduleName - The name (guid) of the role assignment schedule to get. options - RoleAssignmentSchedulesClientGetOptions contains the optional parameters for the RoleAssignmentSchedulesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentSchedulesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentSchedulesClient) NewListForScopePager

NewListForScopePager - Gets role assignment schedules for a resource scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignments schedules. options - RoleAssignmentSchedulesClientListForScopeOptions contains the optional parameters for the RoleAssignmentSchedulesClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentSchedulesByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentSchedulesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleAssignmentSchedulesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type RoleAssignmentSchedulesClientGetOptions

type RoleAssignmentSchedulesClientGetOptions struct {
}

RoleAssignmentSchedulesClientGetOptions contains the optional parameters for the RoleAssignmentSchedulesClient.Get method.

type RoleAssignmentSchedulesClientGetResponse

type RoleAssignmentSchedulesClientGetResponse struct {
	RoleAssignmentSchedule
}

RoleAssignmentSchedulesClientGetResponse contains the response from method RoleAssignmentSchedulesClient.Get.

type RoleAssignmentSchedulesClientListForScopeOptions

type RoleAssignmentSchedulesClientListForScopeOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope.
	// Use $filter=principalId eq {id} to return all role assignment schedules at,
	// above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment
	// schedules for the current user. Use $filter=asTarget() to return all role
	// assignment schedules created for the current user.
	Filter *string
}

RoleAssignmentSchedulesClientListForScopeOptions contains the optional parameters for the RoleAssignmentSchedulesClient.ListForScope method.

type RoleAssignmentSchedulesClientListForScopeResponse

type RoleAssignmentSchedulesClientListForScopeResponse struct {
	RoleAssignmentScheduleListResult
}

RoleAssignmentSchedulesClientListForScopeResponse contains the response from method RoleAssignmentSchedulesClient.ListForScope.

type RoleAssignmentsClient

type RoleAssignmentsClient struct {
	// contains filtered or unexported fields
}

RoleAssignmentsClient contains the methods for the RoleAssignments group. Don't use this type directly, use NewRoleAssignmentsClient() instead.

func NewRoleAssignmentsClient

func NewRoleAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentsClient, error)

NewRoleAssignmentsClient creates a new instance of RoleAssignmentsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleAssignmentsClient) Create

Create - Create or update a role assignment by scope and name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' roleAssignmentName - The name of the role assignment. It can be any valid GUID. parameters - Parameters for the role assignment. options - RoleAssignmentsClientCreateOptions contains the optional parameters for the RoleAssignmentsClient.Create method.

Example (RoleAssignments_CreateForResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_CreateForResource.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Create(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account", "05c5a614-a7d6-4502-b150-c2fb455033ff", armauthorization.RoleAssignmentCreateParameters{
	Properties: &armauthorization.RoleAssignmentProperties{
		PrincipalID:      to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
		PrincipalType:    to.Ptr(armauthorization.PrincipalTypeUser),
		RoleDefinitionID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

Example (RoleAssignments_CreateForResourceGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_CreateForResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Create(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg", "05c5a614-a7d6-4502-b150-c2fb455033ff", armauthorization.RoleAssignmentCreateParameters{
	Properties: &armauthorization.RoleAssignmentProperties{
		PrincipalID:      to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
		PrincipalType:    to.Ptr(armauthorization.PrincipalTypeUser),
		RoleDefinitionID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

Example (RoleAssignments_CreateForSubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_CreateForSubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Create(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", "05c5a614-a7d6-4502-b150-c2fb455033ff", armauthorization.RoleAssignmentCreateParameters{
	Properties: &armauthorization.RoleAssignmentProperties{
		PrincipalID:      to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
		PrincipalType:    to.Ptr(armauthorization.PrincipalTypeUser),
		RoleDefinitionID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentsClient) CreateByID

CreateByID - Create or update a role assignment by ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 roleAssignmentID - The fully qualified ID of the role assignment including scope, resource name, and resource type. Format: /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ parameters - Parameters for the role assignment. options - RoleAssignmentsClientCreateByIDOptions contains the optional parameters for the RoleAssignmentsClient.CreateByID method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_CreateById.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.CreateByID(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", armauthorization.RoleAssignmentCreateParameters{
	Properties: &armauthorization.RoleAssignmentProperties{
		PrincipalID:      to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
		PrincipalType:    to.Ptr(armauthorization.PrincipalTypeUser),
		RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentsClient) Delete

Delete - Delete a role assignment by scope and name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' roleAssignmentName - The name of the role assignment. It can be any valid GUID. options - RoleAssignmentsClientDeleteOptions contains the optional parameters for the RoleAssignmentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Delete(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", "b0f43c54-e787-4862-89b1-a653fa9cf747", &armauthorization.RoleAssignmentsClientDeleteOptions{TenantID: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentsClient) DeleteByID

DeleteByID - Delete a role assignment by ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 roleAssignmentID - The fully qualified ID of the role assignment including scope, resource name, and resource type. Format: /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ options - RoleAssignmentsClientDeleteByIDOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByID method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_DeleteById.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.DeleteByID(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", &armauthorization.RoleAssignmentsClientDeleteByIDOptions{TenantID: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentsClient) Get

Get - Get a role assignment by scope and name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' roleAssignmentName - The name of the role assignment. It can be any valid GUID. options - RoleAssignmentsClientGetOptions contains the optional parameters for the RoleAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", "b0f43c54-e787-4862-89b1-a653fa9cf747", &armauthorization.RoleAssignmentsClientGetOptions{TenantID: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentsClient) GetByID

GetByID - Get a role assignment by ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 roleAssignmentID - The fully qualified ID of the role assignment including scope, resource name, and resource type. Format: /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions//resourcegroups//providers/Microsoft.Authorization/roleAssignments/ options - RoleAssignmentsClientGetByIDOptions contains the optional parameters for the RoleAssignmentsClient.GetByID method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_GetById.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.GetByID(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", &armauthorization.RoleAssignmentsClientGetByIDOptions{TenantID: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleAssignmentsClient) NewListForResourceGroupPager

NewListForResourceGroupPager - List all role assignments that apply to a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group. The name is case insensitive. options - RoleAssignmentsClientListForResourceGroupOptions contains the optional parameters for the RoleAssignmentsClient.ListForResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_ListForResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourceGroupPager("testrg", &armauthorization.RoleAssignmentsClientListForResourceGroupOptions{Filter: nil,
	TenantID: nil,
})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*RoleAssignmentsClient) NewListForResourcePager

func (client *RoleAssignmentsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, resourceType string, resourceName string, options *RoleAssignmentsClientListForResourceOptions) *runtime.Pager[RoleAssignmentsClientListForResourceResponse]

NewListForResourcePager - List all role assignments that apply to a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceProviderNamespace - The namespace of the resource provider. resourceType - The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). resourceName - The resource name. options - RoleAssignmentsClientListForResourceOptions contains the optional parameters for the RoleAssignmentsClient.ListForResource method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_ListForResource.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourcePager("testrg", "Microsoft.DocumentDb", "databaseAccounts", "test-db-account", &armauthorization.RoleAssignmentsClientListForResourceOptions{Filter: nil,
	TenantID: nil,
})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*RoleAssignmentsClient) NewListForScopePager

NewListForScopePager - List all role assignments that apply to a scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' options - RoleAssignmentsClientListForScopeOptions contains the optional parameters for the RoleAssignmentsClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_ListForScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", &armauthorization.RoleAssignmentsClientListForScopeOptions{Filter: nil,
	TenantID:  nil,
	SkipToken: nil,
})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*RoleAssignmentsClient) NewListForSubscriptionPager

NewListForSubscriptionPager - List all role assignments that apply to a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 options - RoleAssignmentsClientListForSubscriptionOptions contains the optional parameters for the RoleAssignmentsClient.ListForSubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/RoleAssignments_ListForSubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForSubscriptionPager(&armauthorization.RoleAssignmentsClientListForSubscriptionOptions{Filter: nil,
	TenantID: nil,
})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type RoleAssignmentsClientCreateByIDOptions

type RoleAssignmentsClientCreateByIDOptions struct {
}

RoleAssignmentsClientCreateByIDOptions contains the optional parameters for the RoleAssignmentsClient.CreateByID method.

type RoleAssignmentsClientCreateByIDResponse

type RoleAssignmentsClientCreateByIDResponse struct {
	RoleAssignment
}

RoleAssignmentsClientCreateByIDResponse contains the response from method RoleAssignmentsClient.CreateByID.

type RoleAssignmentsClientCreateOptions

type RoleAssignmentsClientCreateOptions struct {
	Location *string
}

RoleAssignmentsClientCreateOptions contains the optional parameters for the RoleAssignmentsClient.Create method.

type RoleAssignmentsClientCreateResponse

type RoleAssignmentsClientCreateResponse struct {
	RoleAssignment
}

RoleAssignmentsClientCreateResponse contains the response from method RoleAssignmentsClient.Create.

type RoleAssignmentsClientDeleteByIDOptions

type RoleAssignmentsClientDeleteByIDOptions struct {
	// Tenant ID for cross-tenant request
	TenantID *string
}

RoleAssignmentsClientDeleteByIDOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByID method.

type RoleAssignmentsClientDeleteByIDResponse

type RoleAssignmentsClientDeleteByIDResponse struct {
	RoleAssignment
}

RoleAssignmentsClientDeleteByIDResponse contains the response from method RoleAssignmentsClient.DeleteByID.

type RoleAssignmentsClientDeleteOptions

type RoleAssignmentsClientDeleteOptions struct {
	// Tenant ID for cross-tenant request
	TenantID *string
}

RoleAssignmentsClientDeleteOptions contains the optional parameters for the RoleAssignmentsClient.Delete method.

type RoleAssignmentsClientDeleteResponse

type RoleAssignmentsClientDeleteResponse struct {
	RoleAssignment
}

RoleAssignmentsClientDeleteResponse contains the response from method RoleAssignmentsClient.Delete.

type RoleAssignmentsClientGetByIDOptions

type RoleAssignmentsClientGetByIDOptions struct {
	// Tenant ID for cross-tenant request
	TenantID *string
}

RoleAssignmentsClientGetByIDOptions contains the optional parameters for the RoleAssignmentsClient.GetByID method.

type RoleAssignmentsClientGetByIDResponse

type RoleAssignmentsClientGetByIDResponse struct {
	RoleAssignment
}

RoleAssignmentsClientGetByIDResponse contains the response from method RoleAssignmentsClient.GetByID.

type RoleAssignmentsClientGetOptions

type RoleAssignmentsClientGetOptions struct {
	// Tenant ID for cross-tenant request
	TenantID *string
}

RoleAssignmentsClientGetOptions contains the optional parameters for the RoleAssignmentsClient.Get method.

type RoleAssignmentsClientGetResponse

type RoleAssignmentsClientGetResponse struct {
	RoleAssignment
}

RoleAssignmentsClientGetResponse contains the response from method RoleAssignmentsClient.Get.

type RoleAssignmentsClientListForResourceGroupOptions

type RoleAssignmentsClientListForResourceGroupOptions 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
	// Tenant ID for cross-tenant request
	TenantID *string
}

RoleAssignmentsClientListForResourceGroupOptions contains the optional parameters for the RoleAssignmentsClient.ListForResourceGroup method.

type RoleAssignmentsClientListForResourceGroupResponse

type RoleAssignmentsClientListForResourceGroupResponse struct {
	RoleAssignmentListResult
}

RoleAssignmentsClientListForResourceGroupResponse contains the response from method RoleAssignmentsClient.ListForResourceGroup.

type RoleAssignmentsClientListForResourceOptions

type RoleAssignmentsClientListForResourceOptions 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
	// Tenant ID for cross-tenant request
	TenantID *string
}

RoleAssignmentsClientListForResourceOptions contains the optional parameters for the RoleAssignmentsClient.ListForResource method.

type RoleAssignmentsClientListForResourceResponse

type RoleAssignmentsClientListForResourceResponse struct {
	RoleAssignmentListResult
}

RoleAssignmentsClientListForResourceResponse contains the response from method RoleAssignmentsClient.ListForResource.

type RoleAssignmentsClientListForScopeOptions

type RoleAssignmentsClientListForScopeOptions 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
	// The skipToken to apply on the operation. Use $skipToken={skiptoken} to return paged role assignments following the skipToken
	// passed. Only supported on provider level calls.
	SkipToken *string
	// Tenant ID for cross-tenant request
	TenantID *string
}

RoleAssignmentsClientListForScopeOptions contains the optional parameters for the RoleAssignmentsClient.ListForScope method.

type RoleAssignmentsClientListForScopeResponse

type RoleAssignmentsClientListForScopeResponse struct {
	RoleAssignmentListResult
}

RoleAssignmentsClientListForScopeResponse contains the response from method RoleAssignmentsClient.ListForScope.

type RoleAssignmentsClientListForSubscriptionOptions

type RoleAssignmentsClientListForSubscriptionOptions 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
	// Tenant ID for cross-tenant request
	TenantID *string
}

RoleAssignmentsClientListForSubscriptionOptions contains the optional parameters for the RoleAssignmentsClient.ListForSubscription method.

type RoleAssignmentsClientListForSubscriptionResponse

type RoleAssignmentsClientListForSubscriptionResponse struct {
	RoleAssignmentListResult
}

RoleAssignmentsClientListForSubscriptionResponse contains the response from method RoleAssignmentsClient.ListForSubscription.

type RoleDefinition

type RoleDefinition struct {
	// Role definition properties.
	Properties *RoleDefinitionProperties `json:"properties,omitempty"`

	// READ-ONLY; The role definition ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role definition name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role definition type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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 RoleDefinitionFilter

type RoleDefinitionFilter struct {
	// Returns role definition with the specific name.
	RoleName *string `json:"roleName,omitempty"`

	// Returns role definition with the specific type.
	Type *string `json:"type,omitempty"`
}

RoleDefinitionFilter - Role Definitions filter

func (RoleDefinitionFilter) MarshalJSON

func (r RoleDefinitionFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleDefinitionFilter.

func (*RoleDefinitionFilter) UnmarshalJSON

func (r *RoleDefinitionFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleDefinitionFilter.

type RoleDefinitionListResult

type RoleDefinitionListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Role definition list.
	Value []*RoleDefinition `json:"value,omitempty"`
}

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 []*string `json:"assignableScopes,omitempty"`

	// The role definition description.
	Description *string `json:"description,omitempty"`

	// Role definition permissions.
	Permissions []*Permission `json:"permissions,omitempty"`

	// The role name.
	RoleName *string `json:"roleName,omitempty"`

	// The role type.
	RoleType *string `json:"type,omitempty"`
}

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 RoleDefinitionsClient

type RoleDefinitionsClient struct {
	// contains filtered or unexported fields
}

RoleDefinitionsClient contains the methods for the RoleDefinitions group. Don't use this type directly, use NewRoleDefinitionsClient() instead.

func NewRoleDefinitionsClient

func NewRoleDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleDefinitionsClient, error)

NewRoleDefinitionsClient creates a new instance of RoleDefinitionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleDefinitionsClient) CreateOrUpdate

CreateOrUpdate - Creates or updates a role definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the role definition. roleDefinitionID - The ID of the role definition. roleDefinition - The values for the role definition. options - RoleDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the RoleDefinitionsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/PutRoleDefinition.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.CreateOrUpdate(ctx, "scope", "roleDefinitionId", armauthorization.RoleDefinition{}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*RoleDefinitionsClient) Delete

Delete - Deletes a role definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the role definition. roleDefinitionID - The ID of the role definition to delete. options - RoleDefinitionsClientDeleteOptions contains the optional parameters for the RoleDefinitionsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/DeleteRoleDefinition.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Delete(ctx, "scope", "roleDefinitionId", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleDefinitionsClient) Get

Get - Get role definition by name (GUID). If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the role definition. roleDefinitionID - The ID of the role definition. options - RoleDefinitionsClientGetOptions contains the optional parameters for the RoleDefinitionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetRoleDefinitionByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "scope", "roleDefinitionId", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleDefinitionsClient) GetByID

GetByID - Gets a role definition by ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 roleID - The fully qualified role definition ID. Use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role definitions. options - RoleDefinitionsClientGetByIDOptions contains the optional parameters for the RoleDefinitionsClient.GetByID method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetRoleDefinitionById.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.GetByID(ctx, "roleDefinitionId", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleDefinitionsClient) NewListPager

NewListPager - Get all role definitions that are applicable at scope and above. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01 scope - The scope of the role definition. options - RoleDefinitionsClientListOptions contains the optional parameters for the RoleDefinitionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetRoleDefinitionAtScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("scope", &armauthorization.RoleDefinitionsClientListOptions{Filter: nil})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type RoleDefinitionsClientCreateOrUpdateOptions

type RoleDefinitionsClientCreateOrUpdateOptions struct {
}

RoleDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the RoleDefinitionsClient.CreateOrUpdate method.

type RoleDefinitionsClientCreateOrUpdateResponse

type RoleDefinitionsClientCreateOrUpdateResponse struct {
	RoleDefinition
}

RoleDefinitionsClientCreateOrUpdateResponse contains the response from method RoleDefinitionsClient.CreateOrUpdate.

type RoleDefinitionsClientDeleteOptions

type RoleDefinitionsClientDeleteOptions struct {
}

RoleDefinitionsClientDeleteOptions contains the optional parameters for the RoleDefinitionsClient.Delete method.

type RoleDefinitionsClientDeleteResponse

type RoleDefinitionsClientDeleteResponse struct {
	RoleDefinition
}

RoleDefinitionsClientDeleteResponse contains the response from method RoleDefinitionsClient.Delete.

type RoleDefinitionsClientGetByIDOptions

type RoleDefinitionsClientGetByIDOptions struct {
}

RoleDefinitionsClientGetByIDOptions contains the optional parameters for the RoleDefinitionsClient.GetByID method.

type RoleDefinitionsClientGetByIDResponse

type RoleDefinitionsClientGetByIDResponse struct {
	RoleDefinition
}

RoleDefinitionsClientGetByIDResponse contains the response from method RoleDefinitionsClient.GetByID.

type RoleDefinitionsClientGetOptions

type RoleDefinitionsClientGetOptions struct {
}

RoleDefinitionsClientGetOptions contains the optional parameters for the RoleDefinitionsClient.Get method.

type RoleDefinitionsClientGetResponse

type RoleDefinitionsClientGetResponse struct {
	RoleDefinition
}

RoleDefinitionsClientGetResponse contains the response from method RoleDefinitionsClient.Get.

type RoleDefinitionsClientListOptions

type RoleDefinitionsClientListOptions struct {
	// The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well.
	Filter *string
}

RoleDefinitionsClientListOptions contains the optional parameters for the RoleDefinitionsClient.List method.

type RoleDefinitionsClientListResponse

type RoleDefinitionsClientListResponse struct {
	RoleDefinitionListResult
}

RoleDefinitionsClientListResponse contains the response from method RoleDefinitionsClient.List.

type RoleEligibilitySchedule

type RoleEligibilitySchedule struct {
	// role eligibility schedule properties.
	Properties *RoleEligibilityScheduleProperties `json:"properties,omitempty"`

	// READ-ONLY; The role eligibility schedule Id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role eligibility schedule name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role eligibility schedule type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

RoleEligibilitySchedule - Role eligibility schedule

func (RoleEligibilitySchedule) MarshalJSON

func (r RoleEligibilitySchedule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleEligibilitySchedule.

func (*RoleEligibilitySchedule) UnmarshalJSON

func (r *RoleEligibilitySchedule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilitySchedule.

type RoleEligibilityScheduleFilter

type RoleEligibilityScheduleFilter struct {
	// Returns role eligibility schedule of the specific principal.
	PrincipalID *string `json:"principalId,omitempty"`

	// Returns role eligibility schedule of the specific role definition.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// Returns role eligibility schedule of the specific status.
	Status *string `json:"status,omitempty"`
}

RoleEligibilityScheduleFilter - Role eligibility schedule filter

func (RoleEligibilityScheduleFilter) MarshalJSON

func (r RoleEligibilityScheduleFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleFilter.

func (*RoleEligibilityScheduleFilter) UnmarshalJSON

func (r *RoleEligibilityScheduleFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleFilter.

type RoleEligibilityScheduleInstance

type RoleEligibilityScheduleInstance struct {
	// Role eligibility schedule instance properties.
	Properties *RoleEligibilityScheduleInstanceProperties `json:"properties,omitempty"`

	// READ-ONLY; The role eligibility schedule instance ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role eligibility schedule instance name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role eligibility schedule instance type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

RoleEligibilityScheduleInstance - Information about current or upcoming role eligibility schedule instance

func (RoleEligibilityScheduleInstance) MarshalJSON

func (r RoleEligibilityScheduleInstance) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleInstance.

func (*RoleEligibilityScheduleInstance) UnmarshalJSON

func (r *RoleEligibilityScheduleInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleInstance.

type RoleEligibilityScheduleInstanceFilter

type RoleEligibilityScheduleInstanceFilter struct {
	// Returns role eligibility schedule instances of the specific principal.
	PrincipalID *string `json:"principalId,omitempty"`

	// Returns role eligibility schedule instances of the specific role definition.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// Returns role eligibility schedule instances belonging to a specific role eligibility schedule.
	RoleEligibilityScheduleID *string `json:"roleEligibilityScheduleId,omitempty"`

	// Returns role eligibility schedule instances of the specific status.
	Status *string `json:"status,omitempty"`
}

RoleEligibilityScheduleInstanceFilter - Role eligibility schedule instance filter

func (RoleEligibilityScheduleInstanceFilter) MarshalJSON

func (r RoleEligibilityScheduleInstanceFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleInstanceFilter.

func (*RoleEligibilityScheduleInstanceFilter) UnmarshalJSON

func (r *RoleEligibilityScheduleInstanceFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleInstanceFilter.

type RoleEligibilityScheduleInstanceListResult

type RoleEligibilityScheduleInstanceListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Role eligibility schedule instance list.
	Value []*RoleEligibilityScheduleInstance `json:"value,omitempty"`
}

RoleEligibilityScheduleInstanceListResult - Role eligibility schedule instance list operation result.

func (RoleEligibilityScheduleInstanceListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleInstanceListResult.

func (*RoleEligibilityScheduleInstanceListResult) UnmarshalJSON

func (r *RoleEligibilityScheduleInstanceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleInstanceListResult.

type RoleEligibilityScheduleInstanceProperties

type RoleEligibilityScheduleInstanceProperties struct {
	// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
	// StringEqualsIgnoreCase
	// 'foostoragecontainer'
	Condition *string `json:"condition,omitempty"`

	// Version of the condition. Currently accepted value is '2.0'
	ConditionVersion *string `json:"conditionVersion,omitempty"`

	// DateTime when role eligibility schedule was created
	CreatedOn *time.Time `json:"createdOn,omitempty"`

	// The endDateTime of the role eligibility schedule instance
	EndDateTime *time.Time `json:"endDateTime,omitempty"`

	// Additional properties of principal, scope and role definition
	ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty"`

	// Membership type of the role eligibility schedule
	MemberType *MemberType `json:"memberType,omitempty"`

	// The principal ID.
	PrincipalID *string `json:"principalId,omitempty"`

	// The principal type of the assigned principal ID.
	PrincipalType *PrincipalType `json:"principalType,omitempty"`

	// The role definition ID.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// Id of the master role eligibility schedule
	RoleEligibilityScheduleID *string `json:"roleEligibilityScheduleId,omitempty"`

	// The role eligibility schedule scope.
	Scope *string `json:"scope,omitempty"`

	// The startDateTime of the role eligibility schedule instance
	StartDateTime *time.Time `json:"startDateTime,omitempty"`

	// The status of the role eligibility schedule instance
	Status *Status `json:"status,omitempty"`
}

RoleEligibilityScheduleInstanceProperties - Role eligibility schedule properties with scope.

func (RoleEligibilityScheduleInstanceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleInstanceProperties.

func (*RoleEligibilityScheduleInstanceProperties) UnmarshalJSON

func (r *RoleEligibilityScheduleInstanceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleInstanceProperties.

type RoleEligibilityScheduleInstancesClient

type RoleEligibilityScheduleInstancesClient struct {
	// contains filtered or unexported fields
}

RoleEligibilityScheduleInstancesClient contains the methods for the RoleEligibilityScheduleInstances group. Don't use this type directly, use NewRoleEligibilityScheduleInstancesClient() instead.

func NewRoleEligibilityScheduleInstancesClient

func NewRoleEligibilityScheduleInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleEligibilityScheduleInstancesClient, error)

NewRoleEligibilityScheduleInstancesClient creates a new instance of RoleEligibilityScheduleInstancesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleEligibilityScheduleInstancesClient) Get

Get - Gets the specified role eligibility schedule instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedules. roleEligibilityScheduleInstanceName - The name (hash of schedule name + time) of the role eligibility schedule to get. options - RoleEligibilityScheduleInstancesClientGetOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleInstanceByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleInstancesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "21e4b59a-0499-4fe0-a3c3-43a3055b773a", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleEligibilityScheduleInstancesClient) NewListForScopePager

NewListForScopePager - Gets role eligibility schedule instances of a role eligibility schedule. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule. options - RoleEligibilityScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleInstancesByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleInstancesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleEligibilityScheduleInstancesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type RoleEligibilityScheduleInstancesClientGetOptions

type RoleEligibilityScheduleInstancesClientGetOptions struct {
}

RoleEligibilityScheduleInstancesClientGetOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.Get method.

type RoleEligibilityScheduleInstancesClientGetResponse

type RoleEligibilityScheduleInstancesClientGetResponse struct {
	RoleEligibilityScheduleInstance
}

RoleEligibilityScheduleInstancesClientGetResponse contains the response from method RoleEligibilityScheduleInstancesClient.Get.

type RoleEligibilityScheduleInstancesClientListForScopeOptions

type RoleEligibilityScheduleInstancesClientListForScopeOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope.
	// Use $filter=principalId eq {id} to return all role assignment schedules at,
	// above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility
	// schedules for the user. Use $filter=asTarget() to return all role eligibility
	// schedules created for the current user.
	Filter *string
}

RoleEligibilityScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.ListForScope method.

type RoleEligibilityScheduleInstancesClientListForScopeResponse

type RoleEligibilityScheduleInstancesClientListForScopeResponse struct {
	RoleEligibilityScheduleInstanceListResult
}

RoleEligibilityScheduleInstancesClientListForScopeResponse contains the response from method RoleEligibilityScheduleInstancesClient.ListForScope.

type RoleEligibilityScheduleListResult

type RoleEligibilityScheduleListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// role eligibility schedule list.
	Value []*RoleEligibilitySchedule `json:"value,omitempty"`
}

RoleEligibilityScheduleListResult - role eligibility schedule list operation result.

func (RoleEligibilityScheduleListResult) MarshalJSON

func (r RoleEligibilityScheduleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleListResult.

func (*RoleEligibilityScheduleListResult) UnmarshalJSON

func (r *RoleEligibilityScheduleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleListResult.

type RoleEligibilityScheduleProperties

type RoleEligibilityScheduleProperties struct {
	// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
	// StringEqualsIgnoreCase
	// 'foostoragecontainer'
	Condition *string `json:"condition,omitempty"`

	// Version of the condition. Currently accepted value is '2.0'
	ConditionVersion *string `json:"conditionVersion,omitempty"`

	// DateTime when role eligibility schedule was created
	CreatedOn *time.Time `json:"createdOn,omitempty"`

	// End DateTime when role eligibility schedule
	EndDateTime *time.Time `json:"endDateTime,omitempty"`

	// Additional properties of principal, scope and role definition
	ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty"`

	// Membership type of the role eligibility schedule
	MemberType *MemberType `json:"memberType,omitempty"`

	// The principal ID.
	PrincipalID *string `json:"principalId,omitempty"`

	// The principal type of the assigned principal ID.
	PrincipalType *PrincipalType `json:"principalType,omitempty"`

	// The role definition ID.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// The id of roleEligibilityScheduleRequest used to create this roleAssignmentSchedule
	RoleEligibilityScheduleRequestID *string `json:"roleEligibilityScheduleRequestId,omitempty"`

	// The role eligibility schedule scope.
	Scope *string `json:"scope,omitempty"`

	// Start DateTime when role eligibility schedule
	StartDateTime *time.Time `json:"startDateTime,omitempty"`

	// The status of the role eligibility schedule.
	Status *Status `json:"status,omitempty"`

	// DateTime when role eligibility schedule was modified
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

RoleEligibilityScheduleProperties - Role eligibility schedule properties with scope.

func (RoleEligibilityScheduleProperties) MarshalJSON

func (r RoleEligibilityScheduleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleProperties.

func (*RoleEligibilityScheduleProperties) UnmarshalJSON

func (r *RoleEligibilityScheduleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleProperties.

type RoleEligibilityScheduleRequest

type RoleEligibilityScheduleRequest struct {
	// Role eligibility schedule request properties.
	Properties *RoleEligibilityScheduleRequestProperties `json:"properties,omitempty"`

	// READ-ONLY; The role eligibility schedule request ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role eligibility schedule request name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role eligibility schedule request type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

RoleEligibilityScheduleRequest - Role Eligibility schedule request

func (RoleEligibilityScheduleRequest) MarshalJSON

func (r RoleEligibilityScheduleRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequest.

func (*RoleEligibilityScheduleRequest) UnmarshalJSON

func (r *RoleEligibilityScheduleRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequest.

type RoleEligibilityScheduleRequestFilter

type RoleEligibilityScheduleRequestFilter struct {
	// Returns role eligibility requests of the specific principal.
	PrincipalID *string `json:"principalId,omitempty"`

	// Returns role eligibility requests created by specific principal.
	RequestorID *string `json:"requestorId,omitempty"`

	// Returns role eligibility requests of the specific role definition.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// Returns role eligibility requests of specific status.
	Status *string `json:"status,omitempty"`
}

RoleEligibilityScheduleRequestFilter - Role eligibility schedule request filter

func (RoleEligibilityScheduleRequestFilter) MarshalJSON

func (r RoleEligibilityScheduleRequestFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestFilter.

func (*RoleEligibilityScheduleRequestFilter) UnmarshalJSON

func (r *RoleEligibilityScheduleRequestFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequestFilter.

type RoleEligibilityScheduleRequestListResult

type RoleEligibilityScheduleRequestListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Role eligibility schedule request list.
	Value []*RoleEligibilityScheduleRequest `json:"value,omitempty"`
}

RoleEligibilityScheduleRequestListResult - Role eligibility schedule request list operation result.

func (RoleEligibilityScheduleRequestListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestListResult.

func (*RoleEligibilityScheduleRequestListResult) UnmarshalJSON

func (r *RoleEligibilityScheduleRequestListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequestListResult.

type RoleEligibilityScheduleRequestProperties

type RoleEligibilityScheduleRequestProperties struct {
	// REQUIRED; The principal ID.
	PrincipalID *string `json:"principalId,omitempty"`

	// REQUIRED; The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc
	RequestType *RequestType `json:"requestType,omitempty"`

	// REQUIRED; The role definition ID.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
	// StringEqualsIgnoreCase
	// 'foostoragecontainer'
	Condition *string `json:"condition,omitempty"`

	// Version of the condition. Currently accepted value is '2.0'
	ConditionVersion *string `json:"conditionVersion,omitempty"`

	// Justification for the role eligibility
	Justification *string `json:"justification,omitempty"`

	// Schedule info of the role eligibility schedule
	ScheduleInfo *RoleEligibilityScheduleRequestPropertiesScheduleInfo `json:"scheduleInfo,omitempty"`

	// The resultant role eligibility schedule id or the role eligibility schedule id being updated
	TargetRoleEligibilityScheduleID *string `json:"targetRoleEligibilityScheduleId,omitempty"`

	// The role eligibility schedule instance id being updated
	TargetRoleEligibilityScheduleInstanceID *string `json:"targetRoleEligibilityScheduleInstanceId,omitempty"`

	// Ticket Info of the role eligibility
	TicketInfo *RoleEligibilityScheduleRequestPropertiesTicketInfo `json:"ticketInfo,omitempty"`

	// READ-ONLY; The approvalId of the role eligibility schedule request.
	ApprovalID *string `json:"approvalId,omitempty" azure:"ro"`

	// READ-ONLY; DateTime when role eligibility schedule request was created
	CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"`

	// READ-ONLY; Additional properties of principal, scope and role definition
	ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty" azure:"ro"`

	// READ-ONLY; The principal type of the assigned principal ID.
	PrincipalType *PrincipalType `json:"principalType,omitempty" azure:"ro"`

	// READ-ONLY; Id of the user who created this request
	RequestorID *string `json:"requestorId,omitempty" azure:"ro"`

	// READ-ONLY; The role eligibility schedule request scope.
	Scope *string `json:"scope,omitempty" azure:"ro"`

	// READ-ONLY; The status of the role eligibility schedule request.
	Status *Status `json:"status,omitempty" azure:"ro"`
}

RoleEligibilityScheduleRequestProperties - Role eligibility schedule request properties with scope.

func (RoleEligibilityScheduleRequestProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestProperties.

func (*RoleEligibilityScheduleRequestProperties) UnmarshalJSON

func (r *RoleEligibilityScheduleRequestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequestProperties.

type RoleEligibilityScheduleRequestPropertiesScheduleInfo

type RoleEligibilityScheduleRequestPropertiesScheduleInfo struct {
	// Expiration of the role eligibility schedule
	Expiration *RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration `json:"expiration,omitempty"`

	// Start DateTime of the role eligibility schedule.
	StartDateTime *time.Time `json:"startDateTime,omitempty"`
}

RoleEligibilityScheduleRequestPropertiesScheduleInfo - Schedule info of the role eligibility schedule

func (RoleEligibilityScheduleRequestPropertiesScheduleInfo) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestPropertiesScheduleInfo.

func (*RoleEligibilityScheduleRequestPropertiesScheduleInfo) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequestPropertiesScheduleInfo.

type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration

type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration struct {
	// Duration of the role eligibility schedule in TimeSpan.
	Duration *string `json:"duration,omitempty"`

	// End DateTime of the role eligibility schedule.
	EndDateTime *time.Time `json:"endDateTime,omitempty"`

	// Type of the role eligibility schedule expiration
	Type *Type `json:"type,omitempty"`
}

RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration - Expiration of the role eligibility schedule

func (RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration.

func (*RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration.

type RoleEligibilityScheduleRequestPropertiesTicketInfo

type RoleEligibilityScheduleRequestPropertiesTicketInfo struct {
	// Ticket number for the role eligibility
	TicketNumber *string `json:"ticketNumber,omitempty"`

	// Ticket system name for the role eligibility
	TicketSystem *string `json:"ticketSystem,omitempty"`
}

RoleEligibilityScheduleRequestPropertiesTicketInfo - Ticket Info of the role eligibility

func (RoleEligibilityScheduleRequestPropertiesTicketInfo) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestPropertiesTicketInfo.

func (*RoleEligibilityScheduleRequestPropertiesTicketInfo) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequestPropertiesTicketInfo.

type RoleEligibilityScheduleRequestsClient

type RoleEligibilityScheduleRequestsClient struct {
	// contains filtered or unexported fields
}

RoleEligibilityScheduleRequestsClient contains the methods for the RoleEligibilityScheduleRequests group. Don't use this type directly, use NewRoleEligibilityScheduleRequestsClient() instead.

func NewRoleEligibilityScheduleRequestsClient

func NewRoleEligibilityScheduleRequestsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleEligibilityScheduleRequestsClient, error)

NewRoleEligibilityScheduleRequestsClient creates a new instance of RoleEligibilityScheduleRequestsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleEligibilityScheduleRequestsClient) Cancel

Cancel - Cancels a pending role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility request to cancel. roleEligibilityScheduleRequestName - The name of the role eligibility request to cancel. options - RoleEligibilityScheduleRequestsClientCancelOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Cancel method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/CancelRoleEligibilityScheduleRequestByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.Cancel(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "64caffb6-55c0-4deb-a585-68e948ea1ad6", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*RoleEligibilityScheduleRequestsClient) Create

Create - Creates a role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule request to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource. roleEligibilityScheduleRequestName - The name of the role eligibility to create. It can be any valid GUID. parameters - Parameters for the role eligibility schedule request. options - RoleEligibilityScheduleRequestsClientCreateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PutRoleEligibilityScheduleRequest.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.Create(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "64caffb6-55c0-4deb-a585-68e948ea1ad6", armauthorization.RoleEligibilityScheduleRequest{
	Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{
		Condition:        to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
		ConditionVersion: to.Ptr("1.0"),
		PrincipalID:      to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
		RequestType:      to.Ptr(armauthorization.RequestTypeAdminAssign),
		RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
		ScheduleInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesScheduleInfo{
			Expiration: &armauthorization.RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration{
				Type:     to.Ptr(armauthorization.TypeAfterDuration),
				Duration: to.Ptr("P365D"),
			},
			StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:31:27.91Z"); return t }()),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*RoleEligibilityScheduleRequestsClient) Get

Get - Get the specified role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule request. roleEligibilityScheduleRequestName - The name (guid) of the role eligibility schedule request to get. options - RoleEligibilityScheduleRequestsClientGetOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleRequestByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "64caffb6-55c0-4deb-a585-68e948ea1ad6", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleEligibilityScheduleRequestsClient) NewListForScopePager

NewListForScopePager - Gets role eligibility schedule requests for a scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule requests. options - RoleEligibilityScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleRequestByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleEligibilityScheduleRequestsClientListForScopeOptions{Filter: to.Ptr("assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')")})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*RoleEligibilityScheduleRequestsClient) Validate

Validate - Validates a new role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility request to validate. roleEligibilityScheduleRequestName - The name of the role eligibility request to validate. parameters - Parameters for the role eligibility schedule request. options - RoleEligibilityScheduleRequestsClientValidateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Validate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/ValidateRoleEligibilityScheduleRequestByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Validate(ctx, "subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "64caffb6-55c0-4deb-a585-68e948ea1ad6", armauthorization.RoleEligibilityScheduleRequest{
	Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{
		Condition:        to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
		ConditionVersion: to.Ptr("1.0"),
		PrincipalID:      to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
		RequestType:      to.Ptr(armauthorization.RequestTypeAdminAssign),
		RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
		ScheduleInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesScheduleInfo{
			Expiration: &armauthorization.RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration{
				Type:     to.Ptr(armauthorization.TypeAfterDuration),
				Duration: to.Ptr("P365D"),
			},
			StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:31:27.91Z"); return t }()),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

type RoleEligibilityScheduleRequestsClientCancelOptions

type RoleEligibilityScheduleRequestsClientCancelOptions struct {
}

RoleEligibilityScheduleRequestsClientCancelOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Cancel method.

type RoleEligibilityScheduleRequestsClientCancelResponse

type RoleEligibilityScheduleRequestsClientCancelResponse struct {
}

RoleEligibilityScheduleRequestsClientCancelResponse contains the response from method RoleEligibilityScheduleRequestsClient.Cancel.

type RoleEligibilityScheduleRequestsClientCreateOptions

type RoleEligibilityScheduleRequestsClientCreateOptions struct {
}

RoleEligibilityScheduleRequestsClientCreateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Create method.

type RoleEligibilityScheduleRequestsClientCreateResponse

type RoleEligibilityScheduleRequestsClientCreateResponse struct {
	RoleEligibilityScheduleRequest
}

RoleEligibilityScheduleRequestsClientCreateResponse contains the response from method RoleEligibilityScheduleRequestsClient.Create.

type RoleEligibilityScheduleRequestsClientGetOptions

type RoleEligibilityScheduleRequestsClientGetOptions struct {
}

RoleEligibilityScheduleRequestsClientGetOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Get method.

type RoleEligibilityScheduleRequestsClientGetResponse

type RoleEligibilityScheduleRequestsClientGetResponse struct {
	RoleEligibilityScheduleRequest
}

RoleEligibilityScheduleRequestsClientGetResponse contains the response from method RoleEligibilityScheduleRequestsClient.Get.

type RoleEligibilityScheduleRequestsClientListForScopeOptions

type RoleEligibilityScheduleRequestsClientListForScopeOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above
	// the scope. Use $filter=principalId eq {id} to return all role eligibility
	// schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role
	// eligibility schedule requests requested by the current user. Use
	// $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover()
	// to return all role eligibility schedule requests where the current user is an
	// approver.
	Filter *string
}

RoleEligibilityScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.ListForScope method.

type RoleEligibilityScheduleRequestsClientListForScopeResponse

type RoleEligibilityScheduleRequestsClientListForScopeResponse struct {
	RoleEligibilityScheduleRequestListResult
}

RoleEligibilityScheduleRequestsClientListForScopeResponse contains the response from method RoleEligibilityScheduleRequestsClient.ListForScope.

type RoleEligibilityScheduleRequestsClientValidateOptions

type RoleEligibilityScheduleRequestsClientValidateOptions struct {
}

RoleEligibilityScheduleRequestsClientValidateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Validate method.

type RoleEligibilityScheduleRequestsClientValidateResponse

type RoleEligibilityScheduleRequestsClientValidateResponse struct {
	RoleEligibilityScheduleRequest
}

RoleEligibilityScheduleRequestsClientValidateResponse contains the response from method RoleEligibilityScheduleRequestsClient.Validate.

type RoleEligibilitySchedulesClient

type RoleEligibilitySchedulesClient struct {
	// contains filtered or unexported fields
}

RoleEligibilitySchedulesClient contains the methods for the RoleEligibilitySchedules group. Don't use this type directly, use NewRoleEligibilitySchedulesClient() instead.

func NewRoleEligibilitySchedulesClient

func NewRoleEligibilitySchedulesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleEligibilitySchedulesClient, error)

NewRoleEligibilitySchedulesClient creates a new instance of RoleEligibilitySchedulesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleEligibilitySchedulesClient) Get

Get - Get the specified role eligibility schedule for a resource scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule. roleEligibilityScheduleName - The name (guid) of the role eligibility schedule to get. options - RoleEligibilitySchedulesClientGetOptions contains the optional parameters for the RoleEligibilitySchedulesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilitySchedulesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", "b1477448-2cc6-4ceb-93b4-54a202a89413", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleEligibilitySchedulesClient) NewListForScopePager

NewListForScopePager - Gets role eligibility schedules for a resource scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedules. options - RoleEligibilitySchedulesClientListForScopeOptions contains the optional parameters for the RoleEligibilitySchedulesClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilitySchedulesByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilitySchedulesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleEligibilitySchedulesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")})
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type RoleEligibilitySchedulesClientGetOptions

type RoleEligibilitySchedulesClientGetOptions struct {
}

RoleEligibilitySchedulesClientGetOptions contains the optional parameters for the RoleEligibilitySchedulesClient.Get method.

type RoleEligibilitySchedulesClientGetResponse

type RoleEligibilitySchedulesClientGetResponse struct {
	RoleEligibilitySchedule
}

RoleEligibilitySchedulesClientGetResponse contains the response from method RoleEligibilitySchedulesClient.Get.

type RoleEligibilitySchedulesClientListForScopeOptions

type RoleEligibilitySchedulesClientListForScopeOptions struct {
	// The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope.
	// Use $filter=principalId eq {id} to return all role eligibility schedules at,
	// above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility
	// schedules for the user. Use $filter=asTarget() to return all role eligibility
	// schedules created for the current user.
	Filter *string
}

RoleEligibilitySchedulesClientListForScopeOptions contains the optional parameters for the RoleEligibilitySchedulesClient.ListForScope method.

type RoleEligibilitySchedulesClientListForScopeResponse

type RoleEligibilitySchedulesClientListForScopeResponse struct {
	RoleEligibilityScheduleListResult
}

RoleEligibilitySchedulesClientListForScopeResponse contains the response from method RoleEligibilitySchedulesClient.ListForScope.

type RoleManagementPoliciesClient

type RoleManagementPoliciesClient struct {
	// contains filtered or unexported fields
}

RoleManagementPoliciesClient contains the methods for the RoleManagementPolicies group. Don't use this type directly, use NewRoleManagementPoliciesClient() instead.

func NewRoleManagementPoliciesClient

func NewRoleManagementPoliciesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleManagementPoliciesClient, error)

NewRoleManagementPoliciesClient creates a new instance of RoleManagementPoliciesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleManagementPoliciesClient) Delete

Delete - Delete a role management policy If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy to upsert. roleManagementPolicyName - The name (guid) of the role management policy to upsert. options - RoleManagementPoliciesClientDeleteOptions contains the optional parameters for the RoleManagementPoliciesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/DeleteRoleManagementPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "570c3619-7688-4b34-b290-2b8bb3ccab2a", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*RoleManagementPoliciesClient) Get

Get - Get the specified role management policy for a resource scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. roleManagementPolicyName - The name (guid) of the role management policy to get. options - RoleManagementPoliciesClientGetOptions contains the optional parameters for the RoleManagementPoliciesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleManagementPolicyByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "570c3619-7688-4b34-b290-2b8bb3ccab2a", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleManagementPoliciesClient) NewListForScopePager

NewListForScopePager - Gets role management policies for a resource scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. options - RoleManagementPoliciesClientListForScopeOptions contains the optional parameters for the RoleManagementPoliciesClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleManagementPolicyByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*RoleManagementPoliciesClient) Update

Update - Update a role management policy If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy to upsert. roleManagementPolicyName - The name (guid) of the role management policy to upsert. parameters - Parameters for the role management policy. options - RoleManagementPoliciesClientUpdateOptions contains the optional parameters for the RoleManagementPoliciesClient.Update method.

Example (PatchPartialRoleManagementPolicy)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PatchPartialRoleManagementPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Update(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "570c3619-7688-4b34-b290-2b8bb3ccab2a", armauthorization.RoleManagementPolicy{
	Properties: &armauthorization.RoleManagementPolicyProperties{
		Rules: []armauthorization.RoleManagementPolicyRuleClassification{
			&armauthorization.RoleManagementPolicyExpirationRule{
				ID:       to.Ptr("Expiration_Admin_Eligibility"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Eligibility"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsExpirationRequired: to.Ptr(false),
				MaximumDuration:      to.Ptr("P180D"),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Admin_Admin_Eligibility"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Eligibility"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("admin_admin_eligible@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeAdmin),
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

Example (PatchRoleManagementPolicy)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PatchRoleManagementPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Update(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "570c3619-7688-4b34-b290-2b8bb3ccab2a", armauthorization.RoleManagementPolicy{
	Properties: &armauthorization.RoleManagementPolicyProperties{
		Rules: []armauthorization.RoleManagementPolicyRuleClassification{
			&armauthorization.RoleManagementPolicyExpirationRule{
				ID:       to.Ptr("Expiration_Admin_Eligibility"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Eligibility"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsExpirationRequired: to.Ptr(false),
				MaximumDuration:      to.Ptr("P180D"),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Admin_Admin_Eligibility"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Eligibility"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("admin_admin_eligible@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeAdmin),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Requestor_Admin_Eligibility"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Eligibility"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("requestor_admin_eligible@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeRequestor),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Approver_Admin_Eligibility"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Eligibility"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("approver_admin_eligible@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeApprover),
			},
			&armauthorization.RoleManagementPolicyEnablementRule{
				ID:       to.Ptr("Enablement_Admin_Eligibility"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Eligibility"),
					Operations: []*string{
						to.Ptr("All")},
				},
				EnabledRules: []*armauthorization.EnablementRules{},
			},
			&armauthorization.RoleManagementPolicyExpirationRule{
				ID:       to.Ptr("Expiration_Admin_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsExpirationRequired: to.Ptr(false),
				MaximumDuration:      to.Ptr("P90D"),
			},
			&armauthorization.RoleManagementPolicyEnablementRule{
				ID:       to.Ptr("Enablement_Admin_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				EnabledRules: []*armauthorization.EnablementRules{
					to.Ptr(armauthorization.EnablementRulesJustification),
					to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication)},
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Admin_Admin_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("admin_admin_member@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeAdmin),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Requestor_Admin_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("requestor_admin_member@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeRequestor),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Approver_Admin_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("Admin"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("approver_admin_member@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeApprover),
			},
			&armauthorization.RoleManagementPolicyExpirationRule{
				ID:       to.Ptr("Expiration_EndUser_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("EndUser"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsExpirationRequired: to.Ptr(true),
				MaximumDuration:      to.Ptr("PT7H"),
			},
			&armauthorization.RoleManagementPolicyEnablementRule{
				ID:       to.Ptr("Enablement_EndUser_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("EndUser"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				EnabledRules: []*armauthorization.EnablementRules{
					to.Ptr(armauthorization.EnablementRulesJustification),
					to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
					to.Ptr(armauthorization.EnablementRulesTicketing)},
			},
			&armauthorization.RoleManagementPolicyApprovalRule{
				ID:       to.Ptr("Approval_EndUser_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("EndUser"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				Setting: &armauthorization.ApprovalSettings{
					ApprovalMode: to.Ptr(armauthorization.ApprovalModeSingleStage),
					ApprovalStages: []*armauthorization.ApprovalStage{
						{
							ApprovalStageTimeOutInDays:      to.Ptr[int32](1),
							EscalationTimeInMinutes:         to.Ptr[int32](0),
							IsApproverJustificationRequired: to.Ptr(true),
							IsEscalationEnabled:             to.Ptr(false),
							PrimaryApprovers: []*armauthorization.UserSet{
								{
									Description: to.Ptr("amansw_new_group"),
									ID:          to.Ptr("2385b0f3-5fa9-43cf-8ca4-b01dc97298cd"),
									IsBackup:    to.Ptr(false),
									UserType:    to.Ptr(armauthorization.UserTypeGroup),
								},
								{
									Description: to.Ptr("amansw_group"),
									ID:          to.Ptr("2f4913c9-d15b-406a-9946-1d66a28f2690"),
									IsBackup:    to.Ptr(false),
									UserType:    to.Ptr(armauthorization.UserTypeGroup),
								}},
						}},
					IsApprovalRequired:               to.Ptr(true),
					IsApprovalRequiredForExtension:   to.Ptr(false),
					IsRequestorJustificationRequired: to.Ptr(true),
				},
			},
			&armauthorization.RoleManagementPolicyAuthenticationContextRule{
				ID:       to.Ptr("AuthenticationContext_EndUser_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("EndUser"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				ClaimValue: to.Ptr(""),
				IsEnabled:  to.Ptr(false),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Admin_EndUser_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("EndUser"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("admin_enduser_member@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeAdmin),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Requestor_EndUser_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("EndUser"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(false),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationRecipients: []*string{
					to.Ptr("requestor_enduser_member@test.com")},
				NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:    to.Ptr(armauthorization.RecipientTypeRequestor),
			},
			&armauthorization.RoleManagementPolicyNotificationRule{
				ID:       to.Ptr("Notification_Approver_EndUser_Assignment"),
				RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
				Target: &armauthorization.RoleManagementPolicyRuleTarget{
					Caller: to.Ptr("EndUser"),
					Level:  to.Ptr("Assignment"),
					Operations: []*string{
						to.Ptr("All")},
				},
				IsDefaultRecipientsEnabled: to.Ptr(true),
				NotificationLevel:          to.Ptr(armauthorization.NotificationLevelCritical),
				NotificationType:           to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
				RecipientType:              to.Ptr(armauthorization.RecipientTypeApprover),
			}},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

type RoleManagementPoliciesClientDeleteOptions

type RoleManagementPoliciesClientDeleteOptions struct {
}

RoleManagementPoliciesClientDeleteOptions contains the optional parameters for the RoleManagementPoliciesClient.Delete method.

type RoleManagementPoliciesClientDeleteResponse

type RoleManagementPoliciesClientDeleteResponse struct {
}

RoleManagementPoliciesClientDeleteResponse contains the response from method RoleManagementPoliciesClient.Delete.

type RoleManagementPoliciesClientGetOptions

type RoleManagementPoliciesClientGetOptions struct {
}

RoleManagementPoliciesClientGetOptions contains the optional parameters for the RoleManagementPoliciesClient.Get method.

type RoleManagementPoliciesClientGetResponse

type RoleManagementPoliciesClientGetResponse struct {
	RoleManagementPolicy
}

RoleManagementPoliciesClientGetResponse contains the response from method RoleManagementPoliciesClient.Get.

type RoleManagementPoliciesClientListForScopeOptions

type RoleManagementPoliciesClientListForScopeOptions struct {
}

RoleManagementPoliciesClientListForScopeOptions contains the optional parameters for the RoleManagementPoliciesClient.ListForScope method.

type RoleManagementPoliciesClientListForScopeResponse

type RoleManagementPoliciesClientListForScopeResponse struct {
	RoleManagementPolicyListResult
}

RoleManagementPoliciesClientListForScopeResponse contains the response from method RoleManagementPoliciesClient.ListForScope.

type RoleManagementPoliciesClientUpdateOptions

type RoleManagementPoliciesClientUpdateOptions struct {
}

RoleManagementPoliciesClientUpdateOptions contains the optional parameters for the RoleManagementPoliciesClient.Update method.

type RoleManagementPoliciesClientUpdateResponse

type RoleManagementPoliciesClientUpdateResponse struct {
	RoleManagementPolicy
}

RoleManagementPoliciesClientUpdateResponse contains the response from method RoleManagementPoliciesClient.Update.

type RoleManagementPolicy

type RoleManagementPolicy struct {
	// Role management policy properties.
	Properties *RoleManagementPolicyProperties `json:"properties,omitempty"`

	// READ-ONLY; The role management policy Id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role management policy name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role management policy type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

RoleManagementPolicy - Role management policy

func (RoleManagementPolicy) MarshalJSON

func (r RoleManagementPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicy.

func (*RoleManagementPolicy) UnmarshalJSON

func (r *RoleManagementPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicy.

type RoleManagementPolicyApprovalRule

type RoleManagementPolicyApprovalRule struct {
	// REQUIRED; The type of rule
	RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`

	// The id of the rule.
	ID *string `json:"id,omitempty"`

	// The approval setting
	Setting *ApprovalSettings `json:"setting,omitempty"`

	// The target of the current rule.
	Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}

RoleManagementPolicyApprovalRule - The role management policy approval rule.

func (*RoleManagementPolicyApprovalRule) GetRoleManagementPolicyRule

func (r *RoleManagementPolicyApprovalRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule

GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyApprovalRule.

func (RoleManagementPolicyApprovalRule) MarshalJSON

func (r RoleManagementPolicyApprovalRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyApprovalRule.

func (*RoleManagementPolicyApprovalRule) UnmarshalJSON

func (r *RoleManagementPolicyApprovalRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyApprovalRule.

type RoleManagementPolicyAssignment

type RoleManagementPolicyAssignment struct {
	// Role management policy properties.
	Properties *RoleManagementPolicyAssignmentProperties `json:"properties,omitempty"`

	// READ-ONLY; The role management policy Id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The role management policy name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The role management policy type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

RoleManagementPolicyAssignment - Role management policy

func (RoleManagementPolicyAssignment) MarshalJSON

func (r RoleManagementPolicyAssignment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyAssignment.

func (*RoleManagementPolicyAssignment) UnmarshalJSON

func (r *RoleManagementPolicyAssignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyAssignment.

type RoleManagementPolicyAssignmentListResult

type RoleManagementPolicyAssignmentListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Role management policy assignment list.
	Value []*RoleManagementPolicyAssignment `json:"value,omitempty"`
}

RoleManagementPolicyAssignmentListResult - Role management policy assignment list operation result.

func (RoleManagementPolicyAssignmentListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyAssignmentListResult.

func (*RoleManagementPolicyAssignmentListResult) UnmarshalJSON

func (r *RoleManagementPolicyAssignmentListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyAssignmentListResult.

type RoleManagementPolicyAssignmentProperties

type RoleManagementPolicyAssignmentProperties struct {
	// The policy id role management policy assignment.
	PolicyID *string `json:"policyId,omitempty"`

	// The role definition of management policy assignment.
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`

	// The role management policy scope.
	Scope *string `json:"scope,omitempty"`

	// READ-ONLY; The readonly computed rule applied to the policy.
	EffectiveRules []RoleManagementPolicyRuleClassification `json:"effectiveRules,omitempty" azure:"ro"`

	// READ-ONLY; Additional properties of scope, role definition and policy
	PolicyAssignmentProperties *PolicyAssignmentProperties `json:"policyAssignmentProperties,omitempty" azure:"ro"`
}

RoleManagementPolicyAssignmentProperties - Role management policy assignment properties with scope.

func (RoleManagementPolicyAssignmentProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyAssignmentProperties.

func (*RoleManagementPolicyAssignmentProperties) UnmarshalJSON

func (r *RoleManagementPolicyAssignmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyAssignmentProperties.

type RoleManagementPolicyAssignmentsClient

type RoleManagementPolicyAssignmentsClient struct {
	// contains filtered or unexported fields
}

RoleManagementPolicyAssignmentsClient contains the methods for the RoleManagementPolicyAssignments group. Don't use this type directly, use NewRoleManagementPolicyAssignmentsClient() instead.

func NewRoleManagementPolicyAssignmentsClient

func NewRoleManagementPolicyAssignmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleManagementPolicyAssignmentsClient, error)

NewRoleManagementPolicyAssignmentsClient creates a new instance of RoleManagementPolicyAssignmentsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RoleManagementPolicyAssignmentsClient) Create

Create - Create a role management policy assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy assignment to upsert. roleManagementPolicyAssignmentName - The name of format {guid_guid} the role management policy assignment to upsert. parameters - Parameters for the role management policy assignment. options - RoleManagementPolicyAssignmentsClientCreateOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PutRoleManagementPolicyAssignment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPolicyAssignmentsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.Create(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", armauthorization.RoleManagementPolicyAssignment{
	Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{
		PolicyID:         to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"),
		RoleDefinitionID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
		Scope:            to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*RoleManagementPolicyAssignmentsClient) Delete

Delete - Delete a role management policy assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy assignment to delete. roleManagementPolicyAssignmentName - The name of format {guid_guid} the role management policy assignment to delete. options - RoleManagementPolicyAssignmentsClientDeleteOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/DeleteRoleManagementPolicyAssignment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPolicyAssignmentsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*RoleManagementPolicyAssignmentsClient) Get

Get - Get the specified role management policy assignment for a resource scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. roleManagementPolicyAssignmentName - The name of format {guid_guid} the role management policy assignment to get. options - RoleManagementPolicyAssignmentsClientGetOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleManagementPolicyAssignmentByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPolicyAssignmentsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*RoleManagementPolicyAssignmentsClient) NewListForScopePager

NewListForScopePager - Gets role management assignment policies for a resource scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. options - RoleManagementPolicyAssignmentsClientListForScopeOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.ListForScope method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleManagementPolicyAssignmentByScope.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPolicyAssignmentsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type RoleManagementPolicyAssignmentsClientCreateOptions

type RoleManagementPolicyAssignmentsClientCreateOptions struct {
}

RoleManagementPolicyAssignmentsClientCreateOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Create method.

type RoleManagementPolicyAssignmentsClientCreateResponse

type RoleManagementPolicyAssignmentsClientCreateResponse struct {
	RoleManagementPolicyAssignment
}

RoleManagementPolicyAssignmentsClientCreateResponse contains the response from method RoleManagementPolicyAssignmentsClient.Create.

type RoleManagementPolicyAssignmentsClientDeleteOptions

type RoleManagementPolicyAssignmentsClientDeleteOptions struct {
}

RoleManagementPolicyAssignmentsClientDeleteOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Delete method.

type RoleManagementPolicyAssignmentsClientDeleteResponse

type RoleManagementPolicyAssignmentsClientDeleteResponse struct {
}

RoleManagementPolicyAssignmentsClientDeleteResponse contains the response from method RoleManagementPolicyAssignmentsClient.Delete.

type RoleManagementPolicyAssignmentsClientGetOptions

type RoleManagementPolicyAssignmentsClientGetOptions struct {
}

RoleManagementPolicyAssignmentsClientGetOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Get method.

type RoleManagementPolicyAssignmentsClientGetResponse

type RoleManagementPolicyAssignmentsClientGetResponse struct {
	RoleManagementPolicyAssignment
}

RoleManagementPolicyAssignmentsClientGetResponse contains the response from method RoleManagementPolicyAssignmentsClient.Get.

type RoleManagementPolicyAssignmentsClientListForScopeOptions

type RoleManagementPolicyAssignmentsClientListForScopeOptions struct {
}

RoleManagementPolicyAssignmentsClientListForScopeOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.ListForScope method.

type RoleManagementPolicyAssignmentsClientListForScopeResponse

type RoleManagementPolicyAssignmentsClientListForScopeResponse struct {
	RoleManagementPolicyAssignmentListResult
}

RoleManagementPolicyAssignmentsClientListForScopeResponse contains the response from method RoleManagementPolicyAssignmentsClient.ListForScope.

type RoleManagementPolicyAuthenticationContextRule

type RoleManagementPolicyAuthenticationContextRule struct {
	// REQUIRED; The type of rule
	RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`

	// The claim value.
	ClaimValue *string `json:"claimValue,omitempty"`

	// The id of the rule.
	ID *string `json:"id,omitempty"`

	// The value indicating if rule is enabled.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// The target of the current rule.
	Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}

RoleManagementPolicyAuthenticationContextRule - The role management policy authentication context rule.

func (*RoleManagementPolicyAuthenticationContextRule) GetRoleManagementPolicyRule

GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyAuthenticationContextRule.

func (RoleManagementPolicyAuthenticationContextRule) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyAuthenticationContextRule.

func (*RoleManagementPolicyAuthenticationContextRule) UnmarshalJSON

func (r *RoleManagementPolicyAuthenticationContextRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyAuthenticationContextRule.

type RoleManagementPolicyEnablementRule

type RoleManagementPolicyEnablementRule struct {
	// REQUIRED; The type of rule
	RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`

	// The list of enabled rules.
	EnabledRules []*EnablementRules `json:"enabledRules,omitempty"`

	// The id of the rule.
	ID *string `json:"id,omitempty"`

	// The target of the current rule.
	Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}

RoleManagementPolicyEnablementRule - The role management policy enablement rule.

func (*RoleManagementPolicyEnablementRule) GetRoleManagementPolicyRule

func (r *RoleManagementPolicyEnablementRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule

GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyEnablementRule.

func (RoleManagementPolicyEnablementRule) MarshalJSON

func (r RoleManagementPolicyEnablementRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyEnablementRule.

func (*RoleManagementPolicyEnablementRule) UnmarshalJSON

func (r *RoleManagementPolicyEnablementRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyEnablementRule.

type RoleManagementPolicyExpirationRule

type RoleManagementPolicyExpirationRule struct {
	// REQUIRED; The type of rule
	RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`

	// The id of the rule.
	ID *string `json:"id,omitempty"`

	// The value indicating whether expiration is required.
	IsExpirationRequired *bool `json:"isExpirationRequired,omitempty"`

	// The maximum duration of expiration in timespan.
	MaximumDuration *string `json:"maximumDuration,omitempty"`

	// The target of the current rule.
	Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}

RoleManagementPolicyExpirationRule - The role management policy expiration rule.

func (*RoleManagementPolicyExpirationRule) GetRoleManagementPolicyRule

func (r *RoleManagementPolicyExpirationRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule

GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyExpirationRule.

func (RoleManagementPolicyExpirationRule) MarshalJSON

func (r RoleManagementPolicyExpirationRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyExpirationRule.

func (*RoleManagementPolicyExpirationRule) UnmarshalJSON

func (r *RoleManagementPolicyExpirationRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyExpirationRule.

type RoleManagementPolicyListResult

type RoleManagementPolicyListResult struct {
	// The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`

	// Role management policy list.
	Value []*RoleManagementPolicy `json:"value,omitempty"`
}

RoleManagementPolicyListResult - Role management policy list operation result.

func (RoleManagementPolicyListResult) MarshalJSON

func (r RoleManagementPolicyListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyListResult.

func (*RoleManagementPolicyListResult) UnmarshalJSON

func (r *RoleManagementPolicyListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyListResult.

type RoleManagementPolicyNotificationRule

type RoleManagementPolicyNotificationRule struct {
	// REQUIRED; The type of rule
	RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`

	// The id of the rule.
	ID *string `json:"id,omitempty"`

	// Determines if the notification will be sent to the recipient type specified in the policy rule.
	IsDefaultRecipientsEnabled *bool `json:"isDefaultRecipientsEnabled,omitempty"`

	// The notification level.
	NotificationLevel *NotificationLevel `json:"notificationLevel,omitempty"`

	// The list of notification recipients.
	NotificationRecipients []*string `json:"notificationRecipients,omitempty"`

	// The type of notification.
	NotificationType *NotificationDeliveryMechanism `json:"notificationType,omitempty"`

	// The recipient type.
	RecipientType *RecipientType `json:"recipientType,omitempty"`

	// The target of the current rule.
	Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}

RoleManagementPolicyNotificationRule - The role management policy notification rule.

func (*RoleManagementPolicyNotificationRule) GetRoleManagementPolicyRule

func (r *RoleManagementPolicyNotificationRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule

GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyNotificationRule.

func (RoleManagementPolicyNotificationRule) MarshalJSON

func (r RoleManagementPolicyNotificationRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyNotificationRule.

func (*RoleManagementPolicyNotificationRule) UnmarshalJSON

func (r *RoleManagementPolicyNotificationRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyNotificationRule.

type RoleManagementPolicyProperties

type RoleManagementPolicyProperties struct {
	// The role management policy description.
	Description *string `json:"description,omitempty"`

	// The role management policy display name.
	DisplayName *string `json:"displayName,omitempty"`

	// The role management policy is default policy.
	IsOrganizationDefault *bool `json:"isOrganizationDefault,omitempty"`

	// The rule applied to the policy.
	Rules []RoleManagementPolicyRuleClassification `json:"rules,omitempty"`

	// The role management policy scope.
	Scope *string `json:"scope,omitempty"`

	// READ-ONLY; The readonly computed rule applied to the policy.
	EffectiveRules []RoleManagementPolicyRuleClassification `json:"effectiveRules,omitempty" azure:"ro"`

	// READ-ONLY; The name of the entity last modified it
	LastModifiedBy *Principal `json:"lastModifiedBy,omitempty" azure:"ro"`

	// READ-ONLY; The last modified date time.
	LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" azure:"ro"`

	// READ-ONLY; Additional properties of scope
	PolicyProperties *PolicyProperties `json:"policyProperties,omitempty" azure:"ro"`
}

RoleManagementPolicyProperties - Role management policy properties with scope.

func (RoleManagementPolicyProperties) MarshalJSON

func (r RoleManagementPolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyProperties.

func (*RoleManagementPolicyProperties) UnmarshalJSON

func (r *RoleManagementPolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyProperties.

type RoleManagementPolicyRule

type RoleManagementPolicyRule struct {
	// REQUIRED; The type of rule
	RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`

	// The id of the rule.
	ID *string `json:"id,omitempty"`

	// The target of the current rule.
	Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}

RoleManagementPolicyRule - The role management policy rule.

func (*RoleManagementPolicyRule) GetRoleManagementPolicyRule

func (r *RoleManagementPolicyRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule

GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyRule.

func (RoleManagementPolicyRule) MarshalJSON

func (r RoleManagementPolicyRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyRule.

func (*RoleManagementPolicyRule) UnmarshalJSON

func (r *RoleManagementPolicyRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyRule.

type RoleManagementPolicyRuleClassification

type RoleManagementPolicyRuleClassification interface {
	// GetRoleManagementPolicyRule returns the RoleManagementPolicyRule content of the underlying type.
	GetRoleManagementPolicyRule() *RoleManagementPolicyRule
}

RoleManagementPolicyRuleClassification provides polymorphic access to related types. Call the interface's GetRoleManagementPolicyRule() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *RoleManagementPolicyApprovalRule, *RoleManagementPolicyAuthenticationContextRule, *RoleManagementPolicyEnablementRule, - *RoleManagementPolicyExpirationRule, *RoleManagementPolicyNotificationRule, *RoleManagementPolicyRule

type RoleManagementPolicyRuleTarget

type RoleManagementPolicyRuleTarget struct {
	// The caller of the setting.
	Caller *string `json:"caller,omitempty"`

	// The list of enforced settings.
	EnforcedSettings []*string `json:"enforcedSettings,omitempty"`

	// The list of inheritable settings.
	InheritableSettings []*string `json:"inheritableSettings,omitempty"`

	// The assignment level to which rule is applied.
	Level *string `json:"level,omitempty"`

	// The type of operation.
	Operations []*string `json:"operations,omitempty"`

	// The list of target objects.
	TargetObjects []*string `json:"targetObjects,omitempty"`
}

RoleManagementPolicyRuleTarget - The role management policy rule target.

func (RoleManagementPolicyRuleTarget) MarshalJSON

func (r RoleManagementPolicyRuleTarget) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyRuleTarget.

func (*RoleManagementPolicyRuleTarget) UnmarshalJSON

func (r *RoleManagementPolicyRuleTarget) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyRuleTarget.

type RoleManagementPolicyRuleType

type RoleManagementPolicyRuleType string

RoleManagementPolicyRuleType - The type of rule

const (
	RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule              RoleManagementPolicyRuleType = "RoleManagementPolicyApprovalRule"
	RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule RoleManagementPolicyRuleType = "RoleManagementPolicyAuthenticationContextRule"
	RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule            RoleManagementPolicyRuleType = "RoleManagementPolicyEnablementRule"
	RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule            RoleManagementPolicyRuleType = "RoleManagementPolicyExpirationRule"
	RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule          RoleManagementPolicyRuleType = "RoleManagementPolicyNotificationRule"
)

func PossibleRoleManagementPolicyRuleTypeValues

func PossibleRoleManagementPolicyRuleTypeValues() []RoleManagementPolicyRuleType

PossibleRoleManagementPolicyRuleTypeValues returns the possible values for the RoleManagementPolicyRuleType const type.

type Status

type Status string

Status - The status of the role assignment schedule.

const (
	StatusAccepted                    Status = "Accepted"
	StatusAdminApproved               Status = "AdminApproved"
	StatusAdminDenied                 Status = "AdminDenied"
	StatusCanceled                    Status = "Canceled"
	StatusDenied                      Status = "Denied"
	StatusFailed                      Status = "Failed"
	StatusFailedAsResourceIsLocked    Status = "FailedAsResourceIsLocked"
	StatusGranted                     Status = "Granted"
	StatusInvalid                     Status = "Invalid"
	StatusPendingAdminDecision        Status = "PendingAdminDecision"
	StatusPendingApproval             Status = "PendingApproval"
	StatusPendingApprovalProvisioning Status = "PendingApprovalProvisioning"
	StatusPendingEvaluation           Status = "PendingEvaluation"
	StatusPendingExternalProvisioning Status = "PendingExternalProvisioning"
	StatusPendingProvisioning         Status = "PendingProvisioning"
	StatusPendingRevocation           Status = "PendingRevocation"
	StatusPendingScheduleCreation     Status = "PendingScheduleCreation"
	StatusProvisioned                 Status = "Provisioned"
	StatusProvisioningStarted         Status = "ProvisioningStarted"
	StatusRevoked                     Status = "Revoked"
	StatusScheduleCreated             Status = "ScheduleCreated"
	StatusTimedOut                    Status = "TimedOut"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type Type

type Type string

Type - Type of the role assignment schedule expiration

const (
	TypeAfterDateTime Type = "AfterDateTime"
	TypeAfterDuration Type = "AfterDuration"
	TypeNoExpiration  Type = "NoExpiration"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

type UserSet

type UserSet struct {
	// The description of the user.
	Description *string `json:"description,omitempty"`

	// The object id of the user.
	ID *string `json:"id,omitempty"`

	// The value indicating whether the user is a backup fallback approver
	IsBackup *bool `json:"isBackup,omitempty"`

	// The type of user.
	UserType *UserType `json:"userType,omitempty"`
}

UserSet - The detail of a user.

func (UserSet) MarshalJSON

func (u UserSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserSet.

func (*UserSet) UnmarshalJSON

func (u *UserSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserSet.

type UserType

type UserType string

UserType - The type of user.

const (
	UserTypeGroup UserType = "Group"
	UserTypeUser  UserType = "User"
)

func PossibleUserTypeValues

func PossibleUserTypeValues() []UserType

PossibleUserTypeValues returns the possible values for the UserType const type.

type ValidationResponse

type ValidationResponse struct {
	// Failed validation result details
	ErrorInfo *ValidationResponseErrorInfo `json:"errorInfo,omitempty"`

	// READ-ONLY; Whether or not validation succeeded
	IsValid *bool `json:"isValid,omitempty" azure:"ro"`
}

ValidationResponse - Validation response

func (ValidationResponse) MarshalJSON

func (v ValidationResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidationResponse.

func (*ValidationResponse) UnmarshalJSON

func (v *ValidationResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidationResponse.

type ValidationResponseErrorInfo

type ValidationResponseErrorInfo struct {
	// READ-ONLY; Error code indicating why validation failed
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Message indicating why validation failed
	Message *string `json:"message,omitempty" azure:"ro"`
}

ValidationResponseErrorInfo - Failed validation result details

func (ValidationResponseErrorInfo) MarshalJSON

func (v ValidationResponseErrorInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ValidationResponseErrorInfo.

func (*ValidationResponseErrorInfo) UnmarshalJSON

func (v *ValidationResponseErrorInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidationResponseErrorInfo.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL