Documentation ¶
Index ¶
- type AccessRecommendationType
- type AccessReviewActorIdentity
- type AccessReviewActorIdentityType
- type AccessReviewApplyResult
- type AccessReviewContactedReviewer
- type AccessReviewContactedReviewerListResult
- type AccessReviewContactedReviewerProperties
- type AccessReviewDecision
- type AccessReviewDecisionIdentity
- type AccessReviewDecisionIdentityClassification
- type AccessReviewDecisionInsight
- type AccessReviewDecisionInsightProperties
- type AccessReviewDecisionInsightPropertiesClassification
- type AccessReviewDecisionInsightType
- type AccessReviewDecisionListResult
- type AccessReviewDecisionPrincipalResourceMembership
- type AccessReviewDecisionPrincipalResourceMembershipType
- type AccessReviewDecisionProperties
- type AccessReviewDecisionResource
- type AccessReviewDecisionServicePrincipalIdentity
- type AccessReviewDecisionUserIdentity
- type AccessReviewDecisionUserSignInInsightProperties
- func (a *AccessReviewDecisionUserSignInInsightProperties) GetAccessReviewDecisionInsightProperties() *AccessReviewDecisionInsightProperties
- func (a AccessReviewDecisionUserSignInInsightProperties) MarshalJSON() ([]byte, error)
- func (a *AccessReviewDecisionUserSignInInsightProperties) UnmarshalJSON(data []byte) error
- type AccessReviewDefaultSettings
- type AccessReviewDefaultSettingsClient
- func (client *AccessReviewDefaultSettingsClient) Get(ctx context.Context, options *AccessReviewDefaultSettingsClientGetOptions) (AccessReviewDefaultSettingsClientGetResponse, error)
- func (client *AccessReviewDefaultSettingsClient) Put(ctx context.Context, properties AccessReviewScheduleSettings, ...) (AccessReviewDefaultSettingsClientPutResponse, error)
- type AccessReviewDefaultSettingsClientGetOptions
- type AccessReviewDefaultSettingsClientGetResponse
- type AccessReviewDefaultSettingsClientPutOptions
- type AccessReviewDefaultSettingsClientPutResponse
- type AccessReviewHistoryDefinition
- type AccessReviewHistoryDefinitionClient
- func (client *AccessReviewHistoryDefinitionClient) Create(ctx context.Context, historyDefinitionID string, ...) (AccessReviewHistoryDefinitionClientCreateResponse, error)
- func (client *AccessReviewHistoryDefinitionClient) DeleteByID(ctx context.Context, historyDefinitionID string, ...) (AccessReviewHistoryDefinitionClientDeleteByIDResponse, error)
- type AccessReviewHistoryDefinitionClientCreateOptions
- type AccessReviewHistoryDefinitionClientCreateResponse
- type AccessReviewHistoryDefinitionClientDeleteByIDOptions
- type AccessReviewHistoryDefinitionClientDeleteByIDResponse
- type AccessReviewHistoryDefinitionInstanceClient
- type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions
- type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse
- type AccessReviewHistoryDefinitionInstanceListResult
- type AccessReviewHistoryDefinitionInstancesClient
- type AccessReviewHistoryDefinitionInstancesClientListOptions
- type AccessReviewHistoryDefinitionInstancesClientListResponse
- type AccessReviewHistoryDefinitionListResult
- type AccessReviewHistoryDefinitionProperties
- type AccessReviewHistoryDefinitionStatus
- type AccessReviewHistoryDefinitionsClient
- func (client *AccessReviewHistoryDefinitionsClient) GetByID(ctx context.Context, historyDefinitionID string, ...) (AccessReviewHistoryDefinitionsClientGetByIDResponse, error)
- func (client *AccessReviewHistoryDefinitionsClient) NewListPager(options *AccessReviewHistoryDefinitionsClientListOptions) *runtime.Pager[AccessReviewHistoryDefinitionsClientListResponse]
- type AccessReviewHistoryDefinitionsClientGetByIDOptions
- type AccessReviewHistoryDefinitionsClientGetByIDResponse
- type AccessReviewHistoryDefinitionsClientListOptions
- type AccessReviewHistoryDefinitionsClientListResponse
- type AccessReviewHistoryInstance
- type AccessReviewHistoryInstanceProperties
- type AccessReviewHistoryScheduleSettings
- type AccessReviewInstance
- type AccessReviewInstanceClient
- func (client *AccessReviewInstanceClient) AcceptRecommendations(ctx context.Context, scheduleDefinitionID string, id string, ...) (AccessReviewInstanceClientAcceptRecommendationsResponse, error)
- func (client *AccessReviewInstanceClient) ApplyDecisions(ctx context.Context, scheduleDefinitionID string, id string, ...) (AccessReviewInstanceClientApplyDecisionsResponse, error)
- func (client *AccessReviewInstanceClient) ResetDecisions(ctx context.Context, scheduleDefinitionID string, id string, ...) (AccessReviewInstanceClientResetDecisionsResponse, error)
- func (client *AccessReviewInstanceClient) SendReminders(ctx context.Context, scheduleDefinitionID string, id string, ...) (AccessReviewInstanceClientSendRemindersResponse, error)
- func (client *AccessReviewInstanceClient) Stop(ctx context.Context, scheduleDefinitionID string, id string, ...) (AccessReviewInstanceClientStopResponse, error)
- type AccessReviewInstanceClientAcceptRecommendationsOptions
- type AccessReviewInstanceClientAcceptRecommendationsResponse
- type AccessReviewInstanceClientApplyDecisionsOptions
- type AccessReviewInstanceClientApplyDecisionsResponse
- type AccessReviewInstanceClientResetDecisionsOptions
- type AccessReviewInstanceClientResetDecisionsResponse
- type AccessReviewInstanceClientSendRemindersOptions
- type AccessReviewInstanceClientSendRemindersResponse
- type AccessReviewInstanceClientStopOptions
- type AccessReviewInstanceClientStopResponse
- type AccessReviewInstanceContactedReviewersClient
- type AccessReviewInstanceContactedReviewersClientListOptions
- type AccessReviewInstanceContactedReviewersClientListResponse
- type AccessReviewInstanceDecisionsClient
- type AccessReviewInstanceDecisionsClientListOptions
- type AccessReviewInstanceDecisionsClientListResponse
- type AccessReviewInstanceListResult
- type AccessReviewInstanceMyDecisionsClient
- func (client *AccessReviewInstanceMyDecisionsClient) GetByID(ctx context.Context, scheduleDefinitionID string, id string, decisionID string, ...) (AccessReviewInstanceMyDecisionsClientGetByIDResponse, error)
- func (client *AccessReviewInstanceMyDecisionsClient) NewListPager(scheduleDefinitionID string, id string, ...) *runtime.Pager[AccessReviewInstanceMyDecisionsClientListResponse]
- func (client *AccessReviewInstanceMyDecisionsClient) Patch(ctx context.Context, scheduleDefinitionID string, id string, decisionID string, ...) (AccessReviewInstanceMyDecisionsClientPatchResponse, error)
- type AccessReviewInstanceMyDecisionsClientGetByIDOptions
- type AccessReviewInstanceMyDecisionsClientGetByIDResponse
- type AccessReviewInstanceMyDecisionsClientListOptions
- type AccessReviewInstanceMyDecisionsClientListResponse
- type AccessReviewInstanceMyDecisionsClientPatchOptions
- type AccessReviewInstanceMyDecisionsClientPatchResponse
- type AccessReviewInstanceProperties
- type AccessReviewInstanceReviewersType
- type AccessReviewInstanceStatus
- type AccessReviewInstancesAssignedForMyApprovalClient
- func (client *AccessReviewInstancesAssignedForMyApprovalClient) GetByID(ctx context.Context, scheduleDefinitionID string, id string, ...) (AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse, error)
- func (client *AccessReviewInstancesAssignedForMyApprovalClient) NewListPager(scheduleDefinitionID string, ...) *runtime.Pager[AccessReviewInstancesAssignedForMyApprovalClientListResponse]
- type AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions
- type AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse
- type AccessReviewInstancesAssignedForMyApprovalClientListOptions
- type AccessReviewInstancesAssignedForMyApprovalClientListResponse
- type AccessReviewInstancesClient
- func (client *AccessReviewInstancesClient) Create(ctx context.Context, scheduleDefinitionID string, id string, ...) (AccessReviewInstancesClientCreateResponse, error)
- func (client *AccessReviewInstancesClient) GetByID(ctx context.Context, scheduleDefinitionID string, id string, ...) (AccessReviewInstancesClientGetByIDResponse, error)
- func (client *AccessReviewInstancesClient) NewListPager(scheduleDefinitionID string, options *AccessReviewInstancesClientListOptions) *runtime.Pager[AccessReviewInstancesClientListResponse]
- type AccessReviewInstancesClientCreateOptions
- type AccessReviewInstancesClientCreateResponse
- type AccessReviewInstancesClientGetByIDOptions
- type AccessReviewInstancesClientGetByIDResponse
- type AccessReviewInstancesClientListOptions
- type AccessReviewInstancesClientListResponse
- type AccessReviewRecurrencePattern
- type AccessReviewRecurrencePatternType
- type AccessReviewRecurrenceRange
- type AccessReviewRecurrenceRangeType
- type AccessReviewRecurrenceSettings
- type AccessReviewResult
- type AccessReviewReviewer
- type AccessReviewReviewerType
- type AccessReviewScheduleDefinition
- type AccessReviewScheduleDefinitionListResult
- type AccessReviewScheduleDefinitionProperties
- type AccessReviewScheduleDefinitionReviewersType
- type AccessReviewScheduleDefinitionStatus
- type AccessReviewScheduleDefinitionsAssignedForMyApprovalClient
- type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions
- type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListResponse
- type AccessReviewScheduleDefinitionsClient
- func (client *AccessReviewScheduleDefinitionsClient) CreateOrUpdateByID(ctx context.Context, scheduleDefinitionID string, ...) (AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse, error)
- func (client *AccessReviewScheduleDefinitionsClient) DeleteByID(ctx context.Context, scheduleDefinitionID string, ...) (AccessReviewScheduleDefinitionsClientDeleteByIDResponse, error)
- func (client *AccessReviewScheduleDefinitionsClient) GetByID(ctx context.Context, scheduleDefinitionID string, ...) (AccessReviewScheduleDefinitionsClientGetByIDResponse, error)
- func (client *AccessReviewScheduleDefinitionsClient) NewListPager(options *AccessReviewScheduleDefinitionsClientListOptions) *runtime.Pager[AccessReviewScheduleDefinitionsClientListResponse]
- func (client *AccessReviewScheduleDefinitionsClient) Stop(ctx context.Context, scheduleDefinitionID string, ...) (AccessReviewScheduleDefinitionsClientStopResponse, error)
- type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions
- type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse
- type AccessReviewScheduleDefinitionsClientDeleteByIDOptions
- type AccessReviewScheduleDefinitionsClientDeleteByIDResponse
- type AccessReviewScheduleDefinitionsClientGetByIDOptions
- type AccessReviewScheduleDefinitionsClientGetByIDResponse
- type AccessReviewScheduleDefinitionsClientListOptions
- type AccessReviewScheduleDefinitionsClientListResponse
- type AccessReviewScheduleDefinitionsClientStopOptions
- type AccessReviewScheduleDefinitionsClientStopResponse
- type AccessReviewScheduleSettings
- type AccessReviewScope
- type AccessReviewScopeAssignmentState
- type AccessReviewScopePrincipalType
- type Alert
- type AlertConfiguration
- type AlertConfigurationListResult
- type AlertConfigurationProperties
- type AlertConfigurationPropertiesClassification
- type AlertConfigurationsClient
- func (client *AlertConfigurationsClient) Get(ctx context.Context, scope string, alertID string, ...) (AlertConfigurationsClientGetResponse, error)
- func (client *AlertConfigurationsClient) NewListForScopePager(scope string, options *AlertConfigurationsClientListForScopeOptions) *runtime.Pager[AlertConfigurationsClientListForScopeResponse]
- func (client *AlertConfigurationsClient) Update(ctx context.Context, scope string, alertID string, ...) (AlertConfigurationsClientUpdateResponse, error)
- type AlertConfigurationsClientGetOptions
- type AlertConfigurationsClientGetResponse
- type AlertConfigurationsClientListForScopeOptions
- type AlertConfigurationsClientListForScopeResponse
- type AlertConfigurationsClientUpdateOptions
- type AlertConfigurationsClientUpdateResponse
- type AlertDefinition
- type AlertDefinitionListResult
- type AlertDefinitionProperties
- type AlertDefinitionsClient
- func (client *AlertDefinitionsClient) Get(ctx context.Context, scope string, alertDefinitionID string, ...) (AlertDefinitionsClientGetResponse, error)
- func (client *AlertDefinitionsClient) NewListForScopePager(scope string, options *AlertDefinitionsClientListForScopeOptions) *runtime.Pager[AlertDefinitionsClientListForScopeResponse]
- type AlertDefinitionsClientGetOptions
- type AlertDefinitionsClientGetResponse
- type AlertDefinitionsClientListForScopeOptions
- type AlertDefinitionsClientListForScopeResponse
- type AlertIncident
- type AlertIncidentListResult
- type AlertIncidentProperties
- type AlertIncidentPropertiesClassification
- type AlertIncidentsClient
- func (client *AlertIncidentsClient) Get(ctx context.Context, scope string, alertID string, alertIncidentID string, ...) (AlertIncidentsClientGetResponse, error)
- func (client *AlertIncidentsClient) NewListForScopePager(scope string, alertID string, options *AlertIncidentsClientListForScopeOptions) *runtime.Pager[AlertIncidentsClientListForScopeResponse]
- func (client *AlertIncidentsClient) Remediate(ctx context.Context, scope string, alertID string, alertIncidentID string, ...) (AlertIncidentsClientRemediateResponse, error)
- type AlertIncidentsClientGetOptions
- type AlertIncidentsClientGetResponse
- type AlertIncidentsClientListForScopeOptions
- type AlertIncidentsClientListForScopeResponse
- type AlertIncidentsClientRemediateOptions
- type AlertIncidentsClientRemediateResponse
- type AlertListResult
- type AlertOperationClient
- type AlertOperationClientGetOptions
- type AlertOperationClientGetResponse
- type AlertOperationResult
- type AlertProperties
- type AlertsClient
- func (client *AlertsClient) BeginRefresh(ctx context.Context, scope string, alertID string, ...) (*runtime.Poller[AlertsClientRefreshResponse], error)
- func (client *AlertsClient) BeginRefreshAll(ctx context.Context, scope string, options *AlertsClientBeginRefreshAllOptions) (*runtime.Poller[AlertsClientRefreshAllResponse], error)
- func (client *AlertsClient) Get(ctx context.Context, scope string, alertID string, ...) (AlertsClientGetResponse, error)
- func (client *AlertsClient) NewListForScopePager(scope string, options *AlertsClientListForScopeOptions) *runtime.Pager[AlertsClientListForScopeResponse]
- func (client *AlertsClient) Update(ctx context.Context, scope string, alertID string, parameters Alert, ...) (AlertsClientUpdateResponse, error)
- type AlertsClientBeginRefreshAllOptions
- type AlertsClientBeginRefreshOptions
- type AlertsClientGetOptions
- type AlertsClientGetResponse
- type AlertsClientListForScopeOptions
- type AlertsClientListForScopeResponse
- type AlertsClientRefreshAllResponse
- type AlertsClientRefreshResponse
- type AlertsClientUpdateOptions
- type AlertsClientUpdateResponse
- type ApprovalMode
- type ApprovalSettings
- type ApprovalStage
- type AssignmentType
- type AzureRolesAssignedOutsidePimAlertConfigurationProperties
- func (a *AzureRolesAssignedOutsidePimAlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
- func (a AzureRolesAssignedOutsidePimAlertConfigurationProperties) MarshalJSON() ([]byte, error)
- func (a *AzureRolesAssignedOutsidePimAlertConfigurationProperties) UnmarshalJSON(data []byte) error
- type AzureRolesAssignedOutsidePimAlertIncidentProperties
- func (a *AzureRolesAssignedOutsidePimAlertIncidentProperties) GetAlertIncidentProperties() *AlertIncidentProperties
- func (a AzureRolesAssignedOutsidePimAlertIncidentProperties) MarshalJSON() ([]byte, error)
- func (a *AzureRolesAssignedOutsidePimAlertIncidentProperties) UnmarshalJSON(data []byte) error
- type ClassicAdministrator
- type ClassicAdministratorListResult
- type ClassicAdministratorProperties
- type ClassicAdministratorsClient
- type ClassicAdministratorsClientListOptions
- type ClassicAdministratorsClientListResponse
- type ClientFactory
- func (c *ClientFactory) NewAccessReviewDefaultSettingsClient() *AccessReviewDefaultSettingsClient
- func (c *ClientFactory) NewAccessReviewHistoryDefinitionClient() *AccessReviewHistoryDefinitionClient
- func (c *ClientFactory) NewAccessReviewHistoryDefinitionInstanceClient() *AccessReviewHistoryDefinitionInstanceClient
- func (c *ClientFactory) NewAccessReviewHistoryDefinitionInstancesClient() *AccessReviewHistoryDefinitionInstancesClient
- func (c *ClientFactory) NewAccessReviewHistoryDefinitionsClient() *AccessReviewHistoryDefinitionsClient
- func (c *ClientFactory) NewAccessReviewInstanceClient() *AccessReviewInstanceClient
- func (c *ClientFactory) NewAccessReviewInstanceContactedReviewersClient() *AccessReviewInstanceContactedReviewersClient
- func (c *ClientFactory) NewAccessReviewInstanceDecisionsClient() *AccessReviewInstanceDecisionsClient
- func (c *ClientFactory) NewAccessReviewInstanceMyDecisionsClient() *AccessReviewInstanceMyDecisionsClient
- func (c *ClientFactory) NewAccessReviewInstancesAssignedForMyApprovalClient() *AccessReviewInstancesAssignedForMyApprovalClient
- func (c *ClientFactory) NewAccessReviewInstancesClient() *AccessReviewInstancesClient
- func (c *ClientFactory) NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient() *AccessReviewScheduleDefinitionsAssignedForMyApprovalClient
- func (c *ClientFactory) NewAccessReviewScheduleDefinitionsClient() *AccessReviewScheduleDefinitionsClient
- func (c *ClientFactory) NewAlertConfigurationsClient() *AlertConfigurationsClient
- func (c *ClientFactory) NewAlertDefinitionsClient() *AlertDefinitionsClient
- func (c *ClientFactory) NewAlertIncidentsClient() *AlertIncidentsClient
- func (c *ClientFactory) NewAlertOperationClient() *AlertOperationClient
- func (c *ClientFactory) NewAlertsClient() *AlertsClient
- func (c *ClientFactory) NewClassicAdministratorsClient() *ClassicAdministratorsClient
- func (c *ClientFactory) NewDenyAssignmentsClient() *DenyAssignmentsClient
- func (c *ClientFactory) NewEligibleChildResourcesClient() *EligibleChildResourcesClient
- func (c *ClientFactory) NewGlobalAdministratorClient() *GlobalAdministratorClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- 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
- func (c *ClientFactory) NewScopeAccessReviewDefaultSettingsClient() *ScopeAccessReviewDefaultSettingsClient
- func (c *ClientFactory) NewScopeAccessReviewHistoryDefinitionClient() *ScopeAccessReviewHistoryDefinitionClient
- func (c *ClientFactory) NewScopeAccessReviewHistoryDefinitionInstanceClient() *ScopeAccessReviewHistoryDefinitionInstanceClient
- func (c *ClientFactory) NewScopeAccessReviewHistoryDefinitionInstancesClient() *ScopeAccessReviewHistoryDefinitionInstancesClient
- func (c *ClientFactory) NewScopeAccessReviewHistoryDefinitionsClient() *ScopeAccessReviewHistoryDefinitionsClient
- func (c *ClientFactory) NewScopeAccessReviewInstanceClient() *ScopeAccessReviewInstanceClient
- func (c *ClientFactory) NewScopeAccessReviewInstanceContactedReviewersClient() *ScopeAccessReviewInstanceContactedReviewersClient
- func (c *ClientFactory) NewScopeAccessReviewInstanceDecisionsClient() *ScopeAccessReviewInstanceDecisionsClient
- func (c *ClientFactory) NewScopeAccessReviewInstancesClient() *ScopeAccessReviewInstancesClient
- func (c *ClientFactory) NewScopeAccessReviewScheduleDefinitionsClient() *ScopeAccessReviewScheduleDefinitionsClient
- func (c *ClientFactory) NewTenantLevelAccessReviewInstanceContactedReviewersClient() *TenantLevelAccessReviewInstanceContactedReviewersClient
- type DecisionResourceType
- type DecisionTargetType
- type DefaultDecisionType
- 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 DuplicateRoleCreatedAlertConfigurationProperties
- func (d *DuplicateRoleCreatedAlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
- func (d DuplicateRoleCreatedAlertConfigurationProperties) MarshalJSON() ([]byte, error)
- func (d *DuplicateRoleCreatedAlertConfigurationProperties) UnmarshalJSON(data []byte) error
- type DuplicateRoleCreatedAlertIncidentProperties
- type EligibleChildResource
- type EligibleChildResourcesClient
- type EligibleChildResourcesClientGetOptions
- type EligibleChildResourcesClientGetResponse
- type EligibleChildResourcesListResult
- type EnablementRules
- type ErrorAdditionalInfo
- type ErrorDefinition
- type ErrorDefinitionProperties
- 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 Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- 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 RecordAllDecisionsProperties
- type RecordAllDecisionsResult
- 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 ScopeAccessReviewDefaultSettingsClient
- func (client *ScopeAccessReviewDefaultSettingsClient) Get(ctx context.Context, scope string, ...) (ScopeAccessReviewDefaultSettingsClientGetResponse, error)
- func (client *ScopeAccessReviewDefaultSettingsClient) Put(ctx context.Context, scope string, properties AccessReviewScheduleSettings, ...) (ScopeAccessReviewDefaultSettingsClientPutResponse, error)
- type ScopeAccessReviewDefaultSettingsClientGetOptions
- type ScopeAccessReviewDefaultSettingsClientGetResponse
- type ScopeAccessReviewDefaultSettingsClientPutOptions
- type ScopeAccessReviewDefaultSettingsClientPutResponse
- type ScopeAccessReviewHistoryDefinitionClient
- func (client *ScopeAccessReviewHistoryDefinitionClient) Create(ctx context.Context, scope string, historyDefinitionID string, ...) (ScopeAccessReviewHistoryDefinitionClientCreateResponse, error)
- func (client *ScopeAccessReviewHistoryDefinitionClient) DeleteByID(ctx context.Context, scope string, historyDefinitionID string, ...) (ScopeAccessReviewHistoryDefinitionClientDeleteByIDResponse, error)
- type ScopeAccessReviewHistoryDefinitionClientCreateOptions
- type ScopeAccessReviewHistoryDefinitionClientCreateResponse
- type ScopeAccessReviewHistoryDefinitionClientDeleteByIDOptions
- type ScopeAccessReviewHistoryDefinitionClientDeleteByIDResponse
- type ScopeAccessReviewHistoryDefinitionInstanceClient
- type ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions
- type ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse
- type ScopeAccessReviewHistoryDefinitionInstancesClient
- type ScopeAccessReviewHistoryDefinitionInstancesClientListOptions
- type ScopeAccessReviewHistoryDefinitionInstancesClientListResponse
- type ScopeAccessReviewHistoryDefinitionsClient
- func (client *ScopeAccessReviewHistoryDefinitionsClient) GetByID(ctx context.Context, scope string, historyDefinitionID string, ...) (ScopeAccessReviewHistoryDefinitionsClientGetByIDResponse, error)
- func (client *ScopeAccessReviewHistoryDefinitionsClient) NewListPager(scope string, options *ScopeAccessReviewHistoryDefinitionsClientListOptions) *runtime.Pager[ScopeAccessReviewHistoryDefinitionsClientListResponse]
- type ScopeAccessReviewHistoryDefinitionsClientGetByIDOptions
- type ScopeAccessReviewHistoryDefinitionsClientGetByIDResponse
- type ScopeAccessReviewHistoryDefinitionsClientListOptions
- type ScopeAccessReviewHistoryDefinitionsClientListResponse
- type ScopeAccessReviewInstanceClient
- func (client *ScopeAccessReviewInstanceClient) ApplyDecisions(ctx context.Context, scope string, scheduleDefinitionID string, id string, ...) (ScopeAccessReviewInstanceClientApplyDecisionsResponse, error)
- func (client *ScopeAccessReviewInstanceClient) RecordAllDecisions(ctx context.Context, scope string, scheduleDefinitionID string, id string, ...) (ScopeAccessReviewInstanceClientRecordAllDecisionsResponse, error)
- func (client *ScopeAccessReviewInstanceClient) ResetDecisions(ctx context.Context, scope string, scheduleDefinitionID string, id string, ...) (ScopeAccessReviewInstanceClientResetDecisionsResponse, error)
- func (client *ScopeAccessReviewInstanceClient) SendReminders(ctx context.Context, scope string, scheduleDefinitionID string, id string, ...) (ScopeAccessReviewInstanceClientSendRemindersResponse, error)
- func (client *ScopeAccessReviewInstanceClient) Stop(ctx context.Context, scope string, scheduleDefinitionID string, id string, ...) (ScopeAccessReviewInstanceClientStopResponse, error)
- type ScopeAccessReviewInstanceClientApplyDecisionsOptions
- type ScopeAccessReviewInstanceClientApplyDecisionsResponse
- type ScopeAccessReviewInstanceClientRecordAllDecisionsOptions
- type ScopeAccessReviewInstanceClientRecordAllDecisionsResponse
- type ScopeAccessReviewInstanceClientResetDecisionsOptions
- type ScopeAccessReviewInstanceClientResetDecisionsResponse
- type ScopeAccessReviewInstanceClientSendRemindersOptions
- type ScopeAccessReviewInstanceClientSendRemindersResponse
- type ScopeAccessReviewInstanceClientStopOptions
- type ScopeAccessReviewInstanceClientStopResponse
- type ScopeAccessReviewInstanceContactedReviewersClient
- type ScopeAccessReviewInstanceContactedReviewersClientListOptions
- type ScopeAccessReviewInstanceContactedReviewersClientListResponse
- type ScopeAccessReviewInstanceDecisionsClient
- type ScopeAccessReviewInstanceDecisionsClientListOptions
- type ScopeAccessReviewInstanceDecisionsClientListResponse
- type ScopeAccessReviewInstancesClient
- func (client *ScopeAccessReviewInstancesClient) Create(ctx context.Context, scope string, scheduleDefinitionID string, id string, ...) (ScopeAccessReviewInstancesClientCreateResponse, error)
- func (client *ScopeAccessReviewInstancesClient) GetByID(ctx context.Context, scope string, scheduleDefinitionID string, id string, ...) (ScopeAccessReviewInstancesClientGetByIDResponse, error)
- func (client *ScopeAccessReviewInstancesClient) NewListPager(scope string, scheduleDefinitionID string, ...) *runtime.Pager[ScopeAccessReviewInstancesClientListResponse]
- type ScopeAccessReviewInstancesClientCreateOptions
- type ScopeAccessReviewInstancesClientCreateResponse
- type ScopeAccessReviewInstancesClientGetByIDOptions
- type ScopeAccessReviewInstancesClientGetByIDResponse
- type ScopeAccessReviewInstancesClientListOptions
- type ScopeAccessReviewInstancesClientListResponse
- type ScopeAccessReviewScheduleDefinitionsClient
- func (client *ScopeAccessReviewScheduleDefinitionsClient) CreateOrUpdateByID(ctx context.Context, scope string, scheduleDefinitionID string, ...) (ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse, error)
- func (client *ScopeAccessReviewScheduleDefinitionsClient) DeleteByID(ctx context.Context, scope string, scheduleDefinitionID string, ...) (ScopeAccessReviewScheduleDefinitionsClientDeleteByIDResponse, error)
- func (client *ScopeAccessReviewScheduleDefinitionsClient) GetByID(ctx context.Context, scope string, scheduleDefinitionID string, ...) (ScopeAccessReviewScheduleDefinitionsClientGetByIDResponse, error)
- func (client *ScopeAccessReviewScheduleDefinitionsClient) NewListPager(scope string, options *ScopeAccessReviewScheduleDefinitionsClientListOptions) *runtime.Pager[ScopeAccessReviewScheduleDefinitionsClientListResponse]
- func (client *ScopeAccessReviewScheduleDefinitionsClient) Stop(ctx context.Context, scope string, scheduleDefinitionID string, ...) (ScopeAccessReviewScheduleDefinitionsClientStopResponse, error)
- type ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions
- type ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse
- type ScopeAccessReviewScheduleDefinitionsClientDeleteByIDOptions
- type ScopeAccessReviewScheduleDefinitionsClientDeleteByIDResponse
- type ScopeAccessReviewScheduleDefinitionsClientGetByIDOptions
- type ScopeAccessReviewScheduleDefinitionsClientGetByIDResponse
- type ScopeAccessReviewScheduleDefinitionsClientListOptions
- type ScopeAccessReviewScheduleDefinitionsClientListResponse
- type ScopeAccessReviewScheduleDefinitionsClientStopOptions
- type ScopeAccessReviewScheduleDefinitionsClientStopResponse
- type SeverityLevel
- type Status
- type TenantLevelAccessReviewInstanceContactedReviewersClient
- type TenantLevelAccessReviewInstanceContactedReviewersClientListOptions
- type TenantLevelAccessReviewInstanceContactedReviewersClientListResponse
- type TooManyOwnersAssignedToResourceAlertConfigurationProperties
- func (t *TooManyOwnersAssignedToResourceAlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
- func (t TooManyOwnersAssignedToResourceAlertConfigurationProperties) MarshalJSON() ([]byte, error)
- func (t *TooManyOwnersAssignedToResourceAlertConfigurationProperties) UnmarshalJSON(data []byte) error
- type TooManyOwnersAssignedToResourceAlertIncidentProperties
- func (t *TooManyOwnersAssignedToResourceAlertIncidentProperties) GetAlertIncidentProperties() *AlertIncidentProperties
- func (t TooManyOwnersAssignedToResourceAlertIncidentProperties) MarshalJSON() ([]byte, error)
- func (t *TooManyOwnersAssignedToResourceAlertIncidentProperties) UnmarshalJSON(data []byte) error
- type TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties
- func (t *TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
- func (t TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) MarshalJSON() ([]byte, error)
- func (t *TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) UnmarshalJSON(data []byte) error
- type TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties
- func (t *TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) GetAlertIncidentProperties() *AlertIncidentProperties
- func (t TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) MarshalJSON() ([]byte, error)
- func (t *TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) UnmarshalJSON(data []byte) error
- type Type
- type UserSet
- type UserType
- type ValidationResponse
- type ValidationResponseErrorInfo
Examples ¶
- AccessReviewInstanceClient.AcceptRecommendations
- AccessReviewInstanceMyDecisionsClient.GetByID
- AccessReviewInstanceMyDecisionsClient.NewListPager
- AccessReviewInstanceMyDecisionsClient.Patch
- AccessReviewInstancesAssignedForMyApprovalClient.GetByID
- AccessReviewInstancesAssignedForMyApprovalClient.NewListPager
- AccessReviewScheduleDefinitionsAssignedForMyApprovalClient.NewListPager
- AlertConfigurationsClient.Get
- AlertConfigurationsClient.NewListForScopePager
- AlertConfigurationsClient.Update
- AlertDefinitionsClient.Get
- AlertDefinitionsClient.NewListForScopePager
- AlertIncidentsClient.Get
- AlertIncidentsClient.NewListForScopePager
- AlertIncidentsClient.Remediate
- AlertOperationClient.Get
- AlertsClient.BeginRefresh
- AlertsClient.BeginRefreshAll
- AlertsClient.Get
- AlertsClient.NewListForScopePager
- AlertsClient.Update
- 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
- ScopeAccessReviewDefaultSettingsClient.Get
- ScopeAccessReviewDefaultSettingsClient.Put
- ScopeAccessReviewHistoryDefinitionClient.Create
- ScopeAccessReviewHistoryDefinitionClient.DeleteByID
- ScopeAccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI
- ScopeAccessReviewHistoryDefinitionInstancesClient.NewListPager
- ScopeAccessReviewHistoryDefinitionsClient.GetByID
- ScopeAccessReviewHistoryDefinitionsClient.NewListPager
- ScopeAccessReviewInstanceClient.ApplyDecisions
- ScopeAccessReviewInstanceClient.RecordAllDecisions
- ScopeAccessReviewInstanceClient.ResetDecisions
- ScopeAccessReviewInstanceClient.SendReminders
- ScopeAccessReviewInstanceClient.Stop
- ScopeAccessReviewInstanceContactedReviewersClient.NewListPager
- ScopeAccessReviewInstanceDecisionsClient.NewListPager
- ScopeAccessReviewInstancesClient.Create
- ScopeAccessReviewInstancesClient.GetByID
- ScopeAccessReviewInstancesClient.NewListPager
- ScopeAccessReviewScheduleDefinitionsClient.CreateOrUpdateByID
- ScopeAccessReviewScheduleDefinitionsClient.DeleteByID
- ScopeAccessReviewScheduleDefinitionsClient.GetByID
- ScopeAccessReviewScheduleDefinitionsClient.NewListPager
- ScopeAccessReviewScheduleDefinitionsClient.Stop
- TenantLevelAccessReviewInstanceContactedReviewersClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRecommendationType ¶
type AccessRecommendationType string
AccessRecommendationType - The feature- generated recommendation shown to the reviewer.
const ( AccessRecommendationTypeApprove AccessRecommendationType = "Approve" AccessRecommendationTypeDeny AccessRecommendationType = "Deny" AccessRecommendationTypeNoInfoAvailable AccessRecommendationType = "NoInfoAvailable" )
func PossibleAccessRecommendationTypeValues ¶
func PossibleAccessRecommendationTypeValues() []AccessRecommendationType
PossibleAccessRecommendationTypeValues returns the possible values for the AccessRecommendationType const type.
type AccessReviewActorIdentity ¶
type AccessReviewActorIdentity struct { // READ-ONLY; The identity id PrincipalID *string // READ-ONLY; The identity display name PrincipalName *string // READ-ONLY; The identity type : user/servicePrincipal PrincipalType *AccessReviewActorIdentityType // READ-ONLY; The user principal name(if valid) UserPrincipalName *string }
AccessReviewActorIdentity - Details of the actor identity
func (AccessReviewActorIdentity) MarshalJSON ¶
func (a AccessReviewActorIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewActorIdentity.
func (*AccessReviewActorIdentity) UnmarshalJSON ¶
func (a *AccessReviewActorIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewActorIdentity.
type AccessReviewActorIdentityType ¶
type AccessReviewActorIdentityType string
AccessReviewActorIdentityType - The identity type : user/servicePrincipal
const ( AccessReviewActorIdentityTypeServicePrincipal AccessReviewActorIdentityType = "servicePrincipal" AccessReviewActorIdentityTypeUser AccessReviewActorIdentityType = "user" )
func PossibleAccessReviewActorIdentityTypeValues ¶
func PossibleAccessReviewActorIdentityTypeValues() []AccessReviewActorIdentityType
PossibleAccessReviewActorIdentityTypeValues returns the possible values for the AccessReviewActorIdentityType const type.
type AccessReviewApplyResult ¶
type AccessReviewApplyResult string
AccessReviewApplyResult - The outcome of applying the decision.
const ( AccessReviewApplyResultAppliedSuccessfully AccessReviewApplyResult = "AppliedSuccessfully" AccessReviewApplyResultAppliedSuccessfullyButObjectNotFound AccessReviewApplyResult = "AppliedSuccessfullyButObjectNotFound" AccessReviewApplyResultAppliedWithUnknownFailure AccessReviewApplyResult = "AppliedWithUnknownFailure" AccessReviewApplyResultApplyNotSupported AccessReviewApplyResult = "ApplyNotSupported" AccessReviewApplyResultApplying AccessReviewApplyResult = "Applying" AccessReviewApplyResultNew AccessReviewApplyResult = "New" )
func PossibleAccessReviewApplyResultValues ¶
func PossibleAccessReviewApplyResultValues() []AccessReviewApplyResult
PossibleAccessReviewApplyResultValues returns the possible values for the AccessReviewApplyResult const type.
type AccessReviewContactedReviewer ¶
type AccessReviewContactedReviewer struct { // Access Review Contacted Reviewer properties. Properties *AccessReviewContactedReviewerProperties // READ-ONLY; The access review reviewer id. ID *string // READ-ONLY; The access review reviewer id. Name *string // READ-ONLY; The resource type. Type *string }
AccessReviewContactedReviewer - Access Review Contacted Reviewer.
func (AccessReviewContactedReviewer) MarshalJSON ¶
func (a AccessReviewContactedReviewer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewContactedReviewer.
func (*AccessReviewContactedReviewer) UnmarshalJSON ¶
func (a *AccessReviewContactedReviewer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewContactedReviewer.
type AccessReviewContactedReviewerListResult ¶
type AccessReviewContactedReviewerListResult struct { // The URL to use for getting the next set of results. NextLink *string // Access Review Contacted Reviewer. Value []*AccessReviewContactedReviewer }
AccessReviewContactedReviewerListResult - List of access review contacted reviewers.
func (AccessReviewContactedReviewerListResult) MarshalJSON ¶
func (a AccessReviewContactedReviewerListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewContactedReviewerListResult.
func (*AccessReviewContactedReviewerListResult) UnmarshalJSON ¶
func (a *AccessReviewContactedReviewerListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewContactedReviewerListResult.
type AccessReviewContactedReviewerProperties ¶
type AccessReviewContactedReviewerProperties struct { // READ-ONLY; Date Time when the reviewer was contacted. CreatedDateTime *time.Time // READ-ONLY; The display name of the reviewer UserDisplayName *string // READ-ONLY; The user principal name of the reviewer UserPrincipalName *string }
AccessReviewContactedReviewerProperties - Properties of access review contacted reviewer.
func (AccessReviewContactedReviewerProperties) MarshalJSON ¶
func (a AccessReviewContactedReviewerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewContactedReviewerProperties.
func (*AccessReviewContactedReviewerProperties) UnmarshalJSON ¶
func (a *AccessReviewContactedReviewerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewContactedReviewerProperties.
type AccessReviewDecision ¶
type AccessReviewDecision struct { // Access Review Decision properties. Properties *AccessReviewDecisionProperties // READ-ONLY; The access review decision id. ID *string // READ-ONLY; The access review decision name. Name *string // READ-ONLY; The resource type. Type *string }
AccessReviewDecision - Access Review.
func (AccessReviewDecision) MarshalJSON ¶
func (a AccessReviewDecision) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecision.
func (*AccessReviewDecision) UnmarshalJSON ¶
func (a *AccessReviewDecision) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecision.
type AccessReviewDecisionIdentity ¶
type AccessReviewDecisionIdentity struct { // REQUIRED; The type of decision target : User/ServicePrincipal Type *DecisionTargetType // READ-ONLY; The display name of the user whose access was reviewed. DisplayName *string // READ-ONLY; The id of principal whose access was reviewed. ID *string }
AccessReviewDecisionIdentity - Target of the decision.
func (*AccessReviewDecisionIdentity) GetAccessReviewDecisionIdentity ¶
func (a *AccessReviewDecisionIdentity) GetAccessReviewDecisionIdentity() *AccessReviewDecisionIdentity
GetAccessReviewDecisionIdentity implements the AccessReviewDecisionIdentityClassification interface for type AccessReviewDecisionIdentity.
func (AccessReviewDecisionIdentity) MarshalJSON ¶
func (a AccessReviewDecisionIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionIdentity.
func (*AccessReviewDecisionIdentity) UnmarshalJSON ¶
func (a *AccessReviewDecisionIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionIdentity.
type AccessReviewDecisionIdentityClassification ¶
type AccessReviewDecisionIdentityClassification interface { // GetAccessReviewDecisionIdentity returns the AccessReviewDecisionIdentity content of the underlying type. GetAccessReviewDecisionIdentity() *AccessReviewDecisionIdentity }
AccessReviewDecisionIdentityClassification provides polymorphic access to related types. Call the interface's GetAccessReviewDecisionIdentity() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AccessReviewDecisionIdentity, *AccessReviewDecisionServicePrincipalIdentity, *AccessReviewDecisionUserIdentity
type AccessReviewDecisionInsight ¶
type AccessReviewDecisionInsight struct { // Access Review Decision Insight properties. Properties AccessReviewDecisionInsightPropertiesClassification // READ-ONLY; The access review insight id. ID *string // READ-ONLY; The access review insight name. Name *string // READ-ONLY; The resource type. Type *string }
AccessReviewDecisionInsight - Access Review Decision Insight.
func (AccessReviewDecisionInsight) MarshalJSON ¶
func (a AccessReviewDecisionInsight) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionInsight.
func (*AccessReviewDecisionInsight) UnmarshalJSON ¶
func (a *AccessReviewDecisionInsight) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionInsight.
type AccessReviewDecisionInsightProperties ¶
type AccessReviewDecisionInsightProperties struct { // REQUIRED; The type of insight Type *AccessReviewDecisionInsightType // READ-ONLY; Date Time when the insight was created. InsightCreatedDateTime any }
AccessReviewDecisionInsightProperties - Details of the Insight.
func (*AccessReviewDecisionInsightProperties) GetAccessReviewDecisionInsightProperties ¶
func (a *AccessReviewDecisionInsightProperties) GetAccessReviewDecisionInsightProperties() *AccessReviewDecisionInsightProperties
GetAccessReviewDecisionInsightProperties implements the AccessReviewDecisionInsightPropertiesClassification interface for type AccessReviewDecisionInsightProperties.
func (AccessReviewDecisionInsightProperties) MarshalJSON ¶
func (a AccessReviewDecisionInsightProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionInsightProperties.
func (*AccessReviewDecisionInsightProperties) UnmarshalJSON ¶
func (a *AccessReviewDecisionInsightProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionInsightProperties.
type AccessReviewDecisionInsightPropertiesClassification ¶
type AccessReviewDecisionInsightPropertiesClassification interface { // GetAccessReviewDecisionInsightProperties returns the AccessReviewDecisionInsightProperties content of the underlying type. GetAccessReviewDecisionInsightProperties() *AccessReviewDecisionInsightProperties }
AccessReviewDecisionInsightPropertiesClassification provides polymorphic access to related types. Call the interface's GetAccessReviewDecisionInsightProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AccessReviewDecisionInsightProperties, *AccessReviewDecisionUserSignInInsightProperties
type AccessReviewDecisionInsightType ¶
type AccessReviewDecisionInsightType string
AccessReviewDecisionInsightType - The type of insight
const (
AccessReviewDecisionInsightTypeUserSignInInsight AccessReviewDecisionInsightType = "userSignInInsight"
)
func PossibleAccessReviewDecisionInsightTypeValues ¶
func PossibleAccessReviewDecisionInsightTypeValues() []AccessReviewDecisionInsightType
PossibleAccessReviewDecisionInsightTypeValues returns the possible values for the AccessReviewDecisionInsightType const type.
type AccessReviewDecisionListResult ¶
type AccessReviewDecisionListResult struct { // The URL to use for getting the next set of results. NextLink *string // Access Review Decision list. Value []*AccessReviewDecision }
AccessReviewDecisionListResult - List of access review decisions.
func (AccessReviewDecisionListResult) MarshalJSON ¶
func (a AccessReviewDecisionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionListResult.
func (*AccessReviewDecisionListResult) UnmarshalJSON ¶
func (a *AccessReviewDecisionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionListResult.
type AccessReviewDecisionPrincipalResourceMembership ¶
type AccessReviewDecisionPrincipalResourceMembership struct { // Every decision item in an access review represents a principal's membership to a resource. This property represents details // of the membership. Examples of this detail might be whether the principal // has direct access or indirect access MembershipTypes []*AccessReviewDecisionPrincipalResourceMembershipType }
AccessReviewDecisionPrincipalResourceMembership - Target of the decision.
func (AccessReviewDecisionPrincipalResourceMembership) MarshalJSON ¶
func (a AccessReviewDecisionPrincipalResourceMembership) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionPrincipalResourceMembership.
func (*AccessReviewDecisionPrincipalResourceMembership) UnmarshalJSON ¶
func (a *AccessReviewDecisionPrincipalResourceMembership) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionPrincipalResourceMembership.
type AccessReviewDecisionPrincipalResourceMembershipType ¶
type AccessReviewDecisionPrincipalResourceMembershipType string
const ( AccessReviewDecisionPrincipalResourceMembershipTypeDirect AccessReviewDecisionPrincipalResourceMembershipType = "direct" AccessReviewDecisionPrincipalResourceMembershipTypeIndirect AccessReviewDecisionPrincipalResourceMembershipType = "indirect" )
func PossibleAccessReviewDecisionPrincipalResourceMembershipTypeValues ¶
func PossibleAccessReviewDecisionPrincipalResourceMembershipTypeValues() []AccessReviewDecisionPrincipalResourceMembershipType
PossibleAccessReviewDecisionPrincipalResourceMembershipTypeValues returns the possible values for the AccessReviewDecisionPrincipalResourceMembershipType const type.
type AccessReviewDecisionProperties ¶
type AccessReviewDecisionProperties struct { // The decision on the approval step. This value is initially set to NotReviewed. Approvers can take action of Approve/Deny Decision *AccessReviewResult // This is the collection of insights for this decision item. Insights []*AccessReviewDecisionInsight // Justification provided by approvers for their action Justification *string // READ-ONLY; Details of the approver. AppliedBy *AccessReviewActorIdentity // READ-ONLY; The date and time when the review decision was applied. AppliedDateTime *time.Time // READ-ONLY; The outcome of applying the decision. ApplyResult *AccessReviewApplyResult // READ-ONLY; Principal associated with the decision record. Can be AccessReviewDecisionUserIdentity or AccessReviewDecisionServicePrincipalIdentity Principal AccessReviewDecisionIdentityClassification // READ-ONLY; Details of the membership type. PrincipalResourceMembership *AccessReviewDecisionPrincipalResourceMembership // READ-ONLY; The feature- generated recommendation shown to the reviewer. Recommendation *AccessRecommendationType // READ-ONLY; Resource associated with this decision record. Resource *AccessReviewDecisionResource // READ-ONLY; Details of the approver. ReviewedBy *AccessReviewActorIdentity // READ-ONLY; Date Time when a decision was taken. ReviewedDateTime *time.Time }
AccessReviewDecisionProperties - Approval Step.
func (AccessReviewDecisionProperties) MarshalJSON ¶
func (a AccessReviewDecisionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionProperties.
func (*AccessReviewDecisionProperties) UnmarshalJSON ¶
func (a *AccessReviewDecisionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionProperties.
type AccessReviewDecisionResource ¶
type AccessReviewDecisionResource struct { // REQUIRED; The type of resource Type *DecisionResourceType // READ-ONLY; The display name of resource associated with a decision record. DisplayName *string // READ-ONLY; The id of resource associated with a decision record. ID *string }
AccessReviewDecisionResource - Target of the decision.
func (AccessReviewDecisionResource) MarshalJSON ¶
func (a AccessReviewDecisionResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionResource.
func (*AccessReviewDecisionResource) UnmarshalJSON ¶
func (a *AccessReviewDecisionResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionResource.
type AccessReviewDecisionServicePrincipalIdentity ¶
type AccessReviewDecisionServicePrincipalIdentity struct { // REQUIRED; The type of decision target : User/ServicePrincipal Type *DecisionTargetType // READ-ONLY; The appId for the service principal entity being reviewed AppID *string // READ-ONLY; The display name of the user whose access was reviewed. DisplayName *string // READ-ONLY; The id of principal whose access was reviewed. ID *string }
AccessReviewDecisionServicePrincipalIdentity - Service Principal Decision Target
func (*AccessReviewDecisionServicePrincipalIdentity) GetAccessReviewDecisionIdentity ¶
func (a *AccessReviewDecisionServicePrincipalIdentity) GetAccessReviewDecisionIdentity() *AccessReviewDecisionIdentity
GetAccessReviewDecisionIdentity implements the AccessReviewDecisionIdentityClassification interface for type AccessReviewDecisionServicePrincipalIdentity.
func (AccessReviewDecisionServicePrincipalIdentity) MarshalJSON ¶
func (a AccessReviewDecisionServicePrincipalIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionServicePrincipalIdentity.
func (*AccessReviewDecisionServicePrincipalIdentity) UnmarshalJSON ¶
func (a *AccessReviewDecisionServicePrincipalIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionServicePrincipalIdentity.
type AccessReviewDecisionUserIdentity ¶
type AccessReviewDecisionUserIdentity struct { // REQUIRED; The type of decision target : User/ServicePrincipal Type *DecisionTargetType // READ-ONLY; The display name of the user whose access was reviewed. DisplayName *string // READ-ONLY; The id of principal whose access was reviewed. ID *string // READ-ONLY; The user principal name of the user whose access was reviewed. UserPrincipalName *string }
AccessReviewDecisionUserIdentity - User Decision Target
func (*AccessReviewDecisionUserIdentity) GetAccessReviewDecisionIdentity ¶
func (a *AccessReviewDecisionUserIdentity) GetAccessReviewDecisionIdentity() *AccessReviewDecisionIdentity
GetAccessReviewDecisionIdentity implements the AccessReviewDecisionIdentityClassification interface for type AccessReviewDecisionUserIdentity.
func (AccessReviewDecisionUserIdentity) MarshalJSON ¶
func (a AccessReviewDecisionUserIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionUserIdentity.
func (*AccessReviewDecisionUserIdentity) UnmarshalJSON ¶
func (a *AccessReviewDecisionUserIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionUserIdentity.
type AccessReviewDecisionUserSignInInsightProperties ¶
type AccessReviewDecisionUserSignInInsightProperties struct { // REQUIRED; The type of insight Type *AccessReviewDecisionInsightType // READ-ONLY; Date Time when the insight was created. InsightCreatedDateTime any // READ-ONLY; Date Time when the user signed into the tenant. LastSignInDateTime any }
AccessReviewDecisionUserSignInInsightProperties - User Decision Target
func (*AccessReviewDecisionUserSignInInsightProperties) GetAccessReviewDecisionInsightProperties ¶
func (a *AccessReviewDecisionUserSignInInsightProperties) GetAccessReviewDecisionInsightProperties() *AccessReviewDecisionInsightProperties
GetAccessReviewDecisionInsightProperties implements the AccessReviewDecisionInsightPropertiesClassification interface for type AccessReviewDecisionUserSignInInsightProperties.
func (AccessReviewDecisionUserSignInInsightProperties) MarshalJSON ¶
func (a AccessReviewDecisionUserSignInInsightProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionUserSignInInsightProperties.
func (*AccessReviewDecisionUserSignInInsightProperties) UnmarshalJSON ¶
func (a *AccessReviewDecisionUserSignInInsightProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionUserSignInInsightProperties.
type AccessReviewDefaultSettings ¶
type AccessReviewDefaultSettings struct { // Access Review properties. Properties *AccessReviewScheduleSettings // READ-ONLY; The access review default settings id. This is only going to be default ID *string // READ-ONLY; The access review default settings name. This is always going to be Access Review Default Settings Name *string // READ-ONLY; The resource type. Type *string }
AccessReviewDefaultSettings - Access Review Default Settings.
func (AccessReviewDefaultSettings) MarshalJSON ¶
func (a AccessReviewDefaultSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewDefaultSettings.
func (*AccessReviewDefaultSettings) UnmarshalJSON ¶
func (a *AccessReviewDefaultSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDefaultSettings.
type AccessReviewDefaultSettingsClient ¶
type AccessReviewDefaultSettingsClient struct {
// contains filtered or unexported fields
}
AccessReviewDefaultSettingsClient contains the methods for the AccessReviewDefaultSettings group. Don't use this type directly, use NewAccessReviewDefaultSettingsClient() instead.
func NewAccessReviewDefaultSettingsClient ¶
func NewAccessReviewDefaultSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewDefaultSettingsClient, error)
NewAccessReviewDefaultSettingsClient creates a new instance of AccessReviewDefaultSettingsClient 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 (*AccessReviewDefaultSettingsClient) Get ¶
func (client *AccessReviewDefaultSettingsClient) Get(ctx context.Context, options *AccessReviewDefaultSettingsClientGetOptions) (AccessReviewDefaultSettingsClientGetResponse, error)
Get - Get access review default settings for the subscription If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- options - AccessReviewDefaultSettingsClientGetOptions contains the optional parameters for the AccessReviewDefaultSettingsClient.Get method.
func (*AccessReviewDefaultSettingsClient) Put ¶
func (client *AccessReviewDefaultSettingsClient) Put(ctx context.Context, properties AccessReviewScheduleSettings, options *AccessReviewDefaultSettingsClientPutOptions) (AccessReviewDefaultSettingsClientPutResponse, error)
Put - Get access review default settings for the subscription If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- properties - Access review schedule settings.
- options - AccessReviewDefaultSettingsClientPutOptions contains the optional parameters for the AccessReviewDefaultSettingsClient.Put method.
type AccessReviewDefaultSettingsClientGetOptions ¶
type AccessReviewDefaultSettingsClientGetOptions struct { }
AccessReviewDefaultSettingsClientGetOptions contains the optional parameters for the AccessReviewDefaultSettingsClient.Get method.
type AccessReviewDefaultSettingsClientGetResponse ¶
type AccessReviewDefaultSettingsClientGetResponse struct { // Access Review Default Settings. AccessReviewDefaultSettings }
AccessReviewDefaultSettingsClientGetResponse contains the response from method AccessReviewDefaultSettingsClient.Get.
type AccessReviewDefaultSettingsClientPutOptions ¶
type AccessReviewDefaultSettingsClientPutOptions struct { }
AccessReviewDefaultSettingsClientPutOptions contains the optional parameters for the AccessReviewDefaultSettingsClient.Put method.
type AccessReviewDefaultSettingsClientPutResponse ¶
type AccessReviewDefaultSettingsClientPutResponse struct { // Access Review Default Settings. AccessReviewDefaultSettings }
AccessReviewDefaultSettingsClientPutResponse contains the response from method AccessReviewDefaultSettingsClient.Put.
type AccessReviewHistoryDefinition ¶
type AccessReviewHistoryDefinition struct { // Access Review History Definition properties. Properties *AccessReviewHistoryDefinitionProperties // READ-ONLY; The access review history definition id. ID *string // READ-ONLY; The access review history definition unique id. Name *string // READ-ONLY; The resource type. Type *string }
AccessReviewHistoryDefinition - Access Review History Definition.
func (AccessReviewHistoryDefinition) MarshalJSON ¶
func (a AccessReviewHistoryDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryDefinition.
func (*AccessReviewHistoryDefinition) UnmarshalJSON ¶
func (a *AccessReviewHistoryDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryDefinition.
type AccessReviewHistoryDefinitionClient ¶
type AccessReviewHistoryDefinitionClient struct {
// contains filtered or unexported fields
}
AccessReviewHistoryDefinitionClient contains the methods for the AccessReviewHistoryDefinition group. Don't use this type directly, use NewAccessReviewHistoryDefinitionClient() instead.
func NewAccessReviewHistoryDefinitionClient ¶
func NewAccessReviewHistoryDefinitionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewHistoryDefinitionClient, error)
NewAccessReviewHistoryDefinitionClient creates a new instance of AccessReviewHistoryDefinitionClient 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 (*AccessReviewHistoryDefinitionClient) Create ¶
func (client *AccessReviewHistoryDefinitionClient) Create(ctx context.Context, historyDefinitionID string, properties AccessReviewHistoryDefinitionProperties, options *AccessReviewHistoryDefinitionClientCreateOptions) (AccessReviewHistoryDefinitionClientCreateResponse, error)
Create - Create a scheduled or one-time Access Review History Definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- historyDefinitionID - The id of the access review history definition.
- properties - Access review history definition properties.
- options - AccessReviewHistoryDefinitionClientCreateOptions contains the optional parameters for the AccessReviewHistoryDefinitionClient.Create method.
func (*AccessReviewHistoryDefinitionClient) DeleteByID ¶
func (client *AccessReviewHistoryDefinitionClient) DeleteByID(ctx context.Context, historyDefinitionID string, options *AccessReviewHistoryDefinitionClientDeleteByIDOptions) (AccessReviewHistoryDefinitionClientDeleteByIDResponse, error)
DeleteByID - Delete an access review history definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- historyDefinitionID - The id of the access review history definition.
- options - AccessReviewHistoryDefinitionClientDeleteByIDOptions contains the optional parameters for the AccessReviewHistoryDefinitionClient.DeleteByID method.
type AccessReviewHistoryDefinitionClientCreateOptions ¶
type AccessReviewHistoryDefinitionClientCreateOptions struct { }
AccessReviewHistoryDefinitionClientCreateOptions contains the optional parameters for the AccessReviewHistoryDefinitionClient.Create method.
type AccessReviewHistoryDefinitionClientCreateResponse ¶
type AccessReviewHistoryDefinitionClientCreateResponse struct { // Access Review History Definition. AccessReviewHistoryDefinition }
AccessReviewHistoryDefinitionClientCreateResponse contains the response from method AccessReviewHistoryDefinitionClient.Create.
type AccessReviewHistoryDefinitionClientDeleteByIDOptions ¶
type AccessReviewHistoryDefinitionClientDeleteByIDOptions struct { }
AccessReviewHistoryDefinitionClientDeleteByIDOptions contains the optional parameters for the AccessReviewHistoryDefinitionClient.DeleteByID method.
type AccessReviewHistoryDefinitionClientDeleteByIDResponse ¶
type AccessReviewHistoryDefinitionClientDeleteByIDResponse struct { }
AccessReviewHistoryDefinitionClientDeleteByIDResponse contains the response from method AccessReviewHistoryDefinitionClient.DeleteByID.
type AccessReviewHistoryDefinitionInstanceClient ¶
type AccessReviewHistoryDefinitionInstanceClient struct {
// contains filtered or unexported fields
}
AccessReviewHistoryDefinitionInstanceClient contains the methods for the AccessReviewHistoryDefinitionInstance group. Don't use this type directly, use NewAccessReviewHistoryDefinitionInstanceClient() instead.
func NewAccessReviewHistoryDefinitionInstanceClient ¶
func NewAccessReviewHistoryDefinitionInstanceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewHistoryDefinitionInstanceClient, error)
NewAccessReviewHistoryDefinitionInstanceClient creates a new instance of AccessReviewHistoryDefinitionInstanceClient 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 (*AccessReviewHistoryDefinitionInstanceClient) GenerateDownloadURI ¶
func (client *AccessReviewHistoryDefinitionInstanceClient) GenerateDownloadURI(ctx context.Context, historyDefinitionID string, instanceID string, options *AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions) (AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse, error)
GenerateDownloadURI - Generates a uri which can be used to retrieve review history data. This URI has a TTL of 1 day and can be retrieved by fetching the accessReviewHistoryDefinition object. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- historyDefinitionID - The id of the access review history definition.
- instanceID - The id of the access review history definition instance to generate a URI for.
- options - AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions contains the optional parameters for the AccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI method.
type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions ¶
type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions struct { }
AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions contains the optional parameters for the AccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI method.
type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse ¶
type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse struct { // Access Review History Definition Instance. AccessReviewHistoryInstance }
AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse contains the response from method AccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI.
type AccessReviewHistoryDefinitionInstanceListResult ¶
type AccessReviewHistoryDefinitionInstanceListResult struct { // The URL to use for getting the next set of results. NextLink *string // Access Review History Definition's Instance list. Value []*AccessReviewHistoryInstance }
AccessReviewHistoryDefinitionInstanceListResult - List of Access Review History Instances.
func (AccessReviewHistoryDefinitionInstanceListResult) MarshalJSON ¶
func (a AccessReviewHistoryDefinitionInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryDefinitionInstanceListResult.
func (*AccessReviewHistoryDefinitionInstanceListResult) UnmarshalJSON ¶
func (a *AccessReviewHistoryDefinitionInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryDefinitionInstanceListResult.
type AccessReviewHistoryDefinitionInstancesClient ¶
type AccessReviewHistoryDefinitionInstancesClient struct {
// contains filtered or unexported fields
}
AccessReviewHistoryDefinitionInstancesClient contains the methods for the AccessReviewHistoryDefinitionInstances group. Don't use this type directly, use NewAccessReviewHistoryDefinitionInstancesClient() instead.
func NewAccessReviewHistoryDefinitionInstancesClient ¶
func NewAccessReviewHistoryDefinitionInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewHistoryDefinitionInstancesClient, error)
NewAccessReviewHistoryDefinitionInstancesClient creates a new instance of AccessReviewHistoryDefinitionInstancesClient 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 (*AccessReviewHistoryDefinitionInstancesClient) NewListPager ¶
func (client *AccessReviewHistoryDefinitionInstancesClient) NewListPager(historyDefinitionID string, options *AccessReviewHistoryDefinitionInstancesClientListOptions) *runtime.Pager[AccessReviewHistoryDefinitionInstancesClientListResponse]
NewListPager - Get access review history definition instances by definition Id
Generated from API version 2021-12-01-preview
- historyDefinitionID - The id of the access review history definition.
- options - AccessReviewHistoryDefinitionInstancesClientListOptions contains the optional parameters for the AccessReviewHistoryDefinitionInstancesClient.NewListPager method.
type AccessReviewHistoryDefinitionInstancesClientListOptions ¶
type AccessReviewHistoryDefinitionInstancesClientListOptions struct { }
AccessReviewHistoryDefinitionInstancesClientListOptions contains the optional parameters for the AccessReviewHistoryDefinitionInstancesClient.NewListPager method.
type AccessReviewHistoryDefinitionInstancesClientListResponse ¶
type AccessReviewHistoryDefinitionInstancesClientListResponse struct { // List of Access Review History Instances. AccessReviewHistoryDefinitionInstanceListResult }
AccessReviewHistoryDefinitionInstancesClientListResponse contains the response from method AccessReviewHistoryDefinitionInstancesClient.NewListPager.
type AccessReviewHistoryDefinitionListResult ¶
type AccessReviewHistoryDefinitionListResult struct { // The URL to use for getting the next set of results. NextLink *string // Access Review History Definition list. Value []*AccessReviewHistoryDefinition }
AccessReviewHistoryDefinitionListResult - List of Access Review History Definitions.
func (AccessReviewHistoryDefinitionListResult) MarshalJSON ¶
func (a AccessReviewHistoryDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryDefinitionListResult.
func (*AccessReviewHistoryDefinitionListResult) UnmarshalJSON ¶
func (a *AccessReviewHistoryDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryDefinitionListResult.
type AccessReviewHistoryDefinitionProperties ¶
type AccessReviewHistoryDefinitionProperties struct { // Collection of review decisions which the history data should be filtered on. For example if Approve and Deny are supplied // the data will only contain review results in which the decision maker approved // or denied a review request. Decisions []*AccessReviewResult // The display name for the history definition. DisplayName *string // Set of access review history instances for this history definition. Instances []*AccessReviewHistoryInstance // A collection of scopes used when selecting review history data Scopes []*AccessReviewScope // Recurrence settings for recurring history reports, skip for one-time reports. Settings *AccessReviewHistoryScheduleSettings // READ-ONLY; The user or other identity who created this history definition. CreatedBy *AccessReviewActorIdentity // READ-ONLY; Date time when history definition was created CreatedDateTime *time.Time // READ-ONLY; Date time used when selecting review data, all reviews included in data end on or before this date. For use // only with one-time/non-recurring reports. ReviewHistoryPeriodEndDateTime *time.Time // READ-ONLY; Date time used when selecting review data, all reviews included in data start on or after this date. For use // only with one-time/non-recurring reports. ReviewHistoryPeriodStartDateTime *time.Time // READ-ONLY; This read-only field specifies the of the requested review history data. This is either requested, in-progress, // done or error. Status *AccessReviewHistoryDefinitionStatus }
AccessReviewHistoryDefinitionProperties - Access Review History Instances.
func (AccessReviewHistoryDefinitionProperties) MarshalJSON ¶
func (a AccessReviewHistoryDefinitionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryDefinitionProperties.
func (*AccessReviewHistoryDefinitionProperties) UnmarshalJSON ¶
func (a *AccessReviewHistoryDefinitionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryDefinitionProperties.
type AccessReviewHistoryDefinitionStatus ¶
type AccessReviewHistoryDefinitionStatus string
AccessReviewHistoryDefinitionStatus - This read-only field specifies the of the requested review history data. This is either requested, in-progress, done or error.
const ( AccessReviewHistoryDefinitionStatusDone AccessReviewHistoryDefinitionStatus = "Done" AccessReviewHistoryDefinitionStatusError AccessReviewHistoryDefinitionStatus = "Error" AccessReviewHistoryDefinitionStatusInProgress AccessReviewHistoryDefinitionStatus = "InProgress" AccessReviewHistoryDefinitionStatusRequested AccessReviewHistoryDefinitionStatus = "Requested" )
func PossibleAccessReviewHistoryDefinitionStatusValues ¶
func PossibleAccessReviewHistoryDefinitionStatusValues() []AccessReviewHistoryDefinitionStatus
PossibleAccessReviewHistoryDefinitionStatusValues returns the possible values for the AccessReviewHistoryDefinitionStatus const type.
type AccessReviewHistoryDefinitionsClient ¶
type AccessReviewHistoryDefinitionsClient struct {
// contains filtered or unexported fields
}
AccessReviewHistoryDefinitionsClient contains the methods for the AccessReviewHistoryDefinitions group. Don't use this type directly, use NewAccessReviewHistoryDefinitionsClient() instead.
func NewAccessReviewHistoryDefinitionsClient ¶
func NewAccessReviewHistoryDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewHistoryDefinitionsClient, error)
NewAccessReviewHistoryDefinitionsClient creates a new instance of AccessReviewHistoryDefinitionsClient 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 (*AccessReviewHistoryDefinitionsClient) GetByID ¶
func (client *AccessReviewHistoryDefinitionsClient) GetByID(ctx context.Context, historyDefinitionID string, options *AccessReviewHistoryDefinitionsClientGetByIDOptions) (AccessReviewHistoryDefinitionsClientGetByIDResponse, error)
GetByID - Get access review history definition by definition Id If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- historyDefinitionID - The id of the access review history definition.
- options - AccessReviewHistoryDefinitionsClientGetByIDOptions contains the optional parameters for the AccessReviewHistoryDefinitionsClient.GetByID method.
func (*AccessReviewHistoryDefinitionsClient) NewListPager ¶
func (client *AccessReviewHistoryDefinitionsClient) NewListPager(options *AccessReviewHistoryDefinitionsClientListOptions) *runtime.Pager[AccessReviewHistoryDefinitionsClientListResponse]
NewListPager - Lists the accessReviewHistoryDefinitions available from this provider, definition instances are only available for 30 days after creation.
Generated from API version 2021-12-01-preview
- options - AccessReviewHistoryDefinitionsClientListOptions contains the optional parameters for the AccessReviewHistoryDefinitionsClient.NewListPager method.
type AccessReviewHistoryDefinitionsClientGetByIDOptions ¶
type AccessReviewHistoryDefinitionsClientGetByIDOptions struct { }
AccessReviewHistoryDefinitionsClientGetByIDOptions contains the optional parameters for the AccessReviewHistoryDefinitionsClient.GetByID method.
type AccessReviewHistoryDefinitionsClientGetByIDResponse ¶
type AccessReviewHistoryDefinitionsClientGetByIDResponse struct { // Access Review History Definition. AccessReviewHistoryDefinition }
AccessReviewHistoryDefinitionsClientGetByIDResponse contains the response from method AccessReviewHistoryDefinitionsClient.GetByID.
type AccessReviewHistoryDefinitionsClientListOptions ¶
type AccessReviewHistoryDefinitionsClientListOptions struct { // The filter to apply on the operation. Only standard filters on definition name and created date are supported Filter *string }
AccessReviewHistoryDefinitionsClientListOptions contains the optional parameters for the AccessReviewHistoryDefinitionsClient.NewListPager method.
type AccessReviewHistoryDefinitionsClientListResponse ¶
type AccessReviewHistoryDefinitionsClientListResponse struct { // List of Access Review History Definitions. AccessReviewHistoryDefinitionListResult }
AccessReviewHistoryDefinitionsClientListResponse contains the response from method AccessReviewHistoryDefinitionsClient.NewListPager.
type AccessReviewHistoryInstance ¶
type AccessReviewHistoryInstance struct { // Access Review History Definition Instance properties. Properties *AccessReviewHistoryInstanceProperties // READ-ONLY; The access review history definition instance id. ID *string // READ-ONLY; The access review history definition instance unique id. Name *string // READ-ONLY; The resource type. Type *string }
AccessReviewHistoryInstance - Access Review History Definition Instance.
func (AccessReviewHistoryInstance) MarshalJSON ¶
func (a AccessReviewHistoryInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryInstance.
func (*AccessReviewHistoryInstance) UnmarshalJSON ¶
func (a *AccessReviewHistoryInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryInstance.
type AccessReviewHistoryInstanceProperties ¶
type AccessReviewHistoryInstanceProperties struct { // The display name for the parent history definition. DisplayName *string // Date time when history data report expires and the associated data is deleted. Expiration *time.Time // Date time when the history data report is scheduled to be generated. FulfilledDateTime *time.Time // Date time used when selecting review data, all reviews included in data end on or before this date. For use only with one-time/non-recurring // reports. ReviewHistoryPeriodEndDateTime *time.Time // Date time used when selecting review data, all reviews included in data start on or after this date. For use only with // one-time/non-recurring reports. ReviewHistoryPeriodStartDateTime *time.Time // Date time when the history data report is scheduled to be generated. RunDateTime *time.Time // READ-ONLY; Uri which can be used to retrieve review history data. To generate this Uri, generateDownloadUri() must be called // for a specific accessReviewHistoryDefinitionInstance. The link expires after a 24 hour // period. Callers can see the expiration date time by looking at the 'se' parameter in the generated uri. DownloadURI *string // READ-ONLY; Status of the requested review history instance data. This is either requested, in-progress, done or error. // The state transitions are as follows - Requested -> InProgress -> Done -> Expired Status *AccessReviewHistoryDefinitionStatus }
AccessReviewHistoryInstanceProperties - Access Review History Definition Instance properties.
func (AccessReviewHistoryInstanceProperties) MarshalJSON ¶
func (a AccessReviewHistoryInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryInstanceProperties.
func (*AccessReviewHistoryInstanceProperties) UnmarshalJSON ¶
func (a *AccessReviewHistoryInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryInstanceProperties.
type AccessReviewHistoryScheduleSettings ¶
type AccessReviewHistoryScheduleSettings struct { // Access Review History Definition recurrence settings. Pattern *AccessReviewRecurrencePattern // Access Review History Definition recurrence settings. Range *AccessReviewRecurrenceRange }
AccessReviewHistoryScheduleSettings - Recurrence settings of an Access Review History Definition.
func (AccessReviewHistoryScheduleSettings) MarshalJSON ¶
func (a AccessReviewHistoryScheduleSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryScheduleSettings.
func (*AccessReviewHistoryScheduleSettings) UnmarshalJSON ¶
func (a *AccessReviewHistoryScheduleSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryScheduleSettings.
type AccessReviewInstance ¶
type AccessReviewInstance struct { // Access Review properties. Properties *AccessReviewInstanceProperties // READ-ONLY; The access review instance id. ID *string // READ-ONLY; The access review instance name. Name *string // READ-ONLY; The resource type. Type *string }
AccessReviewInstance - Access Review Instance.
func (AccessReviewInstance) MarshalJSON ¶
func (a AccessReviewInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewInstance.
func (*AccessReviewInstance) UnmarshalJSON ¶
func (a *AccessReviewInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewInstance.
type AccessReviewInstanceClient ¶
type AccessReviewInstanceClient struct {
// contains filtered or unexported fields
}
AccessReviewInstanceClient contains the methods for the AccessReviewInstance group. Don't use this type directly, use NewAccessReviewInstanceClient() instead.
func NewAccessReviewInstanceClient ¶
func NewAccessReviewInstanceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstanceClient, error)
NewAccessReviewInstanceClient creates a new instance of AccessReviewInstanceClient 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 (*AccessReviewInstanceClient) AcceptRecommendations ¶
func (client *AccessReviewInstanceClient) AcceptRecommendations(ctx context.Context, scheduleDefinitionID string, id string, options *AccessReviewInstanceClientAcceptRecommendationsOptions) (AccessReviewInstanceClientAcceptRecommendationsResponse, error)
AcceptRecommendations - An action to accept recommendations for decision in an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstanceClientAcceptRecommendationsOptions contains the optional parameters for the AccessReviewInstanceClient.AcceptRecommendations method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/AccessReviewInstanceAcceptRecommendations.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.NewAccessReviewInstanceClient().AcceptRecommendations(ctx, "488a6d0e-0a63-4946-86e3-1f5bbc934661", "d9b9e056-7004-470b-bf21-1635e98487da", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*AccessReviewInstanceClient) ApplyDecisions ¶
func (client *AccessReviewInstanceClient) ApplyDecisions(ctx context.Context, scheduleDefinitionID string, id string, options *AccessReviewInstanceClientApplyDecisionsOptions) (AccessReviewInstanceClientApplyDecisionsResponse, error)
ApplyDecisions - An action to apply all decisions for an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstanceClientApplyDecisionsOptions contains the optional parameters for the AccessReviewInstanceClient.ApplyDecisions method.
func (*AccessReviewInstanceClient) ResetDecisions ¶
func (client *AccessReviewInstanceClient) ResetDecisions(ctx context.Context, scheduleDefinitionID string, id string, options *AccessReviewInstanceClientResetDecisionsOptions) (AccessReviewInstanceClientResetDecisionsResponse, error)
ResetDecisions - An action to reset all decisions for an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstanceClientResetDecisionsOptions contains the optional parameters for the AccessReviewInstanceClient.ResetDecisions method.
func (*AccessReviewInstanceClient) SendReminders ¶
func (client *AccessReviewInstanceClient) SendReminders(ctx context.Context, scheduleDefinitionID string, id string, options *AccessReviewInstanceClientSendRemindersOptions) (AccessReviewInstanceClientSendRemindersResponse, error)
SendReminders - An action to send reminders for an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstanceClientSendRemindersOptions contains the optional parameters for the AccessReviewInstanceClient.SendReminders method.
func (*AccessReviewInstanceClient) Stop ¶
func (client *AccessReviewInstanceClient) Stop(ctx context.Context, scheduleDefinitionID string, id string, options *AccessReviewInstanceClientStopOptions) (AccessReviewInstanceClientStopResponse, error)
Stop - An action to stop an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstanceClientStopOptions contains the optional parameters for the AccessReviewInstanceClient.Stop method.
type AccessReviewInstanceClientAcceptRecommendationsOptions ¶
type AccessReviewInstanceClientAcceptRecommendationsOptions struct { }
AccessReviewInstanceClientAcceptRecommendationsOptions contains the optional parameters for the AccessReviewInstanceClient.AcceptRecommendations method.
type AccessReviewInstanceClientAcceptRecommendationsResponse ¶
type AccessReviewInstanceClientAcceptRecommendationsResponse struct { }
AccessReviewInstanceClientAcceptRecommendationsResponse contains the response from method AccessReviewInstanceClient.AcceptRecommendations.
type AccessReviewInstanceClientApplyDecisionsOptions ¶
type AccessReviewInstanceClientApplyDecisionsOptions struct { }
AccessReviewInstanceClientApplyDecisionsOptions contains the optional parameters for the AccessReviewInstanceClient.ApplyDecisions method.
type AccessReviewInstanceClientApplyDecisionsResponse ¶
type AccessReviewInstanceClientApplyDecisionsResponse struct { }
AccessReviewInstanceClientApplyDecisionsResponse contains the response from method AccessReviewInstanceClient.ApplyDecisions.
type AccessReviewInstanceClientResetDecisionsOptions ¶
type AccessReviewInstanceClientResetDecisionsOptions struct { }
AccessReviewInstanceClientResetDecisionsOptions contains the optional parameters for the AccessReviewInstanceClient.ResetDecisions method.
type AccessReviewInstanceClientResetDecisionsResponse ¶
type AccessReviewInstanceClientResetDecisionsResponse struct { }
AccessReviewInstanceClientResetDecisionsResponse contains the response from method AccessReviewInstanceClient.ResetDecisions.
type AccessReviewInstanceClientSendRemindersOptions ¶
type AccessReviewInstanceClientSendRemindersOptions struct { }
AccessReviewInstanceClientSendRemindersOptions contains the optional parameters for the AccessReviewInstanceClient.SendReminders method.
type AccessReviewInstanceClientSendRemindersResponse ¶
type AccessReviewInstanceClientSendRemindersResponse struct { }
AccessReviewInstanceClientSendRemindersResponse contains the response from method AccessReviewInstanceClient.SendReminders.
type AccessReviewInstanceClientStopOptions ¶
type AccessReviewInstanceClientStopOptions struct { }
AccessReviewInstanceClientStopOptions contains the optional parameters for the AccessReviewInstanceClient.Stop method.
type AccessReviewInstanceClientStopResponse ¶
type AccessReviewInstanceClientStopResponse struct { }
AccessReviewInstanceClientStopResponse contains the response from method AccessReviewInstanceClient.Stop.
type AccessReviewInstanceContactedReviewersClient ¶
type AccessReviewInstanceContactedReviewersClient struct {
// contains filtered or unexported fields
}
AccessReviewInstanceContactedReviewersClient contains the methods for the AccessReviewInstanceContactedReviewers group. Don't use this type directly, use NewAccessReviewInstanceContactedReviewersClient() instead.
func NewAccessReviewInstanceContactedReviewersClient ¶
func NewAccessReviewInstanceContactedReviewersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstanceContactedReviewersClient, error)
NewAccessReviewInstanceContactedReviewersClient creates a new instance of AccessReviewInstanceContactedReviewersClient 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 (*AccessReviewInstanceContactedReviewersClient) NewListPager ¶
func (client *AccessReviewInstanceContactedReviewersClient) NewListPager(scheduleDefinitionID string, id string, options *AccessReviewInstanceContactedReviewersClientListOptions) *runtime.Pager[AccessReviewInstanceContactedReviewersClientListResponse]
NewListPager - Get access review instance contacted reviewers
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the AccessReviewInstanceContactedReviewersClient.NewListPager method.
type AccessReviewInstanceContactedReviewersClientListOptions ¶
type AccessReviewInstanceContactedReviewersClientListOptions struct { }
AccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the AccessReviewInstanceContactedReviewersClient.NewListPager method.
type AccessReviewInstanceContactedReviewersClientListResponse ¶
type AccessReviewInstanceContactedReviewersClientListResponse struct { // List of access review contacted reviewers. AccessReviewContactedReviewerListResult }
AccessReviewInstanceContactedReviewersClientListResponse contains the response from method AccessReviewInstanceContactedReviewersClient.NewListPager.
type AccessReviewInstanceDecisionsClient ¶
type AccessReviewInstanceDecisionsClient struct {
// contains filtered or unexported fields
}
AccessReviewInstanceDecisionsClient contains the methods for the AccessReviewInstanceDecisions group. Don't use this type directly, use NewAccessReviewInstanceDecisionsClient() instead.
func NewAccessReviewInstanceDecisionsClient ¶
func NewAccessReviewInstanceDecisionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstanceDecisionsClient, error)
NewAccessReviewInstanceDecisionsClient creates a new instance of AccessReviewInstanceDecisionsClient 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 (*AccessReviewInstanceDecisionsClient) NewListPager ¶
func (client *AccessReviewInstanceDecisionsClient) NewListPager(scheduleDefinitionID string, id string, options *AccessReviewInstanceDecisionsClientListOptions) *runtime.Pager[AccessReviewInstanceDecisionsClientListResponse]
NewListPager - Get access review instance decisions
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstanceDecisionsClientListOptions contains the optional parameters for the AccessReviewInstanceDecisionsClient.NewListPager method.
type AccessReviewInstanceDecisionsClientListOptions ¶
type AccessReviewInstanceDecisionsClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
AccessReviewInstanceDecisionsClientListOptions contains the optional parameters for the AccessReviewInstanceDecisionsClient.NewListPager method.
type AccessReviewInstanceDecisionsClientListResponse ¶
type AccessReviewInstanceDecisionsClientListResponse struct { // List of access review decisions. AccessReviewDecisionListResult }
AccessReviewInstanceDecisionsClientListResponse contains the response from method AccessReviewInstanceDecisionsClient.NewListPager.
type AccessReviewInstanceListResult ¶
type AccessReviewInstanceListResult struct { // The URL to use for getting the next set of results. NextLink *string // Access Review Instance list. Value []*AccessReviewInstance }
AccessReviewInstanceListResult - List of Access Review Instances.
func (AccessReviewInstanceListResult) MarshalJSON ¶
func (a AccessReviewInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewInstanceListResult.
func (*AccessReviewInstanceListResult) UnmarshalJSON ¶
func (a *AccessReviewInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewInstanceListResult.
type AccessReviewInstanceMyDecisionsClient ¶
type AccessReviewInstanceMyDecisionsClient struct {
// contains filtered or unexported fields
}
AccessReviewInstanceMyDecisionsClient contains the methods for the AccessReviewInstanceMyDecisions group. Don't use this type directly, use NewAccessReviewInstanceMyDecisionsClient() instead.
func NewAccessReviewInstanceMyDecisionsClient ¶
func NewAccessReviewInstanceMyDecisionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstanceMyDecisionsClient, error)
NewAccessReviewInstanceMyDecisionsClient creates a new instance of AccessReviewInstanceMyDecisionsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AccessReviewInstanceMyDecisionsClient) GetByID ¶
func (client *AccessReviewInstanceMyDecisionsClient) GetByID(ctx context.Context, scheduleDefinitionID string, id string, decisionID string, options *AccessReviewInstanceMyDecisionsClientGetByIDOptions) (AccessReviewInstanceMyDecisionsClientGetByIDResponse, error)
GetByID - Get my single access review instance decision. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- decisionID - The id of the decision record.
- options - AccessReviewInstanceMyDecisionsClientGetByIDOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.GetByID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewInstanceMyDecisionById.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.NewAccessReviewInstanceMyDecisionsClient().GetByID(ctx, "488a6d0e-0a63-4946-86e3-1f5bbc934661", "4135f961-be78-4005-8101-c72a5af307a2", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", 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.AccessReviewDecision = armauthorization.AccessReviewDecision{ // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances/decisions"), // ID: to.Ptr("/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/488a6d0e-0a63-4946-86e3-1f5bbc934661/instances/4135f961-be78-4005-8101-c72a5af307a2/decisions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewDecisionProperties{ // AppliedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("36777fc8-4ec2-49ea-a56c-cec0bd47d83a"), // PrincipalName: to.Ptr("Amit Ghosh"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("amitgho@microsoft.com"), // }, // AppliedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-03T21:02:30.667Z"); return t}()), // ApplyResult: to.Ptr(armauthorization.AccessReviewApplyResult("Success")), // Decision: to.Ptr(armauthorization.AccessReviewResultDeny), // Justification: to.Ptr("This person has left this team"), // Principal: &armauthorization.AccessReviewDecisionUserIdentity{ // Type: to.Ptr(armauthorization.DecisionTargetTypeUser), // DisplayName: to.Ptr("Shubham Gupta"), // ID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // PrincipalResourceMembership: &armauthorization.AccessReviewDecisionPrincipalResourceMembership{ // MembershipTypes: []*armauthorization.AccessReviewDecisionPrincipalResourceMembershipType{ // to.Ptr(armauthorization.AccessReviewDecisionPrincipalResourceMembershipTypeDirect), // to.Ptr(armauthorization.AccessReviewDecisionPrincipalResourceMembershipTypeIndirect)}, // }, // Recommendation: to.Ptr(armauthorization.AccessRecommendationTypeDeny), // Resource: &armauthorization.AccessReviewDecisionResource{ // Type: to.Ptr(armauthorization.DecisionResourceTypeAzureRole), // DisplayName: to.Ptr("Owner"), // ID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // }, // ReviewedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // PrincipalName: to.Ptr("Shubham Gupta"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // ReviewedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }
Output:
func (*AccessReviewInstanceMyDecisionsClient) NewListPager ¶
func (client *AccessReviewInstanceMyDecisionsClient) NewListPager(scheduleDefinitionID string, id string, options *AccessReviewInstanceMyDecisionsClientListOptions) *runtime.Pager[AccessReviewInstanceMyDecisionsClientListResponse]
NewListPager - Get my access review instance decisions.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstanceMyDecisionsClientListOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewInstanceMyDecisions.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.NewAccessReviewInstanceMyDecisionsClient().NewListPager("488a6d0e-0a63-4946-86e3-1f5bbc934661", "4135f961-be78-4005-8101-c72a5af307a2", &armauthorization.AccessReviewInstanceMyDecisionsClientListOptions{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.AccessReviewDecisionListResult = armauthorization.AccessReviewDecisionListResult{ // Value: []*armauthorization.AccessReviewDecision{ // { // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances/decisions"), // ID: to.Ptr("/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/488a6d0e-0a63-4946-86e3-1f5bbc934661/instances/4135f961-be78-4005-8101-c72a5af307a2/decisions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewDecisionProperties{ // AppliedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("36777fc8-4ec2-49ea-a56c-cec0bd47d83a"), // PrincipalName: to.Ptr("Amit Ghosh"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("amitgho@microsoft.com"), // }, // AppliedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-03T21:02:30.667Z"); return t}()), // ApplyResult: to.Ptr(armauthorization.AccessReviewApplyResult("Success")), // Decision: to.Ptr(armauthorization.AccessReviewResultDeny), // Justification: to.Ptr("This person has left this team"), // Principal: &armauthorization.AccessReviewDecisionUserIdentity{ // Type: to.Ptr(armauthorization.DecisionTargetTypeUser), // DisplayName: to.Ptr("Shubham Gupta"), // ID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // PrincipalResourceMembership: &armauthorization.AccessReviewDecisionPrincipalResourceMembership{ // MembershipTypes: []*armauthorization.AccessReviewDecisionPrincipalResourceMembershipType{ // to.Ptr(armauthorization.AccessReviewDecisionPrincipalResourceMembershipTypeDirect), // to.Ptr(armauthorization.AccessReviewDecisionPrincipalResourceMembershipTypeIndirect)}, // }, // Recommendation: to.Ptr(armauthorization.AccessRecommendationTypeDeny), // Resource: &armauthorization.AccessReviewDecisionResource{ // Type: to.Ptr(armauthorization.DecisionResourceTypeAzureRole), // DisplayName: to.Ptr("Owner"), // ID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // }, // ReviewedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // PrincipalName: to.Ptr("Shubham Gupta"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // ReviewedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }}, // } }
Output:
func (*AccessReviewInstanceMyDecisionsClient) Patch ¶
func (client *AccessReviewInstanceMyDecisionsClient) Patch(ctx context.Context, scheduleDefinitionID string, id string, decisionID string, properties AccessReviewDecisionProperties, options *AccessReviewInstanceMyDecisionsClientPatchOptions) (AccessReviewInstanceMyDecisionsClientPatchResponse, error)
Patch - Record a decision. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- decisionID - The id of the decision record.
- properties - Access review decision properties to patch.
- options - AccessReviewInstanceMyDecisionsClientPatchOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.Patch method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/PatchAccessReviewInstanceMyDecisionById.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.NewAccessReviewInstanceMyDecisionsClient().Patch(ctx, "488a6d0e-0a63-4946-86e3-1f5bbc934661", "4135f961-be78-4005-8101-c72a5af307a2", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", armauthorization.AccessReviewDecisionProperties{}, 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.AccessReviewDecision = armauthorization.AccessReviewDecision{ // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances/decisions"), // ID: to.Ptr("/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/488a6d0e-0a63-4946-86e3-1f5bbc934661/instances/4135f961-be78-4005-8101-c72a5af307a2/decisions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewDecisionProperties{ // AppliedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("36777fc8-4ec2-49ea-a56c-cec0bd47d83a"), // PrincipalName: to.Ptr("Amit Ghosh"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("amitgho@microsoft.com"), // }, // AppliedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-03T21:02:30.667Z"); return t}()), // ApplyResult: to.Ptr(armauthorization.AccessReviewApplyResult("Success")), // Decision: to.Ptr(armauthorization.AccessReviewResultDeny), // Justification: to.Ptr("This person has left this team"), // Principal: &armauthorization.AccessReviewDecisionUserIdentity{ // Type: to.Ptr(armauthorization.DecisionTargetTypeUser), // DisplayName: to.Ptr("Shubham Gupta"), // ID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // Recommendation: to.Ptr(armauthorization.AccessRecommendationTypeDeny), // Resource: &armauthorization.AccessReviewDecisionResource{ // Type: to.Ptr(armauthorization.DecisionResourceTypeAzureRole), // DisplayName: to.Ptr("Owner"), // ID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // }, // ReviewedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // PrincipalName: to.Ptr("Shubham Gupta"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // ReviewedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }
Output:
type AccessReviewInstanceMyDecisionsClientGetByIDOptions ¶
type AccessReviewInstanceMyDecisionsClientGetByIDOptions struct { }
AccessReviewInstanceMyDecisionsClientGetByIDOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.GetByID method.
type AccessReviewInstanceMyDecisionsClientGetByIDResponse ¶
type AccessReviewInstanceMyDecisionsClientGetByIDResponse struct { // Access Review. AccessReviewDecision }
AccessReviewInstanceMyDecisionsClientGetByIDResponse contains the response from method AccessReviewInstanceMyDecisionsClient.GetByID.
type AccessReviewInstanceMyDecisionsClientListOptions ¶
type AccessReviewInstanceMyDecisionsClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
AccessReviewInstanceMyDecisionsClientListOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.NewListPager method.
type AccessReviewInstanceMyDecisionsClientListResponse ¶
type AccessReviewInstanceMyDecisionsClientListResponse struct { // List of access review decisions. AccessReviewDecisionListResult }
AccessReviewInstanceMyDecisionsClientListResponse contains the response from method AccessReviewInstanceMyDecisionsClient.NewListPager.
type AccessReviewInstanceMyDecisionsClientPatchOptions ¶
type AccessReviewInstanceMyDecisionsClientPatchOptions struct { }
AccessReviewInstanceMyDecisionsClientPatchOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.Patch method.
type AccessReviewInstanceMyDecisionsClientPatchResponse ¶
type AccessReviewInstanceMyDecisionsClientPatchResponse struct { // Access Review. AccessReviewDecision }
AccessReviewInstanceMyDecisionsClientPatchResponse contains the response from method AccessReviewInstanceMyDecisionsClient.Patch.
type AccessReviewInstanceProperties ¶
type AccessReviewInstanceProperties struct { // This is the collection of backup reviewers. BackupReviewers []*AccessReviewReviewer // The DateTime when the review instance is scheduled to end. EndDateTime *time.Time // This is the collection of reviewers. Reviewers []*AccessReviewReviewer // The DateTime when the review instance is scheduled to be start. StartDateTime *time.Time // READ-ONLY; This field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned. // However, in some cases, the reviewers may not be assigned and instead be chosen // dynamically. For example managers review or self review. ReviewersType *AccessReviewInstanceReviewersType // READ-ONLY; This read-only field specifies the status of an access review instance. Status *AccessReviewInstanceStatus }
AccessReviewInstanceProperties - Access Review Instance properties.
func (AccessReviewInstanceProperties) MarshalJSON ¶
func (a AccessReviewInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewInstanceProperties.
func (*AccessReviewInstanceProperties) UnmarshalJSON ¶
func (a *AccessReviewInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewInstanceProperties.
type AccessReviewInstanceReviewersType ¶
type AccessReviewInstanceReviewersType string
AccessReviewInstanceReviewersType - This field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned. However, in some cases, the reviewers may not be assigned and instead be chosen dynamically. For example managers review or self review.
const ( AccessReviewInstanceReviewersTypeAssigned AccessReviewInstanceReviewersType = "Assigned" AccessReviewInstanceReviewersTypeManagers AccessReviewInstanceReviewersType = "Managers" AccessReviewInstanceReviewersTypeSelf AccessReviewInstanceReviewersType = "Self" )
func PossibleAccessReviewInstanceReviewersTypeValues ¶
func PossibleAccessReviewInstanceReviewersTypeValues() []AccessReviewInstanceReviewersType
PossibleAccessReviewInstanceReviewersTypeValues returns the possible values for the AccessReviewInstanceReviewersType const type.
type AccessReviewInstanceStatus ¶
type AccessReviewInstanceStatus string
AccessReviewInstanceStatus - This read-only field specifies the status of an access review instance.
const ( AccessReviewInstanceStatusApplied AccessReviewInstanceStatus = "Applied" AccessReviewInstanceStatusApplying AccessReviewInstanceStatus = "Applying" AccessReviewInstanceStatusAutoReviewed AccessReviewInstanceStatus = "AutoReviewed" AccessReviewInstanceStatusAutoReviewing AccessReviewInstanceStatus = "AutoReviewing" AccessReviewInstanceStatusCompleted AccessReviewInstanceStatus = "Completed" AccessReviewInstanceStatusCompleting AccessReviewInstanceStatus = "Completing" AccessReviewInstanceStatusInProgress AccessReviewInstanceStatus = "InProgress" AccessReviewInstanceStatusInitializing AccessReviewInstanceStatus = "Initializing" AccessReviewInstanceStatusNotStarted AccessReviewInstanceStatus = "NotStarted" AccessReviewInstanceStatusScheduled AccessReviewInstanceStatus = "Scheduled" AccessReviewInstanceStatusStarting AccessReviewInstanceStatus = "Starting" )
func PossibleAccessReviewInstanceStatusValues ¶
func PossibleAccessReviewInstanceStatusValues() []AccessReviewInstanceStatus
PossibleAccessReviewInstanceStatusValues returns the possible values for the AccessReviewInstanceStatus const type.
type AccessReviewInstancesAssignedForMyApprovalClient ¶
type AccessReviewInstancesAssignedForMyApprovalClient struct {
// contains filtered or unexported fields
}
AccessReviewInstancesAssignedForMyApprovalClient contains the methods for the AccessReviewInstancesAssignedForMyApproval group. Don't use this type directly, use NewAccessReviewInstancesAssignedForMyApprovalClient() instead.
func NewAccessReviewInstancesAssignedForMyApprovalClient ¶
func NewAccessReviewInstancesAssignedForMyApprovalClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstancesAssignedForMyApprovalClient, error)
NewAccessReviewInstancesAssignedForMyApprovalClient creates a new instance of AccessReviewInstancesAssignedForMyApprovalClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AccessReviewInstancesAssignedForMyApprovalClient) GetByID ¶
func (client *AccessReviewInstancesAssignedForMyApprovalClient) GetByID(ctx context.Context, scheduleDefinitionID string, id string, options *AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions) (AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse, error)
GetByID - Get single access review instance assigned for my approval. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions contains the optional parameters for the AccessReviewInstancesAssignedForMyApprovalClient.GetByID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewInstanceAssignedForMyApproval.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.NewAccessReviewInstancesAssignedForMyApprovalClient().GetByID(ctx, "488a6d0e-0a63-4946-86e3-1f5bbc934661", "4135f961-be78-4005-8101-c72a5af307a2", 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.AccessReviewInstance = armauthorization.AccessReviewInstance{ // Name: to.Ptr("4135f961-be78-4005-8101-c72a5af307a2"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances"), // ID: to.Ptr("/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/488a6d0e-0a63-4946-86e3-1f5bbc934661/instances/4135f961-be78-4005-8101-c72a5af307a2"), // Properties: &armauthorization.AccessReviewInstanceProperties{ // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // Status: to.Ptr(armauthorization.AccessReviewInstanceStatusApplied), // }, // }
Output:
func (*AccessReviewInstancesAssignedForMyApprovalClient) NewListPager ¶
func (client *AccessReviewInstancesAssignedForMyApprovalClient) NewListPager(scheduleDefinitionID string, options *AccessReviewInstancesAssignedForMyApprovalClientListOptions) *runtime.Pager[AccessReviewInstancesAssignedForMyApprovalClientListResponse]
NewListPager - Get access review instances assigned for my approval.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- options - AccessReviewInstancesAssignedForMyApprovalClientListOptions contains the optional parameters for the AccessReviewInstancesAssignedForMyApprovalClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewInstancesAssignedForMyApproval.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.NewAccessReviewInstancesAssignedForMyApprovalClient().NewListPager("488a6d0e-0a63-4946-86e3-1f5bbc934661", &armauthorization.AccessReviewInstancesAssignedForMyApprovalClientListOptions{Filter: to.Ptr("assignedToMeToReview()")}) 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.AccessReviewInstanceListResult = armauthorization.AccessReviewInstanceListResult{ // Value: []*armauthorization.AccessReviewInstance{ // { // Name: to.Ptr("4135f961-be78-4005-8101-c72a5af307a2"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances"), // ID: to.Ptr("/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/488a6d0e-0a63-4946-86e3-1f5bbc934661/instances/4135f961-be78-4005-8101-c72a5af307a2"), // Properties: &armauthorization.AccessReviewInstanceProperties{ // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // Status: to.Ptr(armauthorization.AccessReviewInstanceStatusApplied), // }, // }}, // } }
Output:
type AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions ¶
type AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions struct { }
AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions contains the optional parameters for the AccessReviewInstancesAssignedForMyApprovalClient.GetByID method.
type AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse ¶
type AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse struct { // Access Review Instance. AccessReviewInstance }
AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse contains the response from method AccessReviewInstancesAssignedForMyApprovalClient.GetByID.
type AccessReviewInstancesAssignedForMyApprovalClientListOptions ¶
type AccessReviewInstancesAssignedForMyApprovalClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
AccessReviewInstancesAssignedForMyApprovalClientListOptions contains the optional parameters for the AccessReviewInstancesAssignedForMyApprovalClient.NewListPager method.
type AccessReviewInstancesAssignedForMyApprovalClientListResponse ¶
type AccessReviewInstancesAssignedForMyApprovalClientListResponse struct { // List of Access Review Instances. AccessReviewInstanceListResult }
AccessReviewInstancesAssignedForMyApprovalClientListResponse contains the response from method AccessReviewInstancesAssignedForMyApprovalClient.NewListPager.
type AccessReviewInstancesClient ¶
type AccessReviewInstancesClient struct {
// contains filtered or unexported fields
}
AccessReviewInstancesClient contains the methods for the AccessReviewInstances group. Don't use this type directly, use NewAccessReviewInstancesClient() instead.
func NewAccessReviewInstancesClient ¶
func NewAccessReviewInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstancesClient, error)
NewAccessReviewInstancesClient creates a new instance of AccessReviewInstancesClient 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 (*AccessReviewInstancesClient) Create ¶
func (client *AccessReviewInstancesClient) Create(ctx context.Context, scheduleDefinitionID string, id string, properties AccessReviewInstanceProperties, options *AccessReviewInstancesClientCreateOptions) (AccessReviewInstancesClientCreateResponse, error)
Create - Update access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- properties - Access review instance properties.
- options - AccessReviewInstancesClientCreateOptions contains the optional parameters for the AccessReviewInstancesClient.Create method.
func (*AccessReviewInstancesClient) GetByID ¶
func (client *AccessReviewInstancesClient) GetByID(ctx context.Context, scheduleDefinitionID string, id string, options *AccessReviewInstancesClientGetByIDOptions) (AccessReviewInstancesClientGetByIDResponse, error)
GetByID - Get access review instances If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - AccessReviewInstancesClientGetByIDOptions contains the optional parameters for the AccessReviewInstancesClient.GetByID method.
func (*AccessReviewInstancesClient) NewListPager ¶
func (client *AccessReviewInstancesClient) NewListPager(scheduleDefinitionID string, options *AccessReviewInstancesClientListOptions) *runtime.Pager[AccessReviewInstancesClientListResponse]
NewListPager - Get access review instances
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- options - AccessReviewInstancesClientListOptions contains the optional parameters for the AccessReviewInstancesClient.NewListPager method.
type AccessReviewInstancesClientCreateOptions ¶
type AccessReviewInstancesClientCreateOptions struct { }
AccessReviewInstancesClientCreateOptions contains the optional parameters for the AccessReviewInstancesClient.Create method.
type AccessReviewInstancesClientCreateResponse ¶
type AccessReviewInstancesClientCreateResponse struct { // Access Review Instance. AccessReviewInstance }
AccessReviewInstancesClientCreateResponse contains the response from method AccessReviewInstancesClient.Create.
type AccessReviewInstancesClientGetByIDOptions ¶
type AccessReviewInstancesClientGetByIDOptions struct { }
AccessReviewInstancesClientGetByIDOptions contains the optional parameters for the AccessReviewInstancesClient.GetByID method.
type AccessReviewInstancesClientGetByIDResponse ¶
type AccessReviewInstancesClientGetByIDResponse struct { // Access Review Instance. AccessReviewInstance }
AccessReviewInstancesClientGetByIDResponse contains the response from method AccessReviewInstancesClient.GetByID.
type AccessReviewInstancesClientListOptions ¶
type AccessReviewInstancesClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
AccessReviewInstancesClientListOptions contains the optional parameters for the AccessReviewInstancesClient.NewListPager method.
type AccessReviewInstancesClientListResponse ¶
type AccessReviewInstancesClientListResponse struct { // List of Access Review Instances. AccessReviewInstanceListResult }
AccessReviewInstancesClientListResponse contains the response from method AccessReviewInstancesClient.NewListPager.
type AccessReviewRecurrencePattern ¶
type AccessReviewRecurrencePattern struct { // The interval for recurrence. For a quarterly review, the interval is 3 for type : absoluteMonthly. Interval *int32 // The recurrence type : weekly, monthly, etc. Type *AccessReviewRecurrencePatternType }
AccessReviewRecurrencePattern - Recurrence Pattern of an Access Review Schedule Definition.
func (AccessReviewRecurrencePattern) MarshalJSON ¶
func (a AccessReviewRecurrencePattern) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewRecurrencePattern.
func (*AccessReviewRecurrencePattern) UnmarshalJSON ¶
func (a *AccessReviewRecurrencePattern) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewRecurrencePattern.
type AccessReviewRecurrencePatternType ¶
type AccessReviewRecurrencePatternType string
AccessReviewRecurrencePatternType - The recurrence type : weekly, monthly, etc.
const ( AccessReviewRecurrencePatternTypeAbsoluteMonthly AccessReviewRecurrencePatternType = "absoluteMonthly" AccessReviewRecurrencePatternTypeWeekly AccessReviewRecurrencePatternType = "weekly" )
func PossibleAccessReviewRecurrencePatternTypeValues ¶
func PossibleAccessReviewRecurrencePatternTypeValues() []AccessReviewRecurrencePatternType
PossibleAccessReviewRecurrencePatternTypeValues returns the possible values for the AccessReviewRecurrencePatternType const type.
type AccessReviewRecurrenceRange ¶
type AccessReviewRecurrenceRange struct { // The DateTime when the review is scheduled to end. Required if type is endDate EndDate *time.Time // The number of times to repeat the access review. Required and must be positive if type is numbered. NumberOfOccurrences *int32 // The DateTime when the review is scheduled to be start. This could be a date in the future. Required on create. StartDate *time.Time // The recurrence range type. The possible values are: endDate, noEnd, numbered. Type *AccessReviewRecurrenceRangeType }
AccessReviewRecurrenceRange - Recurrence Range of an Access Review Schedule Definition.
func (AccessReviewRecurrenceRange) MarshalJSON ¶
func (a AccessReviewRecurrenceRange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewRecurrenceRange.
func (*AccessReviewRecurrenceRange) UnmarshalJSON ¶
func (a *AccessReviewRecurrenceRange) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewRecurrenceRange.
type AccessReviewRecurrenceRangeType ¶
type AccessReviewRecurrenceRangeType string
AccessReviewRecurrenceRangeType - The recurrence range type. The possible values are: endDate, noEnd, numbered.
const ( AccessReviewRecurrenceRangeTypeEndDate AccessReviewRecurrenceRangeType = "endDate" AccessReviewRecurrenceRangeTypeNoEnd AccessReviewRecurrenceRangeType = "noEnd" AccessReviewRecurrenceRangeTypeNumbered AccessReviewRecurrenceRangeType = "numbered" )
func PossibleAccessReviewRecurrenceRangeTypeValues ¶
func PossibleAccessReviewRecurrenceRangeTypeValues() []AccessReviewRecurrenceRangeType
PossibleAccessReviewRecurrenceRangeTypeValues returns the possible values for the AccessReviewRecurrenceRangeType const type.
type AccessReviewRecurrenceSettings ¶
type AccessReviewRecurrenceSettings struct { // Access Review schedule definition recurrence pattern. Pattern *AccessReviewRecurrencePattern // Access Review schedule definition recurrence range. Range *AccessReviewRecurrenceRange }
AccessReviewRecurrenceSettings - Recurrence Settings of an Access Review Schedule Definition.
func (AccessReviewRecurrenceSettings) MarshalJSON ¶
func (a AccessReviewRecurrenceSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewRecurrenceSettings.
func (*AccessReviewRecurrenceSettings) UnmarshalJSON ¶
func (a *AccessReviewRecurrenceSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewRecurrenceSettings.
type AccessReviewResult ¶
type AccessReviewResult string
AccessReviewResult - Represents a reviewer's decision for a given review
const ( AccessReviewResultApprove AccessReviewResult = "Approve" AccessReviewResultDeny AccessReviewResult = "Deny" AccessReviewResultDontKnow AccessReviewResult = "DontKnow" AccessReviewResultNotNotified AccessReviewResult = "NotNotified" AccessReviewResultNotReviewed AccessReviewResult = "NotReviewed" )
func PossibleAccessReviewResultValues ¶
func PossibleAccessReviewResultValues() []AccessReviewResult
PossibleAccessReviewResultValues returns the possible values for the AccessReviewResult const type.
type AccessReviewReviewer ¶
type AccessReviewReviewer struct { // The id of the reviewer(user/servicePrincipal) PrincipalID *string // READ-ONLY; The identity type : user/servicePrincipal PrincipalType *AccessReviewReviewerType }
AccessReviewReviewer - Descriptor for what needs to be reviewed
func (AccessReviewReviewer) MarshalJSON ¶
func (a AccessReviewReviewer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewReviewer.
func (*AccessReviewReviewer) UnmarshalJSON ¶
func (a *AccessReviewReviewer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewReviewer.
type AccessReviewReviewerType ¶
type AccessReviewReviewerType string
AccessReviewReviewerType - The identity type : user/servicePrincipal
const ( AccessReviewReviewerTypeServicePrincipal AccessReviewReviewerType = "servicePrincipal" AccessReviewReviewerTypeUser AccessReviewReviewerType = "user" )
func PossibleAccessReviewReviewerTypeValues ¶
func PossibleAccessReviewReviewerTypeValues() []AccessReviewReviewerType
PossibleAccessReviewReviewerTypeValues returns the possible values for the AccessReviewReviewerType const type.
type AccessReviewScheduleDefinition ¶
type AccessReviewScheduleDefinition struct { // Access Review properties. Properties *AccessReviewScheduleDefinitionProperties // READ-ONLY; The access review schedule definition id. ID *string // READ-ONLY; The access review schedule definition unique id. Name *string // READ-ONLY; The resource type. Type *string }
AccessReviewScheduleDefinition - Access Review Schedule Definition.
func (AccessReviewScheduleDefinition) MarshalJSON ¶
func (a AccessReviewScheduleDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewScheduleDefinition.
func (*AccessReviewScheduleDefinition) UnmarshalJSON ¶
func (a *AccessReviewScheduleDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewScheduleDefinition.
type AccessReviewScheduleDefinitionListResult ¶
type AccessReviewScheduleDefinitionListResult struct { // The URL to use for getting the next set of results. NextLink *string // Access Review Schedule Definition list. Value []*AccessReviewScheduleDefinition }
AccessReviewScheduleDefinitionListResult - List of Access Review Schedule Definitions.
func (AccessReviewScheduleDefinitionListResult) MarshalJSON ¶
func (a AccessReviewScheduleDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewScheduleDefinitionListResult.
func (*AccessReviewScheduleDefinitionListResult) UnmarshalJSON ¶
func (a *AccessReviewScheduleDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewScheduleDefinitionListResult.
type AccessReviewScheduleDefinitionProperties ¶
type AccessReviewScheduleDefinitionProperties struct { // This is the collection of backup reviewers. BackupReviewers []*AccessReviewReviewer // The description provided by the access review creator and visible to admins. DescriptionForAdmins *string // The description provided by the access review creator to be shown to reviewers. DescriptionForReviewers *string // The display name for the schedule definition. DisplayName *string // This is the collection of instances returned when one does an expand on it. Instances []*AccessReviewInstance // This is the collection of reviewers. Reviewers []*AccessReviewReviewer // Access Review Settings. Settings *AccessReviewScheduleSettings // READ-ONLY; The user or other identity who created this review. CreatedBy *AccessReviewActorIdentity // READ-ONLY; This field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned. // However, in some cases, the reviewers may not be assigned and instead be chosen // dynamically. For example managers review or self review. ReviewersType *AccessReviewScheduleDefinitionReviewersType // READ-ONLY; This is used to define what to include in scope of the review. The scope definition includes the resourceId // and roleDefinitionId. Scope *AccessReviewScope // READ-ONLY; This read-only field specifies the status of an accessReview. Status *AccessReviewScheduleDefinitionStatus }
AccessReviewScheduleDefinitionProperties - Access Review.
func (AccessReviewScheduleDefinitionProperties) MarshalJSON ¶
func (a AccessReviewScheduleDefinitionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewScheduleDefinitionProperties.
func (*AccessReviewScheduleDefinitionProperties) UnmarshalJSON ¶
func (a *AccessReviewScheduleDefinitionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewScheduleDefinitionProperties.
type AccessReviewScheduleDefinitionReviewersType ¶
type AccessReviewScheduleDefinitionReviewersType string
AccessReviewScheduleDefinitionReviewersType - This field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned. However, in some cases, the reviewers may not be assigned and instead be chosen dynamically. For example managers review or self review.
const ( AccessReviewScheduleDefinitionReviewersTypeAssigned AccessReviewScheduleDefinitionReviewersType = "Assigned" AccessReviewScheduleDefinitionReviewersTypeManagers AccessReviewScheduleDefinitionReviewersType = "Managers" AccessReviewScheduleDefinitionReviewersTypeSelf AccessReviewScheduleDefinitionReviewersType = "Self" )
func PossibleAccessReviewScheduleDefinitionReviewersTypeValues ¶
func PossibleAccessReviewScheduleDefinitionReviewersTypeValues() []AccessReviewScheduleDefinitionReviewersType
PossibleAccessReviewScheduleDefinitionReviewersTypeValues returns the possible values for the AccessReviewScheduleDefinitionReviewersType const type.
type AccessReviewScheduleDefinitionStatus ¶
type AccessReviewScheduleDefinitionStatus string
AccessReviewScheduleDefinitionStatus - This read-only field specifies the status of an accessReview.
const ( AccessReviewScheduleDefinitionStatusApplied AccessReviewScheduleDefinitionStatus = "Applied" AccessReviewScheduleDefinitionStatusApplying AccessReviewScheduleDefinitionStatus = "Applying" AccessReviewScheduleDefinitionStatusAutoReviewed AccessReviewScheduleDefinitionStatus = "AutoReviewed" AccessReviewScheduleDefinitionStatusAutoReviewing AccessReviewScheduleDefinitionStatus = "AutoReviewing" AccessReviewScheduleDefinitionStatusCompleted AccessReviewScheduleDefinitionStatus = "Completed" AccessReviewScheduleDefinitionStatusCompleting AccessReviewScheduleDefinitionStatus = "Completing" AccessReviewScheduleDefinitionStatusInProgress AccessReviewScheduleDefinitionStatus = "InProgress" AccessReviewScheduleDefinitionStatusInitializing AccessReviewScheduleDefinitionStatus = "Initializing" AccessReviewScheduleDefinitionStatusNotStarted AccessReviewScheduleDefinitionStatus = "NotStarted" AccessReviewScheduleDefinitionStatusScheduled AccessReviewScheduleDefinitionStatus = "Scheduled" AccessReviewScheduleDefinitionStatusStarting AccessReviewScheduleDefinitionStatus = "Starting" )
func PossibleAccessReviewScheduleDefinitionStatusValues ¶
func PossibleAccessReviewScheduleDefinitionStatusValues() []AccessReviewScheduleDefinitionStatus
PossibleAccessReviewScheduleDefinitionStatusValues returns the possible values for the AccessReviewScheduleDefinitionStatus const type.
type AccessReviewScheduleDefinitionsAssignedForMyApprovalClient ¶
type AccessReviewScheduleDefinitionsAssignedForMyApprovalClient struct {
// contains filtered or unexported fields
}
AccessReviewScheduleDefinitionsAssignedForMyApprovalClient contains the methods for the AccessReviewScheduleDefinitionsAssignedForMyApproval group. Don't use this type directly, use NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient() instead.
func NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient ¶
func NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewScheduleDefinitionsAssignedForMyApprovalClient, error)
NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient creates a new instance of AccessReviewScheduleDefinitionsAssignedForMyApprovalClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AccessReviewScheduleDefinitionsAssignedForMyApprovalClient) NewListPager ¶
func (client *AccessReviewScheduleDefinitionsAssignedForMyApprovalClient) NewListPager(options *AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions) *runtime.Pager[AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListResponse]
NewListPager - Get access review instances assigned for my approval.
Generated from API version 2021-12-01-preview
- options - AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions contains the optional parameters for the AccessReviewScheduleDefinitionsAssignedForMyApprovalClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewScheduleDefinitionsAssignedForMyApproval.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.NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient().NewListPager(&armauthorization.AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions{Filter: to.Ptr("assignedToMeToReview()")}) 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.AccessReviewScheduleDefinitionListResult = armauthorization.AccessReviewScheduleDefinitionListResult{ // Value: []*armauthorization.AccessReviewScheduleDefinition{ // { // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions"), // ID: to.Ptr("/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewScheduleDefinitionProperties{ // CreatedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // PrincipalName: to.Ptr("Shubham Gupta"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // DescriptionForAdmins: to.Ptr("asdfasdf"), // DescriptionForReviewers: to.Ptr("asdfasdf"), // DisplayName: to.Ptr("Hello world"), // Instances: []*armauthorization.AccessReviewInstance{ // { // Name: to.Ptr("4135f961-be78-4005-8101-c72a5af307a2"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances"), // ID: to.Ptr("/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/488a6d0e-0a63-4946-86e3-1f5bbc934661/instances/4135f961-be78-4005-8101-c72a5af307a2"), // Properties: &armauthorization.AccessReviewInstanceProperties{ // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // Status: to.Ptr(armauthorization.AccessReviewInstanceStatusApplied), // }, // }}, // Reviewers: []*armauthorization.AccessReviewReviewer{ // { // PrincipalID: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d "), // PrincipalType: to.Ptr(armauthorization.AccessReviewReviewerTypeUser), // }}, // ReviewersType: to.Ptr(armauthorization.AccessReviewScheduleDefinitionReviewersTypeAssigned), // Scope: &armauthorization.AccessReviewScope{ // ResourceID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // RoleDefinitionID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/roleDefinitions/b225c7ff-4338-4cdc-a790-6b34d987f7cd"), // }, // Settings: &armauthorization.AccessReviewScheduleSettings{ // AutoApplyDecisionsEnabled: to.Ptr(true), // DefaultDecision: to.Ptr(armauthorization.DefaultDecisionTypeApprove), // DefaultDecisionEnabled: to.Ptr(true), // InstanceDurationInDays: to.Ptr[int32](30), // JustificationRequiredOnApproval: to.Ptr(true), // MailNotificationsEnabled: to.Ptr(true), // RecommendationsEnabled: to.Ptr(true), // Recurrence: &armauthorization.AccessReviewRecurrenceSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }, // ReminderNotificationsEnabled: to.Ptr(true), // }, // Status: to.Ptr(armauthorization.AccessReviewScheduleDefinitionStatusInProgress), // }, // }}, // } }
Output:
type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions ¶
type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions contains the optional parameters for the AccessReviewScheduleDefinitionsAssignedForMyApprovalClient.NewListPager method.
type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListResponse ¶
type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListResponse struct { // List of Access Review Schedule Definitions. AccessReviewScheduleDefinitionListResult }
AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListResponse contains the response from method AccessReviewScheduleDefinitionsAssignedForMyApprovalClient.NewListPager.
type AccessReviewScheduleDefinitionsClient ¶
type AccessReviewScheduleDefinitionsClient struct {
// contains filtered or unexported fields
}
AccessReviewScheduleDefinitionsClient contains the methods for the AccessReviewScheduleDefinitions group. Don't use this type directly, use NewAccessReviewScheduleDefinitionsClient() instead.
func NewAccessReviewScheduleDefinitionsClient ¶
func NewAccessReviewScheduleDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewScheduleDefinitionsClient, error)
NewAccessReviewScheduleDefinitionsClient creates a new instance of AccessReviewScheduleDefinitionsClient 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 (*AccessReviewScheduleDefinitionsClient) CreateOrUpdateByID ¶
func (client *AccessReviewScheduleDefinitionsClient) CreateOrUpdateByID(ctx context.Context, scheduleDefinitionID string, properties AccessReviewScheduleDefinitionProperties, options *AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions) (AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse, error)
CreateOrUpdateByID - Create or Update access review schedule definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- properties - Access review schedule definition properties.
- options - AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.CreateOrUpdateByID method.
func (*AccessReviewScheduleDefinitionsClient) DeleteByID ¶
func (client *AccessReviewScheduleDefinitionsClient) DeleteByID(ctx context.Context, scheduleDefinitionID string, options *AccessReviewScheduleDefinitionsClientDeleteByIDOptions) (AccessReviewScheduleDefinitionsClientDeleteByIDResponse, error)
DeleteByID - Delete access review schedule definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- options - AccessReviewScheduleDefinitionsClientDeleteByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.DeleteByID method.
func (*AccessReviewScheduleDefinitionsClient) GetByID ¶
func (client *AccessReviewScheduleDefinitionsClient) GetByID(ctx context.Context, scheduleDefinitionID string, options *AccessReviewScheduleDefinitionsClientGetByIDOptions) (AccessReviewScheduleDefinitionsClientGetByIDResponse, error)
GetByID - Get single access review definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- options - AccessReviewScheduleDefinitionsClientGetByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.GetByID method.
func (*AccessReviewScheduleDefinitionsClient) NewListPager ¶
func (client *AccessReviewScheduleDefinitionsClient) NewListPager(options *AccessReviewScheduleDefinitionsClientListOptions) *runtime.Pager[AccessReviewScheduleDefinitionsClientListResponse]
NewListPager - Get access review schedule definitions
Generated from API version 2021-12-01-preview
- options - AccessReviewScheduleDefinitionsClientListOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.NewListPager method.
func (*AccessReviewScheduleDefinitionsClient) Stop ¶
func (client *AccessReviewScheduleDefinitionsClient) Stop(ctx context.Context, scheduleDefinitionID string, options *AccessReviewScheduleDefinitionsClientStopOptions) (AccessReviewScheduleDefinitionsClientStopResponse, error)
Stop - Stop access review definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- options - AccessReviewScheduleDefinitionsClientStopOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.Stop method.
type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions ¶
type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions struct { }
AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.CreateOrUpdateByID method.
type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse ¶
type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse struct { // Access Review Schedule Definition. AccessReviewScheduleDefinition }
AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse contains the response from method AccessReviewScheduleDefinitionsClient.CreateOrUpdateByID.
type AccessReviewScheduleDefinitionsClientDeleteByIDOptions ¶
type AccessReviewScheduleDefinitionsClientDeleteByIDOptions struct { }
AccessReviewScheduleDefinitionsClientDeleteByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.DeleteByID method.
type AccessReviewScheduleDefinitionsClientDeleteByIDResponse ¶
type AccessReviewScheduleDefinitionsClientDeleteByIDResponse struct { }
AccessReviewScheduleDefinitionsClientDeleteByIDResponse contains the response from method AccessReviewScheduleDefinitionsClient.DeleteByID.
type AccessReviewScheduleDefinitionsClientGetByIDOptions ¶
type AccessReviewScheduleDefinitionsClientGetByIDOptions struct { }
AccessReviewScheduleDefinitionsClientGetByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.GetByID method.
type AccessReviewScheduleDefinitionsClientGetByIDResponse ¶
type AccessReviewScheduleDefinitionsClientGetByIDResponse struct { // Access Review Schedule Definition. AccessReviewScheduleDefinition }
AccessReviewScheduleDefinitionsClientGetByIDResponse contains the response from method AccessReviewScheduleDefinitionsClient.GetByID.
type AccessReviewScheduleDefinitionsClientListOptions ¶
type AccessReviewScheduleDefinitionsClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
AccessReviewScheduleDefinitionsClientListOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.NewListPager method.
type AccessReviewScheduleDefinitionsClientListResponse ¶
type AccessReviewScheduleDefinitionsClientListResponse struct { // List of Access Review Schedule Definitions. AccessReviewScheduleDefinitionListResult }
AccessReviewScheduleDefinitionsClientListResponse contains the response from method AccessReviewScheduleDefinitionsClient.NewListPager.
type AccessReviewScheduleDefinitionsClientStopOptions ¶
type AccessReviewScheduleDefinitionsClientStopOptions struct { }
AccessReviewScheduleDefinitionsClientStopOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.Stop method.
type AccessReviewScheduleDefinitionsClientStopResponse ¶
type AccessReviewScheduleDefinitionsClientStopResponse struct { }
AccessReviewScheduleDefinitionsClientStopResponse contains the response from method AccessReviewScheduleDefinitionsClient.Stop.
type AccessReviewScheduleSettings ¶
type AccessReviewScheduleSettings struct { // Flag to indicate whether auto-apply capability, to automatically change the target object access resource, is enabled. // If not enabled, a user must, after the review completes, apply the access review. AutoApplyDecisionsEnabled *bool // This specifies the behavior for the autoReview feature when an access review completes. DefaultDecision *DefaultDecisionType // Flag to indicate whether reviewers are required to provide a justification when reviewing access. DefaultDecisionEnabled *bool // The duration in days for an instance. InstanceDurationInDays *int32 // Flag to indicate whether the reviewer is required to pass justification when recording a decision. JustificationRequiredOnApproval *bool // Flag to indicate whether sending mails to reviewers and the review creator is enabled. MailNotificationsEnabled *bool // Recommendations for access reviews are calculated by looking back at 30 days of data(w.r.t the start date of the review) // by default. However, in some scenarios, customers want to change how far back // to look at and want to configure 60 days, 90 days, etc. instead. This setting allows customers to configure this duration. // The value should be in ISO 8601 format // (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: // XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) RecommendationLookBackDuration *string // Flag to indicate whether showing recommendations to reviewers is enabled. RecommendationsEnabled *bool // Access Review Settings. Recurrence *AccessReviewRecurrenceSettings // Flag to indicate whether sending reminder emails to reviewers are enabled. ReminderNotificationsEnabled *bool }
AccessReviewScheduleSettings - Settings of an Access Review.
func (AccessReviewScheduleSettings) MarshalJSON ¶
func (a AccessReviewScheduleSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewScheduleSettings.
func (*AccessReviewScheduleSettings) UnmarshalJSON ¶
func (a *AccessReviewScheduleSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewScheduleSettings.
type AccessReviewScope ¶
type AccessReviewScope struct { // This is used to indicate the resource id(s) to exclude ExcludeResourceID *string // This is used to indicate the role definition id(s) to exclude ExcludeRoleDefinitionID *string // Flag to indicate whether to expand nested memberships or not. ExpandNestedMemberships *bool // Duration users are inactive for. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This // code can be used to convert TimeSpan to a valid interval string: // XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) InactiveDuration *string // Flag to indicate whether to expand nested memberships or not. IncludeAccessBelowResource *bool // Flag to indicate whether to expand nested memberships or not. IncludeInheritedAccess *bool // READ-ONLY; The role assignment state eligible/active to review AssignmentState *AccessReviewScopeAssignmentState // READ-ONLY; The identity type user/servicePrincipal to review PrincipalType *AccessReviewScopePrincipalType // READ-ONLY; ResourceId in which this review is getting created ResourceID *string // READ-ONLY; This is used to indicate the role being reviewed RoleDefinitionID *string }
AccessReviewScope - Descriptor for what needs to be reviewed
func (AccessReviewScope) MarshalJSON ¶
func (a AccessReviewScope) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccessReviewScope.
func (*AccessReviewScope) UnmarshalJSON ¶
func (a *AccessReviewScope) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewScope.
type AccessReviewScopeAssignmentState ¶
type AccessReviewScopeAssignmentState string
AccessReviewScopeAssignmentState - The role assignment state eligible/active to review
const ( AccessReviewScopeAssignmentStateActive AccessReviewScopeAssignmentState = "active" AccessReviewScopeAssignmentStateEligible AccessReviewScopeAssignmentState = "eligible" )
func PossibleAccessReviewScopeAssignmentStateValues ¶
func PossibleAccessReviewScopeAssignmentStateValues() []AccessReviewScopeAssignmentState
PossibleAccessReviewScopeAssignmentStateValues returns the possible values for the AccessReviewScopeAssignmentState const type.
type AccessReviewScopePrincipalType ¶
type AccessReviewScopePrincipalType string
AccessReviewScopePrincipalType - The identity type user/servicePrincipal to review
const ( AccessReviewScopePrincipalTypeGuestUser AccessReviewScopePrincipalType = "guestUser" AccessReviewScopePrincipalTypeRedeemedGuestUser AccessReviewScopePrincipalType = "redeemedGuestUser" AccessReviewScopePrincipalTypeServicePrincipal AccessReviewScopePrincipalType = "servicePrincipal" AccessReviewScopePrincipalTypeUser AccessReviewScopePrincipalType = "user" AccessReviewScopePrincipalTypeUserGroup AccessReviewScopePrincipalType = "user,group" )
func PossibleAccessReviewScopePrincipalTypeValues ¶
func PossibleAccessReviewScopePrincipalTypeValues() []AccessReviewScopePrincipalType
PossibleAccessReviewScopePrincipalTypeValues returns the possible values for the AccessReviewScopePrincipalType const type.
type Alert ¶
type Alert struct { // Alert properties. Properties *AlertProperties // READ-ONLY; The alert ID. ID *string // READ-ONLY; The alert name. Name *string // READ-ONLY; The alert type. Type *string }
Alert - The alert.
func (Alert) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Alert.
func (*Alert) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Alert.
type AlertConfiguration ¶
type AlertConfiguration struct { // Alert configuration properties. Properties AlertConfigurationPropertiesClassification // READ-ONLY; The alert configuration ID. ID *string // READ-ONLY; The alert configuration name. Name *string // READ-ONLY; The alert configuration type. Type *string }
AlertConfiguration - Alert configuration.
func (AlertConfiguration) MarshalJSON ¶
func (a AlertConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertConfiguration.
func (*AlertConfiguration) UnmarshalJSON ¶
func (a *AlertConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertConfiguration.
type AlertConfigurationListResult ¶
type AlertConfigurationListResult struct { // The URL to use for getting the next set of results. NextLink *string // Alert configuration list Value []*AlertConfiguration }
AlertConfigurationListResult - Alert configuration list operation result.
func (AlertConfigurationListResult) MarshalJSON ¶
func (a AlertConfigurationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertConfigurationListResult.
func (*AlertConfigurationListResult) UnmarshalJSON ¶
func (a *AlertConfigurationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertConfigurationListResult.
type AlertConfigurationProperties ¶
type AlertConfigurationProperties struct { // REQUIRED; The alert configuration type. AlertConfigurationType *string // True if the alert is enabled, false will disable the scanning for the specific alert. IsEnabled *bool // READ-ONLY; The alert definition. AlertDefinition *AlertDefinition // READ-ONLY; The alert definition ID. AlertDefinitionID *string // READ-ONLY; The alert scope. Scope *string }
AlertConfigurationProperties - Alert configuration properties.
func (*AlertConfigurationProperties) GetAlertConfigurationProperties ¶
func (a *AlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
GetAlertConfigurationProperties implements the AlertConfigurationPropertiesClassification interface for type AlertConfigurationProperties.
func (AlertConfigurationProperties) MarshalJSON ¶
func (a AlertConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertConfigurationProperties.
func (*AlertConfigurationProperties) UnmarshalJSON ¶
func (a *AlertConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertConfigurationProperties.
type AlertConfigurationPropertiesClassification ¶
type AlertConfigurationPropertiesClassification interface { // GetAlertConfigurationProperties returns the AlertConfigurationProperties content of the underlying type. GetAlertConfigurationProperties() *AlertConfigurationProperties }
AlertConfigurationPropertiesClassification provides polymorphic access to related types. Call the interface's GetAlertConfigurationProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AlertConfigurationProperties, *AzureRolesAssignedOutsidePimAlertConfigurationProperties, *DuplicateRoleCreatedAlertConfigurationProperties, - *TooManyOwnersAssignedToResourceAlertConfigurationProperties, *TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties
type AlertConfigurationsClient ¶
type AlertConfigurationsClient struct {
// contains filtered or unexported fields
}
AlertConfigurationsClient contains the methods for the AlertConfigurations group. Don't use this type directly, use NewAlertConfigurationsClient() instead.
func NewAlertConfigurationsClient ¶
func NewAlertConfigurationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertConfigurationsClient, error)
NewAlertConfigurationsClient creates a new instance of AlertConfigurationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AlertConfigurationsClient) Get ¶
func (client *AlertConfigurationsClient) Get(ctx context.Context, scope string, alertID string, options *AlertConfigurationsClientGetOptions) (AlertConfigurationsClientGetResponse, error)
Get - Get the specified alert configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert configuration. The scope can be any REST resource instance. For example, use '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
- alertID - The name of the alert configuration to get.
- options - AlertConfigurationsClientGetOptions contains the optional parameters for the AlertConfigurationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertConfigurationById.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.NewAlertConfigurationsClient().Get(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "TooManyOwnersAssignedToResource", 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.AlertConfiguration = armauthorization.AlertConfiguration{ // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertConfigurations"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertConfigurationProperties{ // AlertConfigurationType: to.Ptr("TooManyOwnersAssignedToResourceAlertConfiguration"), // AlertDefinitionID: to.Ptr("TooManyOwnersAssignedToResource"), // IsEnabled: to.Ptr(true), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // ThresholdNumberOfOwners: to.Ptr[int32](3), // ThresholdPercentageOfOwnersOutOfAllRoleMembers: to.Ptr[int32](40), // }, // }
Output:
func (*AlertConfigurationsClient) NewListForScopePager ¶
func (client *AlertConfigurationsClient) NewListForScopePager(scope string, options *AlertConfigurationsClientListForScopeOptions) *runtime.Pager[AlertConfigurationsClientListForScopeResponse]
NewListForScopePager - Gets alert configurations for a resource scope.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert configuration.
- options - AlertConfigurationsClientListForScopeOptions contains the optional parameters for the AlertConfigurationsClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertConfigurations.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.NewAlertConfigurationsClient().NewListForScopePager("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", 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.AlertConfigurationListResult = armauthorization.AlertConfigurationListResult{ // Value: []*armauthorization.AlertConfiguration{ // { // Name: to.Ptr("DuplicateRoleCreated"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertConfigurations"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/DuplicateRoleCreated"), // Properties: &armauthorization.DuplicateRoleCreatedAlertConfigurationProperties{ // AlertConfigurationType: to.Ptr("DuplicateRoleCreatedAlertConfiguration"), // AlertDefinitionID: to.Ptr("DuplicateRoleCreated"), // IsEnabled: to.Ptr(true), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // { // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertConfigurations"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertConfigurationProperties{ // AlertConfigurationType: to.Ptr("TooManyOwnersAssignedToResourceAlertConfiguration"), // AlertDefinitionID: to.Ptr("TooManyOwnersAssignedToResource"), // IsEnabled: to.Ptr(true), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // ThresholdNumberOfOwners: to.Ptr[int32](2), // ThresholdPercentageOfOwnersOutOfAllRoleMembers: to.Ptr[int32](3), // }, // }, // { // Name: to.Ptr("TooManyPermanentOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertConfigurations"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyPermanentOwnersAssignedToResource"), // Properties: &armauthorization.TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties{ // AlertConfigurationType: to.Ptr("TooManyPermanentOwnersAssignedToResourceAlertConfiguration"), // AlertDefinitionID: to.Ptr("TooManyPermanentOwnersAssignedToResource"), // IsEnabled: to.Ptr(true), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // ThresholdNumberOfPermanentOwners: to.Ptr[int32](10), // ThresholdPercentageOfPermanentOwnersOutOfAllOwners: to.Ptr[int32](10), // }, // }, // { // Name: to.Ptr("AzureRolesAssignedOutsidePimAlert"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertConfigurations"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/AzureRolesAssignedOutsidePimAlert"), // Properties: &armauthorization.AzureRolesAssignedOutsidePimAlertConfigurationProperties{ // AlertConfigurationType: to.Ptr("AzureRolesAssignedOutsidePimAlertConfiguration"), // AlertDefinitionID: to.Ptr("AzureRolesAssignedOutsidePimAlert"), // IsEnabled: to.Ptr(true), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }}, // } }
Output:
func (*AlertConfigurationsClient) Update ¶
func (client *AlertConfigurationsClient) Update(ctx context.Context, scope string, alertID string, parameters AlertConfiguration, options *AlertConfigurationsClientUpdateOptions) (AlertConfigurationsClientUpdateResponse, error)
Update - Update an alert configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert configuration.
- alertID - The name of the alert configuration to update.
- parameters - Parameters for the alert configuration.
- options - AlertConfigurationsClientUpdateOptions contains the optional parameters for the AlertConfigurationsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/UpdateAlertConfiguration.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.NewAlertConfigurationsClient().Update(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "TooManyOwnersAssignedToResource", armauthorization.AlertConfiguration{ Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertConfigurationProperties{ AlertConfigurationType: to.Ptr("TooManyOwnersAssignedToResourceAlertConfiguration"), IsEnabled: to.Ptr(true), ThresholdNumberOfOwners: to.Ptr[int32](2), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type AlertConfigurationsClientGetOptions ¶
type AlertConfigurationsClientGetOptions struct { }
AlertConfigurationsClientGetOptions contains the optional parameters for the AlertConfigurationsClient.Get method.
type AlertConfigurationsClientGetResponse ¶
type AlertConfigurationsClientGetResponse struct { // Alert configuration. AlertConfiguration }
AlertConfigurationsClientGetResponse contains the response from method AlertConfigurationsClient.Get.
type AlertConfigurationsClientListForScopeOptions ¶
type AlertConfigurationsClientListForScopeOptions struct { }
AlertConfigurationsClientListForScopeOptions contains the optional parameters for the AlertConfigurationsClient.NewListForScopePager method.
type AlertConfigurationsClientListForScopeResponse ¶
type AlertConfigurationsClientListForScopeResponse struct { // Alert configuration list operation result. AlertConfigurationListResult }
AlertConfigurationsClientListForScopeResponse contains the response from method AlertConfigurationsClient.NewListForScopePager.
type AlertConfigurationsClientUpdateOptions ¶
type AlertConfigurationsClientUpdateOptions struct { }
AlertConfigurationsClientUpdateOptions contains the optional parameters for the AlertConfigurationsClient.Update method.
type AlertConfigurationsClientUpdateResponse ¶
type AlertConfigurationsClientUpdateResponse struct { }
AlertConfigurationsClientUpdateResponse contains the response from method AlertConfigurationsClient.Update.
type AlertDefinition ¶
type AlertDefinition struct { // Alert definition properties. Properties *AlertDefinitionProperties // READ-ONLY; The alert definition ID. ID *string // READ-ONLY; The alert definition name. Name *string // READ-ONLY; The alert definition type. Type *string }
AlertDefinition - Alert definition
func (AlertDefinition) MarshalJSON ¶
func (a AlertDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertDefinition.
func (*AlertDefinition) UnmarshalJSON ¶
func (a *AlertDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertDefinition.
type AlertDefinitionListResult ¶
type AlertDefinitionListResult struct { // The URL to use for getting the next set of results. NextLink *string // Alert definition list Value []*AlertDefinition }
AlertDefinitionListResult - Alert definition list operation result.
func (AlertDefinitionListResult) MarshalJSON ¶
func (a AlertDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertDefinitionListResult.
func (*AlertDefinitionListResult) UnmarshalJSON ¶
func (a *AlertDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertDefinitionListResult.
type AlertDefinitionProperties ¶
type AlertDefinitionProperties struct { // READ-ONLY; The alert description. Description *string // READ-ONLY; The alert display name. DisplayName *string // READ-ONLY; The ways to prevent the alert. HowToPrevent *string // READ-ONLY; True if the alert configuration can be configured; false, otherwise. IsConfigurable *bool // READ-ONLY; True if the alert can be remediated; false, otherwise. IsRemediatable *bool // READ-ONLY; The methods to mitigate the alert. MitigationSteps *string // READ-ONLY; The alert scope. Scope *string // READ-ONLY; Security impact of the alert. SecurityImpact *string // READ-ONLY; Severity level of the alert. SeverityLevel *SeverityLevel }
AlertDefinitionProperties - Alert definition properties.
func (AlertDefinitionProperties) MarshalJSON ¶
func (a AlertDefinitionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertDefinitionProperties.
func (*AlertDefinitionProperties) UnmarshalJSON ¶
func (a *AlertDefinitionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertDefinitionProperties.
type AlertDefinitionsClient ¶
type AlertDefinitionsClient struct {
// contains filtered or unexported fields
}
AlertDefinitionsClient contains the methods for the AlertDefinitions group. Don't use this type directly, use NewAlertDefinitionsClient() instead.
func NewAlertDefinitionsClient ¶
func NewAlertDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertDefinitionsClient, error)
NewAlertDefinitionsClient creates a new instance of AlertDefinitionsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AlertDefinitionsClient) Get ¶
func (client *AlertDefinitionsClient) Get(ctx context.Context, scope string, alertDefinitionID string, options *AlertDefinitionsClientGetOptions) (AlertDefinitionsClientGetResponse, error)
Get - Get the specified alert definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert definition. The scope can be any REST resource instance. For example, use '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
- alertDefinitionID - The name of the alert definition to get.
- options - AlertDefinitionsClientGetOptions contains the optional parameters for the AlertDefinitionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertDefinitionById.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.NewAlertDefinitionsClient().Get(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "TooManyPermanentOwnersAssignedToResource", 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.AlertDefinition = armauthorization.AlertDefinition{ // Name: to.Ptr("TooManyPermanentOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertDefinitions"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyPermanentOwnersAssignedToResource"), // Properties: &armauthorization.AlertDefinitionProperties{ // Description: to.Ptr("The number of users set to never expire is too high. To enhance the security of your resources, we recommend requiring activation for role use. Take a moment to review the list of users, and suggested changes here."), // DisplayName: to.Ptr("Too many permanent owners assigned to a resource"), // HowToPrevent: to.Ptr("Enable “Activation Required” in the role settings menu. This will ensure newly added users must activate their role."), // IsConfigurable: to.Ptr(true), // IsRemediatable: to.Ptr(true), // MitigationSteps: to.Ptr("To mitigate this issue, require the user to activate the role before use."), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // SecurityImpact: to.Ptr("Providing users permanent access in a role may leave resources vulnerable to accidental or malicious activity."), // SeverityLevel: to.Ptr(armauthorization.SeverityLevelMedium), // }, // }
Output:
func (*AlertDefinitionsClient) NewListForScopePager ¶
func (client *AlertDefinitionsClient) NewListForScopePager(scope string, options *AlertDefinitionsClientListForScopeOptions) *runtime.Pager[AlertDefinitionsClientListForScopeResponse]
NewListForScopePager - Gets alert definitions for a resource scope.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert definition.
- options - AlertDefinitionsClientListForScopeOptions contains the optional parameters for the AlertDefinitionsClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertDefinitions.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.NewAlertDefinitionsClient().NewListForScopePager("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", 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.AlertDefinitionListResult = armauthorization.AlertDefinitionListResult{ // Value: []*armauthorization.AlertDefinition{ // { // Name: to.Ptr("TooManyPermanentOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertDefinitions"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyPermanentOwnersAssignedToResource"), // Properties: &armauthorization.AlertDefinitionProperties{ // Description: to.Ptr("The number of users set to never expire is too high. To enhance the security of your resources, we recommend requiring activation for role use. Take a moment to review the list of users, and suggested changes here."), // DisplayName: to.Ptr("Too many permanent owners assigned to a resource"), // HowToPrevent: to.Ptr("Enable “Activation Required” in the role settings menu. This will ensure newly added users must activate their role."), // IsConfigurable: to.Ptr(true), // IsRemediatable: to.Ptr(true), // MitigationSteps: to.Ptr("To mitigate this issue, require the user to activate the role before use."), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // SecurityImpact: to.Ptr("Providing users permanent access in a role may leave resources vulnerable to accidental or malicious activity."), // SeverityLevel: to.Ptr(armauthorization.SeverityLevelMedium), // }, // }, // { // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertDefinitions"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.AlertDefinitionProperties{ // Description: to.Ptr("The number of users with the Owner role is too high. We recommend assigning these individuals to less privileged roles or roles more suitable to their daily needs. Take a moment to review the current assignments, and suggested changes here."), // DisplayName: to.Ptr("Too many owners assigned to a resource"), // HowToPrevent: to.Ptr("Choose a role that provides the fewest privileges necessary for a user or group to complete their tasks."), // IsConfigurable: to.Ptr(true), // IsRemediatable: to.Ptr(true), // MitigationSteps: to.Ptr("To mitigate this issue, reduce the number of users in the Owner role. Review the list of users in the list, and reassign them to a less privileged role such as Contributor."), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // SecurityImpact: to.Ptr("As the number of users with the owner role increases, so does the potential for malicious or mistaken actions affecting your resource."), // SeverityLevel: to.Ptr(armauthorization.SeverityLevelMedium), // }, // }, // { // Name: to.Ptr("DuplicateRoleCreated"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertDefinitions"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/DuplicateRoleCreated"), // Properties: &armauthorization.AlertDefinitionProperties{ // Description: to.Ptr("One or more custom roles have the same display name and/or permissions as a built-in or preexisting custom role. Please review the newly created role membership assignments and determine the appropriate action."), // DisplayName: to.Ptr("Duplicate role created"), // HowToPrevent: to.Ptr("Prior to creating a custom role, determine if a built-in or preexisting custom role aligns to your security requirements."), // IsConfigurable: to.Ptr(false), // IsRemediatable: to.Ptr(true), // MitigationSteps: to.Ptr("To mitigate this issue, review the newly created role, and determine if a built-in role is suitable."), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // SecurityImpact: to.Ptr("Duplicate roles add confusion and increases the complexity of administration."), // SeverityLevel: to.Ptr(armauthorization.SeverityLevelMedium), // }, // }, // { // Name: to.Ptr("AzureRolesAssignedOutsidePimAlert"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertDefinitions"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/AzureRolesAssignedOutsidePimAlert"), // Properties: &armauthorization.AlertDefinitionProperties{ // Description: to.Ptr("2 privileged assignment(s) were made outisde of Azure AD PIM"), // DisplayName: to.Ptr("Roles are being assigned outside of Privileged Identity Management"), // HowToPrevent: to.Ptr("Investigate where users are being assigned privileged roles outside of Privileged Identity Management and prohibit future assignments from there."), // IsConfigurable: to.Ptr(false), // IsRemediatable: to.Ptr(true), // MitigationSteps: to.Ptr("Review the users in the list and remove them from privileged roles assigned outside of Privileged Identity Management."), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // SecurityImpact: to.Ptr("Privileged role assignments made outside of Privileged Identity Management are not properly monitored and may indicate an active attack."), // SeverityLevel: to.Ptr(armauthorization.SeverityLevelHigh), // }, // }}, // } }
Output:
type AlertDefinitionsClientGetOptions ¶
type AlertDefinitionsClientGetOptions struct { }
AlertDefinitionsClientGetOptions contains the optional parameters for the AlertDefinitionsClient.Get method.
type AlertDefinitionsClientGetResponse ¶
type AlertDefinitionsClientGetResponse struct { // Alert definition AlertDefinition }
AlertDefinitionsClientGetResponse contains the response from method AlertDefinitionsClient.Get.
type AlertDefinitionsClientListForScopeOptions ¶
type AlertDefinitionsClientListForScopeOptions struct { }
AlertDefinitionsClientListForScopeOptions contains the optional parameters for the AlertDefinitionsClient.NewListForScopePager method.
type AlertDefinitionsClientListForScopeResponse ¶
type AlertDefinitionsClientListForScopeResponse struct { // Alert definition list operation result. AlertDefinitionListResult }
AlertDefinitionsClientListForScopeResponse contains the response from method AlertDefinitionsClient.NewListForScopePager.
type AlertIncident ¶
type AlertIncident struct { // Alert incident properties. Properties AlertIncidentPropertiesClassification // READ-ONLY; The alert incident ID. ID *string // READ-ONLY; The alert incident name. Name *string // READ-ONLY; The alert incident type. Type *string }
AlertIncident - Alert incident
func (AlertIncident) MarshalJSON ¶
func (a AlertIncident) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertIncident.
func (*AlertIncident) UnmarshalJSON ¶
func (a *AlertIncident) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertIncident.
type AlertIncidentListResult ¶
type AlertIncidentListResult struct { // The URL to use for getting the next set of results. NextLink *string // Alert incident list Value []*AlertIncident }
AlertIncidentListResult - Alert incident list operation result.
func (AlertIncidentListResult) MarshalJSON ¶
func (a AlertIncidentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertIncidentListResult.
func (*AlertIncidentListResult) UnmarshalJSON ¶
func (a *AlertIncidentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertIncidentListResult.
type AlertIncidentProperties ¶
type AlertIncidentProperties struct { // REQUIRED; The alert incident type. AlertIncidentType *string }
AlertIncidentProperties - Alert incident properties
func (*AlertIncidentProperties) GetAlertIncidentProperties ¶
func (a *AlertIncidentProperties) GetAlertIncidentProperties() *AlertIncidentProperties
GetAlertIncidentProperties implements the AlertIncidentPropertiesClassification interface for type AlertIncidentProperties.
func (AlertIncidentProperties) MarshalJSON ¶
func (a AlertIncidentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertIncidentProperties.
func (*AlertIncidentProperties) UnmarshalJSON ¶
func (a *AlertIncidentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertIncidentProperties.
type AlertIncidentPropertiesClassification ¶
type AlertIncidentPropertiesClassification interface { // GetAlertIncidentProperties returns the AlertIncidentProperties content of the underlying type. GetAlertIncidentProperties() *AlertIncidentProperties }
AlertIncidentPropertiesClassification provides polymorphic access to related types. Call the interface's GetAlertIncidentProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AlertIncidentProperties, *AzureRolesAssignedOutsidePimAlertIncidentProperties, *DuplicateRoleCreatedAlertIncidentProperties, - *TooManyOwnersAssignedToResourceAlertIncidentProperties, *TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties
type AlertIncidentsClient ¶
type AlertIncidentsClient struct {
// contains filtered or unexported fields
}
AlertIncidentsClient contains the methods for the AlertIncidents group. Don't use this type directly, use NewAlertIncidentsClient() instead.
func NewAlertIncidentsClient ¶
func NewAlertIncidentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertIncidentsClient, error)
NewAlertIncidentsClient creates a new instance of AlertIncidentsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AlertIncidentsClient) Get ¶
func (client *AlertIncidentsClient) Get(ctx context.Context, scope string, alertID string, alertIncidentID string, options *AlertIncidentsClientGetOptions) (AlertIncidentsClientGetResponse, error)
Get - Get the specified alert incident. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert incident. The scope can be any REST resource instance. For example, use '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
- alertID - The name of the alert.
- alertIncidentID - The name of the alert incident to get.
- options - AlertIncidentsClientGetOptions contains the optional parameters for the AlertIncidentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertIncidentById.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.NewAlertIncidentsClient().Get(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "TooManyOwnersAssignedToResource", "5cf9ee65-d22e-4784-8b17-3de1c3b7bdcc", 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.AlertIncident = armauthorization.AlertIncident{ // Name: to.Ptr("5cf9ee65-d22e-4784-8b17-3de1c3b7bdcc"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlerts/alertIncidents"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource/alertIncidents/5cf9ee65-d22e-4784-8b17-3de1c3b7bdcc"), // Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertIncidentProperties{ // AlertIncidentType: to.Ptr("TooManyOwnersAssignedToResourceAlertIncident"), // AssigneeName: to.Ptr("test-user"), // AssigneeType: to.Ptr("User"), // }, // }
Output:
func (*AlertIncidentsClient) NewListForScopePager ¶
func (client *AlertIncidentsClient) NewListForScopePager(scope string, alertID string, options *AlertIncidentsClientListForScopeOptions) *runtime.Pager[AlertIncidentsClientListForScopeResponse]
NewListForScopePager - Gets alert incidents for a resource scope.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert incident.
- alertID - The name of the alert.
- options - AlertIncidentsClientListForScopeOptions contains the optional parameters for the AlertIncidentsClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertIncidents.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.NewAlertIncidentsClient().NewListForScopePager("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "TooManyOwnersAssignedToResource", 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.AlertIncidentListResult = armauthorization.AlertIncidentListResult{ // Value: []*armauthorization.AlertIncident{ // { // Name: to.Ptr("5cf9ee65-d22e-4784-8b17-3de1c3b7bdcc"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlerts/alertIncidents"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource/alertIncidents/5cf9ee65-d22e-4784-8b17-3de1c3b7bdcc"), // Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertIncidentProperties{ // AlertIncidentType: to.Ptr("TooManyOwnersAssignedToResourceAlertIncident"), // AssigneeName: to.Ptr("test-user"), // AssigneeType: to.Ptr("User"), // }, // }}, // } }
Output:
func (*AlertIncidentsClient) Remediate ¶
func (client *AlertIncidentsClient) Remediate(ctx context.Context, scope string, alertID string, alertIncidentID string, options *AlertIncidentsClientRemediateOptions) (AlertIncidentsClientRemediateResponse, error)
Remediate - Remediate an alert incident. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert incident.
- alertID - The name of the alert.
- alertIncidentID - The name of the alert incident to remediate.
- options - AlertIncidentsClientRemediateOptions contains the optional parameters for the AlertIncidentsClient.Remediate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RemediateAlertIncident.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.NewAlertIncidentsClient().Remediate(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "DuplicateRoleCreated", "0645231d-16ba-4ebf-851a-0875df4052bd", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type AlertIncidentsClientGetOptions ¶
type AlertIncidentsClientGetOptions struct { }
AlertIncidentsClientGetOptions contains the optional parameters for the AlertIncidentsClient.Get method.
type AlertIncidentsClientGetResponse ¶
type AlertIncidentsClientGetResponse struct { // Alert incident AlertIncident }
AlertIncidentsClientGetResponse contains the response from method AlertIncidentsClient.Get.
type AlertIncidentsClientListForScopeOptions ¶
type AlertIncidentsClientListForScopeOptions struct { }
AlertIncidentsClientListForScopeOptions contains the optional parameters for the AlertIncidentsClient.NewListForScopePager method.
type AlertIncidentsClientListForScopeResponse ¶
type AlertIncidentsClientListForScopeResponse struct { // Alert incident list operation result. AlertIncidentListResult }
AlertIncidentsClientListForScopeResponse contains the response from method AlertIncidentsClient.NewListForScopePager.
type AlertIncidentsClientRemediateOptions ¶
type AlertIncidentsClientRemediateOptions struct { }
AlertIncidentsClientRemediateOptions contains the optional parameters for the AlertIncidentsClient.Remediate method.
type AlertIncidentsClientRemediateResponse ¶
type AlertIncidentsClientRemediateResponse struct { }
AlertIncidentsClientRemediateResponse contains the response from method AlertIncidentsClient.Remediate.
type AlertListResult ¶
type AlertListResult struct { // The URL to use for getting the next set of results. NextLink *string // Alert list Value []*Alert }
AlertListResult - Alert list operation result.
func (AlertListResult) MarshalJSON ¶
func (a AlertListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertListResult.
func (*AlertListResult) UnmarshalJSON ¶
func (a *AlertListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertListResult.
type AlertOperationClient ¶
type AlertOperationClient struct {
// contains filtered or unexported fields
}
AlertOperationClient contains the methods for the AlertOperation group. Don't use this type directly, use NewAlertOperationClient() instead.
func NewAlertOperationClient ¶
func NewAlertOperationClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertOperationClient, error)
NewAlertOperationClient creates a new instance of AlertOperationClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AlertOperationClient) Get ¶
func (client *AlertOperationClient) Get(ctx context.Context, scope string, operationID string, options *AlertOperationClientGetOptions) (AlertOperationClientGetResponse, error)
Get - Get the specified alert operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert operation.
- operationID - The id of the alert operation.
- options - AlertOperationClientGetOptions contains the optional parameters for the AlertOperationClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperationById.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.NewAlertOperationClient().Get(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "{operationId}", 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.AlertOperationResult = armauthorization.AlertOperationResult{ // CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-05T03:04:06.467Z"); return t}()), // ID: to.Ptr("{operationId}"), // LastActionDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-05T03:04:06.467Z"); return t}()), // ResourceLocation: to.Ptr("https://management.azure.com/providers/Microsoft.Subscription/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/DuplicateRoleCreated?api-version=2022-08-01-preview"), // Status: to.Ptr("Running"), // StatusDetail: to.Ptr("{\"result\":[{\"name\":\"DuplicateRoleCreated\",\"statusDetail\":\"Alert scan is not yet started.\"}]}"), // }
Output:
type AlertOperationClientGetOptions ¶
type AlertOperationClientGetOptions struct { }
AlertOperationClientGetOptions contains the optional parameters for the AlertOperationClient.Get method.
type AlertOperationClientGetResponse ¶
type AlertOperationClientGetResponse struct { // Alert operation result AlertOperationResult }
AlertOperationClientGetResponse contains the response from method AlertOperationClient.Get.
type AlertOperationResult ¶
type AlertOperationResult struct { // READ-ONLY; The created date of the alert operation. CreatedDateTime *time.Time // READ-ONLY; The id of the alert operation. ID *string // READ-ONLY; The last action date of the alert operation. LastActionDateTime *time.Time // READ-ONLY; The location of the alert associated with the operation. ResourceLocation *string // READ-ONLY; The status of the alert operation. Status *string // READ-ONLY; The status detail of the alert operation. StatusDetail *string }
AlertOperationResult - Alert operation result
func (AlertOperationResult) MarshalJSON ¶
func (a AlertOperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertOperationResult.
func (*AlertOperationResult) UnmarshalJSON ¶
func (a *AlertOperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertOperationResult.
type AlertProperties ¶
type AlertProperties struct { // False by default; true if the alert is active. IsActive *bool // READ-ONLY; The alert configuration. AlertConfiguration *AlertConfiguration // READ-ONLY; The alert definition. AlertDefinition *AlertDefinition // READ-ONLY; The alert incidents. AlertIncidents []*AlertIncident // READ-ONLY; The number of generated incidents of the alert. IncidentCount *int32 // READ-ONLY; The date time when the alert configuration was updated or new incidents were generated. LastModifiedDateTime *time.Time // READ-ONLY; The date time when the alert was last scanned. LastScannedDateTime *time.Time // READ-ONLY; The alert scope. Scope *string }
AlertProperties - Alert properties.
func (AlertProperties) MarshalJSON ¶
func (a AlertProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AlertProperties.
func (*AlertProperties) UnmarshalJSON ¶
func (a *AlertProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AlertProperties.
type AlertsClient ¶
type AlertsClient struct {
// contains filtered or unexported fields
}
AlertsClient contains the methods for the Alerts group. Don't use this type directly, use NewAlertsClient() instead.
func NewAlertsClient ¶
func NewAlertsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertsClient, error)
NewAlertsClient creates a new instance of AlertsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AlertsClient) BeginRefresh ¶
func (client *AlertsClient) BeginRefresh(ctx context.Context, scope string, alertID string, options *AlertsClientBeginRefreshOptions) (*runtime.Poller[AlertsClientRefreshResponse], error)
BeginRefresh - Refresh an alert. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert.
- alertID - The name of the alert to refresh.
- options - AlertsClientBeginRefreshOptions contains the optional parameters for the AlertsClient.BeginRefresh method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAlert.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) } poller, err := clientFactory.NewAlertsClient().BeginRefresh(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "AzureRolesAssignedOutsidePimAlert", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*AlertsClient) BeginRefreshAll ¶
func (client *AlertsClient) BeginRefreshAll(ctx context.Context, scope string, options *AlertsClientBeginRefreshAllOptions) (*runtime.Poller[AlertsClientRefreshAllResponse], error)
BeginRefreshAll - Refresh all alerts for a resource scope. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert.
- options - AlertsClientBeginRefreshAllOptions contains the optional parameters for the AlertsClient.BeginRefreshAll method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAllAlerts.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) } poller, err := clientFactory.NewAlertsClient().BeginRefreshAll(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*AlertsClient) Get ¶
func (client *AlertsClient) Get(ctx context.Context, scope string, alertID string, options *AlertsClientGetOptions) (AlertsClientGetResponse, error)
Get - Get the specified alert. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert. The scope can be any REST resource instance. For example, use '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
- alertID - The name of the alert to get.
- options - AlertsClientGetOptions contains the optional parameters for the AlertsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertById.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.NewAlertsClient().Get(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "TooManyOwnersAssignedToResource", 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.Alert = armauthorization.Alert{ // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlerts"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.AlertProperties{ // AlertConfiguration: &armauthorization.AlertConfiguration{ // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertConfigurations"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertConfigurationProperties{ // AlertConfigurationType: to.Ptr("TooManyOwnersAssignedToResourceAlertConfiguration"), // AlertDefinitionID: to.Ptr("TooManyOwnersAssignedToResource"), // IsEnabled: to.Ptr(true), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // ThresholdNumberOfOwners: to.Ptr[int32](2), // ThresholdPercentageOfOwnersOutOfAllRoleMembers: to.Ptr[int32](3), // }, // }, // AlertDefinition: &armauthorization.AlertDefinition{ // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertDefinitions"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.AlertDefinitionProperties{ // Description: to.Ptr("The number of users with the Owner role is too high. We recommend assigning these individuals to less privileged roles or roles more suitable to their daily needs. Take a moment to review the current assignments, and suggested changes here."), // DisplayName: to.Ptr("Too many owners assigned to a resource"), // HowToPrevent: to.Ptr("Choose a role that provides the fewest privileges necessary for a user or group to complete their tasks."), // IsConfigurable: to.Ptr(true), // IsRemediatable: to.Ptr(true), // MitigationSteps: to.Ptr("To mitigate this issue, reduce the number of users in the Owner role. Review the list of users in the list, and reassign them to a less privileged role such as Contributor."), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // SecurityImpact: to.Ptr("As the number of users with the owner role increases, so does the potential for malicious or mistaken actions affecting your resource."), // SeverityLevel: to.Ptr(armauthorization.SeverityLevelMedium), // }, // }, // AlertIncidents: []*armauthorization.AlertIncident{ // { // Name: to.Ptr("a9f38501-74ec-43ea-8663-6c538602150d"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlerts/alertIncidents"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource/alertIncidents/a9f38501-74ec-43ea-8663-6c538602150d"), // Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertIncidentProperties{ // AlertIncidentType: to.Ptr("TooManyOwnersAssignedToResourceAlertIncident"), // AssigneeName: to.Ptr("testUser"), // AssigneeType: to.Ptr("User"), // }, // }}, // IncidentCount: to.Ptr[int32](1), // IsActive: to.Ptr(true), // LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-05T03:04:06.467Z"); return t}()), // LastScannedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-06T18:25:00.380Z"); return t}()), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }
Output:
func (*AlertsClient) NewListForScopePager ¶
func (client *AlertsClient) NewListForScopePager(scope string, options *AlertsClientListForScopeOptions) *runtime.Pager[AlertsClientListForScopeResponse]
NewListForScopePager - Gets alerts for a resource scope.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert.
- options - AlertsClientListForScopeOptions contains the optional parameters for the AlertsClient.NewListForScopePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlerts.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.NewAlertsClient().NewListForScopePager("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", 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.AlertListResult = armauthorization.AlertListResult{ // Value: []*armauthorization.Alert{ // { // Name: to.Ptr("TooManyPermanentOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlerts"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyPermanentOwnersAssignedToResource"), // Properties: &armauthorization.AlertProperties{ // AlertConfiguration: &armauthorization.AlertConfiguration{ // Name: to.Ptr("TooManyPermanentOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertConfigurations"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyPermanentOwnersAssignedToResource"), // Properties: &armauthorization.TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties{ // AlertConfigurationType: to.Ptr("TooManyPermanentOwnersAssignedToResourceAlertConfiguration"), // AlertDefinitionID: to.Ptr("TooManyPermanentOwnersAssignedToResource"), // IsEnabled: to.Ptr(true), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // ThresholdNumberOfPermanentOwners: to.Ptr[int32](10), // ThresholdPercentageOfPermanentOwnersOutOfAllOwners: to.Ptr[int32](10), // }, // }, // AlertDefinition: &armauthorization.AlertDefinition{ // Name: to.Ptr("TooManyPermanentOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertDefinitions"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyPermanentOwnersAssignedToResource"), // Properties: &armauthorization.AlertDefinitionProperties{ // Description: to.Ptr("The number of users set to never expire is too high. To enhance the security of your resources, we recommend requiring activation for role use. Take a moment to review the list of users, and suggested changes here."), // DisplayName: to.Ptr("Too many permanent owners assigned to a resource"), // HowToPrevent: to.Ptr("Enable “Activation Required” in the role settings menu. This will ensure newly added users must activate their role."), // IsConfigurable: to.Ptr(true), // IsRemediatable: to.Ptr(true), // MitigationSteps: to.Ptr("To mitigate this issue, require the user to activate the role before use."), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // SecurityImpact: to.Ptr("Providing users permanent access in a role may leave resources vulnerable to accidental or malicious activity."), // SeverityLevel: to.Ptr(armauthorization.SeverityLevelMedium), // }, // }, // AlertIncidents: []*armauthorization.AlertIncident{ // { // Name: to.Ptr("a9f38501-74ec-43ea-8663-6c538602150d"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlerts/alertIncidents"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyPermanentOwnersAssignedToResource/alertIncidents/a9f38501-74ec-43ea-8663-6c538602150d"), // Properties: &armauthorization.TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties{ // AlertIncidentType: to.Ptr("TooManyPermanentOwnersAssignedToResourceAlertIncident"), // AssigneeName: to.Ptr("testUser"), // AssigneeType: to.Ptr("User"), // }, // }}, // IncidentCount: to.Ptr[int32](1), // IsActive: to.Ptr(true), // LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-05T03:04:06.467Z"); return t}()), // LastScannedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-06T18:25:00.380Z"); return t}()), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }, // { // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlerts"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.AlertProperties{ // AlertConfiguration: &armauthorization.AlertConfiguration{ // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertConfigurations"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertConfigurationProperties{ // AlertConfigurationType: to.Ptr("TooManyOwnersAssignedToResourceAlertConfiguration"), // AlertDefinitionID: to.Ptr("TooManyOwnersAssignedToResource"), // IsEnabled: to.Ptr(true), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // ThresholdNumberOfOwners: to.Ptr[int32](2), // ThresholdPercentageOfOwnersOutOfAllRoleMembers: to.Ptr[int32](3), // }, // }, // AlertDefinition: &armauthorization.AlertDefinition{ // Name: to.Ptr("TooManyOwnersAssignedToResource"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlertDefinitions"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyOwnersAssignedToResource"), // Properties: &armauthorization.AlertDefinitionProperties{ // Description: to.Ptr("The number of users with the Owner role is too high. We recommend assigning these individuals to less privileged roles or roles more suitable to their daily needs. Take a moment to review the current assignments, and suggested changes here."), // DisplayName: to.Ptr("Too many owners assigned to a resource"), // HowToPrevent: to.Ptr("Choose a role that provides the fewest privileges necessary for a user or group to complete their tasks."), // IsConfigurable: to.Ptr(true), // IsRemediatable: to.Ptr(true), // MitigationSteps: to.Ptr("To mitigate this issue, reduce the number of users in the Owner role. Review the list of users in the list, and reassign them to a less privileged role such as Contributor."), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // SecurityImpact: to.Ptr("As the number of users with the owner role increases, so does the potential for malicious or mistaken actions affecting your resource."), // SeverityLevel: to.Ptr(armauthorization.SeverityLevelMedium), // }, // }, // AlertIncidents: []*armauthorization.AlertIncident{ // { // Name: to.Ptr("a9f38501-74ec-43ea-8663-6c538602150d"), // Type: to.Ptr("Microsoft.Authorization/roleManagementAlerts/alertIncidents"), // ID: to.Ptr("/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource/alertIncidents/a9f38501-74ec-43ea-8663-6c538602150d"), // Properties: &armauthorization.TooManyOwnersAssignedToResourceAlertIncidentProperties{ // AlertIncidentType: to.Ptr("TooManyOwnersAssignedToResourceAlertIncident"), // AssigneeName: to.Ptr("testUser"), // AssigneeType: to.Ptr("User"), // }, // }}, // IncidentCount: to.Ptr[int32](1), // IsActive: to.Ptr(true), // LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-05T03:04:06.467Z"); return t}()), // LastScannedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-06T18:25:00.380Z"); return t}()), // Scope: to.Ptr("subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f"), // }, // }}, // } }
Output:
func (*AlertsClient) Update ¶
func (client *AlertsClient) Update(ctx context.Context, scope string, alertID string, parameters Alert, options *AlertsClientUpdateOptions) (AlertsClientUpdateResponse, error)
Update - Update an alert. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-08-01-preview
- scope - The scope of the alert.
- alertID - The name of the alert to dismiss.
- parameters - Parameters for the alert.
- options - AlertsClientUpdateOptions contains the optional parameters for the AlertsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/UpdateAlert.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.NewAlertsClient().Update(ctx, "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", "TooManyPermanentOwnersAssignedToResource", armauthorization.Alert{ Properties: &armauthorization.AlertProperties{ IsActive: to.Ptr(false), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type AlertsClientBeginRefreshAllOptions ¶
type AlertsClientBeginRefreshAllOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AlertsClientBeginRefreshAllOptions contains the optional parameters for the AlertsClient.BeginRefreshAll method.
type AlertsClientBeginRefreshOptions ¶
type AlertsClientBeginRefreshOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AlertsClientBeginRefreshOptions contains the optional parameters for the AlertsClient.BeginRefresh method.
type AlertsClientGetOptions ¶
type AlertsClientGetOptions struct { }
AlertsClientGetOptions contains the optional parameters for the AlertsClient.Get method.
type AlertsClientGetResponse ¶
type AlertsClientGetResponse struct { // The alert. Alert }
AlertsClientGetResponse contains the response from method AlertsClient.Get.
type AlertsClientListForScopeOptions ¶
type AlertsClientListForScopeOptions struct { }
AlertsClientListForScopeOptions contains the optional parameters for the AlertsClient.NewListForScopePager method.
type AlertsClientListForScopeResponse ¶
type AlertsClientListForScopeResponse struct { // Alert list operation result. AlertListResult }
AlertsClientListForScopeResponse contains the response from method AlertsClient.NewListForScopePager.
type AlertsClientRefreshAllResponse ¶
type AlertsClientRefreshAllResponse struct { // Alert operation result AlertOperationResult }
AlertsClientRefreshAllResponse contains the response from method AlertsClient.BeginRefreshAll.
type AlertsClientRefreshResponse ¶
type AlertsClientRefreshResponse struct { // Alert operation result AlertOperationResult }
AlertsClientRefreshResponse contains the response from method AlertsClient.BeginRefresh.
type AlertsClientUpdateOptions ¶
type AlertsClientUpdateOptions struct { }
AlertsClientUpdateOptions contains the optional parameters for the AlertsClient.Update method.
type AlertsClientUpdateResponse ¶
type AlertsClientUpdateResponse struct { }
AlertsClientUpdateResponse contains the response from method AlertsClient.Update.
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 AzureRolesAssignedOutsidePimAlertConfigurationProperties ¶
type AzureRolesAssignedOutsidePimAlertConfigurationProperties struct { // REQUIRED; The alert configuration type. AlertConfigurationType *string // True if the alert is enabled, false will disable the scanning for the specific alert. IsEnabled *bool // READ-ONLY; The alert definition. AlertDefinition *AlertDefinition // READ-ONLY; The alert definition ID. AlertDefinitionID *string // READ-ONLY; The alert scope. Scope *string }
AzureRolesAssignedOutsidePimAlertConfigurationProperties - The Azure roles assigned outside PIM alert configuration properties.
func (*AzureRolesAssignedOutsidePimAlertConfigurationProperties) GetAlertConfigurationProperties ¶
func (a *AzureRolesAssignedOutsidePimAlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
GetAlertConfigurationProperties implements the AlertConfigurationPropertiesClassification interface for type AzureRolesAssignedOutsidePimAlertConfigurationProperties.
func (AzureRolesAssignedOutsidePimAlertConfigurationProperties) MarshalJSON ¶
func (a AzureRolesAssignedOutsidePimAlertConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureRolesAssignedOutsidePimAlertConfigurationProperties.
func (*AzureRolesAssignedOutsidePimAlertConfigurationProperties) UnmarshalJSON ¶
func (a *AzureRolesAssignedOutsidePimAlertConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureRolesAssignedOutsidePimAlertConfigurationProperties.
type AzureRolesAssignedOutsidePimAlertIncidentProperties ¶
type AzureRolesAssignedOutsidePimAlertIncidentProperties struct { // REQUIRED; The alert incident type. AlertIncidentType *string // READ-ONLY; The assignee display name. AssigneeDisplayName *string // READ-ONLY; The assignee ID. AssigneeID *string // READ-ONLY; The assignee user principal name. AssigneeUserPrincipalName *string // READ-ONLY; The date the assignment was activated. AssignmentActivatedDate *time.Time // READ-ONLY; The requestor display name. RequestorDisplayName *string // READ-ONLY; The requestor ID. RequestorID *string // READ-ONLY; The requestor user principal name. RequestorUserPrincipalName *string // READ-ONLY; The role definition ID. RoleDefinitionID *string // READ-ONLY; The role display name. RoleDisplayName *string // READ-ONLY; The role template ID. RoleTemplateID *string }
AzureRolesAssignedOutsidePimAlertIncidentProperties - Azure roles assigned outside PIM alert incident properties.
func (*AzureRolesAssignedOutsidePimAlertIncidentProperties) GetAlertIncidentProperties ¶
func (a *AzureRolesAssignedOutsidePimAlertIncidentProperties) GetAlertIncidentProperties() *AlertIncidentProperties
GetAlertIncidentProperties implements the AlertIncidentPropertiesClassification interface for type AzureRolesAssignedOutsidePimAlertIncidentProperties.
func (AzureRolesAssignedOutsidePimAlertIncidentProperties) MarshalJSON ¶
func (a AzureRolesAssignedOutsidePimAlertIncidentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureRolesAssignedOutsidePimAlertIncidentProperties.
func (*AzureRolesAssignedOutsidePimAlertIncidentProperties) UnmarshalJSON ¶
func (a *AzureRolesAssignedOutsidePimAlertIncidentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureRolesAssignedOutsidePimAlertIncidentProperties.
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/310a0100f5b020c1900c527a6aa70d21992f078a/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 ¶
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 ¶
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) NewAccessReviewDefaultSettingsClient ¶
func (c *ClientFactory) NewAccessReviewDefaultSettingsClient() *AccessReviewDefaultSettingsClient
NewAccessReviewDefaultSettingsClient creates a new instance of AccessReviewDefaultSettingsClient.
func (*ClientFactory) NewAccessReviewHistoryDefinitionClient ¶
func (c *ClientFactory) NewAccessReviewHistoryDefinitionClient() *AccessReviewHistoryDefinitionClient
NewAccessReviewHistoryDefinitionClient creates a new instance of AccessReviewHistoryDefinitionClient.
func (*ClientFactory) NewAccessReviewHistoryDefinitionInstanceClient ¶
func (c *ClientFactory) NewAccessReviewHistoryDefinitionInstanceClient() *AccessReviewHistoryDefinitionInstanceClient
NewAccessReviewHistoryDefinitionInstanceClient creates a new instance of AccessReviewHistoryDefinitionInstanceClient.
func (*ClientFactory) NewAccessReviewHistoryDefinitionInstancesClient ¶
func (c *ClientFactory) NewAccessReviewHistoryDefinitionInstancesClient() *AccessReviewHistoryDefinitionInstancesClient
NewAccessReviewHistoryDefinitionInstancesClient creates a new instance of AccessReviewHistoryDefinitionInstancesClient.
func (*ClientFactory) NewAccessReviewHistoryDefinitionsClient ¶
func (c *ClientFactory) NewAccessReviewHistoryDefinitionsClient() *AccessReviewHistoryDefinitionsClient
NewAccessReviewHistoryDefinitionsClient creates a new instance of AccessReviewHistoryDefinitionsClient.
func (*ClientFactory) NewAccessReviewInstanceClient ¶
func (c *ClientFactory) NewAccessReviewInstanceClient() *AccessReviewInstanceClient
NewAccessReviewInstanceClient creates a new instance of AccessReviewInstanceClient.
func (*ClientFactory) NewAccessReviewInstanceContactedReviewersClient ¶
func (c *ClientFactory) NewAccessReviewInstanceContactedReviewersClient() *AccessReviewInstanceContactedReviewersClient
NewAccessReviewInstanceContactedReviewersClient creates a new instance of AccessReviewInstanceContactedReviewersClient.
func (*ClientFactory) NewAccessReviewInstanceDecisionsClient ¶
func (c *ClientFactory) NewAccessReviewInstanceDecisionsClient() *AccessReviewInstanceDecisionsClient
NewAccessReviewInstanceDecisionsClient creates a new instance of AccessReviewInstanceDecisionsClient.
func (*ClientFactory) NewAccessReviewInstanceMyDecisionsClient ¶
func (c *ClientFactory) NewAccessReviewInstanceMyDecisionsClient() *AccessReviewInstanceMyDecisionsClient
NewAccessReviewInstanceMyDecisionsClient creates a new instance of AccessReviewInstanceMyDecisionsClient.
func (*ClientFactory) NewAccessReviewInstancesAssignedForMyApprovalClient ¶
func (c *ClientFactory) NewAccessReviewInstancesAssignedForMyApprovalClient() *AccessReviewInstancesAssignedForMyApprovalClient
NewAccessReviewInstancesAssignedForMyApprovalClient creates a new instance of AccessReviewInstancesAssignedForMyApprovalClient.
func (*ClientFactory) NewAccessReviewInstancesClient ¶
func (c *ClientFactory) NewAccessReviewInstancesClient() *AccessReviewInstancesClient
NewAccessReviewInstancesClient creates a new instance of AccessReviewInstancesClient.
func (*ClientFactory) NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient ¶
func (c *ClientFactory) NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient() *AccessReviewScheduleDefinitionsAssignedForMyApprovalClient
NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient creates a new instance of AccessReviewScheduleDefinitionsAssignedForMyApprovalClient.
func (*ClientFactory) NewAccessReviewScheduleDefinitionsClient ¶
func (c *ClientFactory) NewAccessReviewScheduleDefinitionsClient() *AccessReviewScheduleDefinitionsClient
NewAccessReviewScheduleDefinitionsClient creates a new instance of AccessReviewScheduleDefinitionsClient.
func (*ClientFactory) NewAlertConfigurationsClient ¶
func (c *ClientFactory) NewAlertConfigurationsClient() *AlertConfigurationsClient
NewAlertConfigurationsClient creates a new instance of AlertConfigurationsClient.
func (*ClientFactory) NewAlertDefinitionsClient ¶
func (c *ClientFactory) NewAlertDefinitionsClient() *AlertDefinitionsClient
NewAlertDefinitionsClient creates a new instance of AlertDefinitionsClient.
func (*ClientFactory) NewAlertIncidentsClient ¶
func (c *ClientFactory) NewAlertIncidentsClient() *AlertIncidentsClient
NewAlertIncidentsClient creates a new instance of AlertIncidentsClient.
func (*ClientFactory) NewAlertOperationClient ¶
func (c *ClientFactory) NewAlertOperationClient() *AlertOperationClient
NewAlertOperationClient creates a new instance of AlertOperationClient.
func (*ClientFactory) NewAlertsClient ¶
func (c *ClientFactory) NewAlertsClient() *AlertsClient
NewAlertsClient creates a new instance of AlertsClient.
func (*ClientFactory) NewClassicAdministratorsClient ¶
func (c *ClientFactory) NewClassicAdministratorsClient() *ClassicAdministratorsClient
NewClassicAdministratorsClient creates a new instance of ClassicAdministratorsClient.
func (*ClientFactory) NewDenyAssignmentsClient ¶
func (c *ClientFactory) NewDenyAssignmentsClient() *DenyAssignmentsClient
NewDenyAssignmentsClient creates a new instance of DenyAssignmentsClient.
func (*ClientFactory) NewEligibleChildResourcesClient ¶
func (c *ClientFactory) NewEligibleChildResourcesClient() *EligibleChildResourcesClient
NewEligibleChildResourcesClient creates a new instance of EligibleChildResourcesClient.
func (*ClientFactory) NewGlobalAdministratorClient ¶
func (c *ClientFactory) NewGlobalAdministratorClient() *GlobalAdministratorClient
NewGlobalAdministratorClient creates a new instance of GlobalAdministratorClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPermissionsClient ¶
func (c *ClientFactory) NewPermissionsClient() *PermissionsClient
NewPermissionsClient creates a new instance of PermissionsClient.
func (*ClientFactory) NewProviderOperationsMetadataClient ¶
func (c *ClientFactory) NewProviderOperationsMetadataClient() *ProviderOperationsMetadataClient
NewProviderOperationsMetadataClient creates a new instance of ProviderOperationsMetadataClient.
func (*ClientFactory) NewRoleAssignmentScheduleInstancesClient ¶
func (c *ClientFactory) NewRoleAssignmentScheduleInstancesClient() *RoleAssignmentScheduleInstancesClient
NewRoleAssignmentScheduleInstancesClient creates a new instance of RoleAssignmentScheduleInstancesClient.
func (*ClientFactory) NewRoleAssignmentScheduleRequestsClient ¶
func (c *ClientFactory) NewRoleAssignmentScheduleRequestsClient() *RoleAssignmentScheduleRequestsClient
NewRoleAssignmentScheduleRequestsClient creates a new instance of RoleAssignmentScheduleRequestsClient.
func (*ClientFactory) NewRoleAssignmentSchedulesClient ¶
func (c *ClientFactory) NewRoleAssignmentSchedulesClient() *RoleAssignmentSchedulesClient
NewRoleAssignmentSchedulesClient creates a new instance of RoleAssignmentSchedulesClient.
func (*ClientFactory) NewRoleAssignmentsClient ¶
func (c *ClientFactory) NewRoleAssignmentsClient() *RoleAssignmentsClient
NewRoleAssignmentsClient creates a new instance of RoleAssignmentsClient.
func (*ClientFactory) NewRoleDefinitionsClient ¶
func (c *ClientFactory) NewRoleDefinitionsClient() *RoleDefinitionsClient
NewRoleDefinitionsClient creates a new instance of RoleDefinitionsClient.
func (*ClientFactory) NewRoleEligibilityScheduleInstancesClient ¶
func (c *ClientFactory) NewRoleEligibilityScheduleInstancesClient() *RoleEligibilityScheduleInstancesClient
NewRoleEligibilityScheduleInstancesClient creates a new instance of RoleEligibilityScheduleInstancesClient.
func (*ClientFactory) NewRoleEligibilityScheduleRequestsClient ¶
func (c *ClientFactory) NewRoleEligibilityScheduleRequestsClient() *RoleEligibilityScheduleRequestsClient
NewRoleEligibilityScheduleRequestsClient creates a new instance of RoleEligibilityScheduleRequestsClient.
func (*ClientFactory) NewRoleEligibilitySchedulesClient ¶
func (c *ClientFactory) NewRoleEligibilitySchedulesClient() *RoleEligibilitySchedulesClient
NewRoleEligibilitySchedulesClient creates a new instance of RoleEligibilitySchedulesClient.
func (*ClientFactory) NewRoleManagementPoliciesClient ¶
func (c *ClientFactory) NewRoleManagementPoliciesClient() *RoleManagementPoliciesClient
NewRoleManagementPoliciesClient creates a new instance of RoleManagementPoliciesClient.
func (*ClientFactory) NewRoleManagementPolicyAssignmentsClient ¶
func (c *ClientFactory) NewRoleManagementPolicyAssignmentsClient() *RoleManagementPolicyAssignmentsClient
NewRoleManagementPolicyAssignmentsClient creates a new instance of RoleManagementPolicyAssignmentsClient.
func (*ClientFactory) NewScopeAccessReviewDefaultSettingsClient ¶
func (c *ClientFactory) NewScopeAccessReviewDefaultSettingsClient() *ScopeAccessReviewDefaultSettingsClient
NewScopeAccessReviewDefaultSettingsClient creates a new instance of ScopeAccessReviewDefaultSettingsClient.
func (*ClientFactory) NewScopeAccessReviewHistoryDefinitionClient ¶
func (c *ClientFactory) NewScopeAccessReviewHistoryDefinitionClient() *ScopeAccessReviewHistoryDefinitionClient
NewScopeAccessReviewHistoryDefinitionClient creates a new instance of ScopeAccessReviewHistoryDefinitionClient.
func (*ClientFactory) NewScopeAccessReviewHistoryDefinitionInstanceClient ¶
func (c *ClientFactory) NewScopeAccessReviewHistoryDefinitionInstanceClient() *ScopeAccessReviewHistoryDefinitionInstanceClient
NewScopeAccessReviewHistoryDefinitionInstanceClient creates a new instance of ScopeAccessReviewHistoryDefinitionInstanceClient.
func (*ClientFactory) NewScopeAccessReviewHistoryDefinitionInstancesClient ¶
func (c *ClientFactory) NewScopeAccessReviewHistoryDefinitionInstancesClient() *ScopeAccessReviewHistoryDefinitionInstancesClient
NewScopeAccessReviewHistoryDefinitionInstancesClient creates a new instance of ScopeAccessReviewHistoryDefinitionInstancesClient.
func (*ClientFactory) NewScopeAccessReviewHistoryDefinitionsClient ¶
func (c *ClientFactory) NewScopeAccessReviewHistoryDefinitionsClient() *ScopeAccessReviewHistoryDefinitionsClient
NewScopeAccessReviewHistoryDefinitionsClient creates a new instance of ScopeAccessReviewHistoryDefinitionsClient.
func (*ClientFactory) NewScopeAccessReviewInstanceClient ¶
func (c *ClientFactory) NewScopeAccessReviewInstanceClient() *ScopeAccessReviewInstanceClient
NewScopeAccessReviewInstanceClient creates a new instance of ScopeAccessReviewInstanceClient.
func (*ClientFactory) NewScopeAccessReviewInstanceContactedReviewersClient ¶
func (c *ClientFactory) NewScopeAccessReviewInstanceContactedReviewersClient() *ScopeAccessReviewInstanceContactedReviewersClient
NewScopeAccessReviewInstanceContactedReviewersClient creates a new instance of ScopeAccessReviewInstanceContactedReviewersClient.
func (*ClientFactory) NewScopeAccessReviewInstanceDecisionsClient ¶
func (c *ClientFactory) NewScopeAccessReviewInstanceDecisionsClient() *ScopeAccessReviewInstanceDecisionsClient
NewScopeAccessReviewInstanceDecisionsClient creates a new instance of ScopeAccessReviewInstanceDecisionsClient.
func (*ClientFactory) NewScopeAccessReviewInstancesClient ¶
func (c *ClientFactory) NewScopeAccessReviewInstancesClient() *ScopeAccessReviewInstancesClient
NewScopeAccessReviewInstancesClient creates a new instance of ScopeAccessReviewInstancesClient.
func (*ClientFactory) NewScopeAccessReviewScheduleDefinitionsClient ¶
func (c *ClientFactory) NewScopeAccessReviewScheduleDefinitionsClient() *ScopeAccessReviewScheduleDefinitionsClient
NewScopeAccessReviewScheduleDefinitionsClient creates a new instance of ScopeAccessReviewScheduleDefinitionsClient.
func (*ClientFactory) NewTenantLevelAccessReviewInstanceContactedReviewersClient ¶
func (c *ClientFactory) NewTenantLevelAccessReviewInstanceContactedReviewersClient() *TenantLevelAccessReviewInstanceContactedReviewersClient
NewTenantLevelAccessReviewInstanceContactedReviewersClient creates a new instance of TenantLevelAccessReviewInstanceContactedReviewersClient.
type DecisionResourceType ¶
type DecisionResourceType string
DecisionResourceType - The type of resource
const (
DecisionResourceTypeAzureRole DecisionResourceType = "azureRole"
)
func PossibleDecisionResourceTypeValues ¶
func PossibleDecisionResourceTypeValues() []DecisionResourceType
PossibleDecisionResourceTypeValues returns the possible values for the DecisionResourceType const type.
type DecisionTargetType ¶
type DecisionTargetType string
DecisionTargetType - The type of decision target : User/ServicePrincipal
const ( DecisionTargetTypeServicePrincipal DecisionTargetType = "servicePrincipal" DecisionTargetTypeUser DecisionTargetType = "user" )
func PossibleDecisionTargetTypeValues ¶
func PossibleDecisionTargetTypeValues() []DecisionTargetType
PossibleDecisionTargetTypeValues returns the possible values for the DecisionTargetType const type.
type DefaultDecisionType ¶
type DefaultDecisionType string
DefaultDecisionType - This specifies the behavior for the autoReview feature when an access review completes.
const ( DefaultDecisionTypeApprove DefaultDecisionType = "Approve" DefaultDecisionTypeDeny DefaultDecisionType = "Deny" DefaultDecisionTypeRecommendation DefaultDecisionType = "Recommendation" )
func PossibleDefaultDecisionTypeValues ¶
func PossibleDefaultDecisionTypeValues() []DefaultDecisionType
PossibleDefaultDecisionTypeValues returns the possible values for the DefaultDecisionType const type.
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 conditions on the deny 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. ConditionVersion *string // 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 // READ-ONLY; Id of the user who created the assignment CreatedBy *string // READ-ONLY; Time it was created CreatedOn *time.Time // READ-ONLY; Id of the user who updated the assignment UpdatedBy *string // READ-ONLY; Time it was updated UpdatedOn *time.Time }
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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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 DuplicateRoleCreatedAlertConfigurationProperties ¶
type DuplicateRoleCreatedAlertConfigurationProperties struct { // REQUIRED; The alert configuration type. AlertConfigurationType *string // True if the alert is enabled, false will disable the scanning for the specific alert. IsEnabled *bool // READ-ONLY; The alert definition. AlertDefinition *AlertDefinition // READ-ONLY; The alert definition ID. AlertDefinitionID *string // READ-ONLY; The alert scope. Scope *string }
DuplicateRoleCreatedAlertConfigurationProperties - The duplicate role created alert configuration.
func (*DuplicateRoleCreatedAlertConfigurationProperties) GetAlertConfigurationProperties ¶
func (d *DuplicateRoleCreatedAlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
GetAlertConfigurationProperties implements the AlertConfigurationPropertiesClassification interface for type DuplicateRoleCreatedAlertConfigurationProperties.
func (DuplicateRoleCreatedAlertConfigurationProperties) MarshalJSON ¶
func (d DuplicateRoleCreatedAlertConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DuplicateRoleCreatedAlertConfigurationProperties.
func (*DuplicateRoleCreatedAlertConfigurationProperties) UnmarshalJSON ¶
func (d *DuplicateRoleCreatedAlertConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DuplicateRoleCreatedAlertConfigurationProperties.
type DuplicateRoleCreatedAlertIncidentProperties ¶
type DuplicateRoleCreatedAlertIncidentProperties struct { // REQUIRED; The alert incident type. AlertIncidentType *string // READ-ONLY; The duplicate roles. DuplicateRoles *string // READ-ONLY; The reason for the incident. Reason *string // READ-ONLY; The role name. RoleName *string }
DuplicateRoleCreatedAlertIncidentProperties - Duplicate role created alert incident properties.
func (*DuplicateRoleCreatedAlertIncidentProperties) GetAlertIncidentProperties ¶
func (d *DuplicateRoleCreatedAlertIncidentProperties) GetAlertIncidentProperties() *AlertIncidentProperties
GetAlertIncidentProperties implements the AlertIncidentPropertiesClassification interface for type DuplicateRoleCreatedAlertIncidentProperties.
func (DuplicateRoleCreatedAlertIncidentProperties) MarshalJSON ¶
func (d DuplicateRoleCreatedAlertIncidentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DuplicateRoleCreatedAlertIncidentProperties.
func (*DuplicateRoleCreatedAlertIncidentProperties) UnmarshalJSON ¶
func (d *DuplicateRoleCreatedAlertIncidentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DuplicateRoleCreatedAlertIncidentProperties.
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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/resourceGroups/RG-1"), // }, // { // Name: to.Ptr("RG-2"), // Type: to.Ptr("resourcegroup"), // ID: to.Ptr("/providers/Microsoft.Subscription/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 ErrorDefinition ¶
type ErrorDefinition struct { // Error of the list gateway status. Error *ErrorDefinitionProperties }
ErrorDefinition - Error description and code explaining why an operation failed.
func (ErrorDefinition) MarshalJSON ¶
func (e ErrorDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.
func (*ErrorDefinition) UnmarshalJSON ¶
func (e *ErrorDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.
type ErrorDefinitionProperties ¶
type ErrorDefinitionProperties struct { // Error code of list gateway. Code *string // READ-ONLY; Description of the error. Message *string }
ErrorDefinitionProperties - Error description and code explaining why an operation failed.
func (ErrorDefinitionProperties) MarshalJSON ¶
func (e ErrorDefinitionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDefinitionProperties.
func (*ErrorDefinitionProperties) UnmarshalJSON ¶
func (e *ErrorDefinitionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinitionProperties.
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/310a0100f5b020c1900c527a6aa70d21992f078a/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 Operation ¶
type Operation struct { // Display of the operation Display *OperationDisplay // Indicates whether the operation is a data action IsDataAction *bool // Name of the operation Name *string // Origin of the operation Origin *string }
Operation - The definition of a Microsoft.Authorization operation.
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The description for the operation. Description *string // READ-ONLY; The operation that users can perform. Operation *string // READ-ONLY; The resource provider name: Microsoft.Authorization. Provider *string // READ-ONLY; The resource on which the operation is performed. Resource *string }
OperationDisplay - The display information for a Microsoft.Authorization operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // The URI that can be used to request the next set of paged results. NextLink *string // The collection value. Value []*Operation }
OperationListResult - The result of a request to list Microsoft.Authorization operations.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists the operations available from this provider.
Generated from API version 2021-12-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // The result of a request to list Microsoft.Authorization operations. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Permission ¶
type Permission struct { // Allowed actions. Actions []*string // Allowed Data actions. DataActions []*string // Denied actions. NotActions []*string // Denied Data actions. NotDataActions []*string // READ-ONLY; The conditions on the role definition. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] // StringEqualsIgnoreCase // 'foostoragecontainer' Condition *string // READ-ONLY; Version of the condition. Currently the only accepted value is '2.0' ConditionVersion *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-05-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-05-01-preview/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-05-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-05-01-preview/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 }
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 }
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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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 RecordAllDecisionsProperties ¶
type RecordAllDecisionsProperties struct { // The decision to make. Approvers can take action of Approve/Deny Decision *RecordAllDecisionsResult // Justification provided by approvers for their action Justification *string // READ-ONLY; The id of principal which needs to be approved/denied. PrincipalID *string // READ-ONLY; The id of resource which needs to be approved/denied. ResourceID *string }
RecordAllDecisionsProperties - Record All Decisions payload.
func (RecordAllDecisionsProperties) MarshalJSON ¶
func (r RecordAllDecisionsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecordAllDecisionsProperties.
func (*RecordAllDecisionsProperties) UnmarshalJSON ¶
func (r *RecordAllDecisionsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecordAllDecisionsProperties.
type RecordAllDecisionsResult ¶
type RecordAllDecisionsResult string
RecordAllDecisionsResult - The decision to make. Approvers can take action of Approve/Deny
const ( RecordAllDecisionsResultApprove RecordAllDecisionsResult = "Approve" RecordAllDecisionsResultDeny RecordAllDecisionsResult = "Deny" )
func PossibleRecordAllDecisionsResultValues ¶
func PossibleRecordAllDecisionsResultValues() []RecordAllDecisionsResult
PossibleRecordAllDecisionsResultValues returns the possible values for the RecordAllDecisionsResult 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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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 2022-04-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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 2022-04-01-preview
- scope - The scope of the role assignment schedule request to create. The scope can be any REST resource instance. For example, use '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/providers/Microsoft.Subscription/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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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 2022-04-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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 2022-04-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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 2022-04-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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/310a0100f5b020c1900c527a6aa70d21992f078a/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 // READ-ONLY; Id of the user who created the assignment CreatedBy *string // READ-ONLY; Time it was created CreatedOn *time.Time // READ-ONLY; Id of the user who updated the assignment UpdatedBy *string // READ-ONLY; Time it was updated UpdatedOn *time.Time }
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-05-01-preview
- 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}'
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-05-01-preview/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-05-01-preview
- 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}'
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-05-01-preview/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 ID (GUID). If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01-preview
- 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}'
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-05-01-preview/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().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-05-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-05-01-preview/examples/GetRoleDefinitionByRoleId.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-05-01-preview
- 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 - RoleDefinitionsClientListOptions contains the optional parameters for the RoleDefinitionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-05-01-preview/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"), // Scope: to.Ptr("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"), // Scope: to.Ptr("/providers/Microsoft.Subscription/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 2022-04-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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 2022-04-01-preview
- scope - The scope of the role eligibility schedule request to create. The scope can be any REST resource instance. For example, use '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/providers/Microsoft.Subscription/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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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 2022-04-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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 2022-04-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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 2022-04-01-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-04-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Scope: to.Ptr("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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("/providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"), // Scope: to.Ptr("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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; 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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"), // Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{ // 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("/providers/Microsoft.Subscription/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-preview
- 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/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2020-10-01-preview/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("/providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"), // Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{ // 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("/providers/Microsoft.Subscription/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 ScopeAccessReviewDefaultSettingsClient ¶
type ScopeAccessReviewDefaultSettingsClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewDefaultSettingsClient contains the methods for the ScopeAccessReviewDefaultSettings group. Don't use this type directly, use NewScopeAccessReviewDefaultSettingsClient() instead.
func NewScopeAccessReviewDefaultSettingsClient ¶
func NewScopeAccessReviewDefaultSettingsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewDefaultSettingsClient, error)
NewScopeAccessReviewDefaultSettingsClient creates a new instance of ScopeAccessReviewDefaultSettingsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewDefaultSettingsClient) Get ¶
func (client *ScopeAccessReviewDefaultSettingsClient) Get(ctx context.Context, scope string, options *ScopeAccessReviewDefaultSettingsClientGetOptions) (ScopeAccessReviewDefaultSettingsClientGetResponse, error)
Get - Get access review default settings for the subscription If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- options - ScopeAccessReviewDefaultSettingsClientGetOptions contains the optional parameters for the ScopeAccessReviewDefaultSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewDefaultSettings.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.NewScopeAccessReviewDefaultSettingsClient().Get(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", 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.AccessReviewDefaultSettings = armauthorization.AccessReviewDefaultSettings{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Authorization/accessReviewSettings"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewSettings/default"), // Properties: &armauthorization.AccessReviewScheduleSettings{ // AutoApplyDecisionsEnabled: to.Ptr(true), // DefaultDecision: to.Ptr(armauthorization.DefaultDecisionTypeApprove), // DefaultDecisionEnabled: to.Ptr(true), // InstanceDurationInDays: to.Ptr[int32](30), // JustificationRequiredOnApproval: to.Ptr(true), // MailNotificationsEnabled: to.Ptr(true), // RecommendationsEnabled: to.Ptr(true), // Recurrence: &armauthorization.AccessReviewRecurrenceSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }, // ReminderNotificationsEnabled: to.Ptr(true), // }, // }
Output:
func (*ScopeAccessReviewDefaultSettingsClient) Put ¶
func (client *ScopeAccessReviewDefaultSettingsClient) Put(ctx context.Context, scope string, properties AccessReviewScheduleSettings, options *ScopeAccessReviewDefaultSettingsClientPutOptions) (ScopeAccessReviewDefaultSettingsClientPutResponse, error)
Put - Get access review default settings for the subscription If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- properties - Access review schedule settings.
- options - ScopeAccessReviewDefaultSettingsClientPutOptions contains the optional parameters for the ScopeAccessReviewDefaultSettingsClient.Put method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/PutAccessReviewDefaultSettings.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.NewScopeAccessReviewDefaultSettingsClient().Put(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", armauthorization.AccessReviewScheduleSettings{}, 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.AccessReviewDefaultSettings = armauthorization.AccessReviewDefaultSettings{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Authorization/accessReviewSettings"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewSettings/default"), // Properties: &armauthorization.AccessReviewScheduleSettings{ // AutoApplyDecisionsEnabled: to.Ptr(true), // DefaultDecision: to.Ptr(armauthorization.DefaultDecisionTypeApprove), // DefaultDecisionEnabled: to.Ptr(true), // InstanceDurationInDays: to.Ptr[int32](30), // JustificationRequiredOnApproval: to.Ptr(true), // MailNotificationsEnabled: to.Ptr(true), // RecommendationsEnabled: to.Ptr(true), // Recurrence: &armauthorization.AccessReviewRecurrenceSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }, // ReminderNotificationsEnabled: to.Ptr(true), // }, // }
Output:
type ScopeAccessReviewDefaultSettingsClientGetOptions ¶
type ScopeAccessReviewDefaultSettingsClientGetOptions struct { }
ScopeAccessReviewDefaultSettingsClientGetOptions contains the optional parameters for the ScopeAccessReviewDefaultSettingsClient.Get method.
type ScopeAccessReviewDefaultSettingsClientGetResponse ¶
type ScopeAccessReviewDefaultSettingsClientGetResponse struct { // Access Review Default Settings. AccessReviewDefaultSettings }
ScopeAccessReviewDefaultSettingsClientGetResponse contains the response from method ScopeAccessReviewDefaultSettingsClient.Get.
type ScopeAccessReviewDefaultSettingsClientPutOptions ¶
type ScopeAccessReviewDefaultSettingsClientPutOptions struct { }
ScopeAccessReviewDefaultSettingsClientPutOptions contains the optional parameters for the ScopeAccessReviewDefaultSettingsClient.Put method.
type ScopeAccessReviewDefaultSettingsClientPutResponse ¶
type ScopeAccessReviewDefaultSettingsClientPutResponse struct { // Access Review Default Settings. AccessReviewDefaultSettings }
ScopeAccessReviewDefaultSettingsClientPutResponse contains the response from method ScopeAccessReviewDefaultSettingsClient.Put.
type ScopeAccessReviewHistoryDefinitionClient ¶
type ScopeAccessReviewHistoryDefinitionClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewHistoryDefinitionClient contains the methods for the ScopeAccessReviewHistoryDefinition group. Don't use this type directly, use NewScopeAccessReviewHistoryDefinitionClient() instead.
func NewScopeAccessReviewHistoryDefinitionClient ¶
func NewScopeAccessReviewHistoryDefinitionClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewHistoryDefinitionClient, error)
NewScopeAccessReviewHistoryDefinitionClient creates a new instance of ScopeAccessReviewHistoryDefinitionClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewHistoryDefinitionClient) Create ¶
func (client *ScopeAccessReviewHistoryDefinitionClient) Create(ctx context.Context, scope string, historyDefinitionID string, properties AccessReviewHistoryDefinitionProperties, options *ScopeAccessReviewHistoryDefinitionClientCreateOptions) (ScopeAccessReviewHistoryDefinitionClientCreateResponse, error)
Create - Create a scheduled or one-time Access Review History Definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- historyDefinitionID - The id of the access review history definition.
- properties - Access review history definition properties.
- options - ScopeAccessReviewHistoryDefinitionClientCreateOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/PutAccessReviewHistoryDefinition.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.NewScopeAccessReviewHistoryDefinitionClient().Create(ctx, "subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a", "44724910-d7a5-4c29-b28f-db73e717165a", armauthorization.AccessReviewHistoryDefinitionProperties{}, 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.AccessReviewHistoryDefinition = armauthorization.AccessReviewHistoryDefinition{ // Name: to.Ptr("44724910-d7a5-4c29-b28f-db73e717165a"), // Type: to.Ptr("Microsoft.Authorization/accessReviewHistoryDefinition"), // ID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/accessReviewHistoryDefinitions/44724910-d7a5-4c29-b28f-db73e717165a"), // Properties: &armauthorization.AccessReviewHistoryDefinitionProperties{ // CreatedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("673ad0d8-7b0e-4201-aaeb-74cdcbf22af9"), // PrincipalName: to.Ptr("levi"), // UserPrincipalName: to.Ptr("levi"), // }, // CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-23T00:27:33.690Z"); return t}()), // Decisions: []*armauthorization.AccessReviewResult{ // to.Ptr(armauthorization.AccessReviewResultApprove), // to.Ptr(armauthorization.AccessReviewResultDeny), // to.Ptr(armauthorization.AccessReviewResultNotReviewed), // to.Ptr(armauthorization.AccessReviewResultDontKnow), // to.Ptr(armauthorization.AccessReviewResultNotNotified)}, // DisplayName: to.Ptr("Hello world name"), // ReviewHistoryPeriodEndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T08:00:00.000Z"); return t}()), // ReviewHistoryPeriodStartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-01T07:00:00.000Z"); return t}()), // Scopes: []*armauthorization.AccessReviewScope{ // { // ExpandNestedMemberships: to.Ptr(true), // PrincipalType: to.Ptr(armauthorization.AccessReviewScopePrincipalTypeUser), // ResourceID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a"), // RoleDefinitionID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/roleDefinitions"), // }, // { // ExpandNestedMemberships: to.Ptr(false), // PrincipalType: to.Ptr(armauthorization.AccessReviewScopePrincipalTypeUser), // ResourceID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a"), // RoleDefinitionID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/roleDefinitions/1562cf42-00b9-457c-86ef-5702d4132904"), // }}, // Settings: &armauthorization.AccessReviewHistoryScheduleSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-12-01T08:00:00.000Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T08:00:00.000Z"); return t}()), // }, // }, // Status: to.Ptr(armauthorization.AccessReviewHistoryDefinitionStatusRequested), // }, // }
Output:
func (*ScopeAccessReviewHistoryDefinitionClient) DeleteByID ¶
func (client *ScopeAccessReviewHistoryDefinitionClient) DeleteByID(ctx context.Context, scope string, historyDefinitionID string, options *ScopeAccessReviewHistoryDefinitionClientDeleteByIDOptions) (ScopeAccessReviewHistoryDefinitionClientDeleteByIDResponse, error)
DeleteByID - Delete an access review history definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- historyDefinitionID - The id of the access review history definition.
- options - ScopeAccessReviewHistoryDefinitionClientDeleteByIDOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionClient.DeleteByID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/DeleteAccessReviewHistoryDefinition.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.NewScopeAccessReviewHistoryDefinitionClient().DeleteByID(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type ScopeAccessReviewHistoryDefinitionClientCreateOptions ¶
type ScopeAccessReviewHistoryDefinitionClientCreateOptions struct { }
ScopeAccessReviewHistoryDefinitionClientCreateOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionClient.Create method.
type ScopeAccessReviewHistoryDefinitionClientCreateResponse ¶
type ScopeAccessReviewHistoryDefinitionClientCreateResponse struct { // Access Review History Definition. AccessReviewHistoryDefinition }
ScopeAccessReviewHistoryDefinitionClientCreateResponse contains the response from method ScopeAccessReviewHistoryDefinitionClient.Create.
type ScopeAccessReviewHistoryDefinitionClientDeleteByIDOptions ¶
type ScopeAccessReviewHistoryDefinitionClientDeleteByIDOptions struct { }
ScopeAccessReviewHistoryDefinitionClientDeleteByIDOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionClient.DeleteByID method.
type ScopeAccessReviewHistoryDefinitionClientDeleteByIDResponse ¶
type ScopeAccessReviewHistoryDefinitionClientDeleteByIDResponse struct { }
ScopeAccessReviewHistoryDefinitionClientDeleteByIDResponse contains the response from method ScopeAccessReviewHistoryDefinitionClient.DeleteByID.
type ScopeAccessReviewHistoryDefinitionInstanceClient ¶
type ScopeAccessReviewHistoryDefinitionInstanceClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewHistoryDefinitionInstanceClient contains the methods for the ScopeAccessReviewHistoryDefinitionInstance group. Don't use this type directly, use NewScopeAccessReviewHistoryDefinitionInstanceClient() instead.
func NewScopeAccessReviewHistoryDefinitionInstanceClient ¶
func NewScopeAccessReviewHistoryDefinitionInstanceClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewHistoryDefinitionInstanceClient, error)
NewScopeAccessReviewHistoryDefinitionInstanceClient creates a new instance of ScopeAccessReviewHistoryDefinitionInstanceClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewHistoryDefinitionInstanceClient) GenerateDownloadURI ¶
func (client *ScopeAccessReviewHistoryDefinitionInstanceClient) GenerateDownloadURI(ctx context.Context, scope string, historyDefinitionID string, instanceID string, options *ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions) (ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse, error)
GenerateDownloadURI - Generates a uri which can be used to retrieve review history data. This URI has a TTL of 1 day and can be retrieved by fetching the accessReviewHistoryDefinition object. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- historyDefinitionID - The id of the access review history definition.
- instanceID - The id of the access review history definition instance to generate a URI for.
- options - ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/PostAccessReviewHistoryDefinitionInstance.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.NewScopeAccessReviewHistoryDefinitionInstanceClient().GenerateDownloadURI(ctx, "subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a", "44724910-d7a5-4c29-b28f-db73e717165a", "9038f4f3-3d8d-43c3-8ede-669ea082c43b", 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.AccessReviewHistoryInstance = armauthorization.AccessReviewHistoryInstance{ // Name: to.Ptr("9038f4f3-3d8d-43c3-8ede-669ea082c43b"), // Type: to.Ptr("Microsoft.Authorization/accessReviewHistoryInstance"), // ID: to.Ptr("9038f4f3-3d8d-43c3-8ede-669ea082c43b"), // Properties: &armauthorization.AccessReviewHistoryInstanceProperties{ // DisplayName: to.Ptr("Hello world name"), // DownloadURI: to.Ptr("https://dfermconsolreportusc.blob.core.windows.net/df-erm-reports/Hello world name-22be232e-a93d-42a3-8ac5-313cfd29a0eb.csv?sv=2015-04-05&ss=b&srt=o&sp=rl&st=2021-03-22T19:39:38.0000000Z&se=2021-03-23T19:41:38.0000000Z&spr=https&sig=84rlGCIgU4ToMn%2FFLncBXq95O8a8RsFlwQY1Knl%2Fo%2FI%3D"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-22T00:28:33.690Z"); return t}()), // FulfilledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-23T00:28:33.690Z"); return t}()), // ReviewHistoryPeriodEndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T08:00:00.000Z"); return t}()), // ReviewHistoryPeriodStartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-01T07:00:00.000Z"); return t}()), // RunDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-23T00:27:33.690Z"); return t}()), // Status: to.Ptr(armauthorization.AccessReviewHistoryDefinitionStatusRequested), // }, // }
Output:
type ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions ¶
type ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions struct { }
ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI method.
type ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse ¶
type ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse struct { // Access Review History Definition Instance. AccessReviewHistoryInstance }
ScopeAccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse contains the response from method ScopeAccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI.
type ScopeAccessReviewHistoryDefinitionInstancesClient ¶
type ScopeAccessReviewHistoryDefinitionInstancesClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewHistoryDefinitionInstancesClient contains the methods for the ScopeAccessReviewHistoryDefinitionInstances group. Don't use this type directly, use NewScopeAccessReviewHistoryDefinitionInstancesClient() instead.
func NewScopeAccessReviewHistoryDefinitionInstancesClient ¶
func NewScopeAccessReviewHistoryDefinitionInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewHistoryDefinitionInstancesClient, error)
NewScopeAccessReviewHistoryDefinitionInstancesClient creates a new instance of ScopeAccessReviewHistoryDefinitionInstancesClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewHistoryDefinitionInstancesClient) NewListPager ¶
func (client *ScopeAccessReviewHistoryDefinitionInstancesClient) NewListPager(scope string, historyDefinitionID string, options *ScopeAccessReviewHistoryDefinitionInstancesClientListOptions) *runtime.Pager[ScopeAccessReviewHistoryDefinitionInstancesClientListResponse]
NewListPager - Get access review history definition instances by definition Id
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- historyDefinitionID - The id of the access review history definition.
- options - ScopeAccessReviewHistoryDefinitionInstancesClientListOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewHistoryDefinitionInstances.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.NewScopeAccessReviewHistoryDefinitionInstancesClient().NewListPager("subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a", "44724910-d7a5-4c29-b28f-db73e717165a", 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.AccessReviewHistoryDefinitionInstanceListResult = armauthorization.AccessReviewHistoryDefinitionInstanceListResult{ // Value: []*armauthorization.AccessReviewHistoryInstance{ // { // Name: to.Ptr("44724910-d7a5-4c29-b28f-db73e717165a"), // Type: to.Ptr("Microsoft.Authorization/accessReviewHistoryInstance"), // ID: to.Ptr("44724910-d7a5-4c29-b28f-db73e717165a"), // Properties: &armauthorization.AccessReviewHistoryInstanceProperties{ // DisplayName: to.Ptr("Hello world name"), // Expiration: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-22T00:28:33.690Z"); return t}()), // FulfilledDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-23T00:28:33.690Z"); return t}()), // ReviewHistoryPeriodEndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T08:00:00.000Z"); return t}()), // ReviewHistoryPeriodStartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-01T07:00:00.000Z"); return t}()), // RunDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-23T00:27:33.690Z"); return t}()), // Status: to.Ptr(armauthorization.AccessReviewHistoryDefinitionStatusRequested), // }, // }}, // } }
Output:
type ScopeAccessReviewHistoryDefinitionInstancesClientListOptions ¶
type ScopeAccessReviewHistoryDefinitionInstancesClientListOptions struct { }
ScopeAccessReviewHistoryDefinitionInstancesClientListOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionInstancesClient.NewListPager method.
type ScopeAccessReviewHistoryDefinitionInstancesClientListResponse ¶
type ScopeAccessReviewHistoryDefinitionInstancesClientListResponse struct { // List of Access Review History Instances. AccessReviewHistoryDefinitionInstanceListResult }
ScopeAccessReviewHistoryDefinitionInstancesClientListResponse contains the response from method ScopeAccessReviewHistoryDefinitionInstancesClient.NewListPager.
type ScopeAccessReviewHistoryDefinitionsClient ¶
type ScopeAccessReviewHistoryDefinitionsClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewHistoryDefinitionsClient contains the methods for the ScopeAccessReviewHistoryDefinitions group. Don't use this type directly, use NewScopeAccessReviewHistoryDefinitionsClient() instead.
func NewScopeAccessReviewHistoryDefinitionsClient ¶
func NewScopeAccessReviewHistoryDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewHistoryDefinitionsClient, error)
NewScopeAccessReviewHistoryDefinitionsClient creates a new instance of ScopeAccessReviewHistoryDefinitionsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewHistoryDefinitionsClient) GetByID ¶
func (client *ScopeAccessReviewHistoryDefinitionsClient) GetByID(ctx context.Context, scope string, historyDefinitionID string, options *ScopeAccessReviewHistoryDefinitionsClientGetByIDOptions) (ScopeAccessReviewHistoryDefinitionsClientGetByIDResponse, error)
GetByID - Get access review history definition by definition Id If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- historyDefinitionID - The id of the access review history definition.
- options - ScopeAccessReviewHistoryDefinitionsClientGetByIDOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionsClient.GetByID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewHistoryDefinition.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.NewScopeAccessReviewHistoryDefinitionsClient().GetByID(ctx, "subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a", "44724910-d7a5-4c29-b28f-db73e717165a", 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.AccessReviewHistoryDefinition = armauthorization.AccessReviewHistoryDefinition{ // Name: to.Ptr("44724910-d7a5-4c29-b28f-db73e717165a"), // Type: to.Ptr("Microsoft.Authorization/accessReviewHistoryDefinition"), // ID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/accessReviewHistoryDefinitions/44724910-d7a5-4c29-b28f-db73e717165a"), // Properties: &armauthorization.AccessReviewHistoryDefinitionProperties{ // CreatedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("673ad0d8-7b0e-4201-aaeb-74cdcbf22af9"), // PrincipalName: to.Ptr("levi"), // UserPrincipalName: to.Ptr("levi"), // }, // CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-23T00:27:33.690Z"); return t}()), // Decisions: []*armauthorization.AccessReviewResult{ // to.Ptr(armauthorization.AccessReviewResultApprove), // to.Ptr(armauthorization.AccessReviewResultDeny), // to.Ptr(armauthorization.AccessReviewResultNotReviewed), // to.Ptr(armauthorization.AccessReviewResultDontKnow), // to.Ptr(armauthorization.AccessReviewResultNotNotified)}, // DisplayName: to.Ptr("Hello world name"), // ReviewHistoryPeriodEndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T08:00:00.000Z"); return t}()), // ReviewHistoryPeriodStartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-01T07:00:00.000Z"); return t}()), // Scopes: []*armauthorization.AccessReviewScope{ // { // ExpandNestedMemberships: to.Ptr(true), // PrincipalType: to.Ptr(armauthorization.AccessReviewScopePrincipalTypeUser), // ResourceID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a"), // RoleDefinitionID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/roleDefinitions"), // }, // { // ExpandNestedMemberships: to.Ptr(false), // PrincipalType: to.Ptr(armauthorization.AccessReviewScopePrincipalTypeUser), // ResourceID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a"), // RoleDefinitionID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/roleDefinitions/1562cf42-00b9-457c-86ef-5702d4132904"), // }}, // Settings: &armauthorization.AccessReviewHistoryScheduleSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-12-01T08:00:00.000Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T08:00:00.000Z"); return t}()), // }, // }, // Status: to.Ptr(armauthorization.AccessReviewHistoryDefinitionStatusDone), // }, // }
Output:
func (*ScopeAccessReviewHistoryDefinitionsClient) NewListPager ¶
func (client *ScopeAccessReviewHistoryDefinitionsClient) NewListPager(scope string, options *ScopeAccessReviewHistoryDefinitionsClientListOptions) *runtime.Pager[ScopeAccessReviewHistoryDefinitionsClientListResponse]
NewListPager - Lists the accessReviewHistoryDefinitions available from this provider, definition instances are only available for 30 days after creation.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- options - ScopeAccessReviewHistoryDefinitionsClientListOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewHistoryDefinitions.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.NewScopeAccessReviewHistoryDefinitionsClient().NewListPager("subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a", &armauthorization.ScopeAccessReviewHistoryDefinitionsClientListOptions{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.AccessReviewHistoryDefinitionListResult = armauthorization.AccessReviewHistoryDefinitionListResult{ // Value: []*armauthorization.AccessReviewHistoryDefinition{ // { // Name: to.Ptr("44724910-d7a5-4c29-b28f-db73e717165a"), // Type: to.Ptr("Microsoft.Authorization/accessReviewHistoryDefinition"), // ID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/accessReviewHistoryDefinitions/44724910-d7a5-4c29-b28f-db73e717165a"), // Properties: &armauthorization.AccessReviewHistoryDefinitionProperties{ // CreatedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("673ad0d8-7b0e-4201-aaeb-74cdcbf22af9"), // PrincipalName: to.Ptr("levi"), // UserPrincipalName: to.Ptr("levi"), // }, // CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-23T00:27:33.690Z"); return t}()), // Decisions: []*armauthorization.AccessReviewResult{ // to.Ptr(armauthorization.AccessReviewResultApprove), // to.Ptr(armauthorization.AccessReviewResultDeny), // to.Ptr(armauthorization.AccessReviewResultNotReviewed), // to.Ptr(armauthorization.AccessReviewResultDontKnow), // to.Ptr(armauthorization.AccessReviewResultNotNotified)}, // DisplayName: to.Ptr("Hello world name"), // ReviewHistoryPeriodEndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T08:00:00.000Z"); return t}()), // ReviewHistoryPeriodStartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-01T07:00:00.000Z"); return t}()), // Scopes: []*armauthorization.AccessReviewScope{ // { // ExpandNestedMemberships: to.Ptr(true), // PrincipalType: to.Ptr(armauthorization.AccessReviewScopePrincipalTypeUser), // ResourceID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a"), // RoleDefinitionID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/roleDefinitions"), // }, // { // ExpandNestedMemberships: to.Ptr(false), // PrincipalType: to.Ptr(armauthorization.AccessReviewScopePrincipalTypeUser), // ResourceID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a"), // RoleDefinitionID: to.Ptr("/subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a/providers/Microsoft.Authorization/roleDefinitions/1562cf42-00b9-457c-86ef-5702d4132904"), // }}, // Settings: &armauthorization.AccessReviewHistoryScheduleSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-12-01T08:00:00.000Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T08:00:00.000Z"); return t}()), // }, // }, // Status: to.Ptr(armauthorization.AccessReviewHistoryDefinitionStatusDone), // }, // }}, // } }
Output:
type ScopeAccessReviewHistoryDefinitionsClientGetByIDOptions ¶
type ScopeAccessReviewHistoryDefinitionsClientGetByIDOptions struct { }
ScopeAccessReviewHistoryDefinitionsClientGetByIDOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionsClient.GetByID method.
type ScopeAccessReviewHistoryDefinitionsClientGetByIDResponse ¶
type ScopeAccessReviewHistoryDefinitionsClientGetByIDResponse struct { // Access Review History Definition. AccessReviewHistoryDefinition }
ScopeAccessReviewHistoryDefinitionsClientGetByIDResponse contains the response from method ScopeAccessReviewHistoryDefinitionsClient.GetByID.
type ScopeAccessReviewHistoryDefinitionsClientListOptions ¶
type ScopeAccessReviewHistoryDefinitionsClientListOptions struct { // The filter to apply on the operation. Only standard filters on definition name and created date are supported Filter *string }
ScopeAccessReviewHistoryDefinitionsClientListOptions contains the optional parameters for the ScopeAccessReviewHistoryDefinitionsClient.NewListPager method.
type ScopeAccessReviewHistoryDefinitionsClientListResponse ¶
type ScopeAccessReviewHistoryDefinitionsClientListResponse struct { // List of Access Review History Definitions. AccessReviewHistoryDefinitionListResult }
ScopeAccessReviewHistoryDefinitionsClientListResponse contains the response from method ScopeAccessReviewHistoryDefinitionsClient.NewListPager.
type ScopeAccessReviewInstanceClient ¶
type ScopeAccessReviewInstanceClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewInstanceClient contains the methods for the ScopeAccessReviewInstance group. Don't use this type directly, use NewScopeAccessReviewInstanceClient() instead.
func NewScopeAccessReviewInstanceClient ¶
func NewScopeAccessReviewInstanceClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewInstanceClient, error)
NewScopeAccessReviewInstanceClient creates a new instance of ScopeAccessReviewInstanceClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewInstanceClient) ApplyDecisions ¶
func (client *ScopeAccessReviewInstanceClient) ApplyDecisions(ctx context.Context, scope string, scheduleDefinitionID string, id string, options *ScopeAccessReviewInstanceClientApplyDecisionsOptions) (ScopeAccessReviewInstanceClientApplyDecisionsResponse, error)
ApplyDecisions - An action to apply all decisions for an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - ScopeAccessReviewInstanceClientApplyDecisionsOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.ApplyDecisions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/AccessReviewInstanceApplyDecisions.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.NewScopeAccessReviewInstanceClient().ApplyDecisions(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "d9b9e056-7004-470b-bf21-1635e98487da", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ScopeAccessReviewInstanceClient) RecordAllDecisions ¶
func (client *ScopeAccessReviewInstanceClient) RecordAllDecisions(ctx context.Context, scope string, scheduleDefinitionID string, id string, properties RecordAllDecisionsProperties, options *ScopeAccessReviewInstanceClientRecordAllDecisionsOptions) (ScopeAccessReviewInstanceClientRecordAllDecisionsResponse, error)
RecordAllDecisions - An action to approve/deny all decisions for a review with certain filters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- properties - Record all decisions payload.
- options - ScopeAccessReviewInstanceClientRecordAllDecisionsOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.RecordAllDecisions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/AccessReviewInstanceRecordAllDecisions.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.NewScopeAccessReviewInstanceClient().RecordAllDecisions(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "d9b9e056-7004-470b-bf21-1635e98487da", armauthorization.RecordAllDecisionsProperties{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ScopeAccessReviewInstanceClient) ResetDecisions ¶
func (client *ScopeAccessReviewInstanceClient) ResetDecisions(ctx context.Context, scope string, scheduleDefinitionID string, id string, options *ScopeAccessReviewInstanceClientResetDecisionsOptions) (ScopeAccessReviewInstanceClientResetDecisionsResponse, error)
ResetDecisions - An action to reset all decisions for an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - ScopeAccessReviewInstanceClientResetDecisionsOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.ResetDecisions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/AccessReviewInstanceResetDecisions.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.NewScopeAccessReviewInstanceClient().ResetDecisions(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "d9b9e056-7004-470b-bf21-1635e98487da", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ScopeAccessReviewInstanceClient) SendReminders ¶
func (client *ScopeAccessReviewInstanceClient) SendReminders(ctx context.Context, scope string, scheduleDefinitionID string, id string, options *ScopeAccessReviewInstanceClientSendRemindersOptions) (ScopeAccessReviewInstanceClientSendRemindersResponse, error)
SendReminders - An action to send reminders for an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - ScopeAccessReviewInstanceClientSendRemindersOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.SendReminders method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/AccessReviewInstanceSendReminders.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.NewScopeAccessReviewInstanceClient().SendReminders(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "d9b9e056-7004-470b-bf21-1635e98487da", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ScopeAccessReviewInstanceClient) Stop ¶
func (client *ScopeAccessReviewInstanceClient) Stop(ctx context.Context, scope string, scheduleDefinitionID string, id string, options *ScopeAccessReviewInstanceClientStopOptions) (ScopeAccessReviewInstanceClientStopResponse, error)
Stop - An action to stop an access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - ScopeAccessReviewInstanceClientStopOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.Stop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/StopAccessReviewInstance.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.NewScopeAccessReviewInstanceClient().Stop(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "d9b9e056-7004-470b-bf21-1635e98487da", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type ScopeAccessReviewInstanceClientApplyDecisionsOptions ¶
type ScopeAccessReviewInstanceClientApplyDecisionsOptions struct { }
ScopeAccessReviewInstanceClientApplyDecisionsOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.ApplyDecisions method.
type ScopeAccessReviewInstanceClientApplyDecisionsResponse ¶
type ScopeAccessReviewInstanceClientApplyDecisionsResponse struct { }
ScopeAccessReviewInstanceClientApplyDecisionsResponse contains the response from method ScopeAccessReviewInstanceClient.ApplyDecisions.
type ScopeAccessReviewInstanceClientRecordAllDecisionsOptions ¶
type ScopeAccessReviewInstanceClientRecordAllDecisionsOptions struct { }
ScopeAccessReviewInstanceClientRecordAllDecisionsOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.RecordAllDecisions method.
type ScopeAccessReviewInstanceClientRecordAllDecisionsResponse ¶
type ScopeAccessReviewInstanceClientRecordAllDecisionsResponse struct { }
ScopeAccessReviewInstanceClientRecordAllDecisionsResponse contains the response from method ScopeAccessReviewInstanceClient.RecordAllDecisions.
type ScopeAccessReviewInstanceClientResetDecisionsOptions ¶
type ScopeAccessReviewInstanceClientResetDecisionsOptions struct { }
ScopeAccessReviewInstanceClientResetDecisionsOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.ResetDecisions method.
type ScopeAccessReviewInstanceClientResetDecisionsResponse ¶
type ScopeAccessReviewInstanceClientResetDecisionsResponse struct { }
ScopeAccessReviewInstanceClientResetDecisionsResponse contains the response from method ScopeAccessReviewInstanceClient.ResetDecisions.
type ScopeAccessReviewInstanceClientSendRemindersOptions ¶
type ScopeAccessReviewInstanceClientSendRemindersOptions struct { }
ScopeAccessReviewInstanceClientSendRemindersOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.SendReminders method.
type ScopeAccessReviewInstanceClientSendRemindersResponse ¶
type ScopeAccessReviewInstanceClientSendRemindersResponse struct { }
ScopeAccessReviewInstanceClientSendRemindersResponse contains the response from method ScopeAccessReviewInstanceClient.SendReminders.
type ScopeAccessReviewInstanceClientStopOptions ¶
type ScopeAccessReviewInstanceClientStopOptions struct { }
ScopeAccessReviewInstanceClientStopOptions contains the optional parameters for the ScopeAccessReviewInstanceClient.Stop method.
type ScopeAccessReviewInstanceClientStopResponse ¶
type ScopeAccessReviewInstanceClientStopResponse struct { }
ScopeAccessReviewInstanceClientStopResponse contains the response from method ScopeAccessReviewInstanceClient.Stop.
type ScopeAccessReviewInstanceContactedReviewersClient ¶
type ScopeAccessReviewInstanceContactedReviewersClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewInstanceContactedReviewersClient contains the methods for the ScopeAccessReviewInstanceContactedReviewers group. Don't use this type directly, use NewScopeAccessReviewInstanceContactedReviewersClient() instead.
func NewScopeAccessReviewInstanceContactedReviewersClient ¶
func NewScopeAccessReviewInstanceContactedReviewersClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewInstanceContactedReviewersClient, error)
NewScopeAccessReviewInstanceContactedReviewersClient creates a new instance of ScopeAccessReviewInstanceContactedReviewersClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewInstanceContactedReviewersClient) NewListPager ¶
func (client *ScopeAccessReviewInstanceContactedReviewersClient) NewListPager(scope string, scheduleDefinitionID string, id string, options *ScopeAccessReviewInstanceContactedReviewersClientListOptions) *runtime.Pager[ScopeAccessReviewInstanceContactedReviewersClientListResponse]
NewListPager - Get access review instance contacted reviewers
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - ScopeAccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the ScopeAccessReviewInstanceContactedReviewersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewInstanceContactedReviewers.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.NewScopeAccessReviewInstanceContactedReviewersClient().NewListPager("subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "265785a7-a81f-4201-8a18-bb0db95982b7", "f25ed880-9c31-4101-bc57-825d8df3b58c", 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.AccessReviewContactedReviewerListResult = armauthorization.AccessReviewContactedReviewerListResult{ // Value: []*armauthorization.AccessReviewContactedReviewer{ // { // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances/contactedReviewers"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/instances/f8882fec-7d56-4e97-ad6d-5e3f4557971d/contactedReviewers/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewContactedReviewerProperties{ // CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // UserDisplayName: to.Ptr("Bob"), // UserPrincipalName: to.Ptr("bob@contoso.com"), // }, // }}, // } }
Output:
type ScopeAccessReviewInstanceContactedReviewersClientListOptions ¶
type ScopeAccessReviewInstanceContactedReviewersClientListOptions struct { }
ScopeAccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the ScopeAccessReviewInstanceContactedReviewersClient.NewListPager method.
type ScopeAccessReviewInstanceContactedReviewersClientListResponse ¶
type ScopeAccessReviewInstanceContactedReviewersClientListResponse struct { // List of access review contacted reviewers. AccessReviewContactedReviewerListResult }
ScopeAccessReviewInstanceContactedReviewersClientListResponse contains the response from method ScopeAccessReviewInstanceContactedReviewersClient.NewListPager.
type ScopeAccessReviewInstanceDecisionsClient ¶
type ScopeAccessReviewInstanceDecisionsClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewInstanceDecisionsClient contains the methods for the ScopeAccessReviewInstanceDecisions group. Don't use this type directly, use NewScopeAccessReviewInstanceDecisionsClient() instead.
func NewScopeAccessReviewInstanceDecisionsClient ¶
func NewScopeAccessReviewInstanceDecisionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewInstanceDecisionsClient, error)
NewScopeAccessReviewInstanceDecisionsClient creates a new instance of ScopeAccessReviewInstanceDecisionsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewInstanceDecisionsClient) NewListPager ¶
func (client *ScopeAccessReviewInstanceDecisionsClient) NewListPager(scope string, scheduleDefinitionID string, id string, options *ScopeAccessReviewInstanceDecisionsClientListOptions) *runtime.Pager[ScopeAccessReviewInstanceDecisionsClientListResponse]
NewListPager - Get access review instance decisions
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - ScopeAccessReviewInstanceDecisionsClientListOptions contains the optional parameters for the ScopeAccessReviewInstanceDecisionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewInstanceDecisions.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.NewScopeAccessReviewInstanceDecisionsClient().NewListPager("subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "265785a7-a81f-4201-8a18-bb0db95982b7", "f25ed880-9c31-4101-bc57-825d8df3b58c", &armauthorization.ScopeAccessReviewInstanceDecisionsClientListOptions{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.AccessReviewDecisionListResult = armauthorization.AccessReviewDecisionListResult{ // Value: []*armauthorization.AccessReviewDecision{ // { // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances/decisions"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/instances/f8882fec-7d56-4e97-ad6d-5e3f4557971d/decisions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewDecisionProperties{ // AppliedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("36777fc8-4ec2-49ea-a56c-cec0bd47d83a"), // PrincipalName: to.Ptr("Amit Ghosh"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("amitgho@microsoft.com"), // }, // AppliedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-03T21:02:30.667Z"); return t}()), // ApplyResult: to.Ptr(armauthorization.AccessReviewApplyResult("Success")), // Decision: to.Ptr(armauthorization.AccessReviewResultDeny), // Justification: to.Ptr("This person has left this team"), // Principal: &armauthorization.AccessReviewDecisionUserIdentity{ // Type: to.Ptr(armauthorization.DecisionTargetTypeUser), // DisplayName: to.Ptr("Shubham Gupta"), // ID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // PrincipalResourceMembership: &armauthorization.AccessReviewDecisionPrincipalResourceMembership{ // MembershipTypes: []*armauthorization.AccessReviewDecisionPrincipalResourceMembershipType{ // to.Ptr(armauthorization.AccessReviewDecisionPrincipalResourceMembershipTypeDirect), // to.Ptr(armauthorization.AccessReviewDecisionPrincipalResourceMembershipTypeIndirect)}, // }, // Recommendation: to.Ptr(armauthorization.AccessRecommendationTypeDeny), // Resource: &armauthorization.AccessReviewDecisionResource{ // Type: to.Ptr(armauthorization.DecisionResourceTypeAzureRole), // DisplayName: to.Ptr("Owner"), // ID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // }, // ReviewedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // PrincipalName: to.Ptr("Shubham Gupta"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // ReviewedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }}, // } }
Output:
type ScopeAccessReviewInstanceDecisionsClientListOptions ¶
type ScopeAccessReviewInstanceDecisionsClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
ScopeAccessReviewInstanceDecisionsClientListOptions contains the optional parameters for the ScopeAccessReviewInstanceDecisionsClient.NewListPager method.
type ScopeAccessReviewInstanceDecisionsClientListResponse ¶
type ScopeAccessReviewInstanceDecisionsClientListResponse struct { // List of access review decisions. AccessReviewDecisionListResult }
ScopeAccessReviewInstanceDecisionsClientListResponse contains the response from method ScopeAccessReviewInstanceDecisionsClient.NewListPager.
type ScopeAccessReviewInstancesClient ¶
type ScopeAccessReviewInstancesClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewInstancesClient contains the methods for the ScopeAccessReviewInstances group. Don't use this type directly, use NewScopeAccessReviewInstancesClient() instead.
func NewScopeAccessReviewInstancesClient ¶
func NewScopeAccessReviewInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewInstancesClient, error)
NewScopeAccessReviewInstancesClient creates a new instance of ScopeAccessReviewInstancesClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewInstancesClient) Create ¶
func (client *ScopeAccessReviewInstancesClient) Create(ctx context.Context, scope string, scheduleDefinitionID string, id string, properties AccessReviewInstanceProperties, options *ScopeAccessReviewInstancesClientCreateOptions) (ScopeAccessReviewInstancesClientCreateResponse, error)
Create - Update access review instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- properties - Access review instance properties.
- options - ScopeAccessReviewInstancesClientCreateOptions contains the optional parameters for the ScopeAccessReviewInstancesClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/PutAccessReviewInstance.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.NewScopeAccessReviewInstancesClient().Create(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "4135f961-be78-4005-8101-c72a5af307a2", armauthorization.AccessReviewInstanceProperties{}, 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.AccessReviewInstance = armauthorization.AccessReviewInstance{ // Name: to.Ptr("4135f961-be78-4005-8101-c72a5af307a2"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/instances/4135f961-be78-4005-8101-c72a5af307a2"), // Properties: &armauthorization.AccessReviewInstanceProperties{ // BackupReviewers: []*armauthorization.AccessReviewReviewer{ // { // PrincipalID: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // PrincipalType: to.Ptr(armauthorization.AccessReviewReviewerTypeUser), // }}, // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // Reviewers: []*armauthorization.AccessReviewReviewer{ // { // PrincipalID: to.Ptr("89ff94f6-029c-429c-9037-6cf4fe2f4a13"), // PrincipalType: to.Ptr(armauthorization.AccessReviewReviewerType("group")), // }}, // ReviewersType: to.Ptr(armauthorization.AccessReviewInstanceReviewersTypeAssigned), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // Status: to.Ptr(armauthorization.AccessReviewInstanceStatusInProgress), // }, // }
Output:
func (*ScopeAccessReviewInstancesClient) GetByID ¶
func (client *ScopeAccessReviewInstancesClient) GetByID(ctx context.Context, scope string, scheduleDefinitionID string, id string, options *ScopeAccessReviewInstancesClientGetByIDOptions) (ScopeAccessReviewInstancesClientGetByIDResponse, error)
GetByID - Get access review instances If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - ScopeAccessReviewInstancesClientGetByIDOptions contains the optional parameters for the ScopeAccessReviewInstancesClient.GetByID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewInstance.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.NewScopeAccessReviewInstancesClient().GetByID(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "4135f961-be78-4005-8101-c72a5af307a2", 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.AccessReviewInstance = armauthorization.AccessReviewInstance{ // Name: to.Ptr("4135f961-be78-4005-8101-c72a5af307a2"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/instances/4135f961-be78-4005-8101-c72a5af307a2"), // Properties: &armauthorization.AccessReviewInstanceProperties{ // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // Status: to.Ptr(armauthorization.AccessReviewInstanceStatusApplied), // }, // }
Output:
func (*ScopeAccessReviewInstancesClient) NewListPager ¶
func (client *ScopeAccessReviewInstancesClient) NewListPager(scope string, scheduleDefinitionID string, options *ScopeAccessReviewInstancesClientListOptions) *runtime.Pager[ScopeAccessReviewInstancesClientListResponse]
NewListPager - Get access review instances
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- options - ScopeAccessReviewInstancesClientListOptions contains the optional parameters for the ScopeAccessReviewInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewInstances.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.NewScopeAccessReviewInstancesClient().NewListPager("subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "265785a7-a81f-4201-8a18-bb0db95982b7", &armauthorization.ScopeAccessReviewInstancesClientListOptions{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.AccessReviewInstanceListResult = armauthorization.AccessReviewInstanceListResult{ // Value: []*armauthorization.AccessReviewInstance{ // { // Name: to.Ptr("4135f961-be78-4005-8101-c72a5af307a2"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/instances/4135f961-be78-4005-8101-c72a5af307a2"), // Properties: &armauthorization.AccessReviewInstanceProperties{ // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // Status: to.Ptr(armauthorization.AccessReviewInstanceStatusApplied), // }, // }}, // } }
Output:
type ScopeAccessReviewInstancesClientCreateOptions ¶
type ScopeAccessReviewInstancesClientCreateOptions struct { }
ScopeAccessReviewInstancesClientCreateOptions contains the optional parameters for the ScopeAccessReviewInstancesClient.Create method.
type ScopeAccessReviewInstancesClientCreateResponse ¶
type ScopeAccessReviewInstancesClientCreateResponse struct { // Access Review Instance. AccessReviewInstance }
ScopeAccessReviewInstancesClientCreateResponse contains the response from method ScopeAccessReviewInstancesClient.Create.
type ScopeAccessReviewInstancesClientGetByIDOptions ¶
type ScopeAccessReviewInstancesClientGetByIDOptions struct { }
ScopeAccessReviewInstancesClientGetByIDOptions contains the optional parameters for the ScopeAccessReviewInstancesClient.GetByID method.
type ScopeAccessReviewInstancesClientGetByIDResponse ¶
type ScopeAccessReviewInstancesClientGetByIDResponse struct { // Access Review Instance. AccessReviewInstance }
ScopeAccessReviewInstancesClientGetByIDResponse contains the response from method ScopeAccessReviewInstancesClient.GetByID.
type ScopeAccessReviewInstancesClientListOptions ¶
type ScopeAccessReviewInstancesClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
ScopeAccessReviewInstancesClientListOptions contains the optional parameters for the ScopeAccessReviewInstancesClient.NewListPager method.
type ScopeAccessReviewInstancesClientListResponse ¶
type ScopeAccessReviewInstancesClientListResponse struct { // List of Access Review Instances. AccessReviewInstanceListResult }
ScopeAccessReviewInstancesClientListResponse contains the response from method ScopeAccessReviewInstancesClient.NewListPager.
type ScopeAccessReviewScheduleDefinitionsClient ¶
type ScopeAccessReviewScheduleDefinitionsClient struct {
// contains filtered or unexported fields
}
ScopeAccessReviewScheduleDefinitionsClient contains the methods for the ScopeAccessReviewScheduleDefinitions group. Don't use this type directly, use NewScopeAccessReviewScheduleDefinitionsClient() instead.
func NewScopeAccessReviewScheduleDefinitionsClient ¶
func NewScopeAccessReviewScheduleDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAccessReviewScheduleDefinitionsClient, error)
NewScopeAccessReviewScheduleDefinitionsClient creates a new instance of ScopeAccessReviewScheduleDefinitionsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAccessReviewScheduleDefinitionsClient) CreateOrUpdateByID ¶
func (client *ScopeAccessReviewScheduleDefinitionsClient) CreateOrUpdateByID(ctx context.Context, scope string, scheduleDefinitionID string, properties AccessReviewScheduleDefinitionProperties, options *ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions) (ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse, error)
CreateOrUpdateByID - Create or Update access review schedule definition. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- properties - Access review schedule definition properties.
- options - ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.CreateOrUpdateByID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/PutAccessReviewScheduleDefinition.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.NewScopeAccessReviewScheduleDefinitionsClient().CreateOrUpdateByID(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", armauthorization.AccessReviewScheduleDefinitionProperties{}, 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.AccessReviewScheduleDefinition = armauthorization.AccessReviewScheduleDefinition{ // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewScheduleDefinitionProperties{ // CreatedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // PrincipalName: to.Ptr("Shubham Gupta"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // DescriptionForAdmins: to.Ptr("asdfasdf"), // DescriptionForReviewers: to.Ptr("asdfasdf"), // DisplayName: to.Ptr("Hello world"), // Reviewers: []*armauthorization.AccessReviewReviewer{ // { // PrincipalID: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d "), // PrincipalType: to.Ptr(armauthorization.AccessReviewReviewerTypeUser), // }}, // ReviewersType: to.Ptr(armauthorization.AccessReviewScheduleDefinitionReviewersTypeAssigned), // Scope: &armauthorization.AccessReviewScope{ // ResourceID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // RoleDefinitionID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/roleDefinitions/b225c7ff-4338-4cdc-a790-6b34d987f7cd"), // }, // Settings: &armauthorization.AccessReviewScheduleSettings{ // AutoApplyDecisionsEnabled: to.Ptr(true), // DefaultDecision: to.Ptr(armauthorization.DefaultDecisionTypeApprove), // DefaultDecisionEnabled: to.Ptr(true), // InstanceDurationInDays: to.Ptr[int32](30), // JustificationRequiredOnApproval: to.Ptr(true), // MailNotificationsEnabled: to.Ptr(true), // RecommendationsEnabled: to.Ptr(true), // Recurrence: &armauthorization.AccessReviewRecurrenceSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }, // ReminderNotificationsEnabled: to.Ptr(true), // }, // Status: to.Ptr(armauthorization.AccessReviewScheduleDefinitionStatusInProgress), // }, // }
Output:
func (*ScopeAccessReviewScheduleDefinitionsClient) DeleteByID ¶
func (client *ScopeAccessReviewScheduleDefinitionsClient) DeleteByID(ctx context.Context, scope string, scheduleDefinitionID string, options *ScopeAccessReviewScheduleDefinitionsClientDeleteByIDOptions) (ScopeAccessReviewScheduleDefinitionsClientDeleteByIDResponse, error)
DeleteByID - Delete access review schedule definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- options - ScopeAccessReviewScheduleDefinitionsClientDeleteByIDOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.DeleteByID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/DeleteAccessReviewScheduleDefinition.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.NewScopeAccessReviewScheduleDefinitionsClient().DeleteByID(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ScopeAccessReviewScheduleDefinitionsClient) GetByID ¶
func (client *ScopeAccessReviewScheduleDefinitionsClient) GetByID(ctx context.Context, scope string, scheduleDefinitionID string, options *ScopeAccessReviewScheduleDefinitionsClientGetByIDOptions) (ScopeAccessReviewScheduleDefinitionsClientGetByIDResponse, error)
GetByID - Get single access review definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- options - ScopeAccessReviewScheduleDefinitionsClientGetByIDOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.GetByID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewScheduleDefinition.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.NewScopeAccessReviewScheduleDefinitionsClient().GetByID(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", 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.AccessReviewScheduleDefinition = armauthorization.AccessReviewScheduleDefinition{ // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewScheduleDefinitionProperties{ // CreatedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // PrincipalName: to.Ptr("Shubham Gupta"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // DescriptionForAdmins: to.Ptr("asdfasdf"), // DescriptionForReviewers: to.Ptr("asdfasdf"), // DisplayName: to.Ptr("Hello world"), // Reviewers: []*armauthorization.AccessReviewReviewer{ // { // PrincipalID: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d "), // PrincipalType: to.Ptr(armauthorization.AccessReviewReviewerTypeUser), // }}, // ReviewersType: to.Ptr(armauthorization.AccessReviewScheduleDefinitionReviewersTypeAssigned), // Scope: &armauthorization.AccessReviewScope{ // ResourceID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // RoleDefinitionID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/roleDefinitions/b225c7ff-4338-4cdc-a790-6b34d987f7cd"), // }, // Settings: &armauthorization.AccessReviewScheduleSettings{ // AutoApplyDecisionsEnabled: to.Ptr(true), // DefaultDecision: to.Ptr(armauthorization.DefaultDecisionTypeApprove), // DefaultDecisionEnabled: to.Ptr(true), // InstanceDurationInDays: to.Ptr[int32](30), // JustificationRequiredOnApproval: to.Ptr(true), // MailNotificationsEnabled: to.Ptr(true), // RecommendationsEnabled: to.Ptr(true), // Recurrence: &armauthorization.AccessReviewRecurrenceSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }, // ReminderNotificationsEnabled: to.Ptr(true), // }, // Status: to.Ptr(armauthorization.AccessReviewScheduleDefinitionStatusInProgress), // }, // }
Output:
func (*ScopeAccessReviewScheduleDefinitionsClient) NewListPager ¶
func (client *ScopeAccessReviewScheduleDefinitionsClient) NewListPager(scope string, options *ScopeAccessReviewScheduleDefinitionsClientListOptions) *runtime.Pager[ScopeAccessReviewScheduleDefinitionsClientListResponse]
NewListPager - Get access review schedule definitions
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- options - ScopeAccessReviewScheduleDefinitionsClientListOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/GetAccessReviewScheduleDefinitions.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.NewScopeAccessReviewScheduleDefinitionsClient().NewListPager("subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", &armauthorization.ScopeAccessReviewScheduleDefinitionsClientListOptions{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.AccessReviewScheduleDefinitionListResult = armauthorization.AccessReviewScheduleDefinitionListResult{ // Value: []*armauthorization.AccessReviewScheduleDefinition{ // { // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions"), // ID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewScheduleDefinitionProperties{ // CreatedBy: &armauthorization.AccessReviewActorIdentity{ // PrincipalID: to.Ptr("a6c7aecb-cbfd-4763-87ef-e91b4bd509d9"), // PrincipalName: to.Ptr("Shubham Gupta"), // PrincipalType: to.Ptr(armauthorization.AccessReviewActorIdentityTypeUser), // UserPrincipalName: to.Ptr("shugup@microsoft.com"), // }, // DescriptionForAdmins: to.Ptr("asdfasdf"), // DescriptionForReviewers: to.Ptr("asdfasdf"), // DisplayName: to.Ptr("Hello world"), // Reviewers: []*armauthorization.AccessReviewReviewer{ // { // PrincipalID: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d "), // PrincipalType: to.Ptr(armauthorization.AccessReviewReviewerTypeUser), // }}, // ReviewersType: to.Ptr(armauthorization.AccessReviewScheduleDefinitionReviewersTypeAssigned), // Scope: &armauthorization.AccessReviewScope{ // ResourceID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // RoleDefinitionID: to.Ptr("/subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/providers/Microsoft.Authorization/roleDefinitions/b225c7ff-4338-4cdc-a790-6b34d987f7cd"), // }, // Settings: &armauthorization.AccessReviewScheduleSettings{ // AutoApplyDecisionsEnabled: to.Ptr(true), // DefaultDecision: to.Ptr(armauthorization.DefaultDecisionTypeApprove), // DefaultDecisionEnabled: to.Ptr(true), // InstanceDurationInDays: to.Ptr[int32](30), // JustificationRequiredOnApproval: to.Ptr(true), // MailNotificationsEnabled: to.Ptr(true), // RecommendationsEnabled: to.Ptr(true), // Recurrence: &armauthorization.AccessReviewRecurrenceSettings{ // Range: &armauthorization.AccessReviewRecurrenceRange{ // Type: to.Ptr(armauthorization.AccessReviewRecurrenceRangeTypeEndDate), // EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:17:30.513Z"); return t}()), // NumberOfOccurrences: to.Ptr[int32](1), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // }, // }, // ReminderNotificationsEnabled: to.Ptr(true), // }, // Status: to.Ptr(armauthorization.AccessReviewScheduleDefinitionStatusInProgress), // }, // }}, // } }
Output:
func (*ScopeAccessReviewScheduleDefinitionsClient) Stop ¶
func (client *ScopeAccessReviewScheduleDefinitionsClient) Stop(ctx context.Context, scope string, scheduleDefinitionID string, options *ScopeAccessReviewScheduleDefinitionsClientStopOptions) (ScopeAccessReviewScheduleDefinitionsClientStopResponse, error)
Stop - Stop access review definition If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-12-01-preview
- scope - The scope of the resource.
- scheduleDefinitionID - The id of the access review schedule definition.
- options - ScopeAccessReviewScheduleDefinitionsClientStopOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.Stop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/StopAccessReviewScheduleDefinition.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.NewScopeAccessReviewScheduleDefinitionsClient().Stop(ctx, "subscriptions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d", "fa73e90b-5bf1-45fd-a182-35ce5fc0674d", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions ¶
type ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions struct { }
ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.CreateOrUpdateByID method.
type ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse ¶
type ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse struct { // Access Review Schedule Definition. AccessReviewScheduleDefinition }
ScopeAccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse contains the response from method ScopeAccessReviewScheduleDefinitionsClient.CreateOrUpdateByID.
type ScopeAccessReviewScheduleDefinitionsClientDeleteByIDOptions ¶
type ScopeAccessReviewScheduleDefinitionsClientDeleteByIDOptions struct { }
ScopeAccessReviewScheduleDefinitionsClientDeleteByIDOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.DeleteByID method.
type ScopeAccessReviewScheduleDefinitionsClientDeleteByIDResponse ¶
type ScopeAccessReviewScheduleDefinitionsClientDeleteByIDResponse struct { }
ScopeAccessReviewScheduleDefinitionsClientDeleteByIDResponse contains the response from method ScopeAccessReviewScheduleDefinitionsClient.DeleteByID.
type ScopeAccessReviewScheduleDefinitionsClientGetByIDOptions ¶
type ScopeAccessReviewScheduleDefinitionsClientGetByIDOptions struct { }
ScopeAccessReviewScheduleDefinitionsClientGetByIDOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.GetByID method.
type ScopeAccessReviewScheduleDefinitionsClientGetByIDResponse ¶
type ScopeAccessReviewScheduleDefinitionsClientGetByIDResponse struct { // Access Review Schedule Definition. AccessReviewScheduleDefinition }
ScopeAccessReviewScheduleDefinitionsClientGetByIDResponse contains the response from method ScopeAccessReviewScheduleDefinitionsClient.GetByID.
type ScopeAccessReviewScheduleDefinitionsClientListOptions ¶
type ScopeAccessReviewScheduleDefinitionsClientListOptions struct { // The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'. // When one specified $filter=assignedToMeToReview(), only items that // are assigned to the calling user to review are returned Filter *string }
ScopeAccessReviewScheduleDefinitionsClientListOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.NewListPager method.
type ScopeAccessReviewScheduleDefinitionsClientListResponse ¶
type ScopeAccessReviewScheduleDefinitionsClientListResponse struct { // List of Access Review Schedule Definitions. AccessReviewScheduleDefinitionListResult }
ScopeAccessReviewScheduleDefinitionsClientListResponse contains the response from method ScopeAccessReviewScheduleDefinitionsClient.NewListPager.
type ScopeAccessReviewScheduleDefinitionsClientStopOptions ¶
type ScopeAccessReviewScheduleDefinitionsClientStopOptions struct { }
ScopeAccessReviewScheduleDefinitionsClientStopOptions contains the optional parameters for the ScopeAccessReviewScheduleDefinitionsClient.Stop method.
type ScopeAccessReviewScheduleDefinitionsClientStopResponse ¶
type ScopeAccessReviewScheduleDefinitionsClientStopResponse struct { }
ScopeAccessReviewScheduleDefinitionsClientStopResponse contains the response from method ScopeAccessReviewScheduleDefinitionsClient.Stop.
type SeverityLevel ¶
type SeverityLevel string
SeverityLevel - Severity level of the alert.
const ( SeverityLevelHigh SeverityLevel = "High" SeverityLevelLow SeverityLevel = "Low" SeverityLevelMedium SeverityLevel = "Medium" )
func PossibleSeverityLevelValues ¶
func PossibleSeverityLevelValues() []SeverityLevel
PossibleSeverityLevelValues returns the possible values for the SeverityLevel 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 TenantLevelAccessReviewInstanceContactedReviewersClient ¶
type TenantLevelAccessReviewInstanceContactedReviewersClient struct {
// contains filtered or unexported fields
}
TenantLevelAccessReviewInstanceContactedReviewersClient contains the methods for the TenantLevelAccessReviewInstanceContactedReviewers group. Don't use this type directly, use NewTenantLevelAccessReviewInstanceContactedReviewersClient() instead.
func NewTenantLevelAccessReviewInstanceContactedReviewersClient ¶
func NewTenantLevelAccessReviewInstanceContactedReviewersClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantLevelAccessReviewInstanceContactedReviewersClient, error)
NewTenantLevelAccessReviewInstanceContactedReviewersClient creates a new instance of TenantLevelAccessReviewInstanceContactedReviewersClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TenantLevelAccessReviewInstanceContactedReviewersClient) NewListPager ¶
func (client *TenantLevelAccessReviewInstanceContactedReviewersClient) NewListPager(scheduleDefinitionID string, id string, options *TenantLevelAccessReviewInstanceContactedReviewersClientListOptions) *runtime.Pager[TenantLevelAccessReviewInstanceContactedReviewersClientListResponse]
NewListPager - Get access review instance contacted reviewers
Generated from API version 2021-12-01-preview
- scheduleDefinitionID - The id of the access review schedule definition.
- id - The id of the access review instance.
- options - TenantLevelAccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the TenantLevelAccessReviewInstanceContactedReviewersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-12-01-preview/examples/TenantLevelGetAccessReviewInstanceContactedReviewers.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.NewTenantLevelAccessReviewInstanceContactedReviewersClient().NewListPager("265785a7-a81f-4201-8a18-bb0db95982b7", "f25ed880-9c31-4101-bc57-825d8df3b58c", 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.AccessReviewContactedReviewerListResult = armauthorization.AccessReviewContactedReviewerListResult{ // Value: []*armauthorization.AccessReviewContactedReviewer{ // { // Name: to.Ptr("fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Type: to.Ptr("Microsoft.Authorization/accessReviewScheduleDefinitions/instances/contactedReviewers"), // ID: to.Ptr("/providers/Microsoft.Authorization/accessReviewScheduleDefinitions/fa73e90b-5bf1-45fd-a182-35ce5fc0674d/instances/f8882fec-7d56-4e97-ad6d-5e3f4557971d/contactedReviewers/fa73e90b-5bf1-45fd-a182-35ce5fc0674d"), // Properties: &armauthorization.AccessReviewContactedReviewerProperties{ // CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-03T21:02:30.667Z"); return t}()), // UserDisplayName: to.Ptr("Bob"), // UserPrincipalName: to.Ptr("bob@contoso.com"), // }, // }}, // } }
Output:
type TenantLevelAccessReviewInstanceContactedReviewersClientListOptions ¶
type TenantLevelAccessReviewInstanceContactedReviewersClientListOptions struct { }
TenantLevelAccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the TenantLevelAccessReviewInstanceContactedReviewersClient.NewListPager method.
type TenantLevelAccessReviewInstanceContactedReviewersClientListResponse ¶
type TenantLevelAccessReviewInstanceContactedReviewersClientListResponse struct { // List of access review contacted reviewers. AccessReviewContactedReviewerListResult }
TenantLevelAccessReviewInstanceContactedReviewersClientListResponse contains the response from method TenantLevelAccessReviewInstanceContactedReviewersClient.NewListPager.
type TooManyOwnersAssignedToResourceAlertConfigurationProperties ¶
type TooManyOwnersAssignedToResourceAlertConfigurationProperties struct { // REQUIRED; The alert configuration type. AlertConfigurationType *string // True if the alert is enabled, false will disable the scanning for the specific alert. IsEnabled *bool // The threshold number of owners. ThresholdNumberOfOwners *int32 // The threshold percentage of owners out of all role members. ThresholdPercentageOfOwnersOutOfAllRoleMembers *int32 // READ-ONLY; The alert definition. AlertDefinition *AlertDefinition // READ-ONLY; The alert definition ID. AlertDefinitionID *string // READ-ONLY; The alert scope. Scope *string }
TooManyOwnersAssignedToResourceAlertConfigurationProperties - Too many owners assigned to resource alert configuration properties.
func (*TooManyOwnersAssignedToResourceAlertConfigurationProperties) GetAlertConfigurationProperties ¶
func (t *TooManyOwnersAssignedToResourceAlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
GetAlertConfigurationProperties implements the AlertConfigurationPropertiesClassification interface for type TooManyOwnersAssignedToResourceAlertConfigurationProperties.
func (TooManyOwnersAssignedToResourceAlertConfigurationProperties) MarshalJSON ¶
func (t TooManyOwnersAssignedToResourceAlertConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TooManyOwnersAssignedToResourceAlertConfigurationProperties.
func (*TooManyOwnersAssignedToResourceAlertConfigurationProperties) UnmarshalJSON ¶
func (t *TooManyOwnersAssignedToResourceAlertConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TooManyOwnersAssignedToResourceAlertConfigurationProperties.
type TooManyOwnersAssignedToResourceAlertIncidentProperties ¶
type TooManyOwnersAssignedToResourceAlertIncidentProperties struct { // REQUIRED; The alert incident type. AlertIncidentType *string // READ-ONLY; The assignee name. AssigneeName *string // READ-ONLY; The assignee type. AssigneeType *string }
TooManyOwnersAssignedToResourceAlertIncidentProperties - Too many owners assigned to resource alert incident properties.
func (*TooManyOwnersAssignedToResourceAlertIncidentProperties) GetAlertIncidentProperties ¶
func (t *TooManyOwnersAssignedToResourceAlertIncidentProperties) GetAlertIncidentProperties() *AlertIncidentProperties
GetAlertIncidentProperties implements the AlertIncidentPropertiesClassification interface for type TooManyOwnersAssignedToResourceAlertIncidentProperties.
func (TooManyOwnersAssignedToResourceAlertIncidentProperties) MarshalJSON ¶
func (t TooManyOwnersAssignedToResourceAlertIncidentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TooManyOwnersAssignedToResourceAlertIncidentProperties.
func (*TooManyOwnersAssignedToResourceAlertIncidentProperties) UnmarshalJSON ¶
func (t *TooManyOwnersAssignedToResourceAlertIncidentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TooManyOwnersAssignedToResourceAlertIncidentProperties.
type TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties ¶
type TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties struct { // REQUIRED; The alert configuration type. AlertConfigurationType *string // True if the alert is enabled, false will disable the scanning for the specific alert. IsEnabled *bool // The threshold number of permanent owners. ThresholdNumberOfPermanentOwners *int32 // The threshold percentage of permanent owners out of all owners. ThresholdPercentageOfPermanentOwnersOutOfAllOwners *int32 // READ-ONLY; The alert definition. AlertDefinition *AlertDefinition // READ-ONLY; The alert definition ID. AlertDefinitionID *string // READ-ONLY; The alert scope. Scope *string }
TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties - Too many permanent owners assigned to resource alert configuration properties.
func (*TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) GetAlertConfigurationProperties ¶
func (t *TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) GetAlertConfigurationProperties() *AlertConfigurationProperties
GetAlertConfigurationProperties implements the AlertConfigurationPropertiesClassification interface for type TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties.
func (TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) MarshalJSON ¶
func (t TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties.
func (*TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) UnmarshalJSON ¶
func (t *TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TooManyPermanentOwnersAssignedToResourceAlertConfigurationProperties.
type TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties ¶
type TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties struct { // REQUIRED; The alert incident type. AlertIncidentType *string // READ-ONLY; The assignee name. AssigneeName *string // READ-ONLY; The assignee type. AssigneeType *string }
TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties - Too many permanent owners assigned to resource alert incident properties.
func (*TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) GetAlertIncidentProperties ¶
func (t *TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) GetAlertIncidentProperties() *AlertIncidentProperties
GetAlertIncidentProperties implements the AlertIncidentPropertiesClassification interface for type TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties.
func (TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) MarshalJSON ¶
func (t TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties.
func (*TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) UnmarshalJSON ¶
func (t *TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TooManyPermanentOwnersAssignedToResourceAlertIncidentProperties.
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 ¶
- accessreviewdefaultsettings_client.go
- accessreviewhistorydefinition_client.go
- accessreviewhistorydefinitioninstance_client.go
- accessreviewhistorydefinitioninstances_client.go
- accessreviewhistorydefinitions_client.go
- accessreviewinstance_client.go
- accessreviewinstancecontactedreviewers_client.go
- accessreviewinstancedecisions_client.go
- accessreviewinstancemydecisions_client.go
- accessreviewinstances_client.go
- accessreviewinstancesassignedformyapproval_client.go
- accessreviewscheduledefinitions_client.go
- accessreviewscheduledefinitionsassignedformyapproval_client.go
- alertconfigurations_client.go
- alertdefinitions_client.go
- alertincidents_client.go
- alertoperation_client.go
- alerts_client.go
- 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
- operations_client.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
- scopeaccessreviewdefaultsettings_client.go
- scopeaccessreviewhistorydefinition_client.go
- scopeaccessreviewhistorydefinitioninstance_client.go
- scopeaccessreviewhistorydefinitioninstances_client.go
- scopeaccessreviewhistorydefinitions_client.go
- scopeaccessreviewinstance_client.go
- scopeaccessreviewinstancecontactedreviewers_client.go
- scopeaccessreviewinstancedecisions_client.go
- scopeaccessreviewinstances_client.go
- scopeaccessreviewscheduledefinitions_client.go
- tenantlevelaccessreviewinstancecontactedreviewers_client.go
- time_rfc3339.go