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 AttributeNamespace
- type AttributeNamespaceCreateRequest
- type AttributeNamespacesClient
- func (client *AttributeNamespacesClient) Create(ctx context.Context, attributeNamespace string, ...) (AttributeNamespacesClientCreateResponse, error)
- func (client *AttributeNamespacesClient) Delete(ctx context.Context, attributeNamespace string, ...) (AttributeNamespacesClientDeleteResponse, error)
- func (client *AttributeNamespacesClient) Get(ctx context.Context, attributeNamespace string, ...) (AttributeNamespacesClientGetResponse, error)
- type AttributeNamespacesClientCreateOptions
- type AttributeNamespacesClientCreateResponse
- type AttributeNamespacesClientDeleteOptions
- type AttributeNamespacesClientDeleteResponse
- type AttributeNamespacesClientGetOptions
- type AttributeNamespacesClientGetResponse
- 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) NewAttributeNamespacesClient() *AttributeNamespacesClient
- 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 CreatedByType
- type DecisionResourceType
- type DecisionTargetType
- type DefaultDecisionType
- type DenyAssignment
- type DenyAssignmentEffect
- type DenyAssignmentListResult
- type DenyAssignmentPermission
- type DenyAssignmentPrincipal
- type DenyAssignmentProperties
- type DenyAssignmentsClient
- func (client *DenyAssignmentsClient) CreateOrUpdate(ctx context.Context, scope string, denyAssignmentID string, ...) (DenyAssignmentsClientCreateOrUpdateResponse, error)
- func (client *DenyAssignmentsClient) Delete(ctx context.Context, scope string, denyAssignmentID string, ...) (DenyAssignmentsClientDeleteResponse, error)
- 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 DenyAssignmentsClientCreateOrUpdateOptions
- type DenyAssignmentsClientCreateOrUpdateResponse
- type DenyAssignmentsClientDeleteOptions
- type DenyAssignmentsClientDeleteResponse
- 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 ExcludedPrincipalTypes
- 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 PIMOnlyMode
- type PIMOnlyModeSettings
- 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 RoleAssignmentListResult
- type RoleAssignmentProperties
- type RoleAssignmentSchedule
- type RoleAssignmentScheduleInstance
- 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 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 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 RoleEligibilityScheduleInstance
- 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 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 RoleManagementPolicyPimOnlyModeRule
- 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 SystemData
- 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 UsersOrServicePrincipalSet
- type UsersOrServicePrincipalSetUserType
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.CreateOrUpdate
- DenyAssignmentsClient.Delete
- 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)
- RoleManagementPoliciesClient.Update (PatchRoleManagementPolicyToEnablePimOnlyMode)
- 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 - Approve AccessRecommendationTypeApprove AccessRecommendationType = "Approve" // AccessRecommendationTypeDeny - Deny AccessRecommendationTypeDeny AccessRecommendationType = "Deny" // AccessRecommendationTypeNoInfoAvailable - NoInfoAvailable 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 - servicePrincipal AccessReviewActorIdentityTypeServicePrincipal AccessReviewActorIdentityType = "servicePrincipal" // AccessReviewActorIdentityTypeUser - user 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 - AppliedSuccessfully AccessReviewApplyResultAppliedSuccessfully AccessReviewApplyResult = "AppliedSuccessfully" // AccessReviewApplyResultAppliedSuccessfullyButObjectNotFound - AppliedSuccessfullyButObjectNotFound AccessReviewApplyResultAppliedSuccessfullyButObjectNotFound AccessReviewApplyResult = "AppliedSuccessfullyButObjectNotFound" // AccessReviewApplyResultAppliedWithUnknownFailure - AppliedWithUnknownFailure AccessReviewApplyResultAppliedWithUnknownFailure AccessReviewApplyResult = "AppliedWithUnknownFailure" // AccessReviewApplyResultApplyNotSupported - ApplyNotSupported AccessReviewApplyResultApplyNotSupported AccessReviewApplyResult = "ApplyNotSupported" // AccessReviewApplyResultApplying - Applying AccessReviewApplyResultApplying AccessReviewApplyResult = "Applying" // AccessReviewApplyResultNew - New 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 {
// REQUIRED; The AccessReviewContactedReviewer items on this page
Value []*AccessReviewContactedReviewer
// The link to the next page of items
NextLink *string
}
AccessReviewContactedReviewerListResult - The response of a AccessReviewContactedReviewer list operation.
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 *time.Time
}
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 - userSignInInsight AccessReviewDecisionInsightTypeUserSignInInsight AccessReviewDecisionInsightType = "userSignInInsight" )
func PossibleAccessReviewDecisionInsightTypeValues ¶
func PossibleAccessReviewDecisionInsightTypeValues() []AccessReviewDecisionInsightType
PossibleAccessReviewDecisionInsightTypeValues returns the possible values for the AccessReviewDecisionInsightType const type.
type AccessReviewDecisionListResult ¶
type AccessReviewDecisionListResult struct {
// REQUIRED; The AccessReviewDecision items on this page
Value []*AccessReviewDecision
// The link to the next page of items
NextLink *string
}
AccessReviewDecisionListResult - The response of a AccessReviewDecision list operation.
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 - direct AccessReviewDecisionPrincipalResourceMembershipTypeDirect AccessReviewDecisionPrincipalResourceMembershipType = "direct" // AccessReviewDecisionPrincipalResourceMembershipTypeIndirect - indirect 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 {
// CONSTANT; The type of insight
// Field has constant value AccessReviewDecisionInsightTypeUserSignInInsight, any specified value is ignored.
Type *AccessReviewDecisionInsightType
// READ-ONLY; Date Time when the insight was created.
InsightCreatedDateTime *time.Time
// READ-ONLY; Date Time when the user signed into the tenant.
LastSignInDateTime *time.Time
}
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 - Contains optional client configuration. 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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 - Contains optional client configuration. 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 - Contains optional client configuration. 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 {
// REQUIRED; The AccessReviewHistoryInstance items on this page
Value []*AccessReviewHistoryInstance
// The link to the next page of items
NextLink *string
}
AccessReviewHistoryDefinitionInstanceListResult - Paged collection of AccessReviewHistoryInstance items
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 - Contains optional client configuration. 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 {
// Paged collection of AccessReviewHistoryInstance items
AccessReviewHistoryDefinitionInstanceListResult
}
AccessReviewHistoryDefinitionInstancesClientListResponse contains the response from method AccessReviewHistoryDefinitionInstancesClient.NewListPager.
type AccessReviewHistoryDefinitionListResult ¶
type AccessReviewHistoryDefinitionListResult struct {
// REQUIRED; The AccessReviewHistoryDefinition items on this page
Value []*AccessReviewHistoryDefinition
// The link to the next page of items
NextLink *string
}
AccessReviewHistoryDefinitionListResult - The response of a AccessReviewHistoryDefinition list operation.
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 - Done AccessReviewHistoryDefinitionStatusDone AccessReviewHistoryDefinitionStatus = "Done" // AccessReviewHistoryDefinitionStatusError - Error AccessReviewHistoryDefinitionStatusError AccessReviewHistoryDefinitionStatus = "Error" // AccessReviewHistoryDefinitionStatusInProgress - InProgress AccessReviewHistoryDefinitionStatusInProgress AccessReviewHistoryDefinitionStatus = "InProgress" // AccessReviewHistoryDefinitionStatusRequested - Requested 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 - Contains optional client configuration. 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 {
// The response of a AccessReviewHistoryDefinition list operation.
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 - Contains optional client configuration. 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 {
// The response of a AccessReviewContactedReviewer list operation.
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 - Contains optional client configuration. 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 {
// The response of a AccessReviewDecision list operation.
AccessReviewDecisionListResult
}
AccessReviewInstanceDecisionsClientListResponse contains the response from method AccessReviewInstanceDecisionsClient.NewListPager.
type AccessReviewInstanceListResult ¶
type AccessReviewInstanceListResult struct {
// REQUIRED; The AccessReviewInstance items on this page
Value []*AccessReviewInstance
// The link to the next page of items
NextLink *string
}
AccessReviewInstanceListResult - The response of a AccessReviewInstance list operation.
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// The response of a AccessReviewDecision list operation.
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 - Assigned AccessReviewInstanceReviewersTypeAssigned AccessReviewInstanceReviewersType = "Assigned" // AccessReviewInstanceReviewersTypeManagers - Managers AccessReviewInstanceReviewersTypeManagers AccessReviewInstanceReviewersType = "Managers" // AccessReviewInstanceReviewersTypeSelf - Self 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 - Applied AccessReviewInstanceStatusApplied AccessReviewInstanceStatus = "Applied" // AccessReviewInstanceStatusApplying - Applying AccessReviewInstanceStatusApplying AccessReviewInstanceStatus = "Applying" // AccessReviewInstanceStatusAutoReviewed - AutoReviewed AccessReviewInstanceStatusAutoReviewed AccessReviewInstanceStatus = "AutoReviewed" // AccessReviewInstanceStatusAutoReviewing - AutoReviewing AccessReviewInstanceStatusAutoReviewing AccessReviewInstanceStatus = "AutoReviewing" // AccessReviewInstanceStatusCompleted - Completed AccessReviewInstanceStatusCompleted AccessReviewInstanceStatus = "Completed" // AccessReviewInstanceStatusCompleting - Completing AccessReviewInstanceStatusCompleting AccessReviewInstanceStatus = "Completing" // AccessReviewInstanceStatusInProgress - InProgress AccessReviewInstanceStatusInProgress AccessReviewInstanceStatus = "InProgress" // AccessReviewInstanceStatusInitializing - Initializing AccessReviewInstanceStatusInitializing AccessReviewInstanceStatus = "Initializing" // AccessReviewInstanceStatusNotStarted - NotStarted AccessReviewInstanceStatusNotStarted AccessReviewInstanceStatus = "NotStarted" // AccessReviewInstanceStatusScheduled - Scheduled AccessReviewInstanceStatusScheduled AccessReviewInstanceStatus = "Scheduled" // AccessReviewInstanceStatusStarting - Starting 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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// The response of a AccessReviewInstance list operation.
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 - Contains optional client configuration. 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 {
// The response of a AccessReviewInstance list operation.
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 - absoluteMonthly AccessReviewRecurrencePatternTypeAbsoluteMonthly AccessReviewRecurrencePatternType = "absoluteMonthly" // AccessReviewRecurrencePatternTypeWeekly - weekly 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 - endDate AccessReviewRecurrenceRangeTypeEndDate AccessReviewRecurrenceRangeType = "endDate" // AccessReviewRecurrenceRangeTypeNoEnd - noEnd AccessReviewRecurrenceRangeTypeNoEnd AccessReviewRecurrenceRangeType = "noEnd" // AccessReviewRecurrenceRangeTypeNumbered - numbered 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 - Approve AccessReviewResultApprove AccessReviewResult = "Approve" // AccessReviewResultDeny - Deny AccessReviewResultDeny AccessReviewResult = "Deny" // AccessReviewResultDontKnow - DontKnow AccessReviewResultDontKnow AccessReviewResult = "DontKnow" // AccessReviewResultNotNotified - NotNotified AccessReviewResultNotNotified AccessReviewResult = "NotNotified" // AccessReviewResultNotReviewed - NotReviewed 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 - servicePrincipal AccessReviewReviewerTypeServicePrincipal AccessReviewReviewerType = "servicePrincipal" // AccessReviewReviewerTypeUser - user 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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 {
// REQUIRED; The AccessReviewScheduleDefinition items on this page
Value []*AccessReviewScheduleDefinition
// The link to the next page of items
NextLink *string
}
AccessReviewScheduleDefinitionListResult - The response of a AccessReviewScheduleDefinition list operation.
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 - Assigned AccessReviewScheduleDefinitionReviewersTypeAssigned AccessReviewScheduleDefinitionReviewersType = "Assigned" // AccessReviewScheduleDefinitionReviewersTypeManagers - Managers AccessReviewScheduleDefinitionReviewersTypeManagers AccessReviewScheduleDefinitionReviewersType = "Managers" // AccessReviewScheduleDefinitionReviewersTypeSelf - Self 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 - Applied AccessReviewScheduleDefinitionStatusApplied AccessReviewScheduleDefinitionStatus = "Applied" // AccessReviewScheduleDefinitionStatusApplying - Applying AccessReviewScheduleDefinitionStatusApplying AccessReviewScheduleDefinitionStatus = "Applying" // AccessReviewScheduleDefinitionStatusAutoReviewed - AutoReviewed AccessReviewScheduleDefinitionStatusAutoReviewed AccessReviewScheduleDefinitionStatus = "AutoReviewed" // AccessReviewScheduleDefinitionStatusAutoReviewing - AutoReviewing AccessReviewScheduleDefinitionStatusAutoReviewing AccessReviewScheduleDefinitionStatus = "AutoReviewing" // AccessReviewScheduleDefinitionStatusCompleted - Completed AccessReviewScheduleDefinitionStatusCompleted AccessReviewScheduleDefinitionStatus = "Completed" // AccessReviewScheduleDefinitionStatusCompleting - Completing AccessReviewScheduleDefinitionStatusCompleting AccessReviewScheduleDefinitionStatus = "Completing" // AccessReviewScheduleDefinitionStatusInProgress - InProgress AccessReviewScheduleDefinitionStatusInProgress AccessReviewScheduleDefinitionStatus = "InProgress" // AccessReviewScheduleDefinitionStatusInitializing - Initializing AccessReviewScheduleDefinitionStatusInitializing AccessReviewScheduleDefinitionStatus = "Initializing" // AccessReviewScheduleDefinitionStatusNotStarted - NotStarted AccessReviewScheduleDefinitionStatusNotStarted AccessReviewScheduleDefinitionStatus = "NotStarted" // AccessReviewScheduleDefinitionStatusScheduled - Scheduled AccessReviewScheduleDefinitionStatusScheduled AccessReviewScheduleDefinitionStatus = "Scheduled" // AccessReviewScheduleDefinitionStatusStarting - Starting 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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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. One custom filter option is supported : 'assignedToMeToReview()'. When 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 {
// The response of a AccessReviewScheduleDefinition list operation.
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 - Contains optional client configuration. 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 {
// The response of a AccessReviewScheduleDefinition list operation.
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 - active AccessReviewScopeAssignmentStateActive AccessReviewScopeAssignmentState = "active" // AccessReviewScopeAssignmentStateEligible - eligible 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 - guestUser AccessReviewScopePrincipalTypeGuestUser AccessReviewScopePrincipalType = "guestUser" // AccessReviewScopePrincipalTypeRedeemedGuestUser - redeemedGuestUser AccessReviewScopePrincipalTypeRedeemedGuestUser AccessReviewScopePrincipalType = "redeemedGuestUser" // AccessReviewScopePrincipalTypeServicePrincipal - servicePrincipal AccessReviewScopePrincipalTypeServicePrincipal AccessReviewScopePrincipalType = "servicePrincipal" // AccessReviewScopePrincipalTypeUser - user AccessReviewScopePrincipalTypeUser AccessReviewScopePrincipalType = "user" // AccessReviewScopePrincipalTypeUserGroup - user,group 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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 {
// REQUIRED; The AlertConfiguration items on this page
Value []*AlertConfiguration
// The link to the next page of items
NextLink *string
}
AlertConfigurationListResult - The response of a AlertConfiguration list operation.
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 - Contains optional client configuration. 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 fully qualified Azure Resource manager identifier of the 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: 2022-08-01-preview/GetAlertConfigurationById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertConfigurationsClientGetResponse{
// 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 fully qualified Azure Resource manager identifier of the resource.
- options - AlertConfigurationsClientListForScopeOptions contains the optional parameters for the AlertConfigurationsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2022-08-01-preview/GetAlertConfigurations.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertConfigurationsClientListForScopeResponse{
// 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 fully qualified Azure Resource manager identifier of the resource.
- alertID - The name of the alert configuration to get.
- parameters - Parameters for the alert configuration.
- options - AlertConfigurationsClientUpdateOptions contains the optional parameters for the AlertConfigurationsClient.Update method.
Example ¶
Generated from example definition: 2022-08-01-preview/UpdateAlertConfiguration.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 {
// The response of a AlertConfiguration list operation.
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 {
// REQUIRED; The AlertDefinition items on this page
Value []*AlertDefinition
// The link to the next page of items
NextLink *string
}
AlertDefinitionListResult - The response of a AlertDefinition list operation.
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 - Contains optional client configuration. 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 fully qualified Azure Resource manager identifier of the 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: 2022-08-01-preview/GetAlertDefinitionById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertDefinitionsClientGetResponse{
// 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 fully qualified Azure Resource manager identifier of the resource.
- options - AlertDefinitionsClientListForScopeOptions contains the optional parameters for the AlertDefinitionsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2022-08-01-preview/GetAlertDefinitions.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertDefinitionsClientListForScopeResponse{
// 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 {
// The response of a AlertDefinition list operation.
AlertDefinitionListResult
}
AlertDefinitionsClientListForScopeResponse contains the response from method AlertDefinitionsClient.NewListForScopePager.
type AlertIncident ¶
type AlertIncident struct {
// Alert incident properties.
Properties AlertIncidentPropertiesClassification
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 {
// REQUIRED; The AlertIncident items on this page
Value []*AlertIncident
// The link to the next page of items
NextLink *string
}
AlertIncidentListResult - The response of a AlertIncident list operation.
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 - Contains optional client configuration. 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 fully qualified Azure Resource manager identifier of the resource.
- alertID - The name of the alert to get.
- 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: 2022-08-01-preview/GetAlertIncidentById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertIncidentsClientGetResponse{
// 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 fully qualified Azure Resource manager identifier of the resource.
- alertID - The name of the alert to get.
- options - AlertIncidentsClientListForScopeOptions contains the optional parameters for the AlertIncidentsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2022-08-01-preview/GetAlertIncidents.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertIncidentsClientListForScopeResponse{
// 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 fully qualified Azure Resource manager identifier of the resource.
- alertID - The name of the alert to get.
- alertIncidentID - The name of the alert incident to get.
- options - AlertIncidentsClientRemediateOptions contains the optional parameters for the AlertIncidentsClient.Remediate method.
Example ¶
Generated from example definition: 2022-08-01-preview/RemediateAlertIncident.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 {
// The response of a AlertIncident list operation.
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 {
// REQUIRED; The Alert items on this page
Value []*Alert
// The link to the next page of items
NextLink *string
}
AlertListResult - The response of a Alert list operation.
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 - Contains optional client configuration. 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: 2022-08-01-preview/GetAlertOperationById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertOperationClientGetResponse{
// AlertOperationResult: &armauthorization.AlertOperationResult{
// CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-05T03:04:06.467+00:00"); return t}()),
// ID: to.Ptr("{operationId}"),
// LastActionDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-05T03:04:06.467+00:00"); 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 - Contains optional client configuration. 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 fully qualified Azure Resource manager identifier of the resource.
- alertID - The name of the alert to get.
- options - AlertsClientBeginRefreshOptions contains the optional parameters for the AlertsClient.BeginRefresh method.
Example ¶
Generated from example definition: 2022-08-01-preview/RefreshAlert.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 fully qualified Azure Resource manager identifier of the resource.
- options - AlertsClientBeginRefreshAllOptions contains the optional parameters for the AlertsClient.BeginRefreshAll method.
Example ¶
Generated from example definition: 2022-08-01-preview/RefreshAllAlerts.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 fully qualified Azure Resource manager identifier of the 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: 2022-08-01-preview/GetAlertById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertsClientGetResponse{
// 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.467+00:00"); return t}()),
// LastScannedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-06T18:25:00.38+00:00"); 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 fully qualified Azure Resource manager identifier of the resource.
- options - AlertsClientListForScopeOptions contains the optional parameters for the AlertsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2022-08-01-preview/GetAlerts.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.AlertsClientListForScopeResponse{
// 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.467+00:00"); return t}()),
// LastScannedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-06T18:25:00.38+00:00"); 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.467+00:00"); return t}()),
// LastScannedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-06T18:25:00.38+00:00"); 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 fully qualified Azure Resource manager identifier of the resource.
- alertID - The name of the alert to get.
- parameters - Parameters for the alert.
- options - AlertsClientUpdateOptions contains the optional parameters for the AlertsClient.Update method.
Example ¶
Generated from example definition: 2022-08-01-preview/UpdateAlert.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 long-running operation from the provided token.
ResumeToken string
}
AlertsClientBeginRefreshAllOptions contains the optional parameters for the AlertsClient.BeginRefreshAll method.
type AlertsClientBeginRefreshOptions ¶
type AlertsClientBeginRefreshOptions struct {
// Resumes the long-running operation 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 {
// The response of a Alert list operation.
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 - NoApproval ApprovalModeNoApproval ApprovalMode = "NoApproval" // ApprovalModeParallel - Parallel ApprovalModeParallel ApprovalMode = "Parallel" // ApprovalModeSerial - Serial ApprovalModeSerial ApprovalMode = "Serial" // ApprovalModeSingleStage - SingleStage 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 - Activated AssignmentTypeActivated AssignmentType = "Activated" // AssignmentTypeAssigned - Assigned AssignmentTypeAssigned AssignmentType = "Assigned" )
func PossibleAssignmentTypeValues ¶
func PossibleAssignmentTypeValues() []AssignmentType
PossibleAssignmentTypeValues returns the possible values for the AssignmentType const type.
type AttributeNamespace ¶
type AttributeNamespace struct {
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
AttributeNamespace - An attribute namespace resource.
func (AttributeNamespace) MarshalJSON ¶
func (a AttributeNamespace) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AttributeNamespace.
func (*AttributeNamespace) UnmarshalJSON ¶
func (a *AttributeNamespace) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AttributeNamespace.
type AttributeNamespaceCreateRequest ¶
type AttributeNamespaceCreateRequest struct {
// REQUIRED; The principal ID of the namespace owner.
NamespaceOwnerPrincipalID *string
}
AttributeNamespaceCreateRequest - Request body for creating an attribute namespace.
func (AttributeNamespaceCreateRequest) MarshalJSON ¶
func (a AttributeNamespaceCreateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AttributeNamespaceCreateRequest.
func (*AttributeNamespaceCreateRequest) UnmarshalJSON ¶
func (a *AttributeNamespaceCreateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AttributeNamespaceCreateRequest.
type AttributeNamespacesClient ¶
type AttributeNamespacesClient struct {
// contains filtered or unexported fields
}
AttributeNamespacesClient contains the methods for the AttributeNamespaces group. Don't use this type directly, use NewAttributeNamespacesClient() instead.
func NewAttributeNamespacesClient ¶
func NewAttributeNamespacesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AttributeNamespacesClient, error)
NewAttributeNamespacesClient creates a new instance of AttributeNamespacesClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*AttributeNamespacesClient) Create ¶
func (client *AttributeNamespacesClient) Create(ctx context.Context, attributeNamespace string, parameters AttributeNamespaceCreateRequest, options *AttributeNamespacesClientCreateOptions) (AttributeNamespacesClientCreateResponse, error)
Create - Creates a new attribute namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-12-01-preview
- attributeNamespace - The name of the attribute namespace to get.
- parameters - Parameters for creating the attribute namespace.
- options - AttributeNamespacesClientCreateOptions contains the optional parameters for the AttributeNamespacesClient.Create method.
func (*AttributeNamespacesClient) Delete ¶
func (client *AttributeNamespacesClient) Delete(ctx context.Context, attributeNamespace string, options *AttributeNamespacesClientDeleteOptions) (AttributeNamespacesClientDeleteResponse, error)
Delete - Deletes the specified attribute namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-12-01-preview
- attributeNamespace - The name of the attribute namespace to get.
- options - AttributeNamespacesClientDeleteOptions contains the optional parameters for the AttributeNamespacesClient.Delete method.
func (*AttributeNamespacesClient) Get ¶
func (client *AttributeNamespacesClient) Get(ctx context.Context, attributeNamespace string, options *AttributeNamespacesClientGetOptions) (AttributeNamespacesClientGetResponse, error)
Get - Gets the specified attribute namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-12-01-preview
- attributeNamespace - The name of the attribute namespace to get.
- options - AttributeNamespacesClientGetOptions contains the optional parameters for the AttributeNamespacesClient.Get method.
type AttributeNamespacesClientCreateOptions ¶
type AttributeNamespacesClientCreateOptions struct {
}
AttributeNamespacesClientCreateOptions contains the optional parameters for the AttributeNamespacesClient.Create method.
type AttributeNamespacesClientCreateResponse ¶
type AttributeNamespacesClientCreateResponse struct {
// An attribute namespace resource.
AttributeNamespace
}
AttributeNamespacesClientCreateResponse contains the response from method AttributeNamespacesClient.Create.
type AttributeNamespacesClientDeleteOptions ¶
type AttributeNamespacesClientDeleteOptions struct {
}
AttributeNamespacesClientDeleteOptions contains the optional parameters for the AttributeNamespacesClient.Delete method.
type AttributeNamespacesClientDeleteResponse ¶
type AttributeNamespacesClientDeleteResponse struct {
}
AttributeNamespacesClientDeleteResponse contains the response from method AttributeNamespacesClient.Delete.
type AttributeNamespacesClientGetOptions ¶
type AttributeNamespacesClientGetOptions struct {
}
AttributeNamespacesClientGetOptions contains the optional parameters for the AttributeNamespacesClient.Get method.
type AttributeNamespacesClientGetResponse ¶
type AttributeNamespacesClientGetResponse struct {
// An attribute namespace resource.
AttributeNamespace
}
AttributeNamespacesClientGetResponse contains the response from method AttributeNamespacesClient.Get.
type AzureRolesAssignedOutsidePimAlertConfigurationProperties ¶
type AzureRolesAssignedOutsidePimAlertConfigurationProperties struct {
// CONSTANT; The alert configuration type.
// Field has constant value "AzureRolesAssignedOutsidePimAlertConfiguration", any specified value is ignored.
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 {
// REQUIRED; The ClassicAdministrator items on this page
Value []*ClassicAdministrator
// The link to the next page of items
NextLink *string
}
ClassicAdministratorListResult - The response of a ClassicAdministrator list operation.
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 - Contains optional client configuration. 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: 2015-07-01/GetClassicAdministrators.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("subId", 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 = armauthorization.ClassicAdministratorsClientListResponse{
// 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 {
// The response of a ClassicAdministrator list operation.
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) NewAttributeNamespacesClient ¶
func (c *ClientFactory) NewAttributeNamespacesClient() *AttributeNamespacesClient
NewAttributeNamespacesClient creates a new instance of AttributeNamespacesClient.
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 CreatedByType ¶
type CreatedByType string
CreatedByType - The kind of entity that created the resource.
const ( // CreatedByTypeApplication - The entity was created by an application. CreatedByTypeApplication CreatedByType = "Application" // CreatedByTypeKey - The entity was created by a key. CreatedByTypeKey CreatedByType = "Key" // CreatedByTypeManagedIdentity - The entity was created by a managed identity. CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" // CreatedByTypeUser - The entity was created by a user. CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DecisionResourceType ¶
type DecisionResourceType string
DecisionResourceType - The type of resource
const ( // DecisionResourceTypeAzureRole - azureRole 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 - servicePrincipal DecisionTargetTypeServicePrincipal DecisionTargetType = "servicePrincipal" // DecisionTargetTypeUser - user 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 - Approve DefaultDecisionTypeApprove DefaultDecisionType = "Approve" // DefaultDecisionTypeDeny - Deny DefaultDecisionTypeDeny DefaultDecisionType = "Deny" // DefaultDecisionTypeRecommendation - Recommendation 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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 DenyAssignmentEffect ¶
type DenyAssignmentEffect string
DenyAssignmentEffect - The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
const ( // DenyAssignmentEffectAudit - audit DenyAssignmentEffectAudit DenyAssignmentEffect = "audit" // DenyAssignmentEffectEnforced - enforced DenyAssignmentEffectEnforced DenyAssignmentEffect = "enforced" )
func PossibleDenyAssignmentEffectValues ¶
func PossibleDenyAssignmentEffectValues() []DenyAssignmentEffect
PossibleDenyAssignmentEffectValues returns the possible values for the DenyAssignmentEffect const type.
type DenyAssignmentListResult ¶
type DenyAssignmentListResult struct {
// REQUIRED; The DenyAssignment items on this page
Value []*DenyAssignment
// The link to the next page of items
NextLink *string
}
DenyAssignmentListResult - The response of a DenyAssignment list operation.
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 DenyAssignmentPrincipal ¶
type DenyAssignmentPrincipal struct {
// The object ID of the principal.
ID *string
// The type of the principal such as user, group, servicePrincipal, etc.
Type *string
}
DenyAssignmentPrincipal - Deny assignment principal.
func (DenyAssignmentPrincipal) MarshalJSON ¶
func (d DenyAssignmentPrincipal) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DenyAssignmentPrincipal.
func (*DenyAssignmentPrincipal) UnmarshalJSON ¶
func (d *DenyAssignmentPrincipal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DenyAssignmentPrincipal.
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 'foo_storage_container'
Condition *string
// Version of the condition.
ConditionVersion *string
// The effect of the deny assignment. 'enforced' blocks access, 'audit' logs without blocking.
DenyAssignmentEffect *DenyAssignmentEffect
// 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 []*DenyAssignmentPrincipal
// 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 []*DenyAssignmentPrincipal
// READ-ONLY; Id of the user who created the assignment
CreatedBy *string
// READ-ONLY; Time it was created
CreatedOn *time.Time
// READ-ONLY; The deny 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
}
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 - Contains optional client configuration. Pass nil to accept the default values.
func (*DenyAssignmentsClient) CreateOrUpdate ¶
func (client *DenyAssignmentsClient) CreateOrUpdate(ctx context.Context, scope string, denyAssignmentID string, parameters DenyAssignment, options *DenyAssignmentsClientCreateOrUpdateOptions) (DenyAssignmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a deny assignment by scope and name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- denyAssignmentID - The ID of the deny assignment to get.
- parameters - Parameters for the deny assignment.
- options - DenyAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the DenyAssignmentsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: 2024-07-01-preview/DenyAssignments_CreateForSubscription.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDenyAssignmentsClient().CreateOrUpdate(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", "64b75d79-7a26-4341-944e-4f1a19f0e6ca", armauthorization.DenyAssignment{
Properties: &armauthorization.DenyAssignmentProperties{
Description: to.Ptr("Prevent all users from deleting critical resources in the subscription."),
DenyAssignmentEffect: to.Ptr(armauthorization.DenyAssignmentEffectEnforced),
DenyAssignmentName: to.Ptr("Deny delete on critical resources"),
DoNotApplyToChildScopes: to.Ptr(false),
ExcludePrincipals: []*armauthorization.DenyAssignmentPrincipal{
{
Type: to.Ptr("ServicePrincipal"),
ID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
},
},
Permissions: []*armauthorization.DenyAssignmentPermission{
{
Actions: []*string{
to.Ptr("*/delete"),
},
DataActions: []*string{},
NotActions: []*string{},
NotDataActions: []*string{},
},
},
Principals: []*armauthorization.DenyAssignmentPrincipal{
{
Type: to.Ptr("SystemDefined"),
ID: to.Ptr("00000000-0000-0000-0000-000000000000"),
},
},
},
}, 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 = armauthorization.DenyAssignmentsClientCreateOrUpdateResponse{
// DenyAssignment: &armauthorization.DenyAssignment{
// Name: to.Ptr("64b75d79-7a26-4341-944e-4f1a19f0e6ca"),
// Type: to.Ptr("Microsoft.Authorization/denyAssignments"),
// ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/denyAssignments/64b75d79-7a26-4341-944e-4f1a19f0e6ca"),
// Properties: &armauthorization.DenyAssignmentProperties{
// Description: to.Ptr("Prevent all users from deleting critical resources in the subscription."),
// CreatedBy: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// DenyAssignmentEffect: to.Ptr(armauthorization.DenyAssignmentEffectEnforced),
// DenyAssignmentName: to.Ptr("Deny delete on critical resources"),
// DoNotApplyToChildScopes: to.Ptr(false),
// ExcludePrincipals: []*armauthorization.DenyAssignmentPrincipal{
// {
// Type: to.Ptr("ServicePrincipal"),
// ID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// },
// },
// IsSystemProtected: to.Ptr(false),
// Permissions: []*armauthorization.DenyAssignmentPermission{
// {
// Actions: []*string{
// to.Ptr("*/delete"),
// },
// DataActions: []*string{
// },
// NotActions: []*string{
// },
// NotDataActions: []*string{
// },
// },
// },
// Principals: []*armauthorization.DenyAssignmentPrincipal{
// {
// Type: to.Ptr("SystemDefined"),
// ID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// },
// },
// Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"),
// UpdatedBy: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// },
// SystemData: &armauthorization.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// CreatedBy: to.Ptr("user@example.com"),
// CreatedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// LastModifiedBy: to.Ptr("user@example.com"),
// LastModifiedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// },
// },
// }
}
Output:
func (*DenyAssignmentsClient) Delete ¶
func (client *DenyAssignmentsClient) Delete(ctx context.Context, scope string, denyAssignmentID string, options *DenyAssignmentsClientDeleteOptions) (DenyAssignmentsClientDeleteResponse, error)
Delete - Delete a deny assignment by scope and name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-07-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- denyAssignmentID - The ID of the deny assignment to get.
- options - DenyAssignmentsClientDeleteOptions contains the optional parameters for the DenyAssignmentsClient.Delete method.
Example ¶
Generated from example definition: 2024-07-01-preview/DenyAssignments_Delete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDenyAssignmentsClient().Delete(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", "64b75d79-7a26-4341-944e-4f1a19f0e6ca", 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 = armauthorization.DenyAssignmentsClientDeleteResponse{
// }
}
Output:
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 2024-07-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-07-01-preview/GetDenyAssignmentByNameId.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDenyAssignmentsClient().Get(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/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 = armauthorization.DenyAssignmentsClientGetResponse{
// DenyAssignment: &armauthorization.DenyAssignment{
// Name: to.Ptr("denyAssignmentId"),
// Type: to.Ptr("Microsoft.Authorization/denyAssignments"),
// ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"),
// Properties: &armauthorization.DenyAssignmentProperties{
// Description: to.Ptr("Deny assignment description"),
// DenyAssignmentEffect: to.Ptr(armauthorization.DenyAssignmentEffectEnforced),
// DenyAssignmentName: to.Ptr("Deny assignment name"),
// DoNotApplyToChildScopes: to.Ptr(false),
// ExcludePrincipals: []*armauthorization.DenyAssignmentPrincipal{
// {
// 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.DenyAssignmentPrincipal{
// {
// Type: to.Ptr("principalType1"),
// ID: to.Ptr("principalId1"),
// },
// },
// Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname"),
// },
// SystemData: &armauthorization.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// CreatedBy: to.Ptr("user@example.com"),
// CreatedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// LastModifiedBy: to.Ptr("user@example.com"),
// LastModifiedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// },
// },
// }
}
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 2024-07-01-preview
- denyAssignmentID - The fully qualified ID of the role assignment including scope, resource name, and resource type. Format: /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/<SUB_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.Authorization/roleAssignments/<ROLE_ASSIGNMENT_NAME>
- options - DenyAssignmentsClientGetByIDOptions contains the optional parameters for the DenyAssignmentsClient.GetByID method.
Example ¶
Generated from example definition: 2024-07-01-preview/GetDenyAssignmentById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDenyAssignmentsClient().GetByID(ctx, "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname/providers/Microsoft.Authorization/denyAssignments/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 = armauthorization.DenyAssignmentsClientGetByIDResponse{
// DenyAssignment: &armauthorization.DenyAssignment{
// Properties: &armauthorization.DenyAssignmentProperties{
// DenyAssignmentName: to.Ptr("Deny assignment name"),
// Description: to.Ptr("Deny assignment description"),
// Permissions: []*armauthorization.DenyAssignmentPermission{
// {
// Actions: []*string{
// to.Ptr("action"),
// },
// NotActions: []*string{
// },
// DataActions: []*string{
// },
// NotDataActions: []*string{
// },
// },
// },
// Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname"),
// DoNotApplyToChildScopes: to.Ptr(false),
// Principals: []*armauthorization.DenyAssignmentPrincipal{
// {
// ID: to.Ptr("principalId1"),
// Type: to.Ptr("principalType1"),
// },
// },
// ExcludePrincipals: []*armauthorization.DenyAssignmentPrincipal{
// {
// ID: to.Ptr("principalId2"),
// Type: to.Ptr("principalType2"),
// },
// },
// IsSystemProtected: to.Ptr(true),
// DenyAssignmentEffect: to.Ptr(armauthorization.DenyAssignmentEffectEnforced),
// },
// ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"),
// Type: to.Ptr("Microsoft.Authorization/denyAssignments"),
// Name: to.Ptr("denyAssignmentId"),
// SystemData: &armauthorization.SystemData{
// CreatedBy: to.Ptr("user@example.com"),
// CreatedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// LastModifiedBy: to.Ptr("user@example.com"),
// LastModifiedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// },
// },
// }
}
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 2024-07-01-preview
- 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: 2024-07-01-preview/GetDenyAssignmentsForResourceGroup.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDenyAssignmentsClient().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 = armauthorization.DenyAssignmentsClientListForResourceGroupResponse{
// DenyAssignmentListResult: armauthorization.DenyAssignmentListResult{
// Value: []*armauthorization.DenyAssignment{
// {
// Properties: &armauthorization.DenyAssignmentProperties{
// DenyAssignmentName: to.Ptr("Deny assignment name"),
// Description: to.Ptr("Deny assignment description"),
// Permissions: []*armauthorization.DenyAssignmentPermission{
// {
// Actions: []*string{
// to.Ptr("action"),
// },
// NotActions: []*string{
// },
// DataActions: []*string{
// },
// NotDataActions: []*string{
// },
// },
// },
// Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname"),
// DoNotApplyToChildScopes: to.Ptr(false),
// Principals: []*armauthorization.DenyAssignmentPrincipal{
// {
// ID: to.Ptr("principalId1"),
// Type: to.Ptr("principalType1"),
// },
// },
// ExcludePrincipals: []*armauthorization.DenyAssignmentPrincipal{
// {
// ID: to.Ptr("principalId2"),
// Type: to.Ptr("principalType2"),
// },
// },
// IsSystemProtected: to.Ptr(true),
// DenyAssignmentEffect: to.Ptr(armauthorization.DenyAssignmentEffectEnforced),
// },
// ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"),
// Type: to.Ptr("Microsoft.Authorization/denyAssignments"),
// Name: to.Ptr("denyAssignmentId"),
// SystemData: &armauthorization.SystemData{
// CreatedBy: to.Ptr("user@example.com"),
// CreatedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// LastModifiedBy: to.Ptr("user@example.com"),
// LastModifiedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// },
// },
// },
// },
// }
}
}
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 2024-07-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 deny assignments for.
- options - DenyAssignmentsClientListForResourceOptions contains the optional parameters for the DenyAssignmentsClient.NewListForResourcePager method.
Example ¶
Generated from example definition: 2024-07-01-preview/GetDenyAssignmentsForResource.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDenyAssignmentsClient().NewListForResourcePager("rgname", "resourceProviderNamespace", "parentResourceType/parentResourceName", "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 = armauthorization.DenyAssignmentsClientListForResourceResponse{
// DenyAssignmentListResult: armauthorization.DenyAssignmentListResult{
// Value: []*armauthorization.DenyAssignment{
// {
// Name: to.Ptr("denyAssignmentId"),
// Type: to.Ptr("Microsoft.Authorization/denyAssignments"),
// ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname/providers/resourceProviderNamespace/parentResourceType/parentResourceName/resourceType/resourceName/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"),
// Properties: &armauthorization.DenyAssignmentProperties{
// Description: to.Ptr("Deny assignment description"),
// DenyAssignmentEffect: to.Ptr(armauthorization.DenyAssignmentEffectEnforced),
// DenyAssignmentName: to.Ptr("Deny assignment name"),
// DoNotApplyToChildScopes: to.Ptr(false),
// ExcludePrincipals: []*armauthorization.DenyAssignmentPrincipal{
// {
// 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.DenyAssignmentPrincipal{
// {
// Type: to.Ptr("principalType1"),
// ID: to.Ptr("principalId1"),
// },
// },
// Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname/providers/resourceProviderNamespace/parentResourceType/parentResourceName/resourceType/resourceName"),
// },
// SystemData: &armauthorization.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// CreatedBy: to.Ptr("user@example.com"),
// CreatedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// LastModifiedBy: to.Ptr("user@example.com"),
// LastModifiedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// },
// },
// },
// },
// }
}
}
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 2024-07-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - DenyAssignmentsClientListForScopeOptions contains the optional parameters for the DenyAssignmentsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-07-01-preview/GetDenyAssignmentByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDenyAssignmentsClient().NewListForScopePager("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/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 = armauthorization.DenyAssignmentsClientListForScopeResponse{
// DenyAssignmentListResult: armauthorization.DenyAssignmentListResult{
// Value: []*armauthorization.DenyAssignment{
// {
// Properties: &armauthorization.DenyAssignmentProperties{
// DenyAssignmentName: to.Ptr("Deny assignment name"),
// Description: to.Ptr("Deny assignment description"),
// Permissions: []*armauthorization.DenyAssignmentPermission{
// {
// Actions: []*string{
// to.Ptr("action"),
// },
// NotActions: []*string{
// },
// DataActions: []*string{
// },
// NotDataActions: []*string{
// },
// },
// },
// Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname"),
// DoNotApplyToChildScopes: to.Ptr(false),
// Principals: []*armauthorization.DenyAssignmentPrincipal{
// {
// ID: to.Ptr("principalId1"),
// Type: to.Ptr("principalType1"),
// },
// },
// ExcludePrincipals: []*armauthorization.DenyAssignmentPrincipal{
// {
// ID: to.Ptr("principalId2"),
// Type: to.Ptr("principalType2"),
// },
// },
// IsSystemProtected: to.Ptr(true),
// DenyAssignmentEffect: to.Ptr(armauthorization.DenyAssignmentEffectEnforced),
// },
// ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"),
// Type: to.Ptr("Microsoft.Authorization/denyAssignments"),
// Name: to.Ptr("denyAssignmentId"),
// SystemData: &armauthorization.SystemData{
// CreatedBy: to.Ptr("user@example.com"),
// CreatedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// LastModifiedBy: to.Ptr("user@example.com"),
// LastModifiedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// },
// },
// },
// },
// }
}
}
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 2024-07-01-preview
- options - DenyAssignmentsClientListOptions contains the optional parameters for the DenyAssignmentsClient.NewListPager method.
Example ¶
Generated from example definition: 2024-07-01-preview/GetAllDenyAssignments.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDenyAssignmentsClient().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 = armauthorization.DenyAssignmentsClientListResponse{
// DenyAssignmentListResult: armauthorization.DenyAssignmentListResult{
// Value: []*armauthorization.DenyAssignment{
// {
// Properties: &armauthorization.DenyAssignmentProperties{
// DenyAssignmentName: to.Ptr("Deny assignment name"),
// Description: to.Ptr("Deny assignment description"),
// Permissions: []*armauthorization.DenyAssignmentPermission{
// {
// Actions: []*string{
// to.Ptr("action"),
// },
// NotActions: []*string{
// },
// DataActions: []*string{
// },
// NotDataActions: []*string{
// },
// },
// },
// Scope: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"),
// DoNotApplyToChildScopes: to.Ptr(false),
// Principals: []*armauthorization.DenyAssignmentPrincipal{
// {
// ID: to.Ptr("principalId1"),
// Type: to.Ptr("principalType1"),
// },
// },
// ExcludePrincipals: []*armauthorization.DenyAssignmentPrincipal{
// {
// ID: to.Ptr("principalId2"),
// Type: to.Ptr("principalType2"),
// },
// },
// IsSystemProtected: to.Ptr(true),
// DenyAssignmentEffect: to.Ptr(armauthorization.DenyAssignmentEffectEnforced),
// },
// ID: to.Ptr("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId"),
// Type: to.Ptr("Microsoft.Authorization/denyAssignments"),
// Name: to.Ptr("denyAssignmentId"),
// SystemData: &armauthorization.SystemData{
// CreatedBy: to.Ptr("user@example.com"),
// CreatedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// LastModifiedBy: to.Ptr("user@example.com"),
// LastModifiedByType: to.Ptr(armauthorization.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-07-01T00:00:00.0000000Z"); return t}()),
// },
// },
// },
// },
// }
}
}
Output:
type DenyAssignmentsClientCreateOrUpdateOptions ¶
type DenyAssignmentsClientCreateOrUpdateOptions struct {
}
DenyAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the DenyAssignmentsClient.CreateOrUpdate method.
type DenyAssignmentsClientCreateOrUpdateResponse ¶
type DenyAssignmentsClientCreateOrUpdateResponse struct {
// Deny Assignment
DenyAssignment
}
DenyAssignmentsClientCreateOrUpdateResponse contains the response from method DenyAssignmentsClient.CreateOrUpdate.
type DenyAssignmentsClientDeleteOptions ¶
type DenyAssignmentsClientDeleteOptions struct {
}
DenyAssignmentsClientDeleteOptions contains the optional parameters for the DenyAssignmentsClient.Delete method.
type DenyAssignmentsClientDeleteResponse ¶
type DenyAssignmentsClientDeleteResponse struct {
}
DenyAssignmentsClientDeleteResponse contains the response from method DenyAssignmentsClient.Delete.
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 {
// The response of a DenyAssignment list operation.
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 {
// The response of a DenyAssignment list operation.
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 {
// The response of a DenyAssignment list operation.
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 {
// The response of a DenyAssignment list operation.
DenyAssignmentListResult
}
DenyAssignmentsClientListResponse contains the response from method DenyAssignmentsClient.NewListPager.
type DuplicateRoleCreatedAlertConfigurationProperties ¶
type DuplicateRoleCreatedAlertConfigurationProperties struct {
// CONSTANT; The alert configuration type.
// Field has constant value "DuplicateRoleCreatedAlertConfiguration", any specified value is ignored.
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 - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - EligibleChildResourcesClientGetOptions contains the optional parameters for the EligibleChildResourcesClient.NewGetPager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetEligibleChildResourcesByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.EligibleChildResourcesClientGetResponse{
// EligibleChildResourcesListResult: armauthorization.EligibleChildResourcesListResult{
// Value: []*armauthorization.EligibleChildResource{
// {
// Name: to.Ptr("RG-1"),
// Type: to.Ptr("resourcegroup"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/resourceGroups/RG-1"),
// },
// {
// Name: to.Ptr("RG-2"),
// Type: to.Ptr("resourcegroup"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/resourceGroups/RG-2"),
// },
// },
// },
// }
}
}
Output:
type EligibleChildResourcesClientGetOptions ¶
type EligibleChildResourcesClientGetOptions struct {
// The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'.
// Use $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription'
// or 'ResourceGroup'
Filter *string
}
EligibleChildResourcesClientGetOptions contains the optional parameters for the EligibleChildResourcesClient.NewGetPager method.
type EligibleChildResourcesClientGetResponse ¶
type EligibleChildResourcesClientGetResponse struct {
// Paged collection of EligibleChildResource items
EligibleChildResourcesListResult
}
EligibleChildResourcesClientGetResponse contains the response from method EligibleChildResourcesClient.NewGetPager.
type EligibleChildResourcesListResult ¶
type EligibleChildResourcesListResult struct {
// REQUIRED; The EligibleChildResource items on this page
Value []*EligibleChildResource
// The link to the next page of items
NextLink *string
}
EligibleChildResourcesListResult - Paged collection of EligibleChildResource items
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 - Justification EnablementRulesJustification EnablementRules = "Justification" // EnablementRulesMultiFactorAuthentication - MultiFactorAuthentication EnablementRulesMultiFactorAuthentication EnablementRules = "MultiFactorAuthentication" // EnablementRulesTicketing - Ticketing EnablementRulesTicketing EnablementRules = "Ticketing" )
func PossibleEnablementRulesValues ¶
func PossibleEnablementRulesValues() []EnablementRules
PossibleEnablementRulesValues returns the possible values for the EnablementRules const type.
type ExcludedPrincipalTypes ¶
type ExcludedPrincipalTypes string
const ( // ExcludedPrincipalTypesServicePrincipalsAsRequestor - ServicePrincipalsAsRequestor ExcludedPrincipalTypesServicePrincipalsAsRequestor ExcludedPrincipalTypes = "ServicePrincipalsAsRequestor" // ExcludedPrincipalTypesServicePrincipalsAsTarget - ServicePrincipalsAsTarget ExcludedPrincipalTypesServicePrincipalsAsTarget ExcludedPrincipalTypes = "ServicePrincipalsAsTarget" )
func PossibleExcludedPrincipalTypesValues ¶
func PossibleExcludedPrincipalTypesValues() []ExcludedPrincipalTypes
PossibleExcludedPrincipalTypesValues returns the possible values for the ExcludedPrincipalTypes const type.
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 - Contains optional client configuration. 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: 2015-07-01/ElevateAccess.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGlobalAdministratorClient().ElevateAccess(ctx, 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 = armauthorization.GlobalAdministratorClientElevateAccessResponse{
// }
}
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 - Direct MemberTypeDirect MemberType = "Direct" // MemberTypeGroup - Group MemberTypeGroup MemberType = "Group" // MemberTypeInherited - Inherited 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 - Email 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 - All NotificationLevelAll NotificationLevel = "All" // NotificationLevelCritical - Critical NotificationLevelCritical NotificationLevel = "Critical" // NotificationLevelNone - None 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 {
// REQUIRED; The Operation items on this page
Value []*Operation
// The link to the next page of items
NextLink *string
}
OperationListResult - Paged collection of Operation items
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 - Contains optional client configuration. 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 {
// Paged collection of Operation items
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PIMOnlyMode ¶
type PIMOnlyMode string
PIMOnlyMode - Determines whether the setting is enabled, disabled or report only.
const ( // PIMOnlyModeDisabled - Disabled PIMOnlyModeDisabled PIMOnlyMode = "Disabled" // PIMOnlyModeEnabled - Enabled PIMOnlyModeEnabled PIMOnlyMode = "Enabled" // PIMOnlyModeReportOnly - ReportOnly PIMOnlyModeReportOnly PIMOnlyMode = "ReportOnly" )
func PossiblePIMOnlyModeValues ¶
func PossiblePIMOnlyModeValues() []PIMOnlyMode
PossiblePIMOnlyModeValues returns the possible values for the PIMOnlyMode const type.
type PIMOnlyModeSettings ¶
type PIMOnlyModeSettings struct {
// The list of excluded assignment types allowed.
ExcludedAssignmentTypes []*ExcludedPrincipalTypes
// The list of excluded entities that the rule does not apply to.
Excludes []*UsersOrServicePrincipalSet
// Determines whether the setting is enabled, disabled or report only.
Mode *PIMOnlyMode
}
PIMOnlyModeSettings - The PIM Only Mode settings.
func (PIMOnlyModeSettings) MarshalJSON ¶
func (p PIMOnlyModeSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PIMOnlyModeSettings.
func (*PIMOnlyModeSettings) UnmarshalJSON ¶
func (p *PIMOnlyModeSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PIMOnlyModeSettings.
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 'foo_storage_container'
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 {
// REQUIRED; The Permission items on this page
Value []*Permission
// The link to the next page of items
NextLink *string
}
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 - Contains optional client configuration. 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: 2022-05-01-preview/GetPermissions.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("subID", 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 = armauthorization.PermissionsClientListForResourceGroupResponse{
// PermissionGetResult: armauthorization.PermissionGetResult{
// NextLink: to.Ptr("https://management.azure.com/subscriptions/subID/resourcegroups/rgname/providers/Microsoft.Authorization/permissions?api-version=2022-05-01-preview&$skiptoken=skiptoken"),
// 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: 2022-05-01-preview/GetResourcePermissions.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("subId", 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 = armauthorization.PermissionsClientListForResourceResponse{
// PermissionGetResult: armauthorization.PermissionGetResult{
// Value: []*armauthorization.Permission{
// {
// Actions: []*string{
// },
// NotActions: []*string{
// },
// },
// },
// },
// }
}
}
Output:
type PermissionsClientListForResourceGroupOptions ¶
type PermissionsClientListForResourceGroupOptions struct {
}
PermissionsClientListForResourceGroupOptions contains the optional parameters for the PermissionsClient.NewListForResourceGroupPager method.
type PermissionsClientListForResourceGroupResponse ¶
type PermissionsClientListForResourceGroupResponse struct {
// Permissions information.
PermissionGetResult
}
PermissionsClientListForResourceGroupResponse contains the response from method PermissionsClient.NewListForResourceGroupPager.
type PermissionsClientListForResourceOptions ¶
type PermissionsClientListForResourceOptions struct {
}
PermissionsClientListForResourceOptions contains the optional parameters for the PermissionsClient.NewListForResourcePager method.
type PermissionsClientListForResourceResponse ¶
type PermissionsClientListForResourceResponse struct {
// Permissions information.
PermissionGetResult
}
PermissionsClientListForResourceResponse contains the response from method PermissionsClient.NewListForResourcePager.
type PolicyAssignmentProperties ¶
type PolicyAssignmentProperties struct {
// Details of the policy
Policy *PolicyAssignmentPropertiesPolicy
// Details of role definition
RoleDefinition *PolicyAssignmentPropertiesRoleDefinition
// Details of the resource scope
Scope *PolicyAssignmentPropertiesScope
}
PolicyAssignmentProperties - Expanded info of resource scope, role definition and policy
func (PolicyAssignmentProperties) MarshalJSON ¶
func (p PolicyAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentProperties.
func (*PolicyAssignmentProperties) UnmarshalJSON ¶
func (p *PolicyAssignmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentProperties.
type PolicyAssignmentPropertiesPolicy ¶
type PolicyAssignmentPropertiesPolicy struct {
// Id of the policy
ID *string
// The last modified date time.
LastModifiedDateTime *time.Time
// READ-ONLY; The name of the entity last modified it
LastModifiedBy *Principal
}
PolicyAssignmentPropertiesPolicy - Details of the policy
func (PolicyAssignmentPropertiesPolicy) MarshalJSON ¶
func (p PolicyAssignmentPropertiesPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentPropertiesPolicy.
func (*PolicyAssignmentPropertiesPolicy) UnmarshalJSON ¶
func (p *PolicyAssignmentPropertiesPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentPropertiesPolicy.
type PolicyAssignmentPropertiesRoleDefinition ¶
type PolicyAssignmentPropertiesRoleDefinition struct {
// Display name of the role definition
DisplayName *string
// Id of the role definition
ID *string
// Type of the role definition
Type *string
}
PolicyAssignmentPropertiesRoleDefinition - Details of role definition
func (PolicyAssignmentPropertiesRoleDefinition) MarshalJSON ¶
func (p PolicyAssignmentPropertiesRoleDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentPropertiesRoleDefinition.
func (*PolicyAssignmentPropertiesRoleDefinition) UnmarshalJSON ¶
func (p *PolicyAssignmentPropertiesRoleDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentPropertiesRoleDefinition.
type PolicyAssignmentPropertiesScope ¶
type PolicyAssignmentPropertiesScope struct {
// Display name of the resource
DisplayName *string
// Scope id of the resource
ID *string
// Type of the resource
Type *string
}
PolicyAssignmentPropertiesScope - Details of the resource scope
func (PolicyAssignmentPropertiesScope) MarshalJSON ¶
func (p PolicyAssignmentPropertiesScope) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentPropertiesScope.
func (*PolicyAssignmentPropertiesScope) UnmarshalJSON ¶
func (p *PolicyAssignmentPropertiesScope) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentPropertiesScope.
type PolicyProperties ¶
type PolicyProperties struct {
// READ-ONLY; Details of the resource scope
Scope *PolicyPropertiesScope
}
PolicyProperties - Expanded info of resource scope
func (PolicyProperties) MarshalJSON ¶
func (p PolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicyProperties.
func (*PolicyProperties) UnmarshalJSON ¶
func (p *PolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProperties.
type PolicyPropertiesScope ¶
type PolicyPropertiesScope struct {
// Display name of the resource
DisplayName *string
// Scope id of the resource
ID *string
// Type of the resource
Type *string
}
PolicyPropertiesScope - Details of the resource scope
func (PolicyPropertiesScope) MarshalJSON ¶
func (p PolicyPropertiesScope) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicyPropertiesScope.
func (*PolicyPropertiesScope) UnmarshalJSON ¶
func (p *PolicyPropertiesScope) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicyPropertiesScope.
type Principal ¶
type Principal struct {
// The name of the principal made changes
DisplayName *string
// Email of principal
Email *string
// The id of the principal made changes
ID *string
// Type of principal such as user , group etc
Type *string
}
Principal - The name of the entity last modified it
func (Principal) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Principal.
func (*Principal) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Principal.
type PrincipalType ¶
type PrincipalType string
PrincipalType - The principal type of the assigned principal ID.
const ( // PrincipalTypeDevice - Device PrincipalTypeDevice PrincipalType = "Device" // PrincipalTypeForeignGroup - ForeignGroup PrincipalTypeForeignGroup PrincipalType = "ForeignGroup" // PrincipalTypeGroup - Group PrincipalTypeGroup PrincipalType = "Group" // PrincipalTypeServicePrincipal - ServicePrincipal PrincipalTypeServicePrincipal PrincipalType = "ServicePrincipal" // PrincipalTypeUser - User 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 - Contains optional client configuration. 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: 2022-04-01/GetProviderOperationsRP.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProviderOperationsMetadataClient().Get(ctx, "resourceProviderNamespace", 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 = armauthorization.ProviderOperationsMetadataClientGetResponse{
// 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: 2022-04-01/GetAllProviderOperations.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProviderOperationsMetadataClient().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 = armauthorization.ProviderOperationsMetadataClientListResponse{
// 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 {
// The response of a ProviderOperationsMetadata list operation.
ProviderOperationsMetadataListResult
}
ProviderOperationsMetadataClientListResponse contains the response from method ProviderOperationsMetadataClient.NewListPager.
type ProviderOperationsMetadataListResult ¶
type ProviderOperationsMetadataListResult struct {
// REQUIRED; The ProviderOperationsMetadata items on this page
Value []*ProviderOperationsMetadata
// The link to the next page of items
NextLink *string
}
ProviderOperationsMetadataListResult - The response of a ProviderOperationsMetadata list operation.
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 - Admin RecipientTypeAdmin RecipientType = "Admin" // RecipientTypeApprover - Approver RecipientTypeApprover RecipientType = "Approver" // RecipientTypeRequestor - Requestor 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 - Approve RecordAllDecisionsResultApprove RecordAllDecisionsResult = "Approve" // RecordAllDecisionsResultDeny - Deny 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 - AdminAssign RequestTypeAdminAssign RequestType = "AdminAssign" // RequestTypeAdminExtend - AdminExtend RequestTypeAdminExtend RequestType = "AdminExtend" // RequestTypeAdminRemove - AdminRemove RequestTypeAdminRemove RequestType = "AdminRemove" // RequestTypeAdminRenew - AdminRenew RequestTypeAdminRenew RequestType = "AdminRenew" // RequestTypeAdminUpdate - AdminUpdate RequestTypeAdminUpdate RequestType = "AdminUpdate" // RequestTypeSelfActivate - SelfActivate RequestTypeSelfActivate RequestType = "SelfActivate" // RequestTypeSelfDeactivate - SelfDeactivate RequestTypeSelfDeactivate RequestType = "SelfDeactivate" // RequestTypeSelfExtend - SelfExtend RequestTypeSelfExtend RequestType = "SelfExtend" // RequestTypeSelfRenew - SelfRenew 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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
RoleAssignment - Role Assignments
func (RoleAssignment) MarshalJSON ¶
func (r RoleAssignment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignment.
func (*RoleAssignment) UnmarshalJSON ¶
func (r *RoleAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignment.
type RoleAssignmentCreateParameters ¶
type RoleAssignmentCreateParameters struct {
// REQUIRED; Role assignment properties.
Properties *RoleAssignmentProperties
}
RoleAssignmentCreateParameters - Role assignment create parameters.
func (RoleAssignmentCreateParameters) MarshalJSON ¶
func (r RoleAssignmentCreateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentCreateParameters.
func (*RoleAssignmentCreateParameters) UnmarshalJSON ¶
func (r *RoleAssignmentCreateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentCreateParameters.
type RoleAssignmentListResult ¶
type RoleAssignmentListResult struct {
// REQUIRED; The RoleAssignment items on this page
Value []*RoleAssignment
// The link to the next page of items
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 'foo_storage_container'
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 RoleAssignmentScheduleInstance ¶
type RoleAssignmentScheduleInstance struct {
// Role assignment schedule instance properties.
Properties *RoleAssignmentScheduleInstanceProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 RoleAssignmentScheduleInstanceListResult ¶
type RoleAssignmentScheduleInstanceListResult struct {
// REQUIRED; The RoleAssignmentScheduleInstance items on this page
Value []*RoleAssignmentScheduleInstance
// The link to the next page of items
NextLink *string
}
RoleAssignmentScheduleInstanceListResult - The response of a RoleAssignmentScheduleInstance list operation.
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 'foo_storage_container'
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 - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-09-01-preview/GetRoleAssignmentScheduleInstanceByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentScheduleInstancesClientGetResponse{
// RoleAssignmentScheduleInstance: &armauthorization.RoleAssignmentScheduleInstance{
// Name: to.Ptr("ed9b8180-cef7-4c77-a63c-b8566ecfc412"),
// Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleInstances"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleInstances/ed9b8180-cef7-4c77-a63c-b8566ecfc412"),
// Properties: &armauthorization.RoleAssignmentScheduleInstanceProperties{
// AssignmentType: to.Ptr(armauthorization.AssignmentTypeAssigned),
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t}()),
// EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T05:35:17.91Z"); return t}()),
// ExpandedProperties: &armauthorization.ExpandedProperties{
// Principal: &armauthorization.ExpandedPropertiesPrincipal{
// Type: to.Ptr("User"),
// DisplayName: to.Ptr("User Account"),
// Email: to.Ptr("user@my-tenant.com"),
// ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// },
// RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("Contributor"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// },
// Scope: &armauthorization.ExpandedPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// },
// },
// LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// LinkedRoleEligibilityScheduleInstanceID: to.Ptr("21e4b59a-0499-4fe0-a3c3-43a3055b773a"),
// MemberType: to.Ptr(armauthorization.MemberTypeDirect),
// OriginRoleAssignmentID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignments/ed9b8180-cef7-4c77-a63c-b8566ecfc412"),
// PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// RoleAssignmentScheduleID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6"),
// RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - RoleAssignmentScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetRoleAssignmentScheduleInstancesByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentScheduleInstancesClientListForScopeResponse{
// RoleAssignmentScheduleInstanceListResult: armauthorization.RoleAssignmentScheduleInstanceListResult{
// Value: []*armauthorization.RoleAssignmentScheduleInstance{
// {
// Name: to.Ptr("ed9b8180-cef7-4c77-a63c-b8566ecfc412"),
// Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleInstances"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleInstances/ed9b8180-cef7-4c77-a63c-b8566ecfc412"),
// Properties: &armauthorization.RoleAssignmentScheduleInstanceProperties{
// AssignmentType: to.Ptr(armauthorization.AssignmentTypeAssigned),
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t}()),
// EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T05:35:17.91Z"); return t}()),
// ExpandedProperties: &armauthorization.ExpandedProperties{
// Principal: &armauthorization.ExpandedPropertiesPrincipal{
// Type: to.Ptr("User"),
// DisplayName: to.Ptr("User Account"),
// Email: to.Ptr("user@my-tenant.com"),
// ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// },
// RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("Contributor"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// },
// Scope: &armauthorization.ExpandedPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// },
// },
// LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// LinkedRoleEligibilityScheduleInstanceID: to.Ptr("21e4b59a-0499-4fe0-a3c3-43a3055b773a"),
// MemberType: to.Ptr(armauthorization.MemberTypeDirect),
// OriginRoleAssignmentID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignments/ed9b8180-cef7-4c77-a63c-b8566ecfc412"),
// PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// RoleAssignmentScheduleID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6"),
// RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); 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 {
// The response of a RoleAssignmentScheduleInstance list operation.
RoleAssignmentScheduleInstanceListResult
}
RoleAssignmentScheduleInstancesClientListForScopeResponse contains the response from method RoleAssignmentScheduleInstancesClient.NewListForScopePager.
type RoleAssignmentScheduleListResult ¶
type RoleAssignmentScheduleListResult struct {
// REQUIRED; The RoleAssignmentSchedule items on this page
Value []*RoleAssignmentSchedule
// The link to the next page of items
NextLink *string
}
RoleAssignmentScheduleListResult - The response of a RoleAssignmentSchedule list operation.
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 'foo_storage_container'
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 RoleAssignmentScheduleRequestListResult ¶
type RoleAssignmentScheduleRequestListResult struct {
// REQUIRED; The RoleAssignmentScheduleRequest items on this page
Value []*RoleAssignmentScheduleRequest
// The link to the next page of items
NextLink *string
}
RoleAssignmentScheduleRequestListResult - The response of a RoleAssignmentScheduleRequest list operation.
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 'foo_storage_container'
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 - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleAssignmentScheduleRequestName - The name (guid) of the role assignment schedule request to get.
- options - RoleAssignmentScheduleRequestsClientCancelOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Cancel method.
Example ¶
Generated from example definition: 2024-09-01-preview/CancelRoleAssignmentScheduleRequestByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, 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)
}
// 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 = armauthorization.RoleAssignmentScheduleRequestsClientCancelResponse{
// }
}
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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleAssignmentScheduleRequestName - The name (guid) of the role assignment schedule request to get.
- parameters - Parameters for the role assignment schedule request.
- options - RoleAssignmentScheduleRequestsClientCreateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Create method.
Example ¶
Generated from example definition: 2024-09-01-preview/PutRoleAssignmentScheduleRequest.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
"time"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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.91Z"); 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-09-01-preview/GetRoleAssignmentScheduleRequestByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentScheduleRequestsClientGetResponse{
// RoleAssignmentScheduleRequest: &armauthorization.RoleAssignmentScheduleRequest{
// Name: to.Ptr("fea7a502-9a96-4806-a26f-eee560e52045"),
// Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleRequests"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"),
// Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); 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.91Z"); return t}()),
// },
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// TargetRoleAssignmentScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// TicketInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesTicketInfo{
// },
// },
// },
// }
}
Output:
func (*RoleAssignmentScheduleRequestsClient) NewListForScopePager ¶
func (client *RoleAssignmentScheduleRequestsClient) NewListForScopePager(scope string, options *RoleAssignmentScheduleRequestsClientListForScopeOptions) *runtime.Pager[RoleAssignmentScheduleRequestsClientListForScopeResponse]
NewListForScopePager - Gets role assignment schedule requests for a scope.
Generated from API version 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - RoleAssignmentScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetRoleAssignmentScheduleRequestByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentScheduleRequestsClientListForScopeResponse{
// RoleAssignmentScheduleRequestListResult: armauthorization.RoleAssignmentScheduleRequestListResult{
// Value: []*armauthorization.RoleAssignmentScheduleRequest{
// {
// Name: to.Ptr("fea7a502-9a96-4806-a26f-eee560e52045"),
// Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleRequests"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"),
// Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); 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.91Z"); return t}()),
// },
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// TargetRoleAssignmentScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// TicketInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesTicketInfo{
// },
// },
// },
// },
// },
// }
}
}
Output:
func (*RoleAssignmentScheduleRequestsClient) Validate ¶
func (client *RoleAssignmentScheduleRequestsClient) Validate(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, parameters RoleAssignmentScheduleRequest, options *RoleAssignmentScheduleRequestsClientValidateOptions) (RoleAssignmentScheduleRequestsClientValidateResponse, error)
Validate - Validates a new role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleAssignmentScheduleRequestName - The name (guid) of the role assignment schedule request to get.
- parameters - Parameters for the role assignment schedule request.
- options - RoleAssignmentScheduleRequestsClientValidateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Validate method.
Example ¶
Generated from example definition: 2024-09-01-preview/ValidateRoleAssignmentScheduleRequestByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
"time"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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.91Z"); 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 = armauthorization.RoleAssignmentScheduleRequestsClientValidateResponse{
// RoleAssignmentScheduleRequest: &armauthorization.RoleAssignmentScheduleRequest{
// Name: to.Ptr("fea7a502-9a96-4806-a26f-eee560e52045"),
// Type: to.Ptr("Microsoft.Authorization/RoleAssignmentScheduleRequests"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"),
// Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); 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.91Z"); return t}()),
// },
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// TargetRoleAssignmentScheduleID: to.Ptr("c9e264ff-3133-4776-a81a-ebc7c33c8ec6"),
// TicketInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesTicketInfo{
// },
// },
// },
// }
}
Output:
type RoleAssignmentScheduleRequestsClientCancelOptions ¶
type RoleAssignmentScheduleRequestsClientCancelOptions struct {
}
RoleAssignmentScheduleRequestsClientCancelOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Cancel method.
type RoleAssignmentScheduleRequestsClientCancelResponse ¶
type RoleAssignmentScheduleRequestsClientCancelResponse struct {
}
RoleAssignmentScheduleRequestsClientCancelResponse contains the response from method RoleAssignmentScheduleRequestsClient.Cancel.
type RoleAssignmentScheduleRequestsClientCreateOptions ¶
type RoleAssignmentScheduleRequestsClientCreateOptions struct {
}
RoleAssignmentScheduleRequestsClientCreateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Create method.
type RoleAssignmentScheduleRequestsClientCreateResponse ¶
type RoleAssignmentScheduleRequestsClientCreateResponse struct {
// Role Assignment schedule request
RoleAssignmentScheduleRequest
}
RoleAssignmentScheduleRequestsClientCreateResponse contains the response from method RoleAssignmentScheduleRequestsClient.Create.
type RoleAssignmentScheduleRequestsClientGetOptions ¶
type RoleAssignmentScheduleRequestsClientGetOptions struct {
}
RoleAssignmentScheduleRequestsClientGetOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Get method.
type RoleAssignmentScheduleRequestsClientGetResponse ¶
type RoleAssignmentScheduleRequestsClientGetResponse struct {
// Role Assignment schedule request
RoleAssignmentScheduleRequest
}
RoleAssignmentScheduleRequestsClientGetResponse contains the response from method RoleAssignmentScheduleRequestsClient.Get.
type RoleAssignmentScheduleRequestsClientListForScopeOptions ¶
type RoleAssignmentScheduleRequestsClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above
// the scope. Use $filter=principalId eq {id} to return all role assignment schedule requests at, above or below the scope
// for the specified principal. Use $filter=asRequestor() to return all role assignment schedule requests requested by the
// current user. Use $filter=asTarget() to return all role assignment schedule requests created for the current user. Use
// $filter=asApprover() to return all role assignment schedule requests where the current user is an approver.
Filter *string
}
RoleAssignmentScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.NewListForScopePager method.
type RoleAssignmentScheduleRequestsClientListForScopeResponse ¶
type RoleAssignmentScheduleRequestsClientListForScopeResponse struct {
// The response of a RoleAssignmentScheduleRequest list operation.
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 - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-09-01-preview/GetRoleAssignmentScheduleByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentSchedulesClientGetResponse{
// RoleAssignmentSchedule: &armauthorization.RoleAssignmentSchedule{
// Name: to.Ptr("c9e264ff-3133-4776-a81a-ebc7c33c8ec6"),
// Type: to.Ptr("Microsoft.Authorization/RoleAssignmentSchedules"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6"),
// Properties: &armauthorization.RoleAssignmentScheduleProperties{
// AssignmentType: to.Ptr(armauthorization.AssignmentTypeAssigned),
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t}()),
// EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T05:35:17.91Z"); return t}()),
// ExpandedProperties: &armauthorization.ExpandedProperties{
// Principal: &armauthorization.ExpandedPropertiesPrincipal{
// Type: to.Ptr("User"),
// DisplayName: to.Ptr("User Account"),
// Email: to.Ptr("user@my-tenant.com"),
// ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// },
// RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("Contributor"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// },
// Scope: &armauthorization.ExpandedPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// },
// },
// LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// MemberType: to.Ptr(armauthorization.MemberTypeDirect),
// PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// RoleAssignmentScheduleRequestID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"),
// RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t}()),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - RoleAssignmentSchedulesClientListForScopeOptions contains the optional parameters for the RoleAssignmentSchedulesClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetRoleAssignmentSchedulesByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentSchedulesClientListForScopeResponse{
// RoleAssignmentScheduleListResult: armauthorization.RoleAssignmentScheduleListResult{
// Value: []*armauthorization.RoleAssignmentSchedule{
// {
// Name: to.Ptr("c9e264ff-3133-4776-a81a-ebc7c33c8ec6"),
// Type: to.Ptr("Microsoft.Authorization/RoleAssignmentSchedules"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6"),
// Properties: &armauthorization.RoleAssignmentScheduleProperties{
// AssignmentType: to.Ptr(armauthorization.AssignmentTypeAssigned),
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t}()),
// EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T05:35:17.91Z"); return t}()),
// ExpandedProperties: &armauthorization.ExpandedProperties{
// Principal: &armauthorization.ExpandedPropertiesPrincipal{
// Type: to.Ptr("User"),
// DisplayName: to.Ptr("User Account"),
// Email: to.Ptr("user@my-tenant.com"),
// ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// },
// RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("Contributor"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// },
// Scope: &armauthorization.ExpandedPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// },
// },
// LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// MemberType: to.Ptr(armauthorization.MemberTypeDirect),
// PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// RoleAssignmentScheduleRequestID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045"),
// RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t}()),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); 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 {
// The response of a RoleAssignmentSchedule list operation.
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 - Contains optional client configuration. 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 fully qualified Azure Resource manager identifier of the resource.
- 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: 2022-04-01/RoleAssignments_CreateForResource.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentsClientCreateResponse{
// 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: 2022-04-01/RoleAssignments_CreateForResourceGroup.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentsClientCreateResponse{
// 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: 2022-04-01/RoleAssignments_CreateForSubscription.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleAssignmentsClientCreateResponse{
// 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/<SUB_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.Authorization/roleAssignments/<ROLE_ASSIGNMENT_NAME>
- parameters - Resource create parameters.
- options - RoleAssignmentsClientCreateByIDOptions contains the optional parameters for the RoleAssignmentsClient.CreateByID method.
Example ¶
Generated from example definition: 2022-04-01/RoleAssignments_CreateById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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{
RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
},
}, 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 = armauthorization.RoleAssignmentsClientCreateByIDResponse{
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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 fully qualified Azure Resource manager identifier of the resource.
- 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: 2022-04-01/RoleAssignments_Delete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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", 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 = armauthorization.RoleAssignmentsClientDeleteResponse{
// 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/<SUB_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.Authorization/roleAssignments/<ROLE_ASSIGNMENT_NAME>
- options - RoleAssignmentsClientDeleteByIDOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByID method.
Example ¶
Generated from example definition: 2022-04-01/RoleAssignments_DeleteById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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", 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 = armauthorization.RoleAssignmentsClientDeleteByIDResponse{
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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 fully qualified Azure Resource manager identifier of the resource.
- 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: 2022-04-01/RoleAssignments_Get.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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", 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 = armauthorization.RoleAssignmentsClientGetResponse{
// 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/<SUB_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.Authorization/roleAssignments/<ROLE_ASSIGNMENT_NAME>
- options - RoleAssignmentsClientGetByIDOptions contains the optional parameters for the RoleAssignmentsClient.GetByID method.
Example ¶
Generated from example definition: 2022-04-01/RoleAssignments_GetById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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", 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 = armauthorization.RoleAssignmentsClientGetByIDResponse{
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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: 2022-04-01/RoleAssignments_ListForResourceGroup.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRoleAssignmentsClient().NewListForResourceGroupPager("testrg", 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 = armauthorization.RoleAssignmentsClientListForResourceGroupResponse{
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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 of the resource.
- resourceName - The name of the resource to get role assignments for.
- options - RoleAssignmentsClientListForResourceOptions contains the optional parameters for the RoleAssignmentsClient.NewListForResourcePager method.
Example ¶
Generated from example definition: 2022-04-01/RoleAssignments_ListForResource.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRoleAssignmentsClient().NewListForResourcePager("testrg", "Microsoft.DocumentDb", "databaseAccounts", "test-db-account", 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 = armauthorization.RoleAssignmentsClientListForResourceResponse{
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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 fully qualified Azure Resource manager identifier of the resource.
- options - RoleAssignmentsClientListForScopeOptions contains the optional parameters for the RoleAssignmentsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2022-04-01/RoleAssignments_ListForScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRoleAssignmentsClient().NewListForScopePager("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", 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 = armauthorization.RoleAssignmentsClientListForScopeResponse{
// 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{
// RoleDefinitionID: to.Ptr("/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
// PrincipalID: to.Ptr("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// 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: 2022-04-01/RoleAssignments_ListForSubscription.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("a925f2f7-5c63-4b7b-8799-25a5f97bc3b2", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRoleAssignmentsClient().NewListForSubscriptionPager(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 = armauthorization.RoleAssignmentsClientListForSubscriptionResponse{
// 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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 RoleDefinitionListResult ¶
type RoleDefinitionListResult struct {
// REQUIRED; The RoleDefinition items on this page
Value []*RoleDefinition
// The link to the next page of items
NextLink *string
}
RoleDefinitionListResult - The response of a RoleDefinition list operation.
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 - Contains optional client configuration. 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 fully qualified Azure Resource manager identifier of the resource.
- 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: 2022-05-01-preview/PutRoleDefinition.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 fully qualified Azure Resource manager identifier of the resource.
- roleDefinitionID - The ID of the role definition.
- options - RoleDefinitionsClientDeleteOptions contains the optional parameters for the RoleDefinitionsClient.Delete method.
Example ¶
Generated from example definition: 2022-05-01-preview/DeleteRoleDefinition.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleDefinitionsClientDeleteResponse{
// 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 fully qualified Azure Resource manager identifier of the resource.
- roleDefinitionID - The ID of the role definition.
- options - RoleDefinitionsClientGetOptions contains the optional parameters for the RoleDefinitionsClient.Get method.
Example ¶
Generated from example definition: 2022-05-01-preview/GetRoleDefinitionById.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleDefinitionsClientGetResponse{
// 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: 2022-05-01-preview/GetRoleDefinitionByRoleId.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleDefinitionsClientGetByIDResponse{
// RoleDefinition: &armauthorization.RoleDefinition{
// 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"),
// },
// ID: to.Ptr("/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId"),
// Type: to.Ptr("Microsoft.Authorization/roleDefinitions"),
// Name: to.Ptr("roleDefinitionId"),
// },
// }
}
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 fully qualified Azure Resource manager identifier of the resource.
- options - RoleDefinitionsClientListOptions contains the optional parameters for the RoleDefinitionsClient.NewListPager method.
Example ¶
Generated from example definition: 2022-05-01-preview/GetRoleDefinitionAtScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRoleDefinitionsClient().NewListPager("scope", 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 = armauthorization.RoleDefinitionsClientListResponse{
// 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 {
// The response of a RoleDefinition list operation.
RoleDefinitionListResult
}
RoleDefinitionsClientListResponse contains the response from method RoleDefinitionsClient.NewListPager.
type RoleEligibilitySchedule ¶
type RoleEligibilitySchedule struct {
// role eligibility schedule properties.
Properties *RoleEligibilityScheduleProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 RoleEligibilityScheduleInstance ¶
type RoleEligibilityScheduleInstance struct {
// Role eligibility schedule instance properties.
Properties *RoleEligibilityScheduleInstanceProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 RoleEligibilityScheduleInstanceListResult ¶
type RoleEligibilityScheduleInstanceListResult struct {
// REQUIRED; The RoleEligibilityScheduleInstance items on this page
Value []*RoleEligibilityScheduleInstance
// The link to the next page of items
NextLink *string
}
RoleEligibilityScheduleInstanceListResult - The response of a RoleEligibilityScheduleInstance list operation.
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 'foo_storage_container'
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 - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-09-01-preview/GetRoleEligibilityScheduleInstanceByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleEligibilityScheduleInstancesClientGetResponse{
// RoleEligibilityScheduleInstance: &armauthorization.RoleEligibilityScheduleInstance{
// Name: to.Ptr("21e4b59a-0499-4fe0-a3c3-43a3055b773a"),
// Type: to.Ptr("Microsoft.Authorization/RoleEligibilityScheduleInstances"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleInstances/21e4b59a-0499-4fe0-a3c3-43a3055b773a"),
// Properties: &armauthorization.RoleEligibilityScheduleInstanceProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T00:32:36.86Z"); return t}()),
// EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T00:31:41.477Z"); return t}()),
// ExpandedProperties: &armauthorization.ExpandedProperties{
// Principal: &armauthorization.ExpandedPropertiesPrincipal{
// Type: to.Ptr("User"),
// DisplayName: to.Ptr("User Account"),
// Email: to.Ptr("user@my-tenant.com"),
// ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// },
// RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("Contributor"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// },
// Scope: &armauthorization.ExpandedPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// },
// },
// MemberType: to.Ptr(armauthorization.MemberTypeDirect),
// PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"),
// RoleEligibilityScheduleID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"),
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T00:32:36.86Z"); 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - RoleEligibilityScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetRoleEligibilityScheduleInstancesByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleEligibilityScheduleInstancesClientListForScopeResponse{
// RoleEligibilityScheduleInstanceListResult: armauthorization.RoleEligibilityScheduleInstanceListResult{
// Value: []*armauthorization.RoleEligibilityScheduleInstance{
// {
// Name: to.Ptr("21e4b59a-0499-4fe0-a3c3-43a3055b773a"),
// Type: to.Ptr("Microsoft.Authorization/RoleEligibilityScheduleInstances"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleInstances/21e4b59a-0499-4fe0-a3c3-43a3055b773a"),
// Properties: &armauthorization.RoleEligibilityScheduleInstanceProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T00:32:36.86Z"); return t}()),
// EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T00:31:41.477Z"); return t}()),
// ExpandedProperties: &armauthorization.ExpandedProperties{
// Principal: &armauthorization.ExpandedPropertiesPrincipal{
// Type: to.Ptr("User"),
// DisplayName: to.Ptr("User Account"),
// Email: to.Ptr("user@my-tenant.com"),
// ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// },
// RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("Contributor"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// },
// Scope: &armauthorization.ExpandedPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// },
// },
// MemberType: to.Ptr(armauthorization.MemberTypeDirect),
// PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"),
// RoleEligibilityScheduleID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"),
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-10T00:32:36.86Z"); 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 {
// The response of a RoleEligibilityScheduleInstance list operation.
RoleEligibilityScheduleInstanceListResult
}
RoleEligibilityScheduleInstancesClientListForScopeResponse contains the response from method RoleEligibilityScheduleInstancesClient.NewListForScopePager.
type RoleEligibilityScheduleListResult ¶
type RoleEligibilityScheduleListResult struct {
// REQUIRED; The RoleEligibilitySchedule items on this page
Value []*RoleEligibilitySchedule
// The link to the next page of items
NextLink *string
}
RoleEligibilityScheduleListResult - The response of a RoleEligibilitySchedule list operation.
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 'foo_storage_container'
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 RoleEligibilityScheduleRequestListResult ¶
type RoleEligibilityScheduleRequestListResult struct {
// REQUIRED; The RoleEligibilityScheduleRequest items on this page
Value []*RoleEligibilityScheduleRequest
// The link to the next page of items
NextLink *string
}
RoleEligibilityScheduleRequestListResult - The response of a RoleEligibilityScheduleRequest list operation.
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 'foo_storage_container'
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 - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleEligibilityScheduleRequestName - The name (guid) of the role eligibility schedule request to get.
- options - RoleEligibilityScheduleRequestsClientCancelOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Cancel method.
Example ¶
Generated from example definition: 2024-09-01-preview/CancelRoleEligibilityScheduleRequestByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, 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)
}
// 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 = armauthorization.RoleEligibilityScheduleRequestsClientCancelResponse{
// }
}
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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleEligibilityScheduleRequestName - The name (guid) of the role eligibility schedule request to get.
- parameters - Parameters for the role eligibility schedule request.
- options - RoleEligibilityScheduleRequestsClientCreateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Create method.
Example ¶
Generated from example definition: 2024-09-01-preview/PutRoleEligibilityScheduleRequest.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
"time"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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.91Z"); 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-09-01-preview/GetRoleEligibilityScheduleRequestByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleEligibilityScheduleRequestsClientGetResponse{
// RoleEligibilityScheduleRequest: &armauthorization.RoleEligibilityScheduleRequest{
// Name: to.Ptr("64caffb6-55c0-4deb-a585-68e948ea1ad6"),
// Type: to.Ptr("Microsoft.Authorization/RoleEligibilityRequests"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"),
// Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:32:27.91Z"); 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.91Z"); return t}()),
// },
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// TargetRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// TicketInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesTicketInfo{
// },
// },
// },
// }
}
Output:
func (*RoleEligibilityScheduleRequestsClient) NewListForScopePager ¶
func (client *RoleEligibilityScheduleRequestsClient) NewListForScopePager(scope string, options *RoleEligibilityScheduleRequestsClientListForScopeOptions) *runtime.Pager[RoleEligibilityScheduleRequestsClientListForScopeResponse]
NewListForScopePager - Gets role eligibility schedule requests for a scope.
Generated from API version 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - RoleEligibilityScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetRoleEligibilityScheduleRequestByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleEligibilityScheduleRequestsClientListForScopeResponse{
// RoleEligibilityScheduleRequestListResult: armauthorization.RoleEligibilityScheduleRequestListResult{
// Value: []*armauthorization.RoleEligibilityScheduleRequest{
// {
// Name: to.Ptr("64caffb6-55c0-4deb-a585-68e948ea1ad6"),
// Type: to.Ptr("Microsoft.Authorization/RoleEligibilityRequests"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"),
// Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:32:27.91Z"); 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.91Z"); return t}()),
// },
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// TargetRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// TicketInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesTicketInfo{
// },
// },
// },
// },
// },
// }
}
}
Output:
func (*RoleEligibilityScheduleRequestsClient) Validate ¶
func (client *RoleEligibilityScheduleRequestsClient) Validate(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, parameters RoleEligibilityScheduleRequest, options *RoleEligibilityScheduleRequestsClientValidateOptions) (RoleEligibilityScheduleRequestsClientValidateResponse, error)
Validate - Validates a new role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleEligibilityScheduleRequestName - The name (guid) of the role eligibility schedule request to get.
- parameters - Parameters for the role eligibility schedule request.
- options - RoleEligibilityScheduleRequestsClientValidateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Validate method.
Example ¶
Generated from example definition: 2024-09-01-preview/ValidateRoleEligibilityScheduleRequestByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
"time"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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.91Z"); 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 = armauthorization.RoleEligibilityScheduleRequestsClientValidateResponse{
// RoleEligibilityScheduleRequest: &armauthorization.RoleEligibilityScheduleRequest{
// Name: to.Ptr("64caffb6-55c0-4deb-a585-68e948ea1ad6"),
// Type: to.Ptr("Microsoft.Authorization/RoleEligibilityScheduleRequests"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"),
// Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:32:27.91Z"); 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.91Z"); return t}()),
// },
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// TargetRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// TicketInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesTicketInfo{
// },
// },
// },
// }
}
Output:
type RoleEligibilityScheduleRequestsClientCancelOptions ¶
type RoleEligibilityScheduleRequestsClientCancelOptions struct {
}
RoleEligibilityScheduleRequestsClientCancelOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Cancel method.
type RoleEligibilityScheduleRequestsClientCancelResponse ¶
type RoleEligibilityScheduleRequestsClientCancelResponse struct {
}
RoleEligibilityScheduleRequestsClientCancelResponse contains the response from method RoleEligibilityScheduleRequestsClient.Cancel.
type RoleEligibilityScheduleRequestsClientCreateOptions ¶
type RoleEligibilityScheduleRequestsClientCreateOptions struct {
}
RoleEligibilityScheduleRequestsClientCreateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Create method.
type RoleEligibilityScheduleRequestsClientCreateResponse ¶
type RoleEligibilityScheduleRequestsClientCreateResponse struct {
// Role Eligibility schedule request
RoleEligibilityScheduleRequest
}
RoleEligibilityScheduleRequestsClientCreateResponse contains the response from method RoleEligibilityScheduleRequestsClient.Create.
type RoleEligibilityScheduleRequestsClientGetOptions ¶
type RoleEligibilityScheduleRequestsClientGetOptions struct {
}
RoleEligibilityScheduleRequestsClientGetOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Get method.
type RoleEligibilityScheduleRequestsClientGetResponse ¶
type RoleEligibilityScheduleRequestsClientGetResponse struct {
// Role Eligibility schedule request
RoleEligibilityScheduleRequest
}
RoleEligibilityScheduleRequestsClientGetResponse contains the response from method RoleEligibilityScheduleRequestsClient.Get.
type RoleEligibilityScheduleRequestsClientListForScopeOptions ¶
type RoleEligibilityScheduleRequestsClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above
// the scope. Use $filter=principalId eq {id} to return all role eligibility schedule requests at, above or below the scope
// for the specified principal. Use $filter=asRequestor() to return all role eligibility schedule requests requested by the
// current user. Use $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use
// $filter=asApprover() to return all role eligibility schedule requests where the current user is an approver.
Filter *string
}
RoleEligibilityScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.NewListForScopePager method.
type RoleEligibilityScheduleRequestsClientListForScopeResponse ¶
type RoleEligibilityScheduleRequestsClientListForScopeResponse struct {
// The response of a RoleEligibilityScheduleRequest list operation.
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 - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-09-01-preview/GetRoleEligibilityScheduleByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleEligibilitySchedulesClientGetResponse{
// RoleEligibilitySchedule: &armauthorization.RoleEligibilitySchedule{
// Name: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// Type: to.Ptr("Microsoft.Authorization/RoleEligibilitySchedules"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"),
// Properties: &armauthorization.RoleEligibilityScheduleProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:33:06.3Z"); return t}()),
// EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-09T21:32:28.49Z"); return t}()),
// ExpandedProperties: &armauthorization.ExpandedProperties{
// Principal: &armauthorization.ExpandedPropertiesPrincipal{
// Type: to.Ptr("User"),
// DisplayName: to.Ptr("User Account"),
// Email: to.Ptr("user@my-tenant.com"),
// ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// },
// RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("Contributor"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// },
// Scope: &armauthorization.ExpandedPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// },
// },
// MemberType: to.Ptr(armauthorization.MemberTypeDirect),
// PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"),
// RoleEligibilityScheduleRequestID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"),
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:33:14.557Z"); return t}()),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T22:27:00.513Z"); return t}()),
// },
// },
// }
}
Output:
func (*RoleEligibilitySchedulesClient) NewListForScopePager ¶
func (client *RoleEligibilitySchedulesClient) NewListForScopePager(scope string, options *RoleEligibilitySchedulesClientListForScopeOptions) *runtime.Pager[RoleEligibilitySchedulesClientListForScopeResponse]
NewListForScopePager - Gets role eligibility schedules for a resource scope.
Generated from API version 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - RoleEligibilitySchedulesClientListForScopeOptions contains the optional parameters for the RoleEligibilitySchedulesClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetRoleEligibilitySchedulesByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleEligibilitySchedulesClientListForScopeResponse{
// RoleEligibilityScheduleListResult: armauthorization.RoleEligibilityScheduleListResult{
// Value: []*armauthorization.RoleEligibilitySchedule{
// {
// Name: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
// Type: to.Ptr("Microsoft.Authorization/RoleEligibilitySchedules"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413"),
// Properties: &armauthorization.RoleEligibilityScheduleProperties{
// Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
// ConditionVersion: to.Ptr("1.0"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:33:06.3Z"); return t}()),
// EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-09T21:32:28.49Z"); return t}()),
// ExpandedProperties: &armauthorization.ExpandedProperties{
// Principal: &armauthorization.ExpandedPropertiesPrincipal{
// Type: to.Ptr("User"),
// DisplayName: to.Ptr("User Account"),
// Email: to.Ptr("user@my-tenant.com"),
// ID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// },
// RoleDefinition: &armauthorization.ExpandedPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("Contributor"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
// },
// Scope: &armauthorization.ExpandedPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// },
// },
// MemberType: to.Ptr(armauthorization.MemberTypeDirect),
// PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
// PrincipalType: to.Ptr(armauthorization.PrincipalTypeUser),
// RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"),
// RoleEligibilityScheduleRequestID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6"),
// Scope: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f"),
// StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:33:14.557Z"); return t}()),
// Status: to.Ptr(armauthorization.StatusProvisioned),
// UpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T22:27:00.513Z"); return t}()),
// },
// },
// },
// },
// }
}
}
Output:
type RoleEligibilitySchedulesClientGetOptions ¶
type RoleEligibilitySchedulesClientGetOptions struct {
}
RoleEligibilitySchedulesClientGetOptions contains the optional parameters for the RoleEligibilitySchedulesClient.Get method.
type RoleEligibilitySchedulesClientGetResponse ¶
type RoleEligibilitySchedulesClientGetResponse struct {
// Role eligibility schedule
RoleEligibilitySchedule
}
RoleEligibilitySchedulesClientGetResponse contains the response from method RoleEligibilitySchedulesClient.Get.
type RoleEligibilitySchedulesClientListForScopeOptions ¶
type RoleEligibilitySchedulesClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope.
// Use $filter=principalId eq {id} to return all role eligibility schedules at, above or below the scope for the specified
// principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget()
// to return all role eligibility schedules created for the current user.
Filter *string
}
RoleEligibilitySchedulesClientListForScopeOptions contains the optional parameters for the RoleEligibilitySchedulesClient.NewListForScopePager method.
type RoleEligibilitySchedulesClientListForScopeResponse ¶
type RoleEligibilitySchedulesClientListForScopeResponse struct {
// The response of a RoleEligibilitySchedule list operation.
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 - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleManagementPolicyName - The name (guid) of the role management policy to get.
- options - RoleManagementPoliciesClientDeleteOptions contains the optional parameters for the RoleManagementPoliciesClient.Delete method.
Example ¶
Generated from example definition: 2024-09-01-preview/DeleteRoleManagementPolicy.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, 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)
}
// 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 = armauthorization.RoleManagementPoliciesClientDeleteResponse{
// }
}
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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-09-01-preview/GetRoleManagementPolicyByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleManagementPoliciesClientGetResponse{
// RoleManagementPolicy: &armauthorization.RoleManagementPolicy{
// Name: to.Ptr("570c3619-7688-4b34-b290-2b8bb3ccab2a"),
// Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicies"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a"),
// Properties: &armauthorization.RoleManagementPolicyProperties{
// EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Eligibility"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// 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.167+00:00"); 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{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Eligibility"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - RoleManagementPoliciesClientListForScopeOptions contains the optional parameters for the RoleManagementPoliciesClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetRoleManagementPolicyByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleManagementPoliciesClientListForScopeResponse{
// RoleManagementPolicyListResult: armauthorization.RoleManagementPolicyListResult{
// Value: []*armauthorization.RoleManagementPolicy{
// {
// Name: to.Ptr("570c3619-7688-4b34-b290-2b8bb3ccab2a"),
// Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicies"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a"),
// Properties: &armauthorization.RoleManagementPolicyProperties{
// EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Eligibility"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// 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.167+00:00"); 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{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Eligibility"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleManagementPolicyName - The name (guid) of the role management policy to get.
- parameters - Parameters for the role management policy.
- options - RoleManagementPoliciesClientUpdateOptions contains the optional parameters for the RoleManagementPoliciesClient.Update method.
Example (PatchPartialRoleManagementPolicy) ¶
Generated from example definition: 2024-09-01-preview/PatchPartialRoleManagementPolicy.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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"),
IsExpirationRequired: to.Ptr(false),
MaximumDuration: to.Ptr("P180D"),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Eligibility"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Eligibility"),
Operations: []*string{
to.Ptr("All"),
},
},
},
},
},
}, 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 = armauthorization.RoleManagementPoliciesClientUpdateResponse{
// RoleManagementPolicy: &armauthorization.RoleManagementPolicy{
// Name: to.Ptr("570c3619-7688-4b34-b290-2b8bb3ccab2a"),
// Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicies"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a"),
// Properties: &armauthorization.RoleManagementPolicyProperties{
// EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Eligibility"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P180D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// 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.91+00:00"); 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"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P180D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
// },
// },
// }
}
Output:
Example (PatchRoleManagementPolicy) ¶
Generated from example definition: 2024-09-01-preview/PatchRoleManagementPolicy.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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"),
IsExpirationRequired: to.Ptr(false),
MaximumDuration: to.Ptr("P180D"),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Eligibility"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Eligibility"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Eligibility"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Eligibility"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyEnablementRule{
EnabledRules: []*armauthorization.EnablementRules{},
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"),
},
},
},
&armauthorization.RoleManagementPolicyExpirationRule{
ID: to.Ptr("Expiration_Admin_Assignment"),
IsExpirationRequired: to.Ptr(false),
MaximumDuration: to.Ptr("P90D"),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyEnablementRule{
EnabledRules: []*armauthorization.EnablementRules{
to.Ptr(armauthorization.EnablementRulesJustification),
to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
},
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"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Admin_Admin_Assignment"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Approver_Admin_Assignment"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyExpirationRule{
ID: to.Ptr("Expiration_EndUser_Assignment"),
IsExpirationRequired: to.Ptr(true),
MaximumDuration: to.Ptr("PT7H"),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("EndUser"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyEnablementRule{
EnabledRules: []*armauthorization.EnablementRules{
to.Ptr(armauthorization.EnablementRulesJustification),
to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
to.Ptr(armauthorization.EnablementRulesTicketing),
},
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"),
},
},
},
&armauthorization.RoleManagementPolicyApprovalRule{
ID: to.Ptr("Approval_EndUser_Assignment"),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
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),
},
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("EndUser"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyAuthenticationContextRule{
ClaimValue: to.Ptr(""),
ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
IsEnabled: to.Ptr(false),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("EndUser"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("EndUser"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
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),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("EndUser"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
IsDefaultRecipientsEnabled: to.Ptr(true),
NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("EndUser"),
Level: to.Ptr("Assignment"),
Operations: []*string{
to.Ptr("All"),
},
},
},
&armauthorization.RoleManagementPolicyPimOnlyModeRule{
ID: to.Ptr("PIMOnlyMode_Admin_Assignment"),
PimOnlyModeSettings: &armauthorization.PIMOnlyModeSettings{
ExcludedAssignmentTypes: []*armauthorization.ExcludedPrincipalTypes{
to.Ptr(armauthorization.ExcludedPrincipalTypesServicePrincipalsAsTarget),
},
Excludes: []*armauthorization.UsersOrServicePrincipalSet{
{
Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeUser),
ID: to.Ptr("ec42a424-a0c0-4418-8788-d19bdeb03704"),
},
{
Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeGroup),
ID: to.Ptr("00029dfb-0218-4e7a-9a85-c15dc0c880bc"),
},
{
Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeServicePrincipal),
ID: to.Ptr("0000103d-1fc2-4ac8-81de-71517765655c"),
},
},
Mode: to.Ptr(armauthorization.PIMOnlyModeEnabled),
},
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyPimOnlyModeRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
EnforcedSettings: []*string{
to.Ptr("all"),
},
InheritableSettings: []*string{
to.Ptr("all"),
},
Level: to.Ptr("Assignment"),
TargetObjects: []*string{},
Operations: []*string{
to.Ptr("all"),
},
},
},
},
},
}, 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 = armauthorization.RoleManagementPoliciesClientUpdateResponse{
// 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"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P180D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyPimOnlyModeRule{
// ID: to.Ptr("PIMOnlyMode_Admin_Assignment"),
// PimOnlyModeSettings: &armauthorization.PIMOnlyModeSettings{
// ExcludedAssignmentTypes: []*armauthorization.ExcludedPrincipalTypes{
// to.Ptr(armauthorization.ExcludedPrincipalTypesServicePrincipalsAsTarget),
// },
// Excludes: []*armauthorization.UsersOrServicePrincipalSet{
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeUser),
// DisplayName: to.Ptr("AdminUser1"),
// ID: to.Ptr("ec42a424-a0c0-4418-8788-d19bdeb03704"),
// },
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeGroup),
// DisplayName: to.Ptr("Admin Group1"),
// ID: to.Ptr("00029dfb-0218-4e7a-9a85-c15dc0c880bc"),
// },
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeServicePrincipal),
// DisplayName: to.Ptr("JIT Application"),
// ID: to.Ptr("0000103d-1fc2-4ac8-81de-71517765655c"),
// },
// },
// Mode: to.Ptr(armauthorization.PIMOnlyModeEnabled),
// },
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyPimOnlyModeRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// EnforcedSettings: []*string{
// to.Ptr("all"),
// },
// InheritableSettings: []*string{
// to.Ptr("all"),
// },
// Level: to.Ptr("Assignment"),
// TargetObjects: []*string{
// },
// Operations: []*string{
// to.Ptr("all"),
// },
// },
// },
// },
// 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.91+00:00"); 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"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P180D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
// },
// },
// }
}
Output:
Example (PatchRoleManagementPolicyToEnablePimOnlyMode) ¶
Generated from example definition: 2024-09-01-preview/PatchRoleManagementPolicyToEnablePIMOnlyMode.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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.RoleManagementPolicyPimOnlyModeRule{
ID: to.Ptr("PIMOnlyMode_Admin_Assignment"),
PimOnlyModeSettings: &armauthorization.PIMOnlyModeSettings{
ExcludedAssignmentTypes: []*armauthorization.ExcludedPrincipalTypes{
to.Ptr(armauthorization.ExcludedPrincipalTypesServicePrincipalsAsTarget),
},
Excludes: []*armauthorization.UsersOrServicePrincipalSet{
{
Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeUser),
ID: to.Ptr("ec42a424-a0c0-4418-8788-d19bdeb03704"),
},
{
Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeGroup),
ID: to.Ptr("00029dfb-0218-4e7a-9a85-c15dc0c880bc"),
},
{
Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeServicePrincipal),
ID: to.Ptr("0000103d-1fc2-4ac8-81de-71517765655c"),
},
},
Mode: to.Ptr(armauthorization.PIMOnlyModeEnabled),
},
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyPimOnlyModeRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
EnforcedSettings: []*string{
to.Ptr("all"),
},
InheritableSettings: []*string{
to.Ptr("all"),
},
Level: to.Ptr("Assignment"),
TargetObjects: []*string{},
Operations: []*string{
to.Ptr("all"),
},
},
},
},
},
}, 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 = armauthorization.RoleManagementPoliciesClientUpdateResponse{
// 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"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P180D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyPimOnlyModeRule{
// ID: to.Ptr("PIMOnlyMode_Admin_Assignment"),
// PimOnlyModeSettings: &armauthorization.PIMOnlyModeSettings{
// ExcludedAssignmentTypes: []*armauthorization.ExcludedPrincipalTypes{
// to.Ptr(armauthorization.ExcludedPrincipalTypesServicePrincipalsAsTarget),
// },
// Excludes: []*armauthorization.UsersOrServicePrincipalSet{
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeUser),
// DisplayName: to.Ptr("AdminUser1"),
// ID: to.Ptr("ec42a424-a0c0-4418-8788-d19bdeb03704"),
// },
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeGroup),
// DisplayName: to.Ptr("Admin Group1"),
// ID: to.Ptr("00029dfb-0218-4e7a-9a85-c15dc0c880bc"),
// },
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeServicePrincipal),
// DisplayName: to.Ptr("JIT Application"),
// ID: to.Ptr("0000103d-1fc2-4ac8-81de-71517765655c"),
// },
// },
// Mode: to.Ptr(armauthorization.PIMOnlyModeEnabled),
// },
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyPimOnlyModeRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// EnforcedSettings: []*string{
// to.Ptr("all"),
// },
// InheritableSettings: []*string{
// to.Ptr("all"),
// },
// Level: to.Ptr("Assignment"),
// TargetObjects: []*string{
// },
// Operations: []*string{
// to.Ptr("all"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyPimOnlyModeRule{
// ID: to.Ptr("PIMOnlyMode_Admin_Assignment"),
// PimOnlyModeSettings: &armauthorization.PIMOnlyModeSettings{
// ExcludedAssignmentTypes: []*armauthorization.ExcludedPrincipalTypes{
// to.Ptr(armauthorization.ExcludedPrincipalTypesServicePrincipalsAsTarget),
// },
// Excludes: []*armauthorization.UsersOrServicePrincipalSet{
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeUser),
// ID: to.Ptr("ec42a424-a0c0-4418-8788-d19bdeb03704"),
// },
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeGroup),
// ID: to.Ptr("00029dfb-0218-4e7a-9a85-c15dc0c880bc"),
// },
// {
// Type: to.Ptr(armauthorization.UsersOrServicePrincipalSetUserTypeServicePrincipal),
// ID: to.Ptr("0000103d-1fc2-4ac8-81de-71517765655c"),
// },
// },
// Mode: to.Ptr(armauthorization.PIMOnlyModeEnabled),
// },
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyPimOnlyModeRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// EnforcedSettings: []*string{
// to.Ptr("all"),
// },
// InheritableSettings: []*string{
// to.Ptr("all"),
// },
// Level: to.Ptr("Assignment"),
// TargetObjects: []*string{
// },
// Operations: []*string{
// to.Ptr("all"),
// },
// },
// },
// },
// 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.91+00:00"); 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"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P180D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// 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 {
// The response of a RoleManagementPolicy list operation.
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 {
// CONSTANT; The type of rule
// Field has constant value RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule, any specified value is ignored.
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; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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 {
// REQUIRED; The RoleManagementPolicyAssignment items on this page
Value []*RoleManagementPolicyAssignment
// The link to the next page of items
NextLink *string
}
RoleManagementPolicyAssignmentListResult - The response of a RoleManagementPolicyAssignment list operation.
func (RoleManagementPolicyAssignmentListResult) MarshalJSON ¶
func (r RoleManagementPolicyAssignmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyAssignmentListResult.
func (*RoleManagementPolicyAssignmentListResult) UnmarshalJSON ¶
func (r *RoleManagementPolicyAssignmentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyAssignmentListResult.
type RoleManagementPolicyAssignmentProperties ¶
type RoleManagementPolicyAssignmentProperties struct {
// The policy id role management policy assignment.
PolicyID *string
// The role definition of management policy assignment.
RoleDefinitionID *string
// The role management policy scope.
Scope *string
// READ-ONLY; The readonly computed rule applied to the policy.
EffectiveRules []RoleManagementPolicyRuleClassification
// READ-ONLY; Additional properties of scope, role definition and policy
PolicyAssignmentProperties *PolicyAssignmentProperties
}
RoleManagementPolicyAssignmentProperties - Role management policy assignment properties with scope.
func (RoleManagementPolicyAssignmentProperties) MarshalJSON ¶
func (r RoleManagementPolicyAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyAssignmentProperties.
func (*RoleManagementPolicyAssignmentProperties) UnmarshalJSON ¶
func (r *RoleManagementPolicyAssignmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyAssignmentProperties.
type RoleManagementPolicyAssignmentsClient ¶
type RoleManagementPolicyAssignmentsClient struct {
// contains filtered or unexported fields
}
RoleManagementPolicyAssignmentsClient contains the methods for the RoleManagementPolicyAssignments group. Don't use this type directly, use NewRoleManagementPolicyAssignmentsClient() instead.
func NewRoleManagementPolicyAssignmentsClient ¶
func NewRoleManagementPolicyAssignmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleManagementPolicyAssignmentsClient, error)
NewRoleManagementPolicyAssignmentsClient creates a new instance of RoleManagementPolicyAssignmentsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. 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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleManagementPolicyAssignmentName - The name of format {guid_guid} the role management policy assignment to get.
- parameters - Parameters for the role management policy assignment.
- options - RoleManagementPolicyAssignmentsClientCreateOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Create method.
Example ¶
Generated from example definition: 2024-09-01-preview/PutRoleManagementPolicyAssignment.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewRoleManagementPolicyAssignmentsClient().Create(ctx, "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368", "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", armauthorization.RoleManagementPolicyAssignment{
Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{
PolicyID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"),
RoleDefinitionID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleManagementPolicyAssignmentsClient) Delete ¶
func (client *RoleManagementPolicyAssignmentsClient) Delete(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, options *RoleManagementPolicyAssignmentsClientDeleteOptions) (RoleManagementPolicyAssignmentsClientDeleteResponse, error)
Delete - Delete a role management policy assignment If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- roleManagementPolicyAssignmentName - The name of format {guid_guid} the role management policy assignment to get.
- options - RoleManagementPolicyAssignmentsClientDeleteOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Delete method.
Example ¶
Generated from example definition: 2024-09-01-preview/DeleteRoleManagementPolicyAssignment.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, 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)
}
// 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 = armauthorization.RoleManagementPolicyAssignmentsClientDeleteResponse{
// }
}
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 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- 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: 2024-09-01-preview/GetRoleManagementPolicyAssignmentByName.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleManagementPolicyAssignmentsClientGetResponse{
// RoleManagementPolicyAssignment: &armauthorization.RoleManagementPolicyAssignment{
// Name: to.Ptr("b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
// Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicyAssignment"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
// Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{
// EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Eligibility"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// PolicyAssignmentProperties: &armauthorization.PolicyAssignmentProperties{
// Policy: &armauthorization.PolicyAssignmentPropertiesPolicy{
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"),
// LastModifiedBy: &armauthorization.Principal{
// DisplayName: to.Ptr("Admin"),
// },
// },
// RoleDefinition: &armauthorization.PolicyAssignmentPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("FHIR Data Converter"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
// },
// Scope: &armauthorization.PolicyAssignmentPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
// },
// },
// PolicyID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"),
// RoleDefinitionID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
// Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
// },
// },
// }
}
Output:
func (*RoleManagementPolicyAssignmentsClient) NewListForScopePager ¶
func (client *RoleManagementPolicyAssignmentsClient) NewListForScopePager(scope string, options *RoleManagementPolicyAssignmentsClientListForScopeOptions) *runtime.Pager[RoleManagementPolicyAssignmentsClientListForScopeResponse]
NewListForScopePager - Gets role management assignment policies for a resource scope.
Generated from API version 2024-09-01-preview
- scope - The fully qualified Azure Resource manager identifier of the resource.
- options - RoleManagementPolicyAssignmentsClientListForScopeOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.NewListForScopePager method.
Example ¶
Generated from example definition: 2024-09-01-preview/GetRoleManagementPolicyAssignmentByScope.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscriptionID>", 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 = armauthorization.RoleManagementPolicyAssignmentsClientListForScopeResponse{
// RoleManagementPolicyAssignmentListResult: armauthorization.RoleManagementPolicyAssignmentListResult{
// Value: []*armauthorization.RoleManagementPolicyAssignment{
// {
// Name: to.Ptr("b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
// Type: to.Ptr("Microsoft.Authorization/RoleManagementPolicyAssignment"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
// Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{
// EffectiveRules: []armauthorization.RoleManagementPolicyRuleClassification{
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Eligibility"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Eligibility"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Eligibility"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_Admin_Assignment"),
// IsExpirationRequired: to.Ptr(false),
// MaximumDuration: to.Ptr("P90D"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_Admin_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("Admin"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyApprovalRule{
// ID: to.Ptr("Approval_EndUser_Assignment"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule),
// 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),
// },
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyAuthenticationContextRule{
// ClaimValue: to.Ptr(""),
// ID: to.Ptr("AuthenticationContext_EndUser_Assignment"),
// IsEnabled: to.Ptr(false),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyEnablementRule{
// EnabledRules: []*armauthorization.EnablementRules{
// to.Ptr(armauthorization.EnablementRulesMultiFactorAuthentication),
// to.Ptr(armauthorization.EnablementRulesJustification),
// to.Ptr(armauthorization.EnablementRulesTicketing),
// },
// 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"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyExpirationRule{
// ID: to.Ptr("Expiration_EndUser_Assignment"),
// IsExpirationRequired: to.Ptr(true),
// MaximumDuration: to.Ptr("PT7H"),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Admin_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Requestor_EndUser_Assignment"),
// 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),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// &armauthorization.RoleManagementPolicyNotificationRule{
// ID: to.Ptr("Notification_Approver_EndUser_Assignment"),
// IsDefaultRecipientsEnabled: to.Ptr(true),
// NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
// NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
// RecipientType: to.Ptr(armauthorization.RecipientTypeApprover),
// RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
// Target: &armauthorization.RoleManagementPolicyRuleTarget{
// Caller: to.Ptr("EndUser"),
// Level: to.Ptr("Assignment"),
// Operations: []*string{
// to.Ptr("All"),
// },
// },
// },
// },
// PolicyAssignmentProperties: &armauthorization.PolicyAssignmentProperties{
// Policy: &armauthorization.PolicyAssignmentPropertiesPolicy{
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"),
// LastModifiedBy: &armauthorization.Principal{
// DisplayName: to.Ptr("Admin"),
// },
// },
// RoleDefinition: &armauthorization.PolicyAssignmentPropertiesRoleDefinition{
// Type: to.Ptr("BuiltInRole"),
// DisplayName: to.Ptr("FHIR Data Converter"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
// },
// Scope: &armauthorization.PolicyAssignmentPropertiesScope{
// Type: to.Ptr("subscription"),
// DisplayName: to.Ptr("Pay-As-You-Go"),
// ID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
// },
// },
// PolicyID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"),
// RoleDefinitionID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
// Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
// },
// },
// },
// },
// }
}
}
Output:
type RoleManagementPolicyAssignmentsClientCreateOptions ¶
type RoleManagementPolicyAssignmentsClientCreateOptions struct {
}
RoleManagementPolicyAssignmentsClientCreateOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Create method.
type RoleManagementPolicyAssignmentsClientCreateResponse ¶
type RoleManagementPolicyAssignmentsClientCreateResponse struct {
// Role management policy
RoleManagementPolicyAssignment
}
RoleManagementPolicyAssignmentsClientCreateResponse contains the response from method RoleManagementPolicyAssignmentsClient.Create.
type RoleManagementPolicyAssignmentsClientDeleteOptions ¶
type RoleManagementPolicyAssignmentsClientDeleteOptions struct {
}
RoleManagementPolicyAssignmentsClientDeleteOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Delete method.
type RoleManagementPolicyAssignmentsClientDeleteResponse ¶
type RoleManagementPolicyAssignmentsClientDeleteResponse struct {
}
RoleManagementPolicyAssignmentsClientDeleteResponse contains the response from method RoleManagementPolicyAssignmentsClient.Delete.
type RoleManagementPolicyAssignmentsClientGetOptions ¶
type RoleManagementPolicyAssignmentsClientGetOptions struct {
}
RoleManagementPolicyAssignmentsClientGetOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Get method.
type RoleManagementPolicyAssignmentsClientGetResponse ¶
type RoleManagementPolicyAssignmentsClientGetResponse struct {
// Role management policy
RoleManagementPolicyAssignment
}
RoleManagementPolicyAssignmentsClientGetResponse contains the response from method RoleManagementPolicyAssignmentsClient.Get.
type RoleManagementPolicyAssignmentsClientListForScopeOptions ¶
type RoleManagementPolicyAssignmentsClientListForScopeOptions struct {
}
RoleManagementPolicyAssignmentsClientListForScopeOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.NewListForScopePager method.
type RoleManagementPolicyAssignmentsClientListForScopeResponse ¶
type RoleManagementPolicyAssignmentsClientListForScopeResponse struct {
// The response of a RoleManagementPolicyAssignment list operation.
RoleManagementPolicyAssignmentListResult
}
RoleManagementPolicyAssignmentsClientListForScopeResponse contains the response from method RoleManagementPolicyAssignmentsClient.NewListForScopePager.
type RoleManagementPolicyAuthenticationContextRule ¶
type RoleManagementPolicyAuthenticationContextRule struct {
// CONSTANT; The type of rule
// Field has constant value RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule, any specified value
// is ignored.
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 {
// CONSTANT; The type of rule
// Field has constant value RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule, any specified value is ignored.
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 {
// CONSTANT; The type of rule
// Field has constant value RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule, any specified value is ignored.
RuleType *RoleManagementPolicyRuleType
// The members not restricted by expiration rule.
ExceptionMembers []*UserSet
// 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 {
// REQUIRED; The RoleManagementPolicy items on this page
Value []*RoleManagementPolicy
// The link to the next page of items
NextLink *string
}
RoleManagementPolicyListResult - The response of a RoleManagementPolicy list operation.
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 {
// CONSTANT; The type of rule
// Field has constant value RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule, any specified value is ignored.
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 RoleManagementPolicyPimOnlyModeRule ¶
type RoleManagementPolicyPimOnlyModeRule struct {
// CONSTANT; The type of rule
// Field has constant value RoleManagementPolicyRuleTypeRoleManagementPolicyPimOnlyModeRule, any specified value is ignored.
RuleType *RoleManagementPolicyRuleType
// The id of the rule.
ID *string
// The PIM Only Mode settings
PimOnlyModeSettings *PIMOnlyModeSettings
// The target of the current rule.
Target *RoleManagementPolicyRuleTarget
}
RoleManagementPolicyPimOnlyModeRule - The role management policy PIM only mode rule.
func (*RoleManagementPolicyPimOnlyModeRule) GetRoleManagementPolicyRule ¶
func (r *RoleManagementPolicyPimOnlyModeRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule
GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyPimOnlyModeRule.
func (RoleManagementPolicyPimOnlyModeRule) MarshalJSON ¶
func (r RoleManagementPolicyPimOnlyModeRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyPimOnlyModeRule.
func (*RoleManagementPolicyPimOnlyModeRule) UnmarshalJSON ¶
func (r *RoleManagementPolicyPimOnlyModeRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyPimOnlyModeRule.
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, *RoleManagementPolicyPimOnlyModeRule, *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 - RoleManagementPolicyApprovalRule RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule RoleManagementPolicyRuleType = "RoleManagementPolicyApprovalRule" // RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule - RoleManagementPolicyAuthenticationContextRule RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule RoleManagementPolicyRuleType = "RoleManagementPolicyAuthenticationContextRule" // RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule - RoleManagementPolicyEnablementRule RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule RoleManagementPolicyRuleType = "RoleManagementPolicyEnablementRule" // RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule - RoleManagementPolicyExpirationRule RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule RoleManagementPolicyRuleType = "RoleManagementPolicyExpirationRule" // RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule - RoleManagementPolicyNotificationRule RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule RoleManagementPolicyRuleType = "RoleManagementPolicyNotificationRule" // RoleManagementPolicyRuleTypeRoleManagementPolicyPimOnlyModeRule - RoleManagementPolicyPimOnlyModeRule RoleManagementPolicyRuleTypeRoleManagementPolicyPimOnlyModeRule RoleManagementPolicyRuleType = "RoleManagementPolicyPimOnlyModeRule" )
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// Paged collection of AccessReviewHistoryInstance items
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// The response of a AccessReviewHistoryDefinition list operation.
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// The response of a AccessReviewContactedReviewer list operation.
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// The response of a AccessReviewDecision list operation.
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// The response of a AccessReviewInstance list operation.
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// The response of a AccessReviewScheduleDefinition list operation.
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 - High SeverityLevelHigh SeverityLevel = "High" // SeverityLevelLow - Low SeverityLevelLow SeverityLevel = "Low" // SeverityLevelMedium - Medium 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 - Accepted StatusAccepted Status = "Accepted" // StatusAdminApproved - AdminApproved StatusAdminApproved Status = "AdminApproved" // StatusAdminDenied - AdminDenied StatusAdminDenied Status = "AdminDenied" // StatusCanceled - Canceled StatusCanceled Status = "Canceled" // StatusDenied - Denied StatusDenied Status = "Denied" // StatusFailed - Failed StatusFailed Status = "Failed" // StatusFailedAsResourceIsLocked - FailedAsResourceIsLocked StatusFailedAsResourceIsLocked Status = "FailedAsResourceIsLocked" // StatusGranted - Granted StatusGranted Status = "Granted" // StatusInvalid - Invalid StatusInvalid Status = "Invalid" // StatusPendingAdminDecision - PendingAdminDecision StatusPendingAdminDecision Status = "PendingAdminDecision" // StatusPendingApproval - PendingApproval StatusPendingApproval Status = "PendingApproval" // StatusPendingApprovalProvisioning - PendingApprovalProvisioning StatusPendingApprovalProvisioning Status = "PendingApprovalProvisioning" // StatusPendingEvaluation - PendingEvaluation StatusPendingEvaluation Status = "PendingEvaluation" // StatusPendingExternalProvisioning - PendingExternalProvisioning StatusPendingExternalProvisioning Status = "PendingExternalProvisioning" // StatusPendingProvisioning - PendingProvisioning StatusPendingProvisioning Status = "PendingProvisioning" // StatusPendingRevocation - PendingRevocation StatusPendingRevocation Status = "PendingRevocation" // StatusPendingScheduleCreation - PendingScheduleCreation StatusPendingScheduleCreation Status = "PendingScheduleCreation" // StatusProvisioned - Provisioned StatusProvisioned Status = "Provisioned" // StatusProvisioningStarted - ProvisioningStarted StatusProvisioningStarted Status = "ProvisioningStarted" // StatusRevoked - Revoked StatusRevoked Status = "Revoked" // StatusScheduleCreated - ScheduleCreated StatusScheduleCreated Status = "ScheduleCreated" // StatusTimedOut - TimedOut StatusTimedOut Status = "TimedOut" )
func PossibleStatusValues ¶
func PossibleStatusValues() []Status
PossibleStatusValues returns the possible values for the Status const type.
type SystemData ¶
type SystemData struct {
// The timestamp of resource creation (UTC).
CreatedAt *time.Time
// The identity that created the resource.
CreatedBy *string
// The type of identity that created the resource.
CreatedByType *CreatedByType
// The timestamp of resource last modification (UTC)
LastModifiedAt *time.Time
// The identity that last modified the resource.
LastModifiedBy *string
// The type of identity that last modified the resource.
LastModifiedByType *CreatedByType
}
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
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 - Contains optional client configuration. 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
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
func main() {
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 {
// The response of a AccessReviewContactedReviewer list operation.
AccessReviewContactedReviewerListResult
}
TenantLevelAccessReviewInstanceContactedReviewersClientListResponse contains the response from method TenantLevelAccessReviewInstanceContactedReviewersClient.NewListPager.
type TooManyOwnersAssignedToResourceAlertConfigurationProperties ¶
type TooManyOwnersAssignedToResourceAlertConfigurationProperties struct {
// CONSTANT; The alert configuration type.
// Field has constant value "TooManyOwnersAssignedToResourceAlertConfiguration", any specified value is ignored.
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 {
// CONSTANT; The alert configuration type.
// Field has constant value "TooManyPermanentOwnersAssignedToResourceAlertConfiguration", any specified value is ignored.
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 UsersOrServicePrincipalSet ¶
type UsersOrServicePrincipalSet struct {
// The display Name of the entity.
DisplayName *string
// The object id of the entity.
ID *string
// The type of user.
Type *UsersOrServicePrincipalSetUserType
}
UsersOrServicePrincipalSet - The detail of a subject.
func (UsersOrServicePrincipalSet) MarshalJSON ¶
func (u UsersOrServicePrincipalSet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsersOrServicePrincipalSet.
func (*UsersOrServicePrincipalSet) UnmarshalJSON ¶
func (u *UsersOrServicePrincipalSet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsersOrServicePrincipalSet.
type UsersOrServicePrincipalSetUserType ¶
type UsersOrServicePrincipalSetUserType string
UsersOrServicePrincipalSetUserType - The type of user.
const ( // UsersOrServicePrincipalSetUserTypeGroup - Group UsersOrServicePrincipalSetUserTypeGroup UsersOrServicePrincipalSetUserType = "Group" // UsersOrServicePrincipalSetUserTypeServicePrincipal - ServicePrincipal UsersOrServicePrincipalSetUserTypeServicePrincipal UsersOrServicePrincipalSetUserType = "ServicePrincipal" // UsersOrServicePrincipalSetUserTypeUser - User UsersOrServicePrincipalSetUserTypeUser UsersOrServicePrincipalSetUserType = "User" )
func PossibleUsersOrServicePrincipalSetUserTypeValues ¶
func PossibleUsersOrServicePrincipalSetUserTypeValues() []UsersOrServicePrincipalSetUserType
PossibleUsersOrServicePrincipalSetUserTypeValues returns the possible values for the UsersOrServicePrincipalSetUserType const type.
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
- attributenamespaces_client.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
- responses.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
- version.go