Documentation
¶
Index ¶
- type ApprovalMode
- type ApprovalSettings
- type ApprovalStage
- type AssignmentType
- type ClassicAdministrator
- type ClassicAdministratorListResult
- type ClassicAdministratorProperties
- type ClassicAdministratorsClient
- type ClassicAdministratorsClientListOptions
- type ClassicAdministratorsClientListResponse
- type ClientFactory
- func (c *ClientFactory) NewClassicAdministratorsClient() *ClassicAdministratorsClient
- func (c *ClientFactory) NewDenyAssignmentsClient() *DenyAssignmentsClient
- func (c *ClientFactory) NewEligibleChildResourcesClient() *EligibleChildResourcesClient
- func (c *ClientFactory) NewGlobalAdministratorClient() *GlobalAdministratorClient
- func (c *ClientFactory) NewPermissionsClient() *PermissionsClient
- func (c *ClientFactory) NewProviderOperationsMetadataClient() *ProviderOperationsMetadataClient
- func (c *ClientFactory) NewRoleAssignmentScheduleInstancesClient() *RoleAssignmentScheduleInstancesClient
- func (c *ClientFactory) NewRoleAssignmentScheduleRequestsClient() *RoleAssignmentScheduleRequestsClient
- func (c *ClientFactory) NewRoleAssignmentSchedulesClient() *RoleAssignmentSchedulesClient
- func (c *ClientFactory) NewRoleAssignmentsClient() *RoleAssignmentsClient
- func (c *ClientFactory) NewRoleDefinitionsClient() *RoleDefinitionsClient
- func (c *ClientFactory) NewRoleEligibilityScheduleInstancesClient() *RoleEligibilityScheduleInstancesClient
- func (c *ClientFactory) NewRoleEligibilityScheduleRequestsClient() *RoleEligibilityScheduleRequestsClient
- func (c *ClientFactory) NewRoleEligibilitySchedulesClient() *RoleEligibilitySchedulesClient
- func (c *ClientFactory) NewRoleManagementPoliciesClient() *RoleManagementPoliciesClient
- func (c *ClientFactory) NewRoleManagementPolicyAssignmentsClient() *RoleManagementPolicyAssignmentsClient
- type DenyAssignment
- type DenyAssignmentFilter
- type DenyAssignmentListResult
- type DenyAssignmentPermission
- type DenyAssignmentProperties
- type DenyAssignmentsClient
- func (client *DenyAssignmentsClient) Get(ctx context.Context, scope string, denyAssignmentID string, ...) (DenyAssignmentsClientGetResponse, error)
- func (client *DenyAssignmentsClient) GetByID(ctx context.Context, denyAssignmentID string, ...) (DenyAssignmentsClientGetByIDResponse, error)
- func (client *DenyAssignmentsClient) NewListForResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[DenyAssignmentsClientListForResourceGroupResponse]
- func (client *DenyAssignmentsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, ...) *runtime.Pager[DenyAssignmentsClientListForResourceResponse]
- func (client *DenyAssignmentsClient) NewListForScopePager(scope string, options *DenyAssignmentsClientListForScopeOptions) *runtime.Pager[DenyAssignmentsClientListForScopeResponse]
- func (client *DenyAssignmentsClient) NewListPager(options *DenyAssignmentsClientListOptions) *runtime.Pager[DenyAssignmentsClientListResponse]
- type DenyAssignmentsClientGetByIDOptions
- type DenyAssignmentsClientGetByIDResponse
- type DenyAssignmentsClientGetOptions
- type DenyAssignmentsClientGetResponse
- type DenyAssignmentsClientListForResourceGroupOptions
- type DenyAssignmentsClientListForResourceGroupResponse
- type DenyAssignmentsClientListForResourceOptions
- type DenyAssignmentsClientListForResourceResponse
- type DenyAssignmentsClientListForScopeOptions
- type DenyAssignmentsClientListForScopeResponse
- type DenyAssignmentsClientListOptions
- type DenyAssignmentsClientListResponse
- type EligibleChildResource
- type EligibleChildResourcesClient
- type EligibleChildResourcesClientGetOptions
- type EligibleChildResourcesClientGetResponse
- type EligibleChildResourcesListResult
- type EnablementRules
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type ExpandedProperties
- type ExpandedPropertiesPrincipal
- type ExpandedPropertiesRoleDefinition
- type ExpandedPropertiesScope
- type GlobalAdministratorClient
- type GlobalAdministratorClientElevateAccessOptions
- type GlobalAdministratorClientElevateAccessResponse
- type MemberType
- type NotificationDeliveryMechanism
- type NotificationLevel
- type Permission
- type PermissionGetResult
- type PermissionsClient
- func (client *PermissionsClient) NewListForResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[PermissionsClientListForResourceGroupResponse]
- func (client *PermissionsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, ...) *runtime.Pager[PermissionsClientListForResourceResponse]
- type PermissionsClientListForResourceGroupOptions
- type PermissionsClientListForResourceGroupResponse
- type PermissionsClientListForResourceOptions
- type PermissionsClientListForResourceResponse
- type PolicyAssignmentProperties
- type PolicyAssignmentPropertiesPolicy
- type PolicyAssignmentPropertiesRoleDefinition
- type PolicyAssignmentPropertiesScope
- type PolicyProperties
- type PolicyPropertiesScope
- type Principal
- type PrincipalType
- type ProviderOperation
- type ProviderOperationsMetadata
- type ProviderOperationsMetadataClient
- func (client *ProviderOperationsMetadataClient) Get(ctx context.Context, resourceProviderNamespace string, ...) (ProviderOperationsMetadataClientGetResponse, error)
- func (client *ProviderOperationsMetadataClient) NewListPager(options *ProviderOperationsMetadataClientListOptions) *runtime.Pager[ProviderOperationsMetadataClientListResponse]
- type ProviderOperationsMetadataClientGetOptions
- type ProviderOperationsMetadataClientGetResponse
- type ProviderOperationsMetadataClientListOptions
- type ProviderOperationsMetadataClientListResponse
- type ProviderOperationsMetadataListResult
- type RecipientType
- type RequestType
- type ResourceType
- type RoleAssignment
- type RoleAssignmentCreateParameters
- type RoleAssignmentFilter
- type RoleAssignmentListResult
- type RoleAssignmentProperties
- type RoleAssignmentSchedule
- type RoleAssignmentScheduleFilter
- type RoleAssignmentScheduleInstance
- type RoleAssignmentScheduleInstanceFilter
- type RoleAssignmentScheduleInstanceListResult
- type RoleAssignmentScheduleInstanceProperties
- type RoleAssignmentScheduleInstancesClient
- func (client *RoleAssignmentScheduleInstancesClient) Get(ctx context.Context, scope string, roleAssignmentScheduleInstanceName string, ...) (RoleAssignmentScheduleInstancesClientGetResponse, error)
- func (client *RoleAssignmentScheduleInstancesClient) NewListForScopePager(scope string, ...) *runtime.Pager[RoleAssignmentScheduleInstancesClientListForScopeResponse]
- type RoleAssignmentScheduleInstancesClientGetOptions
- type RoleAssignmentScheduleInstancesClientGetResponse
- type RoleAssignmentScheduleInstancesClientListForScopeOptions
- type RoleAssignmentScheduleInstancesClientListForScopeResponse
- type RoleAssignmentScheduleListResult
- type RoleAssignmentScheduleProperties
- type RoleAssignmentScheduleRequest
- type RoleAssignmentScheduleRequestFilter
- type RoleAssignmentScheduleRequestListResult
- type RoleAssignmentScheduleRequestProperties
- type RoleAssignmentScheduleRequestPropertiesScheduleInfo
- type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration
- type RoleAssignmentScheduleRequestPropertiesTicketInfo
- type RoleAssignmentScheduleRequestsClient
- func (client *RoleAssignmentScheduleRequestsClient) Cancel(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, ...) (RoleAssignmentScheduleRequestsClientCancelResponse, error)
- func (client *RoleAssignmentScheduleRequestsClient) Create(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, ...) (RoleAssignmentScheduleRequestsClientCreateResponse, error)
- func (client *RoleAssignmentScheduleRequestsClient) Get(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, ...) (RoleAssignmentScheduleRequestsClientGetResponse, error)
- func (client *RoleAssignmentScheduleRequestsClient) NewListForScopePager(scope string, options *RoleAssignmentScheduleRequestsClientListForScopeOptions) *runtime.Pager[RoleAssignmentScheduleRequestsClientListForScopeResponse]
- func (client *RoleAssignmentScheduleRequestsClient) Validate(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, ...) (RoleAssignmentScheduleRequestsClientValidateResponse, error)
- type RoleAssignmentScheduleRequestsClientCancelOptions
- type RoleAssignmentScheduleRequestsClientCancelResponse
- type RoleAssignmentScheduleRequestsClientCreateOptions
- type RoleAssignmentScheduleRequestsClientCreateResponse
- type RoleAssignmentScheduleRequestsClientGetOptions
- type RoleAssignmentScheduleRequestsClientGetResponse
- type RoleAssignmentScheduleRequestsClientListForScopeOptions
- type RoleAssignmentScheduleRequestsClientListForScopeResponse
- type RoleAssignmentScheduleRequestsClientValidateOptions
- type RoleAssignmentScheduleRequestsClientValidateResponse
- type RoleAssignmentSchedulesClient
- func (client *RoleAssignmentSchedulesClient) Get(ctx context.Context, scope string, roleAssignmentScheduleName string, ...) (RoleAssignmentSchedulesClientGetResponse, error)
- func (client *RoleAssignmentSchedulesClient) NewListForScopePager(scope string, options *RoleAssignmentSchedulesClientListForScopeOptions) *runtime.Pager[RoleAssignmentSchedulesClientListForScopeResponse]
- type RoleAssignmentSchedulesClientGetOptions
- type RoleAssignmentSchedulesClientGetResponse
- type RoleAssignmentSchedulesClientListForScopeOptions
- type RoleAssignmentSchedulesClientListForScopeResponse
- type RoleAssignmentsClient
- func (client *RoleAssignmentsClient) Create(ctx context.Context, scope string, roleAssignmentName string, ...) (RoleAssignmentsClientCreateResponse, error)
- func (client *RoleAssignmentsClient) CreateByID(ctx context.Context, roleAssignmentID string, ...) (RoleAssignmentsClientCreateByIDResponse, error)
- func (client *RoleAssignmentsClient) Delete(ctx context.Context, scope string, roleAssignmentName string, ...) (RoleAssignmentsClientDeleteResponse, error)
- func (client *RoleAssignmentsClient) DeleteByID(ctx context.Context, roleAssignmentID string, ...) (RoleAssignmentsClientDeleteByIDResponse, error)
- func (client *RoleAssignmentsClient) Get(ctx context.Context, scope string, roleAssignmentName string, ...) (RoleAssignmentsClientGetResponse, error)
- func (client *RoleAssignmentsClient) GetByID(ctx context.Context, roleAssignmentID string, ...) (RoleAssignmentsClientGetByIDResponse, error)
- func (client *RoleAssignmentsClient) NewListForResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[RoleAssignmentsClientListForResourceGroupResponse]
- func (client *RoleAssignmentsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, ...) *runtime.Pager[RoleAssignmentsClientListForResourceResponse]
- func (client *RoleAssignmentsClient) NewListForScopePager(scope string, options *RoleAssignmentsClientListForScopeOptions) *runtime.Pager[RoleAssignmentsClientListForScopeResponse]
- func (client *RoleAssignmentsClient) NewListForSubscriptionPager(options *RoleAssignmentsClientListForSubscriptionOptions) *runtime.Pager[RoleAssignmentsClientListForSubscriptionResponse]
- type RoleAssignmentsClientCreateByIDOptions
- type RoleAssignmentsClientCreateByIDResponse
- type RoleAssignmentsClientCreateOptions
- type RoleAssignmentsClientCreateResponse
- type RoleAssignmentsClientDeleteByIDOptions
- type RoleAssignmentsClientDeleteByIDResponse
- type RoleAssignmentsClientDeleteOptions
- type RoleAssignmentsClientDeleteResponse
- type RoleAssignmentsClientGetByIDOptions
- type RoleAssignmentsClientGetByIDResponse
- type RoleAssignmentsClientGetOptions
- type RoleAssignmentsClientGetResponse
- type RoleAssignmentsClientListForResourceGroupOptions
- type RoleAssignmentsClientListForResourceGroupResponse
- type RoleAssignmentsClientListForResourceOptions
- type RoleAssignmentsClientListForResourceResponse
- type RoleAssignmentsClientListForScopeOptions
- type RoleAssignmentsClientListForScopeResponse
- type RoleAssignmentsClientListForSubscriptionOptions
- type RoleAssignmentsClientListForSubscriptionResponse
- type RoleDefinition
- type RoleDefinitionFilter
- type RoleDefinitionListResult
- type RoleDefinitionProperties
- type RoleDefinitionsClient
- func (client *RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, scope string, roleDefinitionID string, ...) (RoleDefinitionsClientCreateOrUpdateResponse, error)
- func (client *RoleDefinitionsClient) Delete(ctx context.Context, scope string, roleDefinitionID string, ...) (RoleDefinitionsClientDeleteResponse, error)
- func (client *RoleDefinitionsClient) Get(ctx context.Context, scope string, roleDefinitionID string, ...) (RoleDefinitionsClientGetResponse, error)
- func (client *RoleDefinitionsClient) GetByID(ctx context.Context, roleID string, ...) (RoleDefinitionsClientGetByIDResponse, error)
- func (client *RoleDefinitionsClient) NewListPager(scope string, options *RoleDefinitionsClientListOptions) *runtime.Pager[RoleDefinitionsClientListResponse]
- type RoleDefinitionsClientCreateOrUpdateOptions
- type RoleDefinitionsClientCreateOrUpdateResponse
- type RoleDefinitionsClientDeleteOptions
- type RoleDefinitionsClientDeleteResponse
- type RoleDefinitionsClientGetByIDOptions
- type RoleDefinitionsClientGetByIDResponse
- type RoleDefinitionsClientGetOptions
- type RoleDefinitionsClientGetResponse
- type RoleDefinitionsClientListOptions
- type RoleDefinitionsClientListResponse
- type RoleEligibilitySchedule
- type RoleEligibilityScheduleFilter
- type RoleEligibilityScheduleInstance
- type RoleEligibilityScheduleInstanceFilter
- type RoleEligibilityScheduleInstanceListResult
- type RoleEligibilityScheduleInstanceProperties
- type RoleEligibilityScheduleInstancesClient
- func (client *RoleEligibilityScheduleInstancesClient) Get(ctx context.Context, scope string, roleEligibilityScheduleInstanceName string, ...) (RoleEligibilityScheduleInstancesClientGetResponse, error)
- func (client *RoleEligibilityScheduleInstancesClient) NewListForScopePager(scope string, ...) *runtime.Pager[RoleEligibilityScheduleInstancesClientListForScopeResponse]
- type RoleEligibilityScheduleInstancesClientGetOptions
- type RoleEligibilityScheduleInstancesClientGetResponse
- type RoleEligibilityScheduleInstancesClientListForScopeOptions
- type RoleEligibilityScheduleInstancesClientListForScopeResponse
- type RoleEligibilityScheduleListResult
- type RoleEligibilityScheduleProperties
- type RoleEligibilityScheduleRequest
- type RoleEligibilityScheduleRequestFilter
- type RoleEligibilityScheduleRequestListResult
- type RoleEligibilityScheduleRequestProperties
- type RoleEligibilityScheduleRequestPropertiesScheduleInfo
- type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration
- type RoleEligibilityScheduleRequestPropertiesTicketInfo
- type RoleEligibilityScheduleRequestsClient
- func (client *RoleEligibilityScheduleRequestsClient) Cancel(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, ...) (RoleEligibilityScheduleRequestsClientCancelResponse, error)
- func (client *RoleEligibilityScheduleRequestsClient) Create(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, ...) (RoleEligibilityScheduleRequestsClientCreateResponse, error)
- func (client *RoleEligibilityScheduleRequestsClient) Get(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, ...) (RoleEligibilityScheduleRequestsClientGetResponse, error)
- func (client *RoleEligibilityScheduleRequestsClient) NewListForScopePager(scope string, ...) *runtime.Pager[RoleEligibilityScheduleRequestsClientListForScopeResponse]
- func (client *RoleEligibilityScheduleRequestsClient) Validate(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, ...) (RoleEligibilityScheduleRequestsClientValidateResponse, error)
- type RoleEligibilityScheduleRequestsClientCancelOptions
- type RoleEligibilityScheduleRequestsClientCancelResponse
- type RoleEligibilityScheduleRequestsClientCreateOptions
- type RoleEligibilityScheduleRequestsClientCreateResponse
- type RoleEligibilityScheduleRequestsClientGetOptions
- type RoleEligibilityScheduleRequestsClientGetResponse
- type RoleEligibilityScheduleRequestsClientListForScopeOptions
- type RoleEligibilityScheduleRequestsClientListForScopeResponse
- type RoleEligibilityScheduleRequestsClientValidateOptions
- type RoleEligibilityScheduleRequestsClientValidateResponse
- type RoleEligibilitySchedulesClient
- func (client *RoleEligibilitySchedulesClient) Get(ctx context.Context, scope string, roleEligibilityScheduleName string, ...) (RoleEligibilitySchedulesClientGetResponse, error)
- func (client *RoleEligibilitySchedulesClient) NewListForScopePager(scope string, options *RoleEligibilitySchedulesClientListForScopeOptions) *runtime.Pager[RoleEligibilitySchedulesClientListForScopeResponse]
- type RoleEligibilitySchedulesClientGetOptions
- type RoleEligibilitySchedulesClientGetResponse
- type RoleEligibilitySchedulesClientListForScopeOptions
- type RoleEligibilitySchedulesClientListForScopeResponse
- type RoleManagementPoliciesClient
- func (client *RoleManagementPoliciesClient) Delete(ctx context.Context, scope string, roleManagementPolicyName string, ...) (RoleManagementPoliciesClientDeleteResponse, error)
- func (client *RoleManagementPoliciesClient) Get(ctx context.Context, scope string, roleManagementPolicyName string, ...) (RoleManagementPoliciesClientGetResponse, error)
- func (client *RoleManagementPoliciesClient) NewListForScopePager(scope string, options *RoleManagementPoliciesClientListForScopeOptions) *runtime.Pager[RoleManagementPoliciesClientListForScopeResponse]
- func (client *RoleManagementPoliciesClient) Update(ctx context.Context, scope string, roleManagementPolicyName string, ...) (RoleManagementPoliciesClientUpdateResponse, error)
- type RoleManagementPoliciesClientDeleteOptions
- type RoleManagementPoliciesClientDeleteResponse
- type RoleManagementPoliciesClientGetOptions
- type RoleManagementPoliciesClientGetResponse
- type RoleManagementPoliciesClientListForScopeOptions
- type RoleManagementPoliciesClientListForScopeResponse
- type RoleManagementPoliciesClientUpdateOptions
- type RoleManagementPoliciesClientUpdateResponse
- type RoleManagementPolicy
- type RoleManagementPolicyApprovalRule
- type RoleManagementPolicyAssignment
- type RoleManagementPolicyAssignmentListResult
- type RoleManagementPolicyAssignmentProperties
- type RoleManagementPolicyAssignmentsClient
- func (client *RoleManagementPolicyAssignmentsClient) Create(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, ...) (RoleManagementPolicyAssignmentsClientCreateResponse, error)
- func (client *RoleManagementPolicyAssignmentsClient) Delete(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, ...) (RoleManagementPolicyAssignmentsClientDeleteResponse, error)
- func (client *RoleManagementPolicyAssignmentsClient) Get(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, ...) (RoleManagementPolicyAssignmentsClientGetResponse, error)
- func (client *RoleManagementPolicyAssignmentsClient) NewListForScopePager(scope string, ...) *runtime.Pager[RoleManagementPolicyAssignmentsClientListForScopeResponse]
- type RoleManagementPolicyAssignmentsClientCreateOptions
- type RoleManagementPolicyAssignmentsClientCreateResponse
- type RoleManagementPolicyAssignmentsClientDeleteOptions
- type RoleManagementPolicyAssignmentsClientDeleteResponse
- type RoleManagementPolicyAssignmentsClientGetOptions
- type RoleManagementPolicyAssignmentsClientGetResponse
- type RoleManagementPolicyAssignmentsClientListForScopeOptions
- type RoleManagementPolicyAssignmentsClientListForScopeResponse
- type RoleManagementPolicyAuthenticationContextRule
- type RoleManagementPolicyEnablementRule
- type RoleManagementPolicyExpirationRule
- type RoleManagementPolicyListResult
- type RoleManagementPolicyNotificationRule
- type RoleManagementPolicyProperties
- type RoleManagementPolicyRule
- type RoleManagementPolicyRuleClassification
- type RoleManagementPolicyRuleTarget
- type RoleManagementPolicyRuleType
- type Status
- type Type
- type UserSet
- type UserType
- type ValidationResponse
- type ValidationResponseErrorInfo
Examples ¶
- ClassicAdministratorsClient.NewListPager
- DenyAssignmentsClient.Get
- DenyAssignmentsClient.GetByID
- DenyAssignmentsClient.NewListForResourceGroupPager
- DenyAssignmentsClient.NewListForResourcePager
- DenyAssignmentsClient.NewListForScopePager
- DenyAssignmentsClient.NewListPager
- EligibleChildResourcesClient.NewGetPager
- GlobalAdministratorClient.ElevateAccess
- PermissionsClient.NewListForResourceGroupPager
- PermissionsClient.NewListForResourcePager
- ProviderOperationsMetadataClient.Get
- ProviderOperationsMetadataClient.NewListPager
- RoleAssignmentScheduleInstancesClient.Get
- RoleAssignmentScheduleInstancesClient.NewListForScopePager
- RoleAssignmentScheduleRequestsClient.Cancel
- RoleAssignmentScheduleRequestsClient.Create
- RoleAssignmentScheduleRequestsClient.Get
- RoleAssignmentScheduleRequestsClient.NewListForScopePager
- RoleAssignmentScheduleRequestsClient.Validate
- RoleAssignmentSchedulesClient.Get
- RoleAssignmentSchedulesClient.NewListForScopePager
- RoleAssignmentsClient.Create (CreateRoleAssignmentForResource)
- RoleAssignmentsClient.Create (CreateRoleAssignmentForResourceGroup)
- RoleAssignmentsClient.Create (CreateRoleAssignmentForSubscription)
- RoleAssignmentsClient.CreateByID
- RoleAssignmentsClient.Delete
- RoleAssignmentsClient.DeleteByID
- RoleAssignmentsClient.Get
- RoleAssignmentsClient.GetByID
- RoleAssignmentsClient.NewListForResourceGroupPager
- RoleAssignmentsClient.NewListForResourcePager
- RoleAssignmentsClient.NewListForScopePager
- RoleAssignmentsClient.NewListForSubscriptionPager
- RoleDefinitionsClient.CreateOrUpdate
- RoleDefinitionsClient.Delete
- RoleDefinitionsClient.Get
- RoleDefinitionsClient.GetByID
- RoleDefinitionsClient.NewListPager
- RoleEligibilityScheduleInstancesClient.Get
- RoleEligibilityScheduleInstancesClient.NewListForScopePager
- RoleEligibilityScheduleRequestsClient.Cancel
- RoleEligibilityScheduleRequestsClient.Create
- RoleEligibilityScheduleRequestsClient.Get
- RoleEligibilityScheduleRequestsClient.NewListForScopePager
- RoleEligibilityScheduleRequestsClient.Validate
- RoleEligibilitySchedulesClient.Get
- RoleEligibilitySchedulesClient.NewListForScopePager
- RoleManagementPoliciesClient.Delete
- RoleManagementPoliciesClient.Get
- RoleManagementPoliciesClient.NewListForScopePager
- RoleManagementPoliciesClient.Update (PatchPartialRoleManagementPolicy)
- RoleManagementPoliciesClient.Update (PatchRoleManagementPolicy)
- RoleManagementPolicyAssignmentsClient.Create
- RoleManagementPolicyAssignmentsClient.Delete
- RoleManagementPolicyAssignmentsClient.Get
- RoleManagementPolicyAssignmentsClient.NewListForScopePager
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 // The approval stages of the request. ApprovalStages []*ApprovalStage // Determines whether approval is required or not. IsApprovalRequired *bool // Determines whether approval is required for assignment extension. IsApprovalRequiredForExtension *bool // Determine whether requestor justification is required. IsRequestorJustificationRequired *bool }
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 // The escalation approver of the request. EscalationApprovers []*UserSet // The time in minutes when the approval request would be escalated if the primary approver does not approve EscalationTimeInMinutes *int32 // Determines whether approver need to provide justification for his decision. IsApproverJustificationRequired *bool // The value determine whether escalation feature is enabled. IsEscalationEnabled *bool // The primary approver of the request. PrimaryApprovers []*UserSet }
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 // The name of the administrator. Name *string // Properties for the classic administrator. Properties *ClassicAdministratorProperties // The type of the administrator. Type *string }
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 // An array of administrators. Value []*ClassicAdministrator }
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 // The role of the administrator. Role *string }
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 ¶
func (client *ClassicAdministratorsClient) NewListPager(options *ClassicAdministratorsClientListOptions) *runtime.Pager[ClassicAdministratorsClientListResponse]
NewListPager - Gets service administrator, account administrator, and co-administrators for the subscription.
Generated from API version 2015-07-01
- options - ClassicAdministratorsClientListOptions contains the optional parameters for the ClassicAdministratorsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClassicAdministratorsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClassicAdministratorListResult = armauthorization.ClassicAdministratorListResult{ // Value: []*armauthorization.ClassicAdministrator{ // { // Name: to.Ptr("classicadminid"), // Type: to.Ptr("Microsoft.Authorization/classicAdministrators"), // ID: to.Ptr("/subscriptions/subId/providers/Microsoft.Authorization/classicAdministrators/classicadminid"), // Properties: &armauthorization.ClassicAdministratorProperties{ // EmailAddress: to.Ptr("test@test.com"), // Role: to.Ptr("ServiceAdministrator;AccountAdministrator"), // }, // }, // { // Name: to.Ptr("classicadminid2"), // Type: to.Ptr("Microsoft.Authorization/classicAdministrators"), // ID: to.Ptr("/subscriptions/subId/providers/Microsoft.Authorization/classicAdministrators/classicadminid2"), // Properties: &armauthorization.ClassicAdministratorProperties{ // EmailAddress: to.Ptr("coadmin@test.com"), // Role: to.Ptr("CoAdministrator"), // }, // }}, // } }
Output:
type ClassicAdministratorsClientListOptions ¶
type ClassicAdministratorsClientListOptions struct { }
ClassicAdministratorsClientListOptions contains the optional parameters for the ClassicAdministratorsClient.NewListPager method.
type ClassicAdministratorsClientListResponse ¶
type ClassicAdministratorsClientListResponse struct { // ClassicAdministrator list result information. ClassicAdministratorListResult }
ClassicAdministratorsClientListResponse contains the response from method ClassicAdministratorsClient.NewListPager.
type ClientFactory ¶ added in v2.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v2.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- 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 (*ClientFactory) NewClassicAdministratorsClient ¶ added in v2.1.0
func (c *ClientFactory) NewClassicAdministratorsClient() *ClassicAdministratorsClient
NewClassicAdministratorsClient creates a new instance of ClassicAdministratorsClient.
func (*ClientFactory) NewDenyAssignmentsClient ¶ added in v2.1.0
func (c *ClientFactory) NewDenyAssignmentsClient() *DenyAssignmentsClient
NewDenyAssignmentsClient creates a new instance of DenyAssignmentsClient.
func (*ClientFactory) NewEligibleChildResourcesClient ¶ added in v2.1.0
func (c *ClientFactory) NewEligibleChildResourcesClient() *EligibleChildResourcesClient
NewEligibleChildResourcesClient creates a new instance of EligibleChildResourcesClient.
func (*ClientFactory) NewGlobalAdministratorClient ¶ added in v2.1.0
func (c *ClientFactory) NewGlobalAdministratorClient() *GlobalAdministratorClient
NewGlobalAdministratorClient creates a new instance of GlobalAdministratorClient.
func (*ClientFactory) NewPermissionsClient ¶ added in v2.1.0
func (c *ClientFactory) NewPermissionsClient() *PermissionsClient
NewPermissionsClient creates a new instance of PermissionsClient.
func (*ClientFactory) NewProviderOperationsMetadataClient ¶ added in v2.1.0
func (c *ClientFactory) NewProviderOperationsMetadataClient() *ProviderOperationsMetadataClient
NewProviderOperationsMetadataClient creates a new instance of ProviderOperationsMetadataClient.
func (*ClientFactory) NewRoleAssignmentScheduleInstancesClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleAssignmentScheduleInstancesClient() *RoleAssignmentScheduleInstancesClient
NewRoleAssignmentScheduleInstancesClient creates a new instance of RoleAssignmentScheduleInstancesClient.
func (*ClientFactory) NewRoleAssignmentScheduleRequestsClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleAssignmentScheduleRequestsClient() *RoleAssignmentScheduleRequestsClient
NewRoleAssignmentScheduleRequestsClient creates a new instance of RoleAssignmentScheduleRequestsClient.
func (*ClientFactory) NewRoleAssignmentSchedulesClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleAssignmentSchedulesClient() *RoleAssignmentSchedulesClient
NewRoleAssignmentSchedulesClient creates a new instance of RoleAssignmentSchedulesClient.
func (*ClientFactory) NewRoleAssignmentsClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleAssignmentsClient() *RoleAssignmentsClient
NewRoleAssignmentsClient creates a new instance of RoleAssignmentsClient.
func (*ClientFactory) NewRoleDefinitionsClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleDefinitionsClient() *RoleDefinitionsClient
NewRoleDefinitionsClient creates a new instance of RoleDefinitionsClient.
func (*ClientFactory) NewRoleEligibilityScheduleInstancesClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleEligibilityScheduleInstancesClient() *RoleEligibilityScheduleInstancesClient
NewRoleEligibilityScheduleInstancesClient creates a new instance of RoleEligibilityScheduleInstancesClient.
func (*ClientFactory) NewRoleEligibilityScheduleRequestsClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleEligibilityScheduleRequestsClient() *RoleEligibilityScheduleRequestsClient
NewRoleEligibilityScheduleRequestsClient creates a new instance of RoleEligibilityScheduleRequestsClient.
func (*ClientFactory) NewRoleEligibilitySchedulesClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleEligibilitySchedulesClient() *RoleEligibilitySchedulesClient
NewRoleEligibilitySchedulesClient creates a new instance of RoleEligibilitySchedulesClient.
func (*ClientFactory) NewRoleManagementPoliciesClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleManagementPoliciesClient() *RoleManagementPoliciesClient
NewRoleManagementPoliciesClient creates a new instance of RoleManagementPoliciesClient.
func (*ClientFactory) NewRoleManagementPolicyAssignmentsClient ¶ added in v2.1.0
func (c *ClientFactory) NewRoleManagementPolicyAssignmentsClient() *RoleManagementPolicyAssignmentsClient
NewRoleManagementPolicyAssignmentsClient creates a new instance of RoleManagementPolicyAssignmentsClient.
type DenyAssignment ¶
type DenyAssignment struct { // Deny assignment properties. Properties *DenyAssignmentProperties // READ-ONLY; The deny assignment ID. ID *string // READ-ONLY; The deny assignment name. Name *string // READ-ONLY; The deny assignment type. Type *string }
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 // Return all deny assignments where the specified principal is listed either in the principals list or exclude principals // list of deny assignments. GdprExportPrincipalID *string // Return all deny assignments where the specified principal is listed in the principals list of deny assignments. PrincipalID *string }
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 // Deny assignment list. Value []*DenyAssignment }
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 // The conditions on the Deny assignment permission. This limits the resources it applies to. Condition *string // Version of the condition. ConditionVersion *string // Data actions to which the deny assignment does not grant access. DataActions []*string // Actions to exclude from that the deny assignment does not grant access. NotActions []*string // Data actions to exclude from that the deny assignment does not grant access. NotDataActions []*string }
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 // The description of the deny assignment. Description *string // Determines if the deny assignment applies to child scopes. Default value is false. DoNotApplyToChildScopes *bool // Array of principals to which the deny assignment does not apply. ExcludePrincipals []*Principal // Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. IsSystemProtected *bool // An array of permissions that are denied by the deny assignment. Permissions []*DenyAssignmentPermission // Array of principals to which the deny assignment applies. Principals []*Principal // The deny assignment scope. Scope *string }
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 ¶
func (client *DenyAssignmentsClient) Get(ctx context.Context, scope string, denyAssignmentID string, options *DenyAssignmentsClientGetOptions) (DenyAssignmentsClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDenyAssignmentsClient().Get(ctx, "subscriptions/subId/resourcegroups/rgname", "denyAssignmentId", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DenyAssignment = armauthorization.DenyAssignment{ // Name: to.Ptr("denyAssignmentId"), // Type: to.Ptr("Microsoft.Authorization/denyAssignments"), // ID: to.Ptr("/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"), // Properties: &armauthorization.DenyAssignmentProperties{ // Description: to.Ptr("Deny assignment description"), // DenyAssignmentName: to.Ptr("Deny assignment name"), // DoNotApplyToChildScopes: to.Ptr(false), // ExcludePrincipals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType2"), // ID: to.Ptr("principalId2"), // }}, // IsSystemProtected: to.Ptr(true), // Permissions: []*armauthorization.DenyAssignmentPermission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // }, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // Principals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType1"), // ID: to.Ptr("principalId1"), // }}, // Scope: to.Ptr("/subscriptions/subId/resourcegroups/rgname"), // }, // }
Output:
func (*DenyAssignmentsClient) GetByID ¶
func (client *DenyAssignmentsClient) GetByID(ctx context.Context, denyAssignmentID string, options *DenyAssignmentsClientGetByIDOptions) (DenyAssignmentsClientGetByIDResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDenyAssignmentsClient().GetByID(ctx, "subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/daId", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DenyAssignment = armauthorization.DenyAssignment{ // Name: to.Ptr("daId"), // Type: to.Ptr("Microsoft.Authorization/denyAssignments"), // ID: to.Ptr("/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/daId"), // Properties: &armauthorization.DenyAssignmentProperties{ // Description: to.Ptr("Deny assignment description"), // DenyAssignmentName: to.Ptr("Deny assignment name"), // DoNotApplyToChildScopes: to.Ptr(false), // ExcludePrincipals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType2"), // ID: to.Ptr("principalId2"), // }}, // IsSystemProtected: to.Ptr(true), // Permissions: []*armauthorization.DenyAssignmentPermission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // }, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // Principals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType1"), // ID: to.Ptr("principalId1"), // }}, // Scope: to.Ptr("/subscriptions/subId/resourcegroups/rgname"), // }, // }
Output:
func (*DenyAssignmentsClient) NewListForResourceGroupPager ¶
func (client *DenyAssignmentsClient) NewListForResourceGroupPager(resourceGroupName string, options *DenyAssignmentsClientListForResourceGroupOptions) *runtime.Pager[DenyAssignmentsClientListForResourceGroupResponse]
NewListForResourceGroupPager - Gets deny assignments for a resource group.
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.NewListForResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDenyAssignmentsClient().NewListForResourceGroupPager("rgname", &armauthorization.DenyAssignmentsClientListForResourceGroupOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DenyAssignmentListResult = armauthorization.DenyAssignmentListResult{ // Value: []*armauthorization.DenyAssignment{ // { // Name: to.Ptr("denyAssignmentId"), // Type: to.Ptr("Microsoft.Authorization/denyAssignments"), // ID: to.Ptr("/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"), // Properties: &armauthorization.DenyAssignmentProperties{ // Description: to.Ptr("Deny assignment description"), // DenyAssignmentName: to.Ptr("Deny assignment name"), // DoNotApplyToChildScopes: to.Ptr(false), // ExcludePrincipals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType2"), // ID: to.Ptr("principalId2"), // }}, // IsSystemProtected: to.Ptr(true), // Permissions: []*armauthorization.DenyAssignmentPermission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // to.Ptr("action")}, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // Principals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType1"), // ID: to.Ptr("principalId1"), // }}, // Scope: to.Ptr("/subscriptions/subId/resourcegroups/rgname"), // }, // }}, // } }
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.
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.NewListForResourcePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDenyAssignmentsClient().NewListForResourcePager("rgname", "resourceProviderNamespace", "parentResourcePath", "resourceType", "resourceName", &armauthorization.DenyAssignmentsClientListForResourceOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DenyAssignmentListResult = armauthorization.DenyAssignmentListResult{ // Value: []*armauthorization.DenyAssignment{ // { // Name: to.Ptr("denyAssignmentId"), // Type: to.Ptr("Microsoft.Authorization/denyAssignments"), // ID: to.Ptr("/subscriptions/subId/resourcegroups/rgname/providers/resourceProviderNamespace/parentResourcePath/resourceType/resourceName/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"), // Properties: &armauthorization.DenyAssignmentProperties{ // Description: to.Ptr("Deny assignment description"), // DenyAssignmentName: to.Ptr("Deny assignment name"), // DoNotApplyToChildScopes: to.Ptr(false), // ExcludePrincipals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType2"), // ID: to.Ptr("principalId2"), // }}, // IsSystemProtected: to.Ptr(true), // Permissions: []*armauthorization.DenyAssignmentPermission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // to.Ptr("action")}, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // Principals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType1"), // ID: to.Ptr("principalId1"), // }}, // Scope: to.Ptr("/subscriptions/subId/resourcegroups/rgname/providers/resourceProviderNamespace/parentResourcePath/resourceType/resourceName"), // }, // }}, // } }
Output:
func (*DenyAssignmentsClient) NewListForScopePager ¶
func (client *DenyAssignmentsClient) NewListForScopePager(scope string, options *DenyAssignmentsClientListForScopeOptions) *runtime.Pager[DenyAssignmentsClientListForScopeResponse]
NewListForScopePager - Gets deny assignments for a scope.
Generated from API version 2022-04-01
- scope - The scope of the deny assignments.
- options - DenyAssignmentsClientListForScopeOptions contains the optional parameters for the DenyAssignmentsClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDenyAssignmentsClient().NewListForScopePager("subscriptions/subId", &armauthorization.DenyAssignmentsClientListForScopeOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DenyAssignmentListResult = armauthorization.DenyAssignmentListResult{ // Value: []*armauthorization.DenyAssignment{ // { // Name: to.Ptr("denyAssignmentId"), // Type: to.Ptr("Microsoft.Authorization/denyAssignments"), // ID: to.Ptr("/subscriptions/subId/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"), // Properties: &armauthorization.DenyAssignmentProperties{ // Description: to.Ptr("Deny assignment description"), // DenyAssignmentName: to.Ptr("Deny assignment name"), // DoNotApplyToChildScopes: to.Ptr(false), // ExcludePrincipals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType2"), // ID: to.Ptr("principalId2"), // }}, // IsSystemProtected: to.Ptr(true), // Permissions: []*armauthorization.DenyAssignmentPermission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // to.Ptr("action")}, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // Principals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType1"), // ID: to.Ptr("principalId1"), // }}, // Scope: to.Ptr("/subscriptions/subId"), // }, // }}, // } }
Output:
func (*DenyAssignmentsClient) NewListPager ¶
func (client *DenyAssignmentsClient) NewListPager(options *DenyAssignmentsClientListOptions) *runtime.Pager[DenyAssignmentsClientListResponse]
NewListPager - Gets all deny assignments for the subscription.
Generated from API version 2022-04-01
- options - DenyAssignmentsClientListOptions contains the optional parameters for the DenyAssignmentsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDenyAssignmentsClient().NewListPager(&armauthorization.DenyAssignmentsClientListOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DenyAssignmentListResult = armauthorization.DenyAssignmentListResult{ // Value: []*armauthorization.DenyAssignment{ // { // Name: to.Ptr("denyAssignmentId"), // Type: to.Ptr("Microsoft.Authorization/denyAssignments"), // ID: to.Ptr("/subscriptions/subId/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"), // Properties: &armauthorization.DenyAssignmentProperties{ // Description: to.Ptr("Deny assignment description"), // DenyAssignmentName: to.Ptr("Deny assignment name"), // DoNotApplyToChildScopes: to.Ptr(false), // ExcludePrincipals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType2"), // ID: to.Ptr("principalId2"), // }}, // IsSystemProtected: to.Ptr(true), // Permissions: []*armauthorization.DenyAssignmentPermission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // to.Ptr("action")}, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // Principals: []*armauthorization.Principal{ // { // Type: to.Ptr("principalType1"), // ID: to.Ptr("principalId1"), // }}, // Scope: to.Ptr("/subscriptions/subId"), // }, // }}, // } }
Output:
type DenyAssignmentsClientGetByIDOptions ¶
type DenyAssignmentsClientGetByIDOptions struct { }
DenyAssignmentsClientGetByIDOptions contains the optional parameters for the DenyAssignmentsClient.GetByID method.
type DenyAssignmentsClientGetByIDResponse ¶
type DenyAssignmentsClientGetByIDResponse struct { // Deny Assignment 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 { // Deny Assignment 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.NewListForResourceGroupPager method.
type DenyAssignmentsClientListForResourceGroupResponse ¶
type DenyAssignmentsClientListForResourceGroupResponse struct { // Deny assignment list operation result. DenyAssignmentListResult }
DenyAssignmentsClientListForResourceGroupResponse contains the response from method DenyAssignmentsClient.NewListForResourceGroupPager.
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.NewListForResourcePager method.
type DenyAssignmentsClientListForResourceResponse ¶
type DenyAssignmentsClientListForResourceResponse struct { // Deny assignment list operation result. DenyAssignmentListResult }
DenyAssignmentsClientListForResourceResponse contains the response from method DenyAssignmentsClient.NewListForResourcePager.
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.NewListForScopePager method.
type DenyAssignmentsClientListForScopeResponse ¶
type DenyAssignmentsClientListForScopeResponse struct { // Deny assignment list operation result. DenyAssignmentListResult }
DenyAssignmentsClientListForScopeResponse contains the response from method DenyAssignmentsClient.NewListForScopePager.
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.NewListPager method.
type DenyAssignmentsClientListResponse ¶
type DenyAssignmentsClientListResponse struct { // Deny assignment list operation result. DenyAssignmentListResult }
DenyAssignmentsClientListResponse contains the response from method DenyAssignmentsClient.NewListPager.
type EligibleChildResource ¶
type EligibleChildResource struct { // READ-ONLY; The resource scope Id. ID *string // READ-ONLY; The resource name. Name *string // READ-ONLY; The resource type. Type *string }
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 ¶
func (client *EligibleChildResourcesClient) NewGetPager(scope string, options *EligibleChildResourcesClientGetOptions) *runtime.Pager[EligibleChildResourcesClientGetResponse]
NewGetPager - Get the child resources of a resource on which user has eligible access
Generated from API version 2020-10-01
- scope - The scope of the role management policy.
- options - EligibleChildResourcesClientGetOptions contains the optional parameters for the EligibleChildResourcesClient.NewGetPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewEligibleChildResourcesClient().NewGetPager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.EligibleChildResourcesClientGetOptions{Filter: to.Ptr("resourceType+eq+'resourcegroup'")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.EligibleChildResourcesListResult = armauthorization.EligibleChildResourcesListResult{ // Value: []*armauthorization.EligibleChildResource{ // { // Name: to.Ptr("RG-1"), // Type: to.Ptr("resourcegroup"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/resourceGroups/RG-1"), // }, // { // Name: to.Ptr("RG-2"), // Type: to.Ptr("resourcegroup"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/resourceGroups/RG-2"), // }}, // } }
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.NewGetPager method.
type EligibleChildResourcesClientGetResponse ¶
type EligibleChildResourcesClientGetResponse struct { // Eligible child resources list operation result. EligibleChildResourcesListResult }
EligibleChildResourcesClientGetResponse contains the response from method EligibleChildResourcesClient.NewGetPager.
type EligibleChildResourcesListResult ¶
type EligibleChildResourcesListResult struct { // The URL to use for getting the next set of results. NextLink *string // Eligible child resource list. Value []*EligibleChildResource }
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 any // READ-ONLY; The additional info type. Type *string }
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 // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
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 }
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 // Details of role definition RoleDefinition *ExpandedPropertiesRoleDefinition // Details of the resource scope Scope *ExpandedPropertiesScope }
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 // Email id of the principal Email *string // Id of the principal ID *string // Type of the principal Type *string }
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 // Id of the role definition ID *string // Type of the role definition Type *string }
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 // Scope id of the resource ID *string // Type of the resource Type *string }
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 ¶
func (client *GlobalAdministratorClient) ElevateAccess(ctx context.Context, options *GlobalAdministratorClientElevateAccessOptions) (GlobalAdministratorClientElevateAccessResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewGlobalAdministratorClient().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 // Allowed Data actions. DataActions []*string // Denied actions. NotActions []*string // Denied Data actions. NotDataActions []*string }
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 // An array of permissions. Value []*Permission }
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 ¶
func (client *PermissionsClient) NewListForResourceGroupPager(resourceGroupName string, options *PermissionsClientListForResourceGroupOptions) *runtime.Pager[PermissionsClientListForResourceGroupResponse]
NewListForResourceGroupPager - Gets all permissions the caller has for a resource group.
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.NewListForResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPermissionsClient().NewListForResourceGroupPager("rgname", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PermissionGetResult = armauthorization.PermissionGetResult{ // Value: []*armauthorization.Permission{ // { // Actions: []*string{ // }, // DataActions: []*string{ // }, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // } }
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.
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.NewListForResourcePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPermissionsClient().NewListForResourcePager("rgname", "rpnamespace", "parentResourcePath", "resourceType", "resourceName", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PermissionGetResult = armauthorization.PermissionGetResult{ // Value: []*armauthorization.Permission{ // { // Actions: []*string{ // }, // NotActions: []*string{ // }, // }}, // } }
Output:
type PermissionsClientListForResourceGroupOptions ¶
type PermissionsClientListForResourceGroupOptions struct { }
PermissionsClientListForResourceGroupOptions contains the optional parameters for the PermissionsClient.NewListForResourceGroupPager method.
type PermissionsClientListForResourceGroupResponse ¶
type PermissionsClientListForResourceGroupResponse struct { // Permissions information. PermissionGetResult }
PermissionsClientListForResourceGroupResponse contains the response from method PermissionsClient.NewListForResourceGroupPager.
type PermissionsClientListForResourceOptions ¶
type PermissionsClientListForResourceOptions struct { }
PermissionsClientListForResourceOptions contains the optional parameters for the PermissionsClient.NewListForResourcePager method.
type PermissionsClientListForResourceResponse ¶
type PermissionsClientListForResourceResponse struct { // Permissions information. PermissionGetResult }
PermissionsClientListForResourceResponse contains the response from method PermissionsClient.NewListForResourcePager.
type PolicyAssignmentProperties ¶
type PolicyAssignmentProperties struct { // Details of the policy Policy *PolicyAssignmentPropertiesPolicy // Details of role definition RoleDefinition *PolicyAssignmentPropertiesRoleDefinition // Details of the resource scope Scope *PolicyAssignmentPropertiesScope }
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 // The last modified date time. LastModifiedDateTime *time.Time // READ-ONLY; The name of the entity last modified it LastModifiedBy *Principal }
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 // Id of the role definition ID *string // Type of the role definition Type *string }
PolicyAssignmentPropertiesRoleDefinition - Details of role definition
func (PolicyAssignmentPropertiesRoleDefinition) MarshalJSON ¶
func (p PolicyAssignmentPropertiesRoleDefinition) MarshalJSON() ([]byte, error)
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 // Scope id of the resource ID *string // Type of the resource Type *string }
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 }
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 // Scope id of the resource ID *string // Type of the resource Type *string }
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 // Email of principal Email *string // The id of the principal made changes ID *string // Type of principal such as user , group etc Type *string }
Principal - The name of the entity last modified it
func (Principal) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Principal.
func (*Principal) UnmarshalJSON ¶
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 // The operation display name. DisplayName *string // The dataAction flag to specify the operation type. IsDataAction *bool // The operation name. Name *string // The operation origin. Origin *string // The operation properties. Properties any }
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 // The provider id. ID *string // The provider name. Name *string // The provider operations. Operations []*ProviderOperation // The provider resource types ResourceTypes []*ResourceType // The provider type. Type *string }
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 ¶
func (client *ProviderOperationsMetadataClient) Get(ctx context.Context, resourceProviderNamespace string, options *ProviderOperationsMetadataClientGetOptions) (ProviderOperationsMetadataClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewProviderOperationsMetadataClient().Get(ctx, "resourceProviderNamespace", &armauthorization.ProviderOperationsMetadataClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderOperationsMetadata = armauthorization.ProviderOperationsMetadata{ // Name: to.Ptr("name"), // Type: to.Ptr("type"), // DisplayName: to.Ptr("displayName"), // ID: to.Ptr("id"), // ResourceTypes: []*armauthorization.ResourceType{ // { // Name: to.Ptr("name"), // DisplayName: to.Ptr("name"), // Operations: []*armauthorization.ProviderOperation{ // }, // }}, // Operations: []*armauthorization.ProviderOperation{ // }, // }
Output:
func (*ProviderOperationsMetadataClient) NewListPager ¶
func (client *ProviderOperationsMetadataClient) NewListPager(options *ProviderOperationsMetadataClientListOptions) *runtime.Pager[ProviderOperationsMetadataClientListResponse]
NewListPager - Gets provider operations metadata for all resource providers.
Generated from API version 2022-04-01
- options - ProviderOperationsMetadataClientListOptions contains the optional parameters for the ProviderOperationsMetadataClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewProviderOperationsMetadataClient().NewListPager(&armauthorization.ProviderOperationsMetadataClientListOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ProviderOperationsMetadataListResult = armauthorization.ProviderOperationsMetadataListResult{ // Value: []*armauthorization.ProviderOperationsMetadata{ // { // Name: to.Ptr("name"), // Type: to.Ptr("type"), // DisplayName: to.Ptr("displayName"), // ID: to.Ptr("id"), // ResourceTypes: []*armauthorization.ResourceType{ // { // Name: to.Ptr("name"), // DisplayName: to.Ptr("name"), // Operations: []*armauthorization.ProviderOperation{ // }, // }}, // Operations: []*armauthorization.ProviderOperation{ // }, // }}, // } }
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 { // Provider Operations metadata 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.NewListPager method.
type ProviderOperationsMetadataClientListResponse ¶
type ProviderOperationsMetadataClientListResponse struct { // Provider operations metadata list ProviderOperationsMetadataListResult }
ProviderOperationsMetadataClientListResponse contains the response from method ProviderOperationsMetadataClient.NewListPager.
type ProviderOperationsMetadataListResult ¶
type ProviderOperationsMetadataListResult struct { // The URL to use for getting the next set of results. NextLink *string // The list of providers. Value []*ProviderOperationsMetadata }
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 // The resource type name. Name *string // The resource type operations. Operations []*ProviderOperation }
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 // READ-ONLY; The role assignment ID. ID *string // READ-ONLY; The role assignment name. Name *string // READ-ONLY; The role assignment type. Type *string }
RoleAssignment - Role Assignments
func (RoleAssignment) MarshalJSON ¶
func (r RoleAssignment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignment.
func (*RoleAssignment) UnmarshalJSON ¶
func (r *RoleAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignment.
type RoleAssignmentCreateParameters ¶
type RoleAssignmentCreateParameters struct { // REQUIRED; Role assignment properties. Properties *RoleAssignmentProperties }
RoleAssignmentCreateParameters - Role assignment create parameters.
func (RoleAssignmentCreateParameters) MarshalJSON ¶
func (r RoleAssignmentCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentCreateParameters.
func (*RoleAssignmentCreateParameters) UnmarshalJSON ¶
func (r *RoleAssignmentCreateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentCreateParameters.
type RoleAssignmentFilter ¶
type RoleAssignmentFilter struct { // Returns role assignment of the specific principal. PrincipalID *string }
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 // READ-ONLY; The skipToken to use for getting the next set of results. NextLink *string }
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 // REQUIRED; The role definition ID. RoleDefinitionID *string // 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 // Version of the condition. Currently the only accepted value is '2.0' ConditionVersion *string // Id of the delegated managed identity resource DelegatedManagedIdentityResourceID *string // Description of role assignment Description *string // The principal type of the assigned principal ID. PrincipalType *PrincipalType // READ-ONLY; Id of the user who created the assignment CreatedBy *string // READ-ONLY; Time it was created CreatedOn *time.Time // READ-ONLY; The role assignment scope. Scope *string // READ-ONLY; Id of the user who updated the assignment UpdatedBy *string // READ-ONLY; Time it was updated UpdatedOn *time.Time }
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 // READ-ONLY; The role assignment schedule Id. ID *string // READ-ONLY; The role assignment schedule name. Name *string // READ-ONLY; The role assignment schedule type. Type *string }
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 // Returns role assignment schedule of the specific role definition. RoleDefinitionID *string // Returns role assignment schedule instances of the specific status. Status *string }
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 // READ-ONLY; The role assignment schedule instance ID. ID *string // READ-ONLY; The role assignment schedule instance name. Name *string // READ-ONLY; The role assignment schedule instance type. Type *string }
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 // Returns role assignment schedule instances belonging to a specific role assignment schedule. RoleAssignmentScheduleID *string // Returns role assignment schedule instances of the specific role definition. RoleDefinitionID *string // Returns role assignment schedule instances of the specific status. Status *string }
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 // Role assignment schedule instance list. Value []*RoleAssignmentScheduleInstance }
RoleAssignmentScheduleInstanceListResult - Role assignment schedule instance list operation result.
func (RoleAssignmentScheduleInstanceListResult) MarshalJSON ¶
func (r RoleAssignmentScheduleInstanceListResult) MarshalJSON() ([]byte, error)
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 // 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 // Version of the condition. Currently accepted value is '2.0' ConditionVersion *string // DateTime when role assignment schedule was created CreatedOn *time.Time // The endDateTime of the role assignment schedule instance EndDateTime *time.Time // Additional properties of principal, scope and role definition ExpandedProperties *ExpandedProperties // roleEligibilityScheduleId used to activate LinkedRoleEligibilityScheduleID *string // roleEligibilityScheduleInstanceId linked to this roleAssignmentScheduleInstance LinkedRoleEligibilityScheduleInstanceID *string // Membership type of the role assignment schedule MemberType *MemberType // Role Assignment Id in external system OriginRoleAssignmentID *string // The principal ID. PrincipalID *string // The principal type of the assigned principal ID. PrincipalType *PrincipalType // Id of the master role assignment schedule RoleAssignmentScheduleID *string // The role definition ID. RoleDefinitionID *string // The role assignment schedule scope. Scope *string // The startDateTime of the role assignment schedule instance StartDateTime *time.Time // The status of the role assignment schedule instance. Status *Status }
RoleAssignmentScheduleInstanceProperties - Role assignment schedule properties with scope.
func (RoleAssignmentScheduleInstanceProperties) MarshalJSON ¶
func (r RoleAssignmentScheduleInstanceProperties) MarshalJSON() ([]byte, error)
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 ¶
func (client *RoleAssignmentScheduleInstancesClient) Get(ctx context.Context, scope string, roleAssignmentScheduleInstanceName string, options *RoleAssignmentScheduleInstancesClientGetOptions) (RoleAssignmentScheduleInstancesClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentScheduleInstancesClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignmentScheduleInstance = armauthorization.RoleAssignmentScheduleInstance{ // Name: to.Ptr("ed9b8180-cef7-4c77-a63c-b8566ecfc412"), // Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleInstances"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleInstances/ed9b8180-cef7-4c77-a63c-b8566ecfc412"), // Properties: &armauthorization.RoleAssignmentScheduleInstanceProperties{ // AssignmentType: to.Ptr(armauthorization.AssignmentTypeAssigned), // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T05:35:17.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // LinkedRoleEligibilityScheduleInstanceID: to.Ptr("21e4b59a-0499-4fe0-a3c3-43a3055b773a"), // MemberType: to.Ptr(armauthorization.MemberTypeDirect), // OriginRoleAssignmentID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignments/ed9b8180-cef7-4c77-a63c-b8566ecfc412"), // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RoleAssignmentScheduleID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6"), // RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // Status: to.Ptr(armauthorization.StatusAccepted), // }, // }
Output:
func (*RoleAssignmentScheduleInstancesClient) NewListForScopePager ¶
func (client *RoleAssignmentScheduleInstancesClient) NewListForScopePager(scope string, options *RoleAssignmentScheduleInstancesClientListForScopeOptions) *runtime.Pager[RoleAssignmentScheduleInstancesClientListForScopeResponse]
NewListForScopePager - Gets role assignment schedule instances of a role assignment schedule.
Generated from API version 2020-10-01
- scope - The scope of the role assignment schedule.
- options - RoleAssignmentScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleAssignmentScheduleInstancesClient().NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleAssignmentScheduleInstancesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleAssignmentScheduleInstanceListResult = armauthorization.RoleAssignmentScheduleInstanceListResult{ // Value: []*armauthorization.RoleAssignmentScheduleInstance{ // { // Name: to.Ptr("ed9b8180-cef7-4c77-a63c-b8566ecfc412"), // Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleInstances"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleInstances/ed9b8180-cef7-4c77-a63c-b8566ecfc412"), // Properties: &armauthorization.RoleAssignmentScheduleInstanceProperties{ // AssignmentType: to.Ptr(armauthorization.AssignmentTypeAssigned), // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T05:35:17.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // LinkedRoleEligibilityScheduleInstanceID: to.Ptr("21e4b59a-0499-4fe0-a3c3-43a3055b773a"), // MemberType: to.Ptr(armauthorization.MemberTypeDirect), // OriginRoleAssignmentID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignments/ed9b8180-cef7-4c77-a63c-b8566ecfc412"), // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RoleAssignmentScheduleID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6"), // RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // Status: to.Ptr(armauthorization.StatusAccepted), // }, // }}, // } }
Output:
type RoleAssignmentScheduleInstancesClientGetOptions ¶
type RoleAssignmentScheduleInstancesClientGetOptions struct { }
RoleAssignmentScheduleInstancesClientGetOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.Get method.
type RoleAssignmentScheduleInstancesClientGetResponse ¶
type RoleAssignmentScheduleInstancesClientGetResponse struct { // Information about current or upcoming role assignment schedule instance 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.NewListForScopePager method.
type RoleAssignmentScheduleInstancesClientListForScopeResponse ¶
type RoleAssignmentScheduleInstancesClientListForScopeResponse struct { // Role assignment schedule instance list operation result. RoleAssignmentScheduleInstanceListResult }
RoleAssignmentScheduleInstancesClientListForScopeResponse contains the response from method RoleAssignmentScheduleInstancesClient.NewListForScopePager.
type RoleAssignmentScheduleListResult ¶
type RoleAssignmentScheduleListResult struct { // The URL to use for getting the next set of results. NextLink *string // Role assignment schedule list. Value []*RoleAssignmentSchedule }
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 // 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 // Version of the condition. Currently accepted value is '2.0' ConditionVersion *string // DateTime when role assignment schedule was created CreatedOn *time.Time // End DateTime when role assignment schedule EndDateTime *time.Time // Additional properties of principal, scope and role definition ExpandedProperties *ExpandedProperties // The id of roleEligibilitySchedule used to activated this roleAssignmentSchedule LinkedRoleEligibilityScheduleID *string // Membership type of the role assignment schedule MemberType *MemberType // The principal ID. PrincipalID *string // The principal type of the assigned principal ID. PrincipalType *PrincipalType // The id of roleAssignmentScheduleRequest used to create this roleAssignmentSchedule RoleAssignmentScheduleRequestID *string // The role definition ID. RoleDefinitionID *string // The role assignment schedule scope. Scope *string // Start DateTime when role assignment schedule StartDateTime *time.Time // The status of the role assignment schedule. Status *Status // DateTime when role assignment schedule was modified UpdatedOn *time.Time }
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 // READ-ONLY; The role assignment schedule request ID. ID *string // READ-ONLY; The role assignment schedule request name. Name *string // READ-ONLY; The role assignment schedule request type. Type *string }
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 // Returns role assignment requests created by specific principal. RequestorID *string // Returns role assignment requests of the specific role definition. RoleDefinitionID *string // Returns role assignment requests of specific status. Status *string }
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 // Role assignment schedule request list. Value []*RoleAssignmentScheduleRequest }
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 // REQUIRED; The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc RequestType *RequestType // REQUIRED; The role definition ID. RoleDefinitionID *string // 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 // Version of the condition. Currently accepted value is '2.0' ConditionVersion *string // Justification for the role assignment Justification *string // The linked role eligibility schedule id - to activate an eligibility. LinkedRoleEligibilityScheduleID *string // Schedule info of the role assignment schedule ScheduleInfo *RoleAssignmentScheduleRequestPropertiesScheduleInfo // The resultant role assignment schedule id or the role assignment schedule id being updated TargetRoleAssignmentScheduleID *string // The role assignment schedule instance id being updated TargetRoleAssignmentScheduleInstanceID *string // Ticket Info of the role assignment TicketInfo *RoleAssignmentScheduleRequestPropertiesTicketInfo // READ-ONLY; The approvalId of the role assignment schedule request. ApprovalID *string // READ-ONLY; DateTime when role assignment schedule request was created CreatedOn *time.Time // READ-ONLY; Additional properties of principal, scope and role definition ExpandedProperties *ExpandedProperties // READ-ONLY; The principal type of the assigned principal ID. PrincipalType *PrincipalType // READ-ONLY; Id of the user who created this request RequestorID *string // READ-ONLY; The role assignment schedule request scope. Scope *string // READ-ONLY; The status of the role assignment schedule request. Status *Status }
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 // Start DateTime of the role assignment schedule. StartDateTime *time.Time }
RoleAssignmentScheduleRequestPropertiesScheduleInfo - Schedule info of the role assignment schedule
func (RoleAssignmentScheduleRequestPropertiesScheduleInfo) MarshalJSON ¶
func (r RoleAssignmentScheduleRequestPropertiesScheduleInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestPropertiesScheduleInfo.
func (*RoleAssignmentScheduleRequestPropertiesScheduleInfo) UnmarshalJSON ¶
func (r *RoleAssignmentScheduleRequestPropertiesScheduleInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestPropertiesScheduleInfo.
type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration ¶
type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration struct { // Duration of the role assignment schedule in TimeSpan. Duration *string // End DateTime of the role assignment schedule. EndDateTime *time.Time // Type of the role assignment schedule expiration Type *Type }
RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration - Expiration of the role assignment schedule
func (RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration) MarshalJSON ¶
func (r RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration.
func (*RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration) UnmarshalJSON ¶
func (r *RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration.
type RoleAssignmentScheduleRequestPropertiesTicketInfo ¶
type RoleAssignmentScheduleRequestPropertiesTicketInfo struct { // Ticket number for the role assignment TicketNumber *string // Ticket system name for the role assignment TicketSystem *string }
RoleAssignmentScheduleRequestPropertiesTicketInfo - Ticket Info of the role assignment
func (RoleAssignmentScheduleRequestPropertiesTicketInfo) MarshalJSON ¶
func (r RoleAssignmentScheduleRequestPropertiesTicketInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestPropertiesTicketInfo.
func (*RoleAssignmentScheduleRequestPropertiesTicketInfo) UnmarshalJSON ¶
func (r *RoleAssignmentScheduleRequestPropertiesTicketInfo) UnmarshalJSON(data []byte) error
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 ¶
func (client *RoleAssignmentScheduleRequestsClient) Cancel(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, options *RoleAssignmentScheduleRequestsClientCancelOptions) (RoleAssignmentScheduleRequestsClientCancelResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRoleAssignmentScheduleRequestsClient().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 ¶
func (client *RoleAssignmentScheduleRequestsClient) Create(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, parameters RoleAssignmentScheduleRequest, options *RoleAssignmentScheduleRequestsClientCreateOptions) (RoleAssignmentScheduleRequestsClientCreateResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRoleAssignmentScheduleRequestsClient().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.910Z"); return t }()), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*RoleAssignmentScheduleRequestsClient) Get ¶
func (client *RoleAssignmentScheduleRequestsClient) Get(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, options *RoleAssignmentScheduleRequestsClientGetOptions) (RoleAssignmentScheduleRequestsClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentScheduleRequestsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignmentScheduleRequest = armauthorization.RoleAssignmentScheduleRequest{ // Name: to.Ptr("fea7a502-9a96-4806-a26f-eee560e52045"), // Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleRequests"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"), // Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RequestType: to.Ptr(armauthorization.RequestTypeSelfActivate), // RequestorID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // 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.910Z"); return t}()), // }, // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // Status: to.Ptr(armauthorization.StatusProvisioned), // TargetRoleAssignmentScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // TicketInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesTicketInfo{ // }, // }, // }
Output:
func (*RoleAssignmentScheduleRequestsClient) NewListForScopePager ¶
func (client *RoleAssignmentScheduleRequestsClient) NewListForScopePager(scope string, options *RoleAssignmentScheduleRequestsClientListForScopeOptions) *runtime.Pager[RoleAssignmentScheduleRequestsClientListForScopeResponse]
NewListForScopePager - Gets role assignment schedule requests for a scope.
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.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleAssignmentScheduleRequestsClient().NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleAssignmentScheduleRequestsClientListForScopeOptions{Filter: to.Ptr("assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleAssignmentScheduleRequestListResult = armauthorization.RoleAssignmentScheduleRequestListResult{ // Value: []*armauthorization.RoleAssignmentScheduleRequest{ // { // Name: to.Ptr("fea7a502-9a96-4806-a26f-eee560e52045"), // Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleRequests"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"), // Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RequestType: to.Ptr(armauthorization.RequestTypeSelfActivate), // RequestorID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // 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.910Z"); return t}()), // }, // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // Status: to.Ptr(armauthorization.StatusProvisioned), // TargetRoleAssignmentScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // TicketInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesTicketInfo{ // }, // }, // }}, // } }
Output:
func (*RoleAssignmentScheduleRequestsClient) Validate ¶
func (client *RoleAssignmentScheduleRequestsClient) Validate(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, parameters RoleAssignmentScheduleRequest, options *RoleAssignmentScheduleRequestsClientValidateOptions) (RoleAssignmentScheduleRequestsClientValidateResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentScheduleRequestsClient().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.910Z"); return t }()), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignmentScheduleRequest = armauthorization.RoleAssignmentScheduleRequest{ // Name: to.Ptr("fea7a502-9a96-4806-a26f-eee560e52045"), // Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleRequests"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"), // Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RequestType: to.Ptr(armauthorization.RequestTypeSelfActivate), // RequestorID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // 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.910Z"); return t}()), // }, // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // Status: to.Ptr(armauthorization.StatusProvisioned), // TargetRoleAssignmentScheduleID: to.Ptr("c9e264ff-3133-4776-a81a-ebc7c33c8ec6"), // TicketInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesTicketInfo{ // }, // }, // }
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 { // Role Assignment schedule request 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 { // Role Assignment schedule request 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.NewListForScopePager method.
type RoleAssignmentScheduleRequestsClientListForScopeResponse ¶
type RoleAssignmentScheduleRequestsClientListForScopeResponse struct { // Role assignment schedule request list operation result. RoleAssignmentScheduleRequestListResult }
RoleAssignmentScheduleRequestsClientListForScopeResponse contains the response from method RoleAssignmentScheduleRequestsClient.NewListForScopePager.
type RoleAssignmentScheduleRequestsClientValidateOptions ¶
type RoleAssignmentScheduleRequestsClientValidateOptions struct { }
RoleAssignmentScheduleRequestsClientValidateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Validate method.
type RoleAssignmentScheduleRequestsClientValidateResponse ¶
type RoleAssignmentScheduleRequestsClientValidateResponse struct { // Role Assignment schedule request 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 ¶
func (client *RoleAssignmentSchedulesClient) Get(ctx context.Context, scope string, roleAssignmentScheduleName string, options *RoleAssignmentSchedulesClientGetOptions) (RoleAssignmentSchedulesClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentSchedulesClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignmentSchedule = armauthorization.RoleAssignmentSchedule{ // Name: to.Ptr("c9e264ff-3133-4776-a81a-ebc7c33c8ec6"), // Type: to.Ptr("Microsoft.Authorization/RoleAssignmentSchedules"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6"), // Properties: &armauthorization.RoleAssignmentScheduleProperties{ // AssignmentType: to.Ptr(armauthorization.AssignmentTypeAssigned), // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T05:35:17.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // MemberType: to.Ptr(armauthorization.MemberTypeDirect), // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RoleAssignmentScheduleRequestID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"), // RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // Status: to.Ptr(armauthorization.StatusProvisioned), // UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // }, // }
Output:
func (*RoleAssignmentSchedulesClient) NewListForScopePager ¶
func (client *RoleAssignmentSchedulesClient) NewListForScopePager(scope string, options *RoleAssignmentSchedulesClientListForScopeOptions) *runtime.Pager[RoleAssignmentSchedulesClientListForScopeResponse]
NewListForScopePager - Gets role assignment schedules for a resource scope.
Generated from API version 2020-10-01
- scope - The scope of the role assignments schedules.
- options - RoleAssignmentSchedulesClientListForScopeOptions contains the optional parameters for the RoleAssignmentSchedulesClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleAssignmentSchedulesClient().NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleAssignmentSchedulesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleAssignmentScheduleListResult = armauthorization.RoleAssignmentScheduleListResult{ // Value: []*armauthorization.RoleAssignmentSchedule{ // { // Name: to.Ptr("c9e264ff-3133-4776-a81a-ebc7c33c8ec6"), // Type: to.Ptr("Microsoft.Authorization/RoleAssignmentSchedules"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6"), // Properties: &armauthorization.RoleAssignmentScheduleProperties{ // AssignmentType: to.Ptr(armauthorization.AssignmentTypeAssigned), // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T05:35:17.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // MemberType: to.Ptr(armauthorization.MemberTypeDirect), // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RoleAssignmentScheduleRequestID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"), // RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // Status: to.Ptr(armauthorization.StatusProvisioned), // UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.910Z"); return t}()), // }, // }}, // } }
Output:
type RoleAssignmentSchedulesClientGetOptions ¶
type RoleAssignmentSchedulesClientGetOptions struct { }
RoleAssignmentSchedulesClientGetOptions contains the optional parameters for the RoleAssignmentSchedulesClient.Get method.
type RoleAssignmentSchedulesClientGetResponse ¶
type RoleAssignmentSchedulesClientGetResponse struct { // Role Assignment schedule 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.NewListForScopePager method.
type RoleAssignmentSchedulesClientListForScopeResponse ¶
type RoleAssignmentSchedulesClientListForScopeResponse struct { // Role assignment schedule list operation result. RoleAssignmentScheduleListResult }
RoleAssignmentSchedulesClientListForScopeResponse contains the response from method RoleAssignmentSchedulesClient.NewListForScopePager.
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 ¶
func (client *RoleAssignmentsClient) Create(ctx context.Context, scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters, options *RoleAssignmentsClientCreateOptions) (RoleAssignmentsClientCreateResponse, error)
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 (CreateRoleAssignmentForResource) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignment = armauthorization.RoleAssignment{ // Name: to.Ptr("05c5a614-a7d6-4502-b150-c2fb455033ff"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account"), // }, // }
Output:
Example (CreateRoleAssignmentForResourceGroup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignment = armauthorization.RoleAssignment{ // Name: to.Ptr("05c5a614-a7d6-4502-b150-c2fb455033ff"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg"), // }, // }
Output:
Example (CreateRoleAssignmentForSubscription) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignment = armauthorization.RoleAssignment{ // Name: to.Ptr("05c5a614-a7d6-4502-b150-c2fb455033ff"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }
Output:
func (*RoleAssignmentsClient) CreateByID ¶
func (client *RoleAssignmentsClient) CreateByID(ctx context.Context, roleAssignmentID string, parameters RoleAssignmentCreateParameters, options *RoleAssignmentsClientCreateByIDOptions) (RoleAssignmentsClientCreateByIDResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignment = armauthorization.RoleAssignment{ // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }
Output:
func (*RoleAssignmentsClient) Delete ¶
func (client *RoleAssignmentsClient) Delete(ctx context.Context, scope string, roleAssignmentName string, options *RoleAssignmentsClientDeleteOptions) (RoleAssignmentsClientDeleteResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignment = armauthorization.RoleAssignment{ // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }
Output:
func (*RoleAssignmentsClient) DeleteByID ¶
func (client *RoleAssignmentsClient) DeleteByID(ctx context.Context, roleAssignmentID string, options *RoleAssignmentsClientDeleteByIDOptions) (RoleAssignmentsClientDeleteByIDResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignment = armauthorization.RoleAssignment{ // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }
Output:
func (*RoleAssignmentsClient) Get ¶
func (client *RoleAssignmentsClient) Get(ctx context.Context, scope string, roleAssignmentName string, options *RoleAssignmentsClientGetOptions) (RoleAssignmentsClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignment = armauthorization.RoleAssignment{ // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }
Output:
func (*RoleAssignmentsClient) GetByID ¶
func (client *RoleAssignmentsClient) GetByID(ctx context.Context, roleAssignmentID string, options *RoleAssignmentsClientGetByIDOptions) (RoleAssignmentsClientGetByIDResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleAssignment = armauthorization.RoleAssignment{ // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }
Output:
func (*RoleAssignmentsClient) NewListForResourceGroupPager ¶
func (client *RoleAssignmentsClient) NewListForResourceGroupPager(resourceGroupName string, options *RoleAssignmentsClientListForResourceGroupOptions) *runtime.Pager[RoleAssignmentsClientListForResourceGroupResponse]
NewListForResourceGroupPager - List all role assignments that apply to a resource group.
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.NewListForResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleAssignmentsClient().NewListForResourceGroupPager("testrg", &armauthorization.RoleAssignmentsClientListForResourceGroupOptions{Filter: nil, TenantID: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleAssignmentListResult = armauthorization.RoleAssignmentListResult{ // Value: []*armauthorization.RoleAssignment{ // { // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }, // { // Name: to.Ptr("96786e4b-dede-4c2e-8736-8ab911987f08"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/96786e4b-dede-4c2e-8736-8ab911987f08"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg"), // }, // }}, // } }
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.
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.NewListForResourcePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleAssignmentsClient().NewListForResourcePager("testrg", "Microsoft.DocumentDb", "databaseAccounts", "test-db-account", &armauthorization.RoleAssignmentsClientListForResourceOptions{Filter: nil, TenantID: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleAssignmentListResult = armauthorization.RoleAssignmentListResult{ // Value: []*armauthorization.RoleAssignment{ // { // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }, // { // Name: to.Ptr("96786e4b-dede-4c2e-8736-8ab911987f08"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/96786e4b-dede-4c2e-8736-8ab911987f08"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg"), // }, // }, // { // Name: to.Ptr("05c5a614-a7d6-4502-b150-c2fb455033ff"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account"), // }, // }}, // } }
Output:
func (*RoleAssignmentsClient) NewListForScopePager ¶
func (client *RoleAssignmentsClient) NewListForScopePager(scope string, options *RoleAssignmentsClientListForScopeOptions) *runtime.Pager[RoleAssignmentsClientListForScopeResponse]
NewListForScopePager - List all role assignments that apply to a scope.
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.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleAssignmentsClient().NewListForScopePager("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", &armauthorization.RoleAssignmentsClientListForScopeOptions{Filter: nil, TenantID: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleAssignmentListResult = armauthorization.RoleAssignmentListResult{ // Value: []*armauthorization.RoleAssignment{ // { // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }}, // } }
Output:
func (*RoleAssignmentsClient) NewListForSubscriptionPager ¶
func (client *RoleAssignmentsClient) NewListForSubscriptionPager(options *RoleAssignmentsClientListForSubscriptionOptions) *runtime.Pager[RoleAssignmentsClientListForSubscriptionResponse]
NewListForSubscriptionPager - List all role assignments that apply to a subscription.
Generated from API version 2022-04-01
- options - RoleAssignmentsClientListForSubscriptionOptions contains the optional parameters for the RoleAssignmentsClient.NewListForSubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleAssignmentsClient().NewListForSubscriptionPager(&armauthorization.RoleAssignmentsClientListForSubscriptionOptions{Filter: nil, TenantID: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleAssignmentListResult = armauthorization.RoleAssignmentListResult{ // Value: []*armauthorization.RoleAssignment{ // { // Name: to.Ptr("b0f43c54-e787-4862-89b1-a653fa9cf747"), // Type: to.Ptr("Microsoft.Authorization/roleAssignments"), // ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747"), // 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"), // Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"), // }, // }}, // } }
Output:
type RoleAssignmentsClientCreateByIDOptions ¶
type RoleAssignmentsClientCreateByIDOptions struct { }
RoleAssignmentsClientCreateByIDOptions contains the optional parameters for the RoleAssignmentsClient.CreateByID method.
type RoleAssignmentsClientCreateByIDResponse ¶
type RoleAssignmentsClientCreateByIDResponse struct { // Role Assignments RoleAssignment }
RoleAssignmentsClientCreateByIDResponse contains the response from method RoleAssignmentsClient.CreateByID.
type RoleAssignmentsClientCreateOptions ¶
type RoleAssignmentsClientCreateOptions struct { }
RoleAssignmentsClientCreateOptions contains the optional parameters for the RoleAssignmentsClient.Create method.
type RoleAssignmentsClientCreateResponse ¶
type RoleAssignmentsClientCreateResponse struct { // Role Assignments 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 { // Role Assignments 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 { // Role Assignments 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 { // Role Assignments 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 { // Role Assignments 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.NewListForResourceGroupPager method.
type RoleAssignmentsClientListForResourceGroupResponse ¶
type RoleAssignmentsClientListForResourceGroupResponse struct { // Role assignment list operation result. RoleAssignmentListResult }
RoleAssignmentsClientListForResourceGroupResponse contains the response from method RoleAssignmentsClient.NewListForResourceGroupPager.
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.NewListForResourcePager method.
type RoleAssignmentsClientListForResourceResponse ¶
type RoleAssignmentsClientListForResourceResponse struct { // Role assignment list operation result. RoleAssignmentListResult }
RoleAssignmentsClientListForResourceResponse contains the response from method RoleAssignmentsClient.NewListForResourcePager.
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.NewListForScopePager method.
type RoleAssignmentsClientListForScopeResponse ¶
type RoleAssignmentsClientListForScopeResponse struct { // Role assignment list operation result. RoleAssignmentListResult }
RoleAssignmentsClientListForScopeResponse contains the response from method RoleAssignmentsClient.NewListForScopePager.
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.NewListForSubscriptionPager method.
type RoleAssignmentsClientListForSubscriptionResponse ¶
type RoleAssignmentsClientListForSubscriptionResponse struct { // Role assignment list operation result. RoleAssignmentListResult }
RoleAssignmentsClientListForSubscriptionResponse contains the response from method RoleAssignmentsClient.NewListForSubscriptionPager.
type RoleDefinition ¶
type RoleDefinition struct { // Role definition properties. Properties *RoleDefinitionProperties // READ-ONLY; The role definition ID. ID *string // READ-ONLY; The role definition name. Name *string // READ-ONLY; The role definition type. Type *string }
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 // Returns role definition with the specific type. Type *string }
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 // Role definition list. Value []*RoleDefinition }
RoleDefinitionListResult - Role definition list operation result.
func (RoleDefinitionListResult) MarshalJSON ¶
func (r RoleDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleDefinitionListResult.
func (*RoleDefinitionListResult) UnmarshalJSON ¶
func (r *RoleDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleDefinitionListResult.
type RoleDefinitionProperties ¶
type RoleDefinitionProperties struct { // Role definition assignable scopes. AssignableScopes []*string // The role definition description. Description *string // Role definition permissions. Permissions []*Permission // The role name. RoleName *string // The role type. RoleType *string }
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 ¶
func (client *RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, scope string, roleDefinitionID string, roleDefinition RoleDefinition, options *RoleDefinitionsClientCreateOrUpdateOptions) (RoleDefinitionsClientCreateOrUpdateResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRoleDefinitionsClient().CreateOrUpdate(ctx, "scope", "roleDefinitionId", armauthorization.RoleDefinition{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*RoleDefinitionsClient) Delete ¶
func (client *RoleDefinitionsClient) Delete(ctx context.Context, scope string, roleDefinitionID string, options *RoleDefinitionsClientDeleteOptions) (RoleDefinitionsClientDeleteResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleDefinitionsClient().Delete(ctx, "scope", "roleDefinitionId", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleDefinition = armauthorization.RoleDefinition{ // Name: to.Ptr("roleDefinitionId"), // Type: to.Ptr("Microsoft.Authorization/roleDefinitions"), // ID: to.Ptr("/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId"), // Properties: &armauthorization.RoleDefinitionProperties{ // RoleType: to.Ptr("roletype"), // Description: to.Ptr("Role description"), // AssignableScopes: []*string{ // to.Ptr("/subscriptions/subId")}, // Permissions: []*armauthorization.Permission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // to.Ptr("dataAction")}, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // RoleName: to.Ptr("Role name"), // }, // }
Output:
func (*RoleDefinitionsClient) Get ¶
func (client *RoleDefinitionsClient) Get(ctx context.Context, scope string, roleDefinitionID string, options *RoleDefinitionsClientGetOptions) (RoleDefinitionsClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleDefinitionsClient().Get(ctx, "scope", "roleDefinitionId", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleDefinition = armauthorization.RoleDefinition{ // Name: to.Ptr("roleDefinitionId"), // Type: to.Ptr("Microsoft.Authorization/roleDefinitions"), // ID: to.Ptr("/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId"), // Properties: &armauthorization.RoleDefinitionProperties{ // RoleType: to.Ptr("roletype"), // Description: to.Ptr("Role description"), // AssignableScopes: []*string{ // to.Ptr("/subscriptions/subId")}, // Permissions: []*armauthorization.Permission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // to.Ptr("dataAction")}, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // RoleName: to.Ptr("Role name"), // }, // }
Output:
func (*RoleDefinitionsClient) GetByID ¶
func (client *RoleDefinitionsClient) GetByID(ctx context.Context, roleID string, options *RoleDefinitionsClientGetByIDOptions) (RoleDefinitionsClientGetByIDResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleDefinitionsClient().GetByID(ctx, "roleDefinitionId", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleDefinition = armauthorization.RoleDefinition{ // Name: to.Ptr("roleDefinitionId"), // Type: to.Ptr("Microsoft.Authorization/roleDefinitions"), // ID: to.Ptr("/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId"), // Properties: &armauthorization.RoleDefinitionProperties{ // RoleType: to.Ptr("roletype"), // Description: to.Ptr("Role description"), // AssignableScopes: []*string{ // to.Ptr("/subscriptions/subId")}, // Permissions: []*armauthorization.Permission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // to.Ptr("dataAction")}, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // RoleName: to.Ptr("Role name"), // }, // }
Output:
func (*RoleDefinitionsClient) NewListPager ¶
func (client *RoleDefinitionsClient) NewListPager(scope string, options *RoleDefinitionsClientListOptions) *runtime.Pager[RoleDefinitionsClientListResponse]
NewListPager - Get all role definitions that are applicable at scope and above.
Generated from API version 2022-04-01
- scope - The scope of the role definition.
- options - RoleDefinitionsClientListOptions contains the optional parameters for the RoleDefinitionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleDefinitionsClient().NewListPager("scope", &armauthorization.RoleDefinitionsClientListOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleDefinitionListResult = armauthorization.RoleDefinitionListResult{ // Value: []*armauthorization.RoleDefinition{ // { // Name: to.Ptr("roleDefinitionId"), // Type: to.Ptr("Microsoft.Authorization/roleDefinitions"), // ID: to.Ptr("/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId"), // Properties: &armauthorization.RoleDefinitionProperties{ // RoleType: to.Ptr("roletype"), // Description: to.Ptr("Role description"), // AssignableScopes: []*string{ // to.Ptr("/subscriptions/subId")}, // Permissions: []*armauthorization.Permission{ // { // Actions: []*string{ // to.Ptr("action")}, // DataActions: []*string{ // to.Ptr("dataAction")}, // NotActions: []*string{ // }, // NotDataActions: []*string{ // }, // }}, // RoleName: to.Ptr("Role name"), // }, // }}, // } }
Output:
type RoleDefinitionsClientCreateOrUpdateOptions ¶
type RoleDefinitionsClientCreateOrUpdateOptions struct { }
RoleDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the RoleDefinitionsClient.CreateOrUpdate method.
type RoleDefinitionsClientCreateOrUpdateResponse ¶
type RoleDefinitionsClientCreateOrUpdateResponse struct { // Role definition. 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 { // Role definition. 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 { // Role definition. 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 { // Role definition. 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.NewListPager method.
type RoleDefinitionsClientListResponse ¶
type RoleDefinitionsClientListResponse struct { // Role definition list operation result. RoleDefinitionListResult }
RoleDefinitionsClientListResponse contains the response from method RoleDefinitionsClient.NewListPager.
type RoleEligibilitySchedule ¶
type RoleEligibilitySchedule struct { // role eligibility schedule properties. Properties *RoleEligibilityScheduleProperties // READ-ONLY; The role eligibility schedule Id. ID *string // READ-ONLY; The role eligibility schedule name. Name *string // READ-ONLY; The role eligibility schedule type. Type *string }
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 // Returns role eligibility schedule of the specific role definition. RoleDefinitionID *string // Returns role eligibility schedule of the specific status. Status *string }
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 // READ-ONLY; The role eligibility schedule instance ID. ID *string // READ-ONLY; The role eligibility schedule instance name. Name *string // READ-ONLY; The role eligibility schedule instance type. Type *string }
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 // Returns role eligibility schedule instances of the specific role definition. RoleDefinitionID *string // Returns role eligibility schedule instances belonging to a specific role eligibility schedule. RoleEligibilityScheduleID *string // Returns role eligibility schedule instances of the specific status. Status *string }
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 // Role eligibility schedule instance list. Value []*RoleEligibilityScheduleInstance }
RoleEligibilityScheduleInstanceListResult - Role eligibility schedule instance list operation result.
func (RoleEligibilityScheduleInstanceListResult) MarshalJSON ¶
func (r RoleEligibilityScheduleInstanceListResult) MarshalJSON() ([]byte, error)
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 // Version of the condition. Currently accepted value is '2.0' ConditionVersion *string // DateTime when role eligibility schedule was created CreatedOn *time.Time // The endDateTime of the role eligibility schedule instance EndDateTime *time.Time // Additional properties of principal, scope and role definition ExpandedProperties *ExpandedProperties // Membership type of the role eligibility schedule MemberType *MemberType // The principal ID. PrincipalID *string // The principal type of the assigned principal ID. PrincipalType *PrincipalType // The role definition ID. RoleDefinitionID *string // Id of the master role eligibility schedule RoleEligibilityScheduleID *string // The role eligibility schedule scope. Scope *string // The startDateTime of the role eligibility schedule instance StartDateTime *time.Time // The status of the role eligibility schedule instance Status *Status }
RoleEligibilityScheduleInstanceProperties - Role eligibility schedule properties with scope.
func (RoleEligibilityScheduleInstanceProperties) MarshalJSON ¶
func (r RoleEligibilityScheduleInstanceProperties) MarshalJSON() ([]byte, error)
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 ¶
func (client *RoleEligibilityScheduleInstancesClient) Get(ctx context.Context, scope string, roleEligibilityScheduleInstanceName string, options *RoleEligibilityScheduleInstancesClientGetOptions) (RoleEligibilityScheduleInstancesClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleEligibilityScheduleInstancesClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleEligibilityScheduleInstance = armauthorization.RoleEligibilityScheduleInstance{ // Name: to.Ptr("21e4b59a-0499-4fe0-a3c3-43a3055b773a"), // Type: to.Ptr("Microsoft.Authorization/RoleEligibilityScheduleInstances"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleInstances/21e4b59a-0499-4fe0-a3c3-43a3055b773a"), // Properties: &armauthorization.RoleEligibilityScheduleInstanceProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T00:32:36.860Z"); return t}()), // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T00:31:41.477Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // MemberType: to.Ptr(armauthorization.MemberTypeDirect), // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"), // RoleEligibilityScheduleID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"), // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T00:32:36.860Z"); return t}()), // Status: to.Ptr(armauthorization.StatusProvisioned), // }, // }
Output:
func (*RoleEligibilityScheduleInstancesClient) NewListForScopePager ¶
func (client *RoleEligibilityScheduleInstancesClient) NewListForScopePager(scope string, options *RoleEligibilityScheduleInstancesClientListForScopeOptions) *runtime.Pager[RoleEligibilityScheduleInstancesClientListForScopeResponse]
NewListForScopePager - Gets role eligibility schedule instances of a role eligibility schedule.
Generated from API version 2020-10-01
- scope - The scope of the role eligibility schedule.
- options - RoleEligibilityScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleEligibilityScheduleInstancesClient().NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleEligibilityScheduleInstancesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleEligibilityScheduleInstanceListResult = armauthorization.RoleEligibilityScheduleInstanceListResult{ // Value: []*armauthorization.RoleEligibilityScheduleInstance{ // { // Name: to.Ptr("21e4b59a-0499-4fe0-a3c3-43a3055b773a"), // Type: to.Ptr("Microsoft.Authorization/RoleEligibilityScheduleInstances"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleInstances/21e4b59a-0499-4fe0-a3c3-43a3055b773a"), // Properties: &armauthorization.RoleEligibilityScheduleInstanceProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T00:32:36.860Z"); return t}()), // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T00:31:41.477Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // MemberType: to.Ptr(armauthorization.MemberTypeDirect), // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"), // RoleEligibilityScheduleID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"), // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T00:32:36.860Z"); return t}()), // Status: to.Ptr(armauthorization.StatusProvisioned), // }, // }}, // } }
Output:
type RoleEligibilityScheduleInstancesClientGetOptions ¶
type RoleEligibilityScheduleInstancesClientGetOptions struct { }
RoleEligibilityScheduleInstancesClientGetOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.Get method.
type RoleEligibilityScheduleInstancesClientGetResponse ¶
type RoleEligibilityScheduleInstancesClientGetResponse struct { // Information about current or upcoming role eligibility schedule instance 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.NewListForScopePager method.
type RoleEligibilityScheduleInstancesClientListForScopeResponse ¶
type RoleEligibilityScheduleInstancesClientListForScopeResponse struct { // Role eligibility schedule instance list operation result. RoleEligibilityScheduleInstanceListResult }
RoleEligibilityScheduleInstancesClientListForScopeResponse contains the response from method RoleEligibilityScheduleInstancesClient.NewListForScopePager.
type RoleEligibilityScheduleListResult ¶
type RoleEligibilityScheduleListResult struct { // The URL to use for getting the next set of results. NextLink *string // role eligibility schedule list. Value []*RoleEligibilitySchedule }
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 // Version of the condition. Currently accepted value is '2.0' ConditionVersion *string // DateTime when role eligibility schedule was created CreatedOn *time.Time // End DateTime when role eligibility schedule EndDateTime *time.Time // Additional properties of principal, scope and role definition ExpandedProperties *ExpandedProperties // Membership type of the role eligibility schedule MemberType *MemberType // The principal ID. PrincipalID *string // The principal type of the assigned principal ID. PrincipalType *PrincipalType // The role definition ID. RoleDefinitionID *string // The id of roleEligibilityScheduleRequest used to create this roleAssignmentSchedule RoleEligibilityScheduleRequestID *string // The role eligibility schedule scope. Scope *string // Start DateTime when role eligibility schedule StartDateTime *time.Time // The status of the role eligibility schedule. Status *Status // DateTime when role eligibility schedule was modified UpdatedOn *time.Time }
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 // READ-ONLY; The role eligibility schedule request ID. ID *string // READ-ONLY; The role eligibility schedule request name. Name *string // READ-ONLY; The role eligibility schedule request type. Type *string }
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 // Returns role eligibility requests created by specific principal. RequestorID *string // Returns role eligibility requests of the specific role definition. RoleDefinitionID *string // Returns role eligibility requests of specific status. Status *string }
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 // Role eligibility schedule request list. Value []*RoleEligibilityScheduleRequest }
RoleEligibilityScheduleRequestListResult - Role eligibility schedule request list operation result.
func (RoleEligibilityScheduleRequestListResult) MarshalJSON ¶
func (r RoleEligibilityScheduleRequestListResult) MarshalJSON() ([]byte, error)
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 // REQUIRED; The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc RequestType *RequestType // REQUIRED; The role definition ID. RoleDefinitionID *string // 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 // Version of the condition. Currently accepted value is '2.0' ConditionVersion *string // Justification for the role eligibility Justification *string // Schedule info of the role eligibility schedule ScheduleInfo *RoleEligibilityScheduleRequestPropertiesScheduleInfo // The resultant role eligibility schedule id or the role eligibility schedule id being updated TargetRoleEligibilityScheduleID *string // The role eligibility schedule instance id being updated TargetRoleEligibilityScheduleInstanceID *string // Ticket Info of the role eligibility TicketInfo *RoleEligibilityScheduleRequestPropertiesTicketInfo // READ-ONLY; The approvalId of the role eligibility schedule request. ApprovalID *string // READ-ONLY; DateTime when role eligibility schedule request was created CreatedOn *time.Time // READ-ONLY; Additional properties of principal, scope and role definition ExpandedProperties *ExpandedProperties // READ-ONLY; The principal type of the assigned principal ID. PrincipalType *PrincipalType // READ-ONLY; Id of the user who created this request RequestorID *string // READ-ONLY; The role eligibility schedule request scope. Scope *string // READ-ONLY; The status of the role eligibility schedule request. Status *Status }
RoleEligibilityScheduleRequestProperties - Role eligibility schedule request properties with scope.
func (RoleEligibilityScheduleRequestProperties) MarshalJSON ¶
func (r RoleEligibilityScheduleRequestProperties) MarshalJSON() ([]byte, error)
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 // Start DateTime of the role eligibility schedule. StartDateTime *time.Time }
RoleEligibilityScheduleRequestPropertiesScheduleInfo - Schedule info of the role eligibility schedule
func (RoleEligibilityScheduleRequestPropertiesScheduleInfo) MarshalJSON ¶
func (r RoleEligibilityScheduleRequestPropertiesScheduleInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestPropertiesScheduleInfo.
func (*RoleEligibilityScheduleRequestPropertiesScheduleInfo) UnmarshalJSON ¶
func (r *RoleEligibilityScheduleRequestPropertiesScheduleInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequestPropertiesScheduleInfo.
type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration ¶
type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration struct { // Duration of the role eligibility schedule in TimeSpan. Duration *string // End DateTime of the role eligibility schedule. EndDateTime *time.Time // Type of the role eligibility schedule expiration Type *Type }
RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration - Expiration of the role eligibility schedule
func (RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration) MarshalJSON ¶
func (r RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration.
func (*RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration) UnmarshalJSON ¶
func (r *RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration.
type RoleEligibilityScheduleRequestPropertiesTicketInfo ¶
type RoleEligibilityScheduleRequestPropertiesTicketInfo struct { // Ticket number for the role eligibility TicketNumber *string // Ticket system name for the role eligibility TicketSystem *string }
RoleEligibilityScheduleRequestPropertiesTicketInfo - Ticket Info of the role eligibility
func (RoleEligibilityScheduleRequestPropertiesTicketInfo) MarshalJSON ¶
func (r RoleEligibilityScheduleRequestPropertiesTicketInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleEligibilityScheduleRequestPropertiesTicketInfo.
func (*RoleEligibilityScheduleRequestPropertiesTicketInfo) UnmarshalJSON ¶
func (r *RoleEligibilityScheduleRequestPropertiesTicketInfo) UnmarshalJSON(data []byte) error
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 ¶
func (client *RoleEligibilityScheduleRequestsClient) Cancel(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, options *RoleEligibilityScheduleRequestsClientCancelOptions) (RoleEligibilityScheduleRequestsClientCancelResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRoleEligibilityScheduleRequestsClient().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 ¶
func (client *RoleEligibilityScheduleRequestsClient) Create(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, parameters RoleEligibilityScheduleRequest, options *RoleEligibilityScheduleRequestsClientCreateOptions) (RoleEligibilityScheduleRequestsClientCreateResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRoleEligibilityScheduleRequestsClient().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.910Z"); return t }()), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*RoleEligibilityScheduleRequestsClient) Get ¶
func (client *RoleEligibilityScheduleRequestsClient) Get(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, options *RoleEligibilityScheduleRequestsClientGetOptions) (RoleEligibilityScheduleRequestsClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleEligibilityScheduleRequestsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleEligibilityScheduleRequest = armauthorization.RoleEligibilityScheduleRequest{ // Name: to.Ptr("64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Type: to.Ptr("Microsoft.Authorization/RoleEligibilityRequests"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:32:27.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RequestType: to.Ptr(armauthorization.RequestTypeAdminAssign), // RequestorID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // 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.910Z"); return t}()), // }, // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // Status: to.Ptr(armauthorization.StatusProvisioned), // TargetRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // TicketInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesTicketInfo{ // }, // }, // }
Output:
func (*RoleEligibilityScheduleRequestsClient) NewListForScopePager ¶
func (client *RoleEligibilityScheduleRequestsClient) NewListForScopePager(scope string, options *RoleEligibilityScheduleRequestsClientListForScopeOptions) *runtime.Pager[RoleEligibilityScheduleRequestsClientListForScopeResponse]
NewListForScopePager - Gets role eligibility schedule requests for a scope.
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.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleEligibilityScheduleRequestsClient().NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleEligibilityScheduleRequestsClientListForScopeOptions{Filter: to.Ptr("assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleEligibilityScheduleRequestListResult = armauthorization.RoleEligibilityScheduleRequestListResult{ // Value: []*armauthorization.RoleEligibilityScheduleRequest{ // { // Name: to.Ptr("64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Type: to.Ptr("Microsoft.Authorization/RoleEligibilityRequests"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:32:27.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RequestType: to.Ptr(armauthorization.RequestTypeAdminAssign), // RequestorID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // 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.910Z"); return t}()), // }, // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // Status: to.Ptr(armauthorization.StatusProvisioned), // TargetRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // TicketInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesTicketInfo{ // }, // }, // }}, // } }
Output:
func (*RoleEligibilityScheduleRequestsClient) Validate ¶
func (client *RoleEligibilityScheduleRequestsClient) Validate(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, parameters RoleEligibilityScheduleRequest, options *RoleEligibilityScheduleRequestsClientValidateOptions) (RoleEligibilityScheduleRequestsClientValidateResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleEligibilityScheduleRequestsClient().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.910Z"); return t }()), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleEligibilityScheduleRequest = armauthorization.RoleEligibilityScheduleRequest{ // Name: to.Ptr("64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Type: to.Ptr("Microsoft.Authorization/RoleEligibilityScheduleRequests"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:32:27.910Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RequestType: to.Ptr(armauthorization.RequestTypeAdminAssign), // RequestorID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // 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.910Z"); return t}()), // }, // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // Status: to.Ptr(armauthorization.StatusProvisioned), // TargetRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // TicketInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesTicketInfo{ // }, // }, // }
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 { // Role Eligibility schedule request 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 { // Role Eligibility schedule request 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.NewListForScopePager method.
type RoleEligibilityScheduleRequestsClientListForScopeResponse ¶
type RoleEligibilityScheduleRequestsClientListForScopeResponse struct { // Role eligibility schedule request list operation result. RoleEligibilityScheduleRequestListResult }
RoleEligibilityScheduleRequestsClientListForScopeResponse contains the response from method RoleEligibilityScheduleRequestsClient.NewListForScopePager.
type RoleEligibilityScheduleRequestsClientValidateOptions ¶
type RoleEligibilityScheduleRequestsClientValidateOptions struct { }
RoleEligibilityScheduleRequestsClientValidateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Validate method.
type RoleEligibilityScheduleRequestsClientValidateResponse ¶
type RoleEligibilityScheduleRequestsClientValidateResponse struct { // Role Eligibility schedule request 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 ¶
func (client *RoleEligibilitySchedulesClient) Get(ctx context.Context, scope string, roleEligibilityScheduleName string, options *RoleEligibilitySchedulesClientGetOptions) (RoleEligibilitySchedulesClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleEligibilitySchedulesClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleEligibilitySchedule = armauthorization.RoleEligibilitySchedule{ // Name: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // Type: to.Ptr("Microsoft.Authorization/RoleEligibilitySchedules"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"), // Properties: &armauthorization.RoleEligibilityScheduleProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:33:06.300Z"); return t}()), // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-09T21:32:28.490Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // MemberType: to.Ptr(armauthorization.MemberTypeDirect), // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"), // RoleEligibilityScheduleRequestID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:33:14.557Z"); return t}()), // Status: to.Ptr(armauthorization.StatusProvisioned), // UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T22:27:00.513Z"); return t}()), // }, // }
Output:
func (*RoleEligibilitySchedulesClient) NewListForScopePager ¶
func (client *RoleEligibilitySchedulesClient) NewListForScopePager(scope string, options *RoleEligibilitySchedulesClientListForScopeOptions) *runtime.Pager[RoleEligibilitySchedulesClientListForScopeResponse]
NewListForScopePager - Gets role eligibility schedules for a resource scope.
Generated from API version 2020-10-01
- scope - The scope of the role eligibility schedules.
- options - RoleEligibilitySchedulesClientListForScopeOptions contains the optional parameters for the RoleEligibilitySchedulesClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleEligibilitySchedulesClient().NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", &armauthorization.RoleEligibilitySchedulesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleEligibilityScheduleListResult = armauthorization.RoleEligibilityScheduleListResult{ // Value: []*armauthorization.RoleEligibilitySchedule{ // { // Name: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"), // Type: to.Ptr("Microsoft.Authorization/RoleEligibilitySchedules"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"), // Properties: &armauthorization.RoleEligibilityScheduleProperties{ // Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"), // ConditionVersion: to.Ptr("1.0"), // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:33:06.300Z"); return t}()), // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-09T21:32:28.490Z"); return t}()), // ExpandedProperties: &armauthorization.ExpandedProperties{ // Principal: &armauthorization.ExpandedPropertiesPrincipal{ // Type: to.Ptr("User"), // DisplayName: to.Ptr("User Account"), // Email: to.Ptr("user@my-tenant.com"), // ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // }, // RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("Contributor"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"), // }, // Scope: &armauthorization.ExpandedPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // MemberType: to.Ptr(armauthorization.MemberTypeDirect), // PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"), // PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser), // RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"), // RoleEligibilityScheduleRequestID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:33:14.557Z"); return t}()), // Status: to.Ptr(armauthorization.StatusProvisioned), // UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T22:27:00.513Z"); return t}()), // }, // }}, // } }
Output:
type RoleEligibilitySchedulesClientGetOptions ¶
type RoleEligibilitySchedulesClientGetOptions struct { }
RoleEligibilitySchedulesClientGetOptions contains the optional parameters for the RoleEligibilitySchedulesClient.Get method.
type RoleEligibilitySchedulesClientGetResponse ¶
type RoleEligibilitySchedulesClientGetResponse struct { // Role eligibility schedule 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.NewListForScopePager method.
type RoleEligibilitySchedulesClientListForScopeResponse ¶
type RoleEligibilitySchedulesClientListForScopeResponse struct { // role eligibility schedule list operation result. RoleEligibilityScheduleListResult }
RoleEligibilitySchedulesClientListForScopeResponse contains the response from method RoleEligibilitySchedulesClient.NewListForScopePager.
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 ¶
func (client *RoleManagementPoliciesClient) Delete(ctx context.Context, scope string, roleManagementPolicyName string, options *RoleManagementPoliciesClientDeleteOptions) (RoleManagementPoliciesClientDeleteResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRoleManagementPoliciesClient().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 ¶
func (client *RoleManagementPoliciesClient) Get(ctx context.Context, scope string, roleManagementPolicyName string, options *RoleManagementPoliciesClientGetOptions) (RoleManagementPoliciesClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleManagementPoliciesClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleManagementPolicy = armauthorization.RoleManagementPolicy{ // Name: to.Ptr("570c3619-7688-4b34-b290-2b8bb3ccab2a"), // Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicies"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a"), // Properties: &armauthorization.RoleManagementPolicyProperties{ // EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{ // &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_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(true), // MaximumDuration: to.Ptr("P90D"), // }, // &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_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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification)}, // }, // &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.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.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.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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification), // to.Ptr(armauthorization.EnablementRulesTicketing)}, // }, // &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.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), // }}, // IsOrganizationDefault: to.Ptr(false), // LastModifiedBy: &armauthorization.Principal{ // DisplayName: to.Ptr("Admin"), // }, // LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-17T02:54:27.167Z"); return t}()), // PolicyProperties: &armauthorization.PolicyProperties{ // Scope: &armauthorization.PolicyPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }, // Rules: []armauthorization.RoleManagementPolicyRuleClassification{ // &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_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(true), // MaximumDuration: to.Ptr("P90D"), // }, // &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_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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification)}, // }, // &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.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.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.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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification), // to.Ptr(armauthorization.EnablementRulesTicketing)}, // }, // &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.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), // }}, // Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }
Output:
func (*RoleManagementPoliciesClient) NewListForScopePager ¶
func (client *RoleManagementPoliciesClient) NewListForScopePager(scope string, options *RoleManagementPoliciesClientListForScopeOptions) *runtime.Pager[RoleManagementPoliciesClientListForScopeResponse]
NewListForScopePager - Gets role management policies for a resource scope.
Generated from API version 2020-10-01
- scope - The scope of the role management policy.
- options - RoleManagementPoliciesClientListForScopeOptions contains the optional parameters for the RoleManagementPoliciesClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleManagementPoliciesClient().NewListForScopePager("providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleManagementPolicyListResult = armauthorization.RoleManagementPolicyListResult{ // Value: []*armauthorization.RoleManagementPolicy{ // { // Name: to.Ptr("570c3619-7688-4b34-b290-2b8bb3ccab2a"), // Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicies"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a"), // Properties: &armauthorization.RoleManagementPolicyProperties{ // EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{ // &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_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(true), // MaximumDuration: to.Ptr("P90D"), // }, // &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_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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification)}, // }, // &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.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.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.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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification), // to.Ptr(armauthorization.EnablementRulesTicketing)}, // }, // &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.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), // }}, // IsOrganizationDefault: to.Ptr(false), // LastModifiedBy: &armauthorization.Principal{ // DisplayName: to.Ptr("Admin"), // }, // LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-17T02:54:27.167Z"); return t}()), // PolicyProperties: &armauthorization.PolicyProperties{ // Scope: &armauthorization.PolicyPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }, // Rules: []armauthorization.RoleManagementPolicyRuleClassification{ // &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_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(true), // MaximumDuration: to.Ptr("P90D"), // }, // &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_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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification)}, // }, // &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.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.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.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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification), // to.Ptr(armauthorization.EnablementRulesTicketing)}, // }, // &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.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), // }}, // Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }}, // } }
Output:
func (*RoleManagementPoliciesClient) Update ¶
func (client *RoleManagementPoliciesClient) Update(ctx context.Context, scope string, roleManagementPolicyName string, parameters RoleManagementPolicy, options *RoleManagementPoliciesClientUpdateOptions) (RoleManagementPoliciesClientUpdateResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleManagementPoliciesClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleManagementPolicy = armauthorization.RoleManagementPolicy{ // Name: to.Ptr("570c3619-7688-4b34-b290-2b8bb3ccab2a"), // Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicies"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a"), // Properties: &armauthorization.RoleManagementPolicyProperties{ // EffectiveRules: []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), // }}, // IsOrganizationDefault: to.Ptr(false), // LastModifiedBy: &armauthorization.Principal{ // DisplayName: to.Ptr("Admin"), // }, // LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-17T16:35:27.910Z"); return t}()), // PolicyProperties: &armauthorization.PolicyProperties{ // Scope: &armauthorization.PolicyPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }, // 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), // }}, // Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }
Output:
Example (PatchRoleManagementPolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleManagementPoliciesClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleManagementPolicy = armauthorization.RoleManagementPolicy{ // Name: to.Ptr("570c3619-7688-4b34-b290-2b8bb3ccab2a"), // Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicies"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a"), // Properties: &armauthorization.RoleManagementPolicyProperties{ // EffectiveRules: []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), // }}, // IsOrganizationDefault: to.Ptr(false), // LastModifiedBy: &armauthorization.Principal{ // DisplayName: to.Ptr("Admin"), // }, // LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-03-17T16:35:27.910Z"); return t}()), // PolicyProperties: &armauthorization.PolicyProperties{ // Scope: &armauthorization.PolicyPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }, // 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), // }}, // Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }
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 { // Role management policy RoleManagementPolicy }
RoleManagementPoliciesClientGetResponse contains the response from method RoleManagementPoliciesClient.Get.
type RoleManagementPoliciesClientListForScopeOptions ¶
type RoleManagementPoliciesClientListForScopeOptions struct { }
RoleManagementPoliciesClientListForScopeOptions contains the optional parameters for the RoleManagementPoliciesClient.NewListForScopePager method.
type RoleManagementPoliciesClientListForScopeResponse ¶
type RoleManagementPoliciesClientListForScopeResponse struct { // Role management policy list operation result. RoleManagementPolicyListResult }
RoleManagementPoliciesClientListForScopeResponse contains the response from method RoleManagementPoliciesClient.NewListForScopePager.
type RoleManagementPoliciesClientUpdateOptions ¶
type RoleManagementPoliciesClientUpdateOptions struct { }
RoleManagementPoliciesClientUpdateOptions contains the optional parameters for the RoleManagementPoliciesClient.Update method.
type RoleManagementPoliciesClientUpdateResponse ¶
type RoleManagementPoliciesClientUpdateResponse struct { // Role management policy RoleManagementPolicy }
RoleManagementPoliciesClientUpdateResponse contains the response from method RoleManagementPoliciesClient.Update.
type RoleManagementPolicy ¶
type RoleManagementPolicy struct { // Role management policy properties. Properties *RoleManagementPolicyProperties // READ-ONLY; The role management policy Id. ID *string // READ-ONLY; The role management policy name. Name *string // READ-ONLY; The role management policy type. Type *string }
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 // The id of the rule. ID *string // The approval setting Setting *ApprovalSettings // The target of the current rule. Target *RoleManagementPolicyRuleTarget }
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 // READ-ONLY; The role management policy Id. ID *string // READ-ONLY; The role management policy name. Name *string // READ-ONLY; The role management policy type. Type *string }
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 // Role management policy assignment list. Value []*RoleManagementPolicyAssignment }
RoleManagementPolicyAssignmentListResult - Role management policy assignment list operation result.
func (RoleManagementPolicyAssignmentListResult) MarshalJSON ¶
func (r RoleManagementPolicyAssignmentListResult) MarshalJSON() ([]byte, error)
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 // The role definition of management policy assignment. RoleDefinitionID *string // The role management policy scope. Scope *string // READ-ONLY; The readonly computed rule applied to the policy. EffectiveRules []RoleManagementPolicyRuleClassification // READ-ONLY; Additional properties of scope, role definition and policy PolicyAssignmentProperties *PolicyAssignmentProperties }
RoleManagementPolicyAssignmentProperties - Role management policy assignment properties with scope.
func (RoleManagementPolicyAssignmentProperties) MarshalJSON ¶
func (r RoleManagementPolicyAssignmentProperties) MarshalJSON() ([]byte, error)
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 ¶
func (client *RoleManagementPolicyAssignmentsClient) Create(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, parameters RoleManagementPolicyAssignment, options *RoleManagementPolicyAssignmentsClientCreateOptions) (RoleManagementPolicyAssignmentsClientCreateResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRoleManagementPolicyAssignmentsClient().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 ¶
func (client *RoleManagementPolicyAssignmentsClient) Delete(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, options *RoleManagementPolicyAssignmentsClientDeleteOptions) (RoleManagementPolicyAssignmentsClientDeleteResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRoleManagementPolicyAssignmentsClient().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 ¶
func (client *RoleManagementPolicyAssignmentsClient) Get(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, options *RoleManagementPolicyAssignmentsClientGetOptions) (RoleManagementPolicyAssignmentsClientGetResponse, error)
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/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRoleManagementPolicyAssignmentsClient().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) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RoleManagementPolicyAssignment = armauthorization.RoleManagementPolicyAssignment{ // Name: to.Ptr("b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"), // Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicyAssignment"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"), // Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{ // EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{ // &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_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(true), // MaximumDuration: to.Ptr("P90D"), // }, // &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_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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification)}, // }, // &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.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.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.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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification), // to.Ptr(armauthorization.EnablementRulesTicketing)}, // }, // &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.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), // }}, // PolicyAssignmentProperties: &armauthorization.PolicyAssignmentProperties{ // Policy: &armauthorization.PolicyAssignmentPropertiesPolicy{ // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"), // LastModifiedBy: &armauthorization.Principal{ // DisplayName: to.Ptr("Admin"), // }, // }, // RoleDefinition: &armauthorization.PolicyAssignmentPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("FHIR Data Converter"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"), // }, // Scope: &armauthorization.PolicyAssignmentPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }, // 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"), // }, // }
Output:
func (*RoleManagementPolicyAssignmentsClient) NewListForScopePager ¶
func (client *RoleManagementPolicyAssignmentsClient) NewListForScopePager(scope string, options *RoleManagementPolicyAssignmentsClientListForScopeOptions) *runtime.Pager[RoleManagementPolicyAssignmentsClientListForScopeResponse]
NewListForScopePager - Gets role management assignment policies for a resource scope.
Generated from API version 2020-10-01
- scope - The scope of the role management policy.
- options - RoleManagementPolicyAssignmentsClientListForScopeOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/53b1affe357b3bfbb53721d0a2002382a046d3b0/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() clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRoleManagementPolicyAssignmentsClient().NewListForScopePager("providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RoleManagementPolicyAssignmentListResult = armauthorization.RoleManagementPolicyAssignmentListResult{ // Value: []*armauthorization.RoleManagementPolicyAssignment{ // { // Name: to.Ptr("b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"), // Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicyAssignment"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"), // Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{ // EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{ // &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_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(true), // MaximumDuration: to.Ptr("P90D"), // }, // &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_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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification)}, // }, // &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.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.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.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.EnablementRulesMultiFactorAuthentication), // to.Ptr(armauthorization.EnablementRulesJustification), // to.Ptr(armauthorization.EnablementRulesTicketing)}, // }, // &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.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), // }}, // PolicyAssignmentProperties: &armauthorization.PolicyAssignmentProperties{ // Policy: &armauthorization.PolicyAssignmentPropertiesPolicy{ // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"), // LastModifiedBy: &armauthorization.Principal{ // DisplayName: to.Ptr("Admin"), // }, // }, // RoleDefinition: &armauthorization.PolicyAssignmentPropertiesRoleDefinition{ // Type: to.Ptr("BuiltInRole"), // DisplayName: to.Ptr("FHIR Data Converter"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"), // }, // Scope: &armauthorization.PolicyAssignmentPropertiesScope{ // Type: to.Ptr("subscription"), // DisplayName: to.Ptr("Pay-As-You-Go"), // ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"), // }, // }, // 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"), // }, // }}, // } }
Output:
type RoleManagementPolicyAssignmentsClientCreateOptions ¶
type RoleManagementPolicyAssignmentsClientCreateOptions struct { }
RoleManagementPolicyAssignmentsClientCreateOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Create method.
type RoleManagementPolicyAssignmentsClientCreateResponse ¶
type RoleManagementPolicyAssignmentsClientCreateResponse struct { // Role management policy 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 { // Role management policy RoleManagementPolicyAssignment }
RoleManagementPolicyAssignmentsClientGetResponse contains the response from method RoleManagementPolicyAssignmentsClient.Get.
type RoleManagementPolicyAssignmentsClientListForScopeOptions ¶
type RoleManagementPolicyAssignmentsClientListForScopeOptions struct { }
RoleManagementPolicyAssignmentsClientListForScopeOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.NewListForScopePager method.
type RoleManagementPolicyAssignmentsClientListForScopeResponse ¶
type RoleManagementPolicyAssignmentsClientListForScopeResponse struct { // Role management policy assignment list operation result. RoleManagementPolicyAssignmentListResult }
RoleManagementPolicyAssignmentsClientListForScopeResponse contains the response from method RoleManagementPolicyAssignmentsClient.NewListForScopePager.
type RoleManagementPolicyAuthenticationContextRule ¶
type RoleManagementPolicyAuthenticationContextRule struct { // REQUIRED; The type of rule RuleType *RoleManagementPolicyRuleType // The claim value. ClaimValue *string // The id of the rule. ID *string // The value indicating if rule is enabled. IsEnabled *bool // The target of the current rule. Target *RoleManagementPolicyRuleTarget }
RoleManagementPolicyAuthenticationContextRule - The role management policy authentication context rule.
func (*RoleManagementPolicyAuthenticationContextRule) GetRoleManagementPolicyRule ¶
func (r *RoleManagementPolicyAuthenticationContextRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule
GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyAuthenticationContextRule.
func (RoleManagementPolicyAuthenticationContextRule) MarshalJSON ¶
func (r RoleManagementPolicyAuthenticationContextRule) MarshalJSON() ([]byte, error)
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 // The list of enabled rules. EnabledRules []*EnablementRules // The id of the rule. ID *string // The target of the current rule. Target *RoleManagementPolicyRuleTarget }
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 // The id of the rule. ID *string // The value indicating whether expiration is required. IsExpirationRequired *bool // The maximum duration of expiration in timespan. MaximumDuration *string // The target of the current rule. Target *RoleManagementPolicyRuleTarget }
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 // Role management policy list. Value []*RoleManagementPolicy }
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 // The id of the rule. ID *string // Determines if the notification will be sent to the recipient type specified in the policy rule. IsDefaultRecipientsEnabled *bool // The notification level. NotificationLevel *NotificationLevel // The list of notification recipients. NotificationRecipients []*string // The type of notification. NotificationType *NotificationDeliveryMechanism // The recipient type. RecipientType *RecipientType // The target of the current rule. Target *RoleManagementPolicyRuleTarget }
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 // The role management policy display name. DisplayName *string // The role management policy is default policy. IsOrganizationDefault *bool // The rule applied to the policy. Rules []RoleManagementPolicyRuleClassification // The role management policy scope. Scope *string // READ-ONLY; The readonly computed rule applied to the policy. EffectiveRules []RoleManagementPolicyRuleClassification // READ-ONLY; The name of the entity last modified it LastModifiedBy *Principal // READ-ONLY; The last modified date time. LastModifiedDateTime *time.Time // READ-ONLY; Additional properties of scope PolicyProperties *PolicyProperties }
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 // The id of the rule. ID *string // The target of the current rule. Target *RoleManagementPolicyRuleTarget }
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 // The list of enforced settings. EnforcedSettings []*string // The list of inheritable settings. InheritableSettings []*string // The assignment level to which rule is applied. Level *string // The type of operation. Operations []*string // The list of target objects. TargetObjects []*string }
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
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 // The object id of the user. ID *string // The value indicating whether the user is a backup fallback approver IsBackup *bool // The type of user. UserType *UserType }
UserSet - The detail of a user.
func (UserSet) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type UserSet.
func (*UserSet) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type UserSet.
type UserType ¶
type UserType string
UserType - The type of 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 // READ-ONLY; Whether or not validation succeeded IsValid *bool }
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 // READ-ONLY; Message indicating why validation failed Message *string }
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.
Source Files
¶
- build.go
- classicadministrators_client.go
- client_factory.go
- constants.go
- denyassignments_client.go
- eligiblechildresources_client.go
- globaladministrator_client.go
- interfaces.go
- models.go
- models_serde.go
- options.go
- permissions_client.go
- polymorphic_helpers.go
- provideroperationsmetadata_client.go
- response_types.go
- roleassignments_client.go
- roleassignmentscheduleinstances_client.go
- roleassignmentschedulerequests_client.go
- roleassignmentschedules_client.go
- roledefinitions_client.go
- roleeligibilityscheduleinstances_client.go
- roleeligibilityschedulerequests_client.go
- roleeligibilityschedules_client.go
- rolemanagementpolicies_client.go
- rolemanagementpolicyassignments_client.go
- time_rfc3339.go