Documentation
¶
Index ¶
- type ApprovalMode
- type ApprovalSettings
- type ApprovalStage
- type AssignmentType
- type ClassicAdministrator
- type ClassicAdministratorListResult
- type ClassicAdministratorProperties
- type ClassicAdministratorsClient
- type ClassicAdministratorsClientListOptions
- type ClassicAdministratorsClientListResponse
- type CloudError
- type CloudErrorBody
- type EligibleChildResource
- type EligibleChildResourcesClient
- type EligibleChildResourcesClientGetOptions
- type EligibleChildResourcesClientGetResponse
- type EligibleChildResourcesListResult
- type EnablementRules
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type ExpandedProperties
- type ExpandedPropertiesPrincipal
- type ExpandedPropertiesRoleDefinition
- type ExpandedPropertiesScope
- type GlobalAdministratorClient
- type GlobalAdministratorClientElevateAccessOptions
- type GlobalAdministratorClientElevateAccessResponse
- type MemberType
- type NotificationDeliveryMechanism
- type NotificationLevel
- type Permission
- type PermissionAutoGenerated
- type PermissionGetResult
- type PermissionsClient
- func (client *PermissionsClient) NewListForResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[PermissionsClientListForResourceGroupResponse]
- func (client *PermissionsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, ...) *runtime.Pager[PermissionsClientListForResourceResponse]
- type PermissionsClientListForResourceGroupOptions
- type PermissionsClientListForResourceGroupResponse
- type PermissionsClientListForResourceOptions
- type PermissionsClientListForResourceResponse
- type PolicyAssignmentProperties
- type PolicyAssignmentPropertiesPolicy
- type PolicyAssignmentPropertiesRoleDefinition
- type PolicyAssignmentPropertiesScope
- type PolicyProperties
- type PolicyPropertiesScope
- type Principal
- type PrincipalType
- type ProviderOperation
- type ProviderOperationsMetadata
- type ProviderOperationsMetadataClient
- func (client *ProviderOperationsMetadataClient) Get(ctx context.Context, resourceProviderNamespace string, ...) (ProviderOperationsMetadataClientGetResponse, error)
- func (client *ProviderOperationsMetadataClient) NewListPager(options *ProviderOperationsMetadataClientListOptions) *runtime.Pager[ProviderOperationsMetadataClientListResponse]
- type ProviderOperationsMetadataClientGetOptions
- type ProviderOperationsMetadataClientGetResponse
- type ProviderOperationsMetadataClientListOptions
- type ProviderOperationsMetadataClientListResponse
- type ProviderOperationsMetadataListResult
- type RecipientType
- type RequestType
- type ResourceType
- type RoleAssignment
- type RoleAssignmentCreateParameters
- type RoleAssignmentFilter
- type RoleAssignmentListResult
- type RoleAssignmentProperties
- type RoleAssignmentPropertiesWithScope
- type RoleAssignmentSchedule
- type RoleAssignmentScheduleFilter
- type RoleAssignmentScheduleInstance
- type RoleAssignmentScheduleInstanceFilter
- type RoleAssignmentScheduleInstanceListResult
- type RoleAssignmentScheduleInstanceProperties
- type RoleAssignmentScheduleInstancesClient
- func (client *RoleAssignmentScheduleInstancesClient) Get(ctx context.Context, scope string, roleAssignmentScheduleInstanceName string, ...) (RoleAssignmentScheduleInstancesClientGetResponse, error)
- func (client *RoleAssignmentScheduleInstancesClient) NewListForScopePager(scope string, ...) *runtime.Pager[RoleAssignmentScheduleInstancesClientListForScopeResponse]
- type RoleAssignmentScheduleInstancesClientGetOptions
- type RoleAssignmentScheduleInstancesClientGetResponse
- type RoleAssignmentScheduleInstancesClientListForScopeOptions
- type RoleAssignmentScheduleInstancesClientListForScopeResponse
- type RoleAssignmentScheduleListResult
- type RoleAssignmentScheduleProperties
- type RoleAssignmentScheduleRequest
- type RoleAssignmentScheduleRequestFilter
- type RoleAssignmentScheduleRequestListResult
- type RoleAssignmentScheduleRequestProperties
- type RoleAssignmentScheduleRequestPropertiesScheduleInfo
- type RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration
- type RoleAssignmentScheduleRequestPropertiesTicketInfo
- type RoleAssignmentScheduleRequestsClient
- func (client *RoleAssignmentScheduleRequestsClient) Cancel(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, ...) (RoleAssignmentScheduleRequestsClientCancelResponse, error)
- func (client *RoleAssignmentScheduleRequestsClient) Create(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, ...) (RoleAssignmentScheduleRequestsClientCreateResponse, error)
- func (client *RoleAssignmentScheduleRequestsClient) Get(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, ...) (RoleAssignmentScheduleRequestsClientGetResponse, error)
- func (client *RoleAssignmentScheduleRequestsClient) NewListForScopePager(scope string, options *RoleAssignmentScheduleRequestsClientListForScopeOptions) *runtime.Pager[RoleAssignmentScheduleRequestsClientListForScopeResponse]
- func (client *RoleAssignmentScheduleRequestsClient) Validate(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, ...) (RoleAssignmentScheduleRequestsClientValidateResponse, error)
- type RoleAssignmentScheduleRequestsClientCancelOptions
- type RoleAssignmentScheduleRequestsClientCancelResponse
- type RoleAssignmentScheduleRequestsClientCreateOptions
- type RoleAssignmentScheduleRequestsClientCreateResponse
- type RoleAssignmentScheduleRequestsClientGetOptions
- type RoleAssignmentScheduleRequestsClientGetResponse
- type RoleAssignmentScheduleRequestsClientListForScopeOptions
- type RoleAssignmentScheduleRequestsClientListForScopeResponse
- type RoleAssignmentScheduleRequestsClientValidateOptions
- type RoleAssignmentScheduleRequestsClientValidateResponse
- type RoleAssignmentSchedulesClient
- func (client *RoleAssignmentSchedulesClient) Get(ctx context.Context, scope string, roleAssignmentScheduleName string, ...) (RoleAssignmentSchedulesClientGetResponse, error)
- func (client *RoleAssignmentSchedulesClient) NewListForScopePager(scope string, options *RoleAssignmentSchedulesClientListForScopeOptions) *runtime.Pager[RoleAssignmentSchedulesClientListForScopeResponse]
- type RoleAssignmentSchedulesClientGetOptions
- type RoleAssignmentSchedulesClientGetResponse
- type RoleAssignmentSchedulesClientListForScopeOptions
- type RoleAssignmentSchedulesClientListForScopeResponse
- type RoleAssignmentsClient
- func (client *RoleAssignmentsClient) Create(ctx context.Context, scope string, roleAssignmentName string, ...) (RoleAssignmentsClientCreateResponse, error)
- func (client *RoleAssignmentsClient) CreateByID(ctx context.Context, roleAssignmentID string, ...) (RoleAssignmentsClientCreateByIDResponse, error)
- func (client *RoleAssignmentsClient) Delete(ctx context.Context, scope string, roleAssignmentName string, ...) (RoleAssignmentsClientDeleteResponse, error)
- func (client *RoleAssignmentsClient) DeleteByID(ctx context.Context, roleAssignmentID string, ...) (RoleAssignmentsClientDeleteByIDResponse, error)
- func (client *RoleAssignmentsClient) Get(ctx context.Context, scope string, roleAssignmentName string, ...) (RoleAssignmentsClientGetResponse, error)
- func (client *RoleAssignmentsClient) GetByID(ctx context.Context, roleAssignmentID string, ...) (RoleAssignmentsClientGetByIDResponse, error)
- func (client *RoleAssignmentsClient) NewListForResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[RoleAssignmentsClientListForResourceGroupResponse]
- func (client *RoleAssignmentsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, ...) *runtime.Pager[RoleAssignmentsClientListForResourceResponse]
- func (client *RoleAssignmentsClient) NewListForScopePager(scope string, options *RoleAssignmentsClientListForScopeOptions) *runtime.Pager[RoleAssignmentsClientListForScopeResponse]
- func (client *RoleAssignmentsClient) NewListPager(options *RoleAssignmentsClientListOptions) *runtime.Pager[RoleAssignmentsClientListResponse]
- 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 RoleAssignmentsClientListOptions
- type RoleAssignmentsClientListResponse
- type RoleDefinition
- type RoleDefinitionFilter
- type RoleDefinitionListResult
- type RoleDefinitionProperties
- type RoleDefinitionsClient
- func (client *RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, scope string, roleDefinitionID string, ...) (RoleDefinitionsClientCreateOrUpdateResponse, error)
- func (client *RoleDefinitionsClient) Delete(ctx context.Context, scope string, roleDefinitionID string, ...) (RoleDefinitionsClientDeleteResponse, error)
- func (client *RoleDefinitionsClient) Get(ctx context.Context, scope string, roleDefinitionID string, ...) (RoleDefinitionsClientGetResponse, error)
- func (client *RoleDefinitionsClient) GetByID(ctx context.Context, roleDefinitionID string, ...) (RoleDefinitionsClientGetByIDResponse, error)
- func (client *RoleDefinitionsClient) NewListPager(scope string, options *RoleDefinitionsClientListOptions) *runtime.Pager[RoleDefinitionsClientListResponse]
- type RoleDefinitionsClientCreateOrUpdateOptions
- type RoleDefinitionsClientCreateOrUpdateResponse
- type RoleDefinitionsClientDeleteOptions
- type RoleDefinitionsClientDeleteResponse
- type RoleDefinitionsClientGetByIDOptions
- type RoleDefinitionsClientGetByIDResponse
- type RoleDefinitionsClientGetOptions
- type RoleDefinitionsClientGetResponse
- type RoleDefinitionsClientListOptions
- type RoleDefinitionsClientListResponse
- type RoleEligibilitySchedule
- type RoleEligibilityScheduleFilter
- type RoleEligibilityScheduleInstance
- type RoleEligibilityScheduleInstanceFilter
- type RoleEligibilityScheduleInstanceListResult
- type RoleEligibilityScheduleInstanceProperties
- type RoleEligibilityScheduleInstancesClient
- func (client *RoleEligibilityScheduleInstancesClient) Get(ctx context.Context, scope string, roleEligibilityScheduleInstanceName string, ...) (RoleEligibilityScheduleInstancesClientGetResponse, error)
- func (client *RoleEligibilityScheduleInstancesClient) NewListForScopePager(scope string, ...) *runtime.Pager[RoleEligibilityScheduleInstancesClientListForScopeResponse]
- type RoleEligibilityScheduleInstancesClientGetOptions
- type RoleEligibilityScheduleInstancesClientGetResponse
- type RoleEligibilityScheduleInstancesClientListForScopeOptions
- type RoleEligibilityScheduleInstancesClientListForScopeResponse
- type RoleEligibilityScheduleListResult
- type RoleEligibilityScheduleProperties
- type RoleEligibilityScheduleRequest
- type RoleEligibilityScheduleRequestFilter
- type RoleEligibilityScheduleRequestListResult
- type RoleEligibilityScheduleRequestProperties
- type RoleEligibilityScheduleRequestPropertiesScheduleInfo
- type RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration
- type RoleEligibilityScheduleRequestPropertiesTicketInfo
- type RoleEligibilityScheduleRequestsClient
- func (client *RoleEligibilityScheduleRequestsClient) Cancel(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, ...) (RoleEligibilityScheduleRequestsClientCancelResponse, error)
- func (client *RoleEligibilityScheduleRequestsClient) Create(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, ...) (RoleEligibilityScheduleRequestsClientCreateResponse, error)
- func (client *RoleEligibilityScheduleRequestsClient) Get(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, ...) (RoleEligibilityScheduleRequestsClientGetResponse, error)
- func (client *RoleEligibilityScheduleRequestsClient) NewListForScopePager(scope string, ...) *runtime.Pager[RoleEligibilityScheduleRequestsClientListForScopeResponse]
- func (client *RoleEligibilityScheduleRequestsClient) Validate(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, ...) (RoleEligibilityScheduleRequestsClientValidateResponse, error)
- type RoleEligibilityScheduleRequestsClientCancelOptions
- type RoleEligibilityScheduleRequestsClientCancelResponse
- type RoleEligibilityScheduleRequestsClientCreateOptions
- type RoleEligibilityScheduleRequestsClientCreateResponse
- type RoleEligibilityScheduleRequestsClientGetOptions
- type RoleEligibilityScheduleRequestsClientGetResponse
- type RoleEligibilityScheduleRequestsClientListForScopeOptions
- type RoleEligibilityScheduleRequestsClientListForScopeResponse
- type RoleEligibilityScheduleRequestsClientValidateOptions
- type RoleEligibilityScheduleRequestsClientValidateResponse
- type RoleEligibilitySchedulesClient
- func (client *RoleEligibilitySchedulesClient) Get(ctx context.Context, scope string, roleEligibilityScheduleName string, ...) (RoleEligibilitySchedulesClientGetResponse, error)
- func (client *RoleEligibilitySchedulesClient) NewListForScopePager(scope string, options *RoleEligibilitySchedulesClientListForScopeOptions) *runtime.Pager[RoleEligibilitySchedulesClientListForScopeResponse]
- type RoleEligibilitySchedulesClientGetOptions
- type RoleEligibilitySchedulesClientGetResponse
- type RoleEligibilitySchedulesClientListForScopeOptions
- type RoleEligibilitySchedulesClientListForScopeResponse
- type RoleManagementPoliciesClient
- func (client *RoleManagementPoliciesClient) Delete(ctx context.Context, scope string, roleManagementPolicyName string, ...) (RoleManagementPoliciesClientDeleteResponse, error)
- func (client *RoleManagementPoliciesClient) Get(ctx context.Context, scope string, roleManagementPolicyName string, ...) (RoleManagementPoliciesClientGetResponse, error)
- func (client *RoleManagementPoliciesClient) NewListForScopePager(scope string, options *RoleManagementPoliciesClientListForScopeOptions) *runtime.Pager[RoleManagementPoliciesClientListForScopeResponse]
- func (client *RoleManagementPoliciesClient) Update(ctx context.Context, scope string, roleManagementPolicyName string, ...) (RoleManagementPoliciesClientUpdateResponse, error)
- type RoleManagementPoliciesClientDeleteOptions
- type RoleManagementPoliciesClientDeleteResponse
- type RoleManagementPoliciesClientGetOptions
- type RoleManagementPoliciesClientGetResponse
- type RoleManagementPoliciesClientListForScopeOptions
- type RoleManagementPoliciesClientListForScopeResponse
- type RoleManagementPoliciesClientUpdateOptions
- type RoleManagementPoliciesClientUpdateResponse
- type RoleManagementPolicy
- type RoleManagementPolicyApprovalRule
- type RoleManagementPolicyAssignment
- type RoleManagementPolicyAssignmentListResult
- type RoleManagementPolicyAssignmentProperties
- type RoleManagementPolicyAssignmentsClient
- func (client *RoleManagementPolicyAssignmentsClient) Create(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, ...) (RoleManagementPolicyAssignmentsClientCreateResponse, error)
- func (client *RoleManagementPolicyAssignmentsClient) Delete(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, ...) (RoleManagementPolicyAssignmentsClientDeleteResponse, error)
- func (client *RoleManagementPolicyAssignmentsClient) Get(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, ...) (RoleManagementPolicyAssignmentsClientGetResponse, error)
- func (client *RoleManagementPolicyAssignmentsClient) NewListForScopePager(scope string, ...) *runtime.Pager[RoleManagementPolicyAssignmentsClientListForScopeResponse]
- type RoleManagementPolicyAssignmentsClientCreateOptions
- type RoleManagementPolicyAssignmentsClientCreateResponse
- type RoleManagementPolicyAssignmentsClientDeleteOptions
- type RoleManagementPolicyAssignmentsClientDeleteResponse
- type RoleManagementPolicyAssignmentsClientGetOptions
- type RoleManagementPolicyAssignmentsClientGetResponse
- type RoleManagementPolicyAssignmentsClientListForScopeOptions
- type RoleManagementPolicyAssignmentsClientListForScopeResponse
- type RoleManagementPolicyAuthenticationContextRule
- type RoleManagementPolicyEnablementRule
- type RoleManagementPolicyExpirationRule
- type RoleManagementPolicyListResult
- type RoleManagementPolicyNotificationRule
- type RoleManagementPolicyProperties
- type RoleManagementPolicyRule
- type RoleManagementPolicyRuleClassification
- type RoleManagementPolicyRuleTarget
- type RoleManagementPolicyRuleType
- type Status
- type Type
- type UserSet
- type UserType
Examples ¶
- ClassicAdministratorsClient.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
- RoleAssignmentsClient.Delete
- RoleAssignmentsClient.Get
- RoleAssignmentsClient.NewListForResourceGroupPager
- RoleAssignmentsClient.NewListForResourcePager
- RoleAssignmentsClient.NewListForScopePager
- RoleAssignmentsClient.NewListPager
- RoleDefinitionsClient.CreateOrUpdate
- RoleDefinitionsClient.Delete
- RoleDefinitionsClient.Get
- 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
- RoleManagementPolicyAssignmentsClient.Create
- RoleManagementPolicyAssignmentsClient.Delete
- RoleManagementPolicyAssignmentsClient.Get
- RoleManagementPolicyAssignmentsClient.NewListForScopePager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalMode ¶
type ApprovalMode string
ApprovalMode - The type of rule
const ( ApprovalModeNoApproval ApprovalMode = "NoApproval" ApprovalModeParallel ApprovalMode = "Parallel" ApprovalModeSerial ApprovalMode = "Serial" ApprovalModeSingleStage ApprovalMode = "SingleStage" )
func PossibleApprovalModeValues ¶
func PossibleApprovalModeValues() []ApprovalMode
PossibleApprovalModeValues returns the possible values for the ApprovalMode const type.
type ApprovalSettings ¶
type ApprovalSettings struct {
// The type of rule
ApprovalMode *ApprovalMode `json:"approvalMode,omitempty"`
// The approval stages of the request.
ApprovalStages []*ApprovalStage `json:"approvalStages,omitempty"`
// Determines whether approval is required or not.
IsApprovalRequired *bool `json:"isApprovalRequired,omitempty"`
// Determines whether approval is required for assignment extension.
IsApprovalRequiredForExtension *bool `json:"isApprovalRequiredForExtension,omitempty"`
// Determine whether requestor justification is required.
IsRequestorJustificationRequired *bool `json:"isRequestorJustificationRequired,omitempty"`
}
ApprovalSettings - The approval settings.
func (ApprovalSettings) MarshalJSON ¶
func (a ApprovalSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApprovalSettings.
type ApprovalStage ¶
type ApprovalStage struct {
// The time in days when approval request would be timed out
ApprovalStageTimeOutInDays *int32 `json:"approvalStageTimeOutInDays,omitempty"`
// The escalation approver of the request.
EscalationApprovers []*UserSet `json:"escalationApprovers,omitempty"`
// The time in minutes when the approval request would be escalated if the primary approver does not approve
EscalationTimeInMinutes *int32 `json:"escalationTimeInMinutes,omitempty"`
// Determines whether approver need to provide justification for his decision.
IsApproverJustificationRequired *bool `json:"isApproverJustificationRequired,omitempty"`
// The value determine whether escalation feature is enabled.
IsEscalationEnabled *bool `json:"isEscalationEnabled,omitempty"`
// The primary approver of the request.
PrimaryApprovers []*UserSet `json:"primaryApprovers,omitempty"`
}
ApprovalStage - The approval stage.
func (ApprovalStage) MarshalJSON ¶
func (a ApprovalStage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApprovalStage.
type AssignmentType ¶
type AssignmentType string
AssignmentType - Assignment type of the role assignment schedule
const ( AssignmentTypeActivated AssignmentType = "Activated" AssignmentTypeAssigned AssignmentType = "Assigned" )
func PossibleAssignmentTypeValues ¶
func PossibleAssignmentTypeValues() []AssignmentType
PossibleAssignmentTypeValues returns the possible values for the AssignmentType const type.
type ClassicAdministrator ¶ added in v1.0.0
type ClassicAdministrator struct {
// The ID of the administrator.
ID *string `json:"id,omitempty"`
// The name of the administrator.
Name *string `json:"name,omitempty"`
// Properties for the classic administrator.
Properties *ClassicAdministratorProperties `json:"properties,omitempty"`
// The type of the administrator.
Type *string `json:"type,omitempty"`
}
ClassicAdministrator - Classic Administrators
type ClassicAdministratorListResult ¶ added in v1.0.0
type ClassicAdministratorListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// An array of administrators.
Value []*ClassicAdministrator `json:"value,omitempty"`
}
ClassicAdministratorListResult - ClassicAdministrator list result information.
type ClassicAdministratorProperties ¶ added in v1.0.0
type ClassicAdministratorProperties struct {
// The email address of the administrator.
EmailAddress *string `json:"emailAddress,omitempty"`
// The role of the administrator.
Role *string `json:"role,omitempty"`
}
ClassicAdministratorProperties - Classic Administrator properties.
type ClassicAdministratorsClient ¶ added in v1.0.0
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 ¶ added in v1.0.0
func NewClassicAdministratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClassicAdministratorsClient, error)
NewClassicAdministratorsClient creates a new instance of ClassicAdministratorsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ClassicAdministratorsClient) NewListPager ¶ added in v1.0.0
func (client *ClassicAdministratorsClient) NewListPager(options *ClassicAdministratorsClientListOptions) *runtime.Pager[ClassicAdministratorsClientListResponse]
NewListPager - Gets service administrator, account administrator, and co-administrators for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 options - ClassicAdministratorsClientListOptions contains the optional parameters for the ClassicAdministratorsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetClassicAdministrators.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewClassicAdministratorsClient("subId", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(nil)
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type ClassicAdministratorsClientListOptions ¶ added in v1.0.0
type ClassicAdministratorsClientListOptions struct {
}
ClassicAdministratorsClientListOptions contains the optional parameters for the ClassicAdministratorsClient.List method.
type ClassicAdministratorsClientListResponse ¶ added in v1.0.0
type ClassicAdministratorsClientListResponse struct {
ClassicAdministratorListResult
}
ClassicAdministratorsClientListResponse contains the response from method ClassicAdministratorsClient.List.
type CloudError ¶
type CloudError struct {
// An error response from the service.
Error *CloudErrorBody `json:"error,omitempty"`
}
CloudError - An error response from the service.
type CloudErrorBody ¶
type CloudErrorBody struct {
// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
Code *string `json:"code,omitempty"`
// A message describing the error, intended to be suitable for display in a user interface.
Message *string `json:"message,omitempty"`
}
CloudErrorBody - An error response from the service.
type EligibleChildResource ¶
type EligibleChildResource struct {
// READ-ONLY; The resource scope Id.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The resource name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The resource type.
Type *string `json:"type,omitempty" azure:"ro"`
}
EligibleChildResource - Eligible child resource
type EligibleChildResourcesClient ¶
type EligibleChildResourcesClient struct {
// contains filtered or unexported fields
}
EligibleChildResourcesClient contains the methods for the EligibleChildResources group. Don't use this type directly, use NewEligibleChildResourcesClient() instead.
func NewEligibleChildResourcesClient ¶
func NewEligibleChildResourcesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EligibleChildResourcesClient, error)
NewEligibleChildResourcesClient creates a new instance of EligibleChildResourcesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*EligibleChildResourcesClient) NewGetPager ¶ added in v1.0.0
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. options - EligibleChildResourcesClientGetOptions contains the optional parameters for the EligibleChildResourcesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetEligibleChildResourcesByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewEligibleChildResourcesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewGetPager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
&armauthorization.EligibleChildResourcesClientGetOptions{Filter: to.Ptr("resourceType+eq+'resourcegroup'")})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type EligibleChildResourcesClientGetOptions ¶ added in v0.3.0
type EligibleChildResourcesClientGetOptions struct {
// The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'.
// Use
// $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription'
// or 'ResourceGroup'
Filter *string
}
EligibleChildResourcesClientGetOptions contains the optional parameters for the EligibleChildResourcesClient.Get method.
type EligibleChildResourcesClientGetResponse ¶ added in v0.3.0
type EligibleChildResourcesClientGetResponse struct {
EligibleChildResourcesListResult
}
EligibleChildResourcesClientGetResponse contains the response from method EligibleChildResourcesClient.Get.
type EligibleChildResourcesListResult ¶
type EligibleChildResourcesListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Eligible child resource list.
Value []*EligibleChildResource `json:"value,omitempty"`
}
EligibleChildResourcesListResult - Eligible child resources list operation result.
type EnablementRules ¶
type EnablementRules string
EnablementRules - The type of enablement rule
const ( EnablementRulesJustification EnablementRules = "Justification" EnablementRulesMultiFactorAuthentication EnablementRules = "MultiFactorAuthentication" EnablementRulesTicketing EnablementRules = "Ticketing" )
func PossibleEnablementRulesValues ¶
func PossibleEnablementRulesValues() []EnablementRules
PossibleEnablementRulesValues returns the possible values for the EnablementRules const type.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct {
// READ-ONLY; The additional info.
Info interface{} `json:"info,omitempty" azure:"ro"`
// READ-ONLY; The additional info type.
Type *string `json:"type,omitempty" azure:"ro"`
}
ErrorAdditionalInfo - The resource management error additional info.
type ErrorDetail ¶
type ErrorDetail struct {
// READ-ONLY; The error additional info.
AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"`
// READ-ONLY; The error code.
Code *string `json:"code,omitempty" azure:"ro"`
// READ-ONLY; The error details.
Details []*ErrorDetail `json:"details,omitempty" azure:"ro"`
// READ-ONLY; The error message.
Message *string `json:"message,omitempty" azure:"ro"`
// READ-ONLY; The error target.
Target *string `json:"target,omitempty" azure:"ro"`
}
ErrorDetail - The error detail.
type ErrorResponse ¶
type ErrorResponse struct {
// The error object.
Error *ErrorDetail `json:"error,omitempty"`
}
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
type ExpandedProperties ¶
type ExpandedProperties struct {
// Details of the principal
Principal *ExpandedPropertiesPrincipal `json:"principal,omitempty"`
// Details of role definition
RoleDefinition *ExpandedPropertiesRoleDefinition `json:"roleDefinition,omitempty"`
// Details of the resource scope
Scope *ExpandedPropertiesScope `json:"scope,omitempty"`
}
type ExpandedPropertiesPrincipal ¶
type ExpandedPropertiesPrincipal struct {
// Display name of the principal
DisplayName *string `json:"displayName,omitempty"`
// Email id of the principal
Email *string `json:"email,omitempty"`
// Id of the principal
ID *string `json:"id,omitempty"`
// Type of the principal
Type *string `json:"type,omitempty"`
}
ExpandedPropertiesPrincipal - Details of the principal
type ExpandedPropertiesRoleDefinition ¶
type ExpandedPropertiesRoleDefinition struct {
// Display name of the role definition
DisplayName *string `json:"displayName,omitempty"`
// Id of the role definition
ID *string `json:"id,omitempty"`
// Type of the role definition
Type *string `json:"type,omitempty"`
}
ExpandedPropertiesRoleDefinition - Details of role definition
type ExpandedPropertiesScope ¶
type ExpandedPropertiesScope struct {
// Display name of the resource
DisplayName *string `json:"displayName,omitempty"`
// Scope id of the resource
ID *string `json:"id,omitempty"`
// Type of the resource
Type *string `json:"type,omitempty"`
}
ExpandedPropertiesScope - Details of the resource scope
type GlobalAdministratorClient ¶ added in v1.0.0
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 ¶ added in v1.0.0
func NewGlobalAdministratorClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalAdministratorClient, error)
NewGlobalAdministratorClient creates a new instance of GlobalAdministratorClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*GlobalAdministratorClient) ElevateAccess ¶ added in v1.0.0
func (client *GlobalAdministratorClient) ElevateAccess(ctx context.Context, options *GlobalAdministratorClientElevateAccessOptions) (GlobalAdministratorClientElevateAccessResponse, error)
ElevateAccess - Elevates access for a Global Administrator. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 options - GlobalAdministratorClientElevateAccessOptions contains the optional parameters for the GlobalAdministratorClient.ElevateAccess method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/ElevateAccess.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewGlobalAdministratorClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.ElevateAccess(ctx,
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
type GlobalAdministratorClientElevateAccessOptions ¶ added in v1.0.0
type GlobalAdministratorClientElevateAccessOptions struct {
}
GlobalAdministratorClientElevateAccessOptions contains the optional parameters for the GlobalAdministratorClient.ElevateAccess method.
type GlobalAdministratorClientElevateAccessResponse ¶ added in v1.0.0
type GlobalAdministratorClientElevateAccessResponse struct {
}
GlobalAdministratorClientElevateAccessResponse contains the response from method GlobalAdministratorClient.ElevateAccess.
type MemberType ¶
type MemberType string
MemberType - Membership type of the role assignment schedule
const ( MemberTypeDirect MemberType = "Direct" MemberTypeGroup MemberType = "Group" MemberTypeInherited MemberType = "Inherited" )
func PossibleMemberTypeValues ¶
func PossibleMemberTypeValues() []MemberType
PossibleMemberTypeValues returns the possible values for the MemberType const type.
type NotificationDeliveryMechanism ¶
type NotificationDeliveryMechanism string
NotificationDeliveryMechanism - The type of notification.
const (
NotificationDeliveryMechanismEmail NotificationDeliveryMechanism = "Email"
)
func PossibleNotificationDeliveryMechanismValues ¶
func PossibleNotificationDeliveryMechanismValues() []NotificationDeliveryMechanism
PossibleNotificationDeliveryMechanismValues returns the possible values for the NotificationDeliveryMechanism const type.
type NotificationLevel ¶
type NotificationLevel string
NotificationLevel - The notification level.
const ( NotificationLevelAll NotificationLevel = "All" NotificationLevelCritical NotificationLevel = "Critical" NotificationLevelNone NotificationLevel = "None" )
func PossibleNotificationLevelValues ¶
func PossibleNotificationLevelValues() []NotificationLevel
PossibleNotificationLevelValues returns the possible values for the NotificationLevel const type.
type Permission ¶
type Permission struct {
// Allowed actions.
Actions []*string `json:"actions,omitempty"`
// Denied actions.
NotActions []*string `json:"notActions,omitempty"`
}
Permission - Role definition permissions.
func (Permission) MarshalJSON ¶
func (p Permission) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Permission.
type PermissionAutoGenerated ¶ added in v1.0.0
type PermissionAutoGenerated struct {
// Allowed actions.
Actions []*string `json:"actions,omitempty"`
// Allowed Data actions.
DataActions []*string `json:"dataActions,omitempty"`
// Denied actions.
NotActions []*string `json:"notActions,omitempty"`
// Denied Data actions.
NotDataActions []*string `json:"notDataActions,omitempty"`
}
PermissionAutoGenerated - Role definition permissions.
type PermissionGetResult ¶
type PermissionGetResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// An array of permissions.
Value []*Permission `json:"value,omitempty"`
}
PermissionGetResult - Permissions information.
type PermissionsClient ¶
type PermissionsClient struct {
// contains filtered or unexported fields
}
PermissionsClient contains the methods for the Permissions group. Don't use this type directly, use NewPermissionsClient() instead.
func NewPermissionsClient ¶
func NewPermissionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PermissionsClient, error)
NewPermissionsClient creates a new instance of PermissionsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PermissionsClient) NewListForResourceGroupPager ¶ added in v1.0.0
func (client *PermissionsClient) NewListForResourceGroupPager(resourceGroupName string, options *PermissionsClientListForResourceGroupOptions) *runtime.Pager[PermissionsClientListForResourceGroupResponse]
NewListForResourceGroupPager - Gets all permissions the caller has for a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 resourceGroupName - The name of the resource group. The name is case insensitive. options - PermissionsClientListForResourceGroupOptions contains the optional parameters for the PermissionsClient.ListForResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetPermissions.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewPermissionsClient("subID", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourceGroupPager("rgname",
nil)
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
func (*PermissionsClient) NewListForResourcePager ¶ added in v1.0.0
func (client *PermissionsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, options *PermissionsClientListForResourceOptions) *runtime.Pager[PermissionsClientListForResourceResponse]
NewListForResourcePager - Gets all permissions the caller has for a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceProviderNamespace - The namespace of the resource provider. parentResourcePath - The parent resource identity. resourceType - The resource type of the resource. resourceName - The name of the resource to get the permissions for. options - PermissionsClientListForResourceOptions contains the optional parameters for the PermissionsClient.ListForResource method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetResourcePermissions.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewPermissionsClient("subId", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourcePager("rgname",
"rpnamespace",
"parentResourcePath",
"resourceType",
"resourceName",
nil)
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type PermissionsClientListForResourceGroupOptions ¶ added in v0.3.0
type PermissionsClientListForResourceGroupOptions struct {
}
PermissionsClientListForResourceGroupOptions contains the optional parameters for the PermissionsClient.ListForResourceGroup method.
type PermissionsClientListForResourceGroupResponse ¶ added in v0.3.0
type PermissionsClientListForResourceGroupResponse struct {
PermissionGetResult
}
PermissionsClientListForResourceGroupResponse contains the response from method PermissionsClient.ListForResourceGroup.
type PermissionsClientListForResourceOptions ¶ added in v0.3.0
type PermissionsClientListForResourceOptions struct {
}
PermissionsClientListForResourceOptions contains the optional parameters for the PermissionsClient.ListForResource method.
type PermissionsClientListForResourceResponse ¶ added in v0.3.0
type PermissionsClientListForResourceResponse struct {
PermissionGetResult
}
PermissionsClientListForResourceResponse contains the response from method PermissionsClient.ListForResource.
type PolicyAssignmentProperties ¶
type PolicyAssignmentProperties struct {
// Details of the policy
Policy *PolicyAssignmentPropertiesPolicy `json:"policy,omitempty"`
// Details of role definition
RoleDefinition *PolicyAssignmentPropertiesRoleDefinition `json:"roleDefinition,omitempty"`
// Details of the resource scope
Scope *PolicyAssignmentPropertiesScope `json:"scope,omitempty"`
}
PolicyAssignmentProperties - Expanded info of resource scope, role definition and policy
type PolicyAssignmentPropertiesPolicy ¶
type PolicyAssignmentPropertiesPolicy struct {
// Id of the policy
ID *string `json:"id,omitempty"`
// The last modified date time.
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
// READ-ONLY; The name of the entity last modified it
LastModifiedBy *Principal `json:"lastModifiedBy,omitempty" azure:"ro"`
}
PolicyAssignmentPropertiesPolicy - Details of the policy
func (PolicyAssignmentPropertiesPolicy) MarshalJSON ¶
func (p PolicyAssignmentPropertiesPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicyAssignmentPropertiesPolicy.
func (*PolicyAssignmentPropertiesPolicy) UnmarshalJSON ¶
func (p *PolicyAssignmentPropertiesPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicyAssignmentPropertiesPolicy.
type PolicyAssignmentPropertiesRoleDefinition ¶
type PolicyAssignmentPropertiesRoleDefinition struct {
// Display name of the role definition
DisplayName *string `json:"displayName,omitempty"`
// Id of the role definition
ID *string `json:"id,omitempty"`
// Type of the role definition
Type *string `json:"type,omitempty"`
}
PolicyAssignmentPropertiesRoleDefinition - Details of role definition
type PolicyAssignmentPropertiesScope ¶
type PolicyAssignmentPropertiesScope struct {
// Display name of the resource
DisplayName *string `json:"displayName,omitempty"`
// Scope id of the resource
ID *string `json:"id,omitempty"`
// Type of the resource
Type *string `json:"type,omitempty"`
}
PolicyAssignmentPropertiesScope - Details of the resource scope
type PolicyProperties ¶
type PolicyProperties struct {
// READ-ONLY; Details of the resource scope
Scope *PolicyPropertiesScope `json:"scope,omitempty" azure:"ro"`
}
PolicyProperties - Expanded info of resource scope
type PolicyPropertiesScope ¶
type PolicyPropertiesScope struct {
// Display name of the resource
DisplayName *string `json:"displayName,omitempty"`
// Scope id of the resource
ID *string `json:"id,omitempty"`
// Type of the resource
Type *string `json:"type,omitempty"`
}
PolicyPropertiesScope - Details of the resource scope
type Principal ¶
type Principal struct {
// The name of the principal made changes
DisplayName *string `json:"displayName,omitempty"`
// Email of principal
Email *string `json:"email,omitempty"`
// The id of the principal made changes
ID *string `json:"id,omitempty"`
// Type of principal such as user , group etc
Type *string `json:"type,omitempty"`
}
Principal - The name of the entity last modified it
type PrincipalType ¶
type PrincipalType string
PrincipalType - The principal type of the assigned principal ID.
const ( PrincipalTypeDevice PrincipalType = "Device" PrincipalTypeForeignGroup PrincipalType = "ForeignGroup" PrincipalTypeGroup PrincipalType = "Group" PrincipalTypeServicePrincipal PrincipalType = "ServicePrincipal" PrincipalTypeUser PrincipalType = "User" )
func PossiblePrincipalTypeValues ¶
func PossiblePrincipalTypeValues() []PrincipalType
PossiblePrincipalTypeValues returns the possible values for the PrincipalType const type.
type ProviderOperation ¶
type ProviderOperation struct {
// The operation description.
Description *string `json:"description,omitempty"`
// The operation display name.
DisplayName *string `json:"displayName,omitempty"`
// The operation name.
Name *string `json:"name,omitempty"`
// The operation origin.
Origin *string `json:"origin,omitempty"`
// The operation properties.
Properties interface{} `json:"properties,omitempty"`
}
ProviderOperation - Operation
type ProviderOperationsMetadata ¶
type ProviderOperationsMetadata struct {
// The provider display name.
DisplayName *string `json:"displayName,omitempty"`
// The provider id.
ID *string `json:"id,omitempty"`
// The provider name.
Name *string `json:"name,omitempty"`
// The provider operations.
Operations []*ProviderOperation `json:"operations,omitempty"`
// The provider resource types
ResourceTypes []*ResourceType `json:"resourceTypes,omitempty"`
// The provider type.
Type *string `json:"type,omitempty"`
}
ProviderOperationsMetadata - Provider Operations metadata
type ProviderOperationsMetadataClient ¶
type ProviderOperationsMetadataClient struct {
// contains filtered or unexported fields
}
ProviderOperationsMetadataClient contains the methods for the ProviderOperationsMetadata group. Don't use this type directly, use NewProviderOperationsMetadataClient() instead.
func NewProviderOperationsMetadataClient ¶
func NewProviderOperationsMetadataClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderOperationsMetadataClient, error)
NewProviderOperationsMetadataClient creates a new instance of ProviderOperationsMetadataClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ProviderOperationsMetadataClient) Get ¶
func (client *ProviderOperationsMetadataClient) Get(ctx context.Context, resourceProviderNamespace string, options *ProviderOperationsMetadataClientGetOptions) (ProviderOperationsMetadataClientGetResponse, error)
Get - Gets provider operations metadata for the specified resource provider. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 resourceProviderNamespace - The namespace of the resource provider. options - ProviderOperationsMetadataClientGetOptions contains the optional parameters for the ProviderOperationsMetadataClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetProviderOperationsRP.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewProviderOperationsMetadataClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"resourceProviderNamespace",
&armauthorization.ProviderOperationsMetadataClientGetOptions{Expand: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*ProviderOperationsMetadataClient) NewListPager ¶ added in v1.0.0
func (client *ProviderOperationsMetadataClient) NewListPager(options *ProviderOperationsMetadataClientListOptions) *runtime.Pager[ProviderOperationsMetadataClientListResponse]
NewListPager - Gets provider operations metadata for all resource providers. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 options - ProviderOperationsMetadataClientListOptions contains the optional parameters for the ProviderOperationsMetadataClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetAllProviderOperations.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewProviderOperationsMetadataClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(&armauthorization.ProviderOperationsMetadataClientListOptions{Expand: nil})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type ProviderOperationsMetadataClientGetOptions ¶ added in v0.3.0
type ProviderOperationsMetadataClientGetOptions struct {
// Specifies whether to expand the values.
Expand *string
}
ProviderOperationsMetadataClientGetOptions contains the optional parameters for the ProviderOperationsMetadataClient.Get method.
type ProviderOperationsMetadataClientGetResponse ¶ added in v0.3.0
type ProviderOperationsMetadataClientGetResponse struct {
ProviderOperationsMetadata
}
ProviderOperationsMetadataClientGetResponse contains the response from method ProviderOperationsMetadataClient.Get.
type ProviderOperationsMetadataClientListOptions ¶ added in v0.3.0
type ProviderOperationsMetadataClientListOptions struct {
// Specifies whether to expand the values.
Expand *string
}
ProviderOperationsMetadataClientListOptions contains the optional parameters for the ProviderOperationsMetadataClient.List method.
type ProviderOperationsMetadataClientListResponse ¶ added in v0.3.0
type ProviderOperationsMetadataClientListResponse struct {
ProviderOperationsMetadataListResult
}
ProviderOperationsMetadataClientListResponse contains the response from method ProviderOperationsMetadataClient.List.
type ProviderOperationsMetadataListResult ¶
type ProviderOperationsMetadataListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// The list of providers.
Value []*ProviderOperationsMetadata `json:"value,omitempty"`
}
ProviderOperationsMetadataListResult - Provider operations metadata list
type RecipientType ¶
type RecipientType string
RecipientType - The recipient type.
const ( RecipientTypeAdmin RecipientType = "Admin" RecipientTypeApprover RecipientType = "Approver" RecipientTypeRequestor RecipientType = "Requestor" )
func PossibleRecipientTypeValues ¶
func PossibleRecipientTypeValues() []RecipientType
PossibleRecipientTypeValues returns the possible values for the RecipientType const type.
type RequestType ¶
type RequestType string
RequestType - The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc
const ( RequestTypeAdminAssign RequestType = "AdminAssign" RequestTypeAdminExtend RequestType = "AdminExtend" RequestTypeAdminRemove RequestType = "AdminRemove" RequestTypeAdminRenew RequestType = "AdminRenew" RequestTypeAdminUpdate RequestType = "AdminUpdate" RequestTypeSelfActivate RequestType = "SelfActivate" RequestTypeSelfDeactivate RequestType = "SelfDeactivate" RequestTypeSelfExtend RequestType = "SelfExtend" RequestTypeSelfRenew RequestType = "SelfRenew" )
func PossibleRequestTypeValues ¶
func PossibleRequestTypeValues() []RequestType
PossibleRequestTypeValues returns the possible values for the RequestType const type.
type ResourceType ¶
type ResourceType struct {
// The resource type display name.
DisplayName *string `json:"displayName,omitempty"`
// The resource type name.
Name *string `json:"name,omitempty"`
// The resource type operations.
Operations []*ProviderOperation `json:"operations,omitempty"`
}
ResourceType - Resource Type
type RoleAssignment ¶
type RoleAssignment struct {
// Role assignment properties.
Properties *RoleAssignmentPropertiesWithScope `json:"properties,omitempty"`
// READ-ONLY; The role assignment ID.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role assignment name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role assignment type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleAssignment - Role Assignments
type RoleAssignmentCreateParameters ¶
type RoleAssignmentCreateParameters struct {
// REQUIRED; Role assignment properties.
Properties *RoleAssignmentProperties `json:"properties,omitempty"`
}
RoleAssignmentCreateParameters - Role assignment create parameters.
type RoleAssignmentFilter ¶
type RoleAssignmentFilter struct {
// Returns role assignment of the specific principal.
PrincipalID *string `json:"principalId,omitempty"`
}
RoleAssignmentFilter - Role Assignments filter
type RoleAssignmentListResult ¶
type RoleAssignmentListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role assignment list.
Value []*RoleAssignment `json:"value,omitempty"`
}
RoleAssignmentListResult - Role assignment list operation result.
type RoleAssignmentProperties ¶
type RoleAssignmentProperties struct {
// REQUIRED; The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user,
// service principal, or security group.
PrincipalID *string `json:"principalId,omitempty"`
// REQUIRED; The role definition ID used in the role assignment.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
}
RoleAssignmentProperties - Role assignment properties.
type RoleAssignmentPropertiesWithScope ¶ added in v1.0.0
type RoleAssignmentPropertiesWithScope struct {
// The principal ID.
PrincipalID *string `json:"principalId,omitempty"`
// The role definition ID.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// The role assignment scope.
Scope *string `json:"scope,omitempty"`
}
RoleAssignmentPropertiesWithScope - Role assignment properties with scope.
type RoleAssignmentSchedule ¶
type RoleAssignmentSchedule struct {
// Role assignment schedule properties.
Properties *RoleAssignmentScheduleProperties `json:"properties,omitempty"`
// READ-ONLY; The role assignment schedule Id.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role assignment schedule name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role assignment schedule type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleAssignmentSchedule - Role Assignment schedule
type RoleAssignmentScheduleFilter ¶
type RoleAssignmentScheduleFilter struct {
// Returns role assignment schedule of the specific principal.
PrincipalID *string `json:"principalId,omitempty"`
// Returns role assignment schedule of the specific role definition.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// Returns role assignment schedule instances of the specific status.
Status *string `json:"status,omitempty"`
}
RoleAssignmentScheduleFilter - Role assignment schedule filter
type RoleAssignmentScheduleInstance ¶
type RoleAssignmentScheduleInstance struct {
// Role assignment schedule instance properties.
Properties *RoleAssignmentScheduleInstanceProperties `json:"properties,omitempty"`
// READ-ONLY; The role assignment schedule instance ID.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role assignment schedule instance name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role assignment schedule instance type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleAssignmentScheduleInstance - Information about current or upcoming role assignment schedule instance
type RoleAssignmentScheduleInstanceFilter ¶
type RoleAssignmentScheduleInstanceFilter struct {
// Returns role assignment schedule instances of the specific principal.
PrincipalID *string `json:"principalId,omitempty"`
// Returns role assignment schedule instances belonging to a specific role assignment schedule.
RoleAssignmentScheduleID *string `json:"roleAssignmentScheduleId,omitempty"`
// Returns role assignment schedule instances of the specific role definition.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// Returns role assignment schedule instances of the specific status.
Status *string `json:"status,omitempty"`
}
RoleAssignmentScheduleInstanceFilter - Role assignment schedule instance filter
type RoleAssignmentScheduleInstanceListResult ¶
type RoleAssignmentScheduleInstanceListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role assignment schedule instance list.
Value []*RoleAssignmentScheduleInstance `json:"value,omitempty"`
}
RoleAssignmentScheduleInstanceListResult - Role assignment schedule instance list operation result.
type RoleAssignmentScheduleInstanceProperties ¶
type RoleAssignmentScheduleInstanceProperties struct {
// Assignment type of the role assignment schedule
AssignmentType *AssignmentType `json:"assignmentType,omitempty"`
// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
// StringEqualsIgnoreCase
// 'foostoragecontainer'
Condition *string `json:"condition,omitempty"`
// Version of the condition. Currently accepted value is '2.0'
ConditionVersion *string `json:"conditionVersion,omitempty"`
// DateTime when role assignment schedule was created
CreatedOn *time.Time `json:"createdOn,omitempty"`
// The endDateTime of the role assignment schedule instance
EndDateTime *time.Time `json:"endDateTime,omitempty"`
// Additional properties of principal, scope and role definition
ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty"`
// roleEligibilityScheduleId used to activate
LinkedRoleEligibilityScheduleID *string `json:"linkedRoleEligibilityScheduleId,omitempty"`
// roleEligibilityScheduleInstanceId linked to this roleAssignmentScheduleInstance
LinkedRoleEligibilityScheduleInstanceID *string `json:"linkedRoleEligibilityScheduleInstanceId,omitempty"`
// Membership type of the role assignment schedule
MemberType *MemberType `json:"memberType,omitempty"`
// Role Assignment Id in external system
OriginRoleAssignmentID *string `json:"originRoleAssignmentId,omitempty"`
// The principal ID.
PrincipalID *string `json:"principalId,omitempty"`
// The principal type of the assigned principal ID.
PrincipalType *PrincipalType `json:"principalType,omitempty"`
// Id of the master role assignment schedule
RoleAssignmentScheduleID *string `json:"roleAssignmentScheduleId,omitempty"`
// The role definition ID.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// The role assignment schedule scope.
Scope *string `json:"scope,omitempty"`
// The startDateTime of the role assignment schedule instance
StartDateTime *time.Time `json:"startDateTime,omitempty"`
// The status of the role assignment schedule instance.
Status *Status `json:"status,omitempty"`
}
RoleAssignmentScheduleInstanceProperties - Role assignment schedule properties with scope.
func (*RoleAssignmentScheduleInstanceProperties) UnmarshalJSON ¶
func (r *RoleAssignmentScheduleInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleInstanceProperties.
type RoleAssignmentScheduleInstancesClient ¶
type RoleAssignmentScheduleInstancesClient struct {
// contains filtered or unexported fields
}
RoleAssignmentScheduleInstancesClient contains the methods for the RoleAssignmentScheduleInstances group. Don't use this type directly, use NewRoleAssignmentScheduleInstancesClient() instead.
func NewRoleAssignmentScheduleInstancesClient ¶
func NewRoleAssignmentScheduleInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentScheduleInstancesClient, error)
NewRoleAssignmentScheduleInstancesClient creates a new instance of RoleAssignmentScheduleInstancesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleAssignmentScheduleInstancesClient) Get ¶
func (client *RoleAssignmentScheduleInstancesClient) Get(ctx context.Context, scope string, roleAssignmentScheduleInstanceName string, options *RoleAssignmentScheduleInstancesClientGetOptions) (RoleAssignmentScheduleInstancesClientGetResponse, error)
Get - Gets the specified role assignment schedule instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignments schedules. roleAssignmentScheduleInstanceName - The name (hash of schedule name + time) of the role assignment schedule to get. options - RoleAssignmentScheduleInstancesClientGetOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleInstanceByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleInstancesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"ed9b8180-cef7-4c77-a63c-b8566ecfc412",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleAssignmentScheduleInstancesClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleAssignmentScheduleInstancesClient) NewListForScopePager(scope string, options *RoleAssignmentScheduleInstancesClientListForScopeOptions) *runtime.Pager[RoleAssignmentScheduleInstancesClientListForScopeResponse]
NewListForScopePager - Gets role assignment schedule instances of a role assignment schedule. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment schedule. options - RoleAssignmentScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleInstancesByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleInstancesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
&armauthorization.RoleAssignmentScheduleInstancesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type RoleAssignmentScheduleInstancesClientGetOptions ¶ added in v0.3.0
type RoleAssignmentScheduleInstancesClientGetOptions struct {
}
RoleAssignmentScheduleInstancesClientGetOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.Get method.
type RoleAssignmentScheduleInstancesClientGetResponse ¶ added in v0.3.0
type RoleAssignmentScheduleInstancesClientGetResponse struct {
RoleAssignmentScheduleInstance
}
RoleAssignmentScheduleInstancesClientGetResponse contains the response from method RoleAssignmentScheduleInstancesClient.Get.
type RoleAssignmentScheduleInstancesClientListForScopeOptions ¶ added in v0.3.0
type RoleAssignmentScheduleInstancesClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope.
// Use $filter=principalId eq {id} to return all role assignment schedules at,
// above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment
// schedule instances for the user. Use $filter=asTarget() to return all role
// assignment schedule instances created for the current user.
Filter *string
}
RoleAssignmentScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleInstancesClient.ListForScope method.
type RoleAssignmentScheduleInstancesClientListForScopeResponse ¶ added in v0.3.0
type RoleAssignmentScheduleInstancesClientListForScopeResponse struct {
RoleAssignmentScheduleInstanceListResult
}
RoleAssignmentScheduleInstancesClientListForScopeResponse contains the response from method RoleAssignmentScheduleInstancesClient.ListForScope.
type RoleAssignmentScheduleListResult ¶
type RoleAssignmentScheduleListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role assignment schedule list.
Value []*RoleAssignmentSchedule `json:"value,omitempty"`
}
RoleAssignmentScheduleListResult - Role assignment schedule list operation result.
type RoleAssignmentScheduleProperties ¶
type RoleAssignmentScheduleProperties struct {
// Assignment type of the role assignment schedule
AssignmentType *AssignmentType `json:"assignmentType,omitempty"`
// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
// StringEqualsIgnoreCase
// 'foostoragecontainer'
Condition *string `json:"condition,omitempty"`
// Version of the condition. Currently accepted value is '2.0'
ConditionVersion *string `json:"conditionVersion,omitempty"`
// DateTime when role assignment schedule was created
CreatedOn *time.Time `json:"createdOn,omitempty"`
// End DateTime when role assignment schedule
EndDateTime *time.Time `json:"endDateTime,omitempty"`
// Additional properties of principal, scope and role definition
ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty"`
// The id of roleEligibilitySchedule used to activated this roleAssignmentSchedule
LinkedRoleEligibilityScheduleID *string `json:"linkedRoleEligibilityScheduleId,omitempty"`
// Membership type of the role assignment schedule
MemberType *MemberType `json:"memberType,omitempty"`
// The principal ID.
PrincipalID *string `json:"principalId,omitempty"`
// The principal type of the assigned principal ID.
PrincipalType *PrincipalType `json:"principalType,omitempty"`
// The id of roleAssignmentScheduleRequest used to create this roleAssignmentSchedule
RoleAssignmentScheduleRequestID *string `json:"roleAssignmentScheduleRequestId,omitempty"`
// The role definition ID.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// The role assignment schedule scope.
Scope *string `json:"scope,omitempty"`
// Start DateTime when role assignment schedule
StartDateTime *time.Time `json:"startDateTime,omitempty"`
// The status of the role assignment schedule.
Status *Status `json:"status,omitempty"`
// DateTime when role assignment schedule was modified
UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}
RoleAssignmentScheduleProperties - Role assignment schedule properties with scope.
func (*RoleAssignmentScheduleProperties) UnmarshalJSON ¶
func (r *RoleAssignmentScheduleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleProperties.
type RoleAssignmentScheduleRequest ¶
type RoleAssignmentScheduleRequest struct {
// Role assignment schedule request properties.
Properties *RoleAssignmentScheduleRequestProperties `json:"properties,omitempty"`
// READ-ONLY; The role assignment schedule request ID.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role assignment schedule request name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role assignment schedule request type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleAssignmentScheduleRequest - Role Assignment schedule request
type RoleAssignmentScheduleRequestFilter ¶
type RoleAssignmentScheduleRequestFilter struct {
// Returns role assignment requests of the specific principal.
PrincipalID *string `json:"principalId,omitempty"`
// Returns role assignment requests created by specific principal.
RequestorID *string `json:"requestorId,omitempty"`
// Returns role assignment requests of the specific role definition.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// Returns role assignment requests of specific status.
Status *string `json:"status,omitempty"`
}
RoleAssignmentScheduleRequestFilter - Role assignment schedule request filter
type RoleAssignmentScheduleRequestListResult ¶
type RoleAssignmentScheduleRequestListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role assignment schedule request list.
Value []*RoleAssignmentScheduleRequest `json:"value,omitempty"`
}
RoleAssignmentScheduleRequestListResult - Role assignment schedule request list operation result.
type RoleAssignmentScheduleRequestProperties ¶
type RoleAssignmentScheduleRequestProperties struct {
// REQUIRED; The principal ID.
PrincipalID *string `json:"principalId,omitempty"`
// REQUIRED; The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc
RequestType *RequestType `json:"requestType,omitempty"`
// REQUIRED; The role definition ID.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
// StringEqualsIgnoreCase
// 'foostoragecontainer'
Condition *string `json:"condition,omitempty"`
// Version of the condition. Currently accepted value is '2.0'
ConditionVersion *string `json:"conditionVersion,omitempty"`
// Justification for the role assignment
Justification *string `json:"justification,omitempty"`
// The linked role eligibility schedule id - to activate an eligibility.
LinkedRoleEligibilityScheduleID *string `json:"linkedRoleEligibilityScheduleId,omitempty"`
// Schedule info of the role assignment schedule
ScheduleInfo *RoleAssignmentScheduleRequestPropertiesScheduleInfo `json:"scheduleInfo,omitempty"`
// The resultant role assignment schedule id or the role assignment schedule id being updated
TargetRoleAssignmentScheduleID *string `json:"targetRoleAssignmentScheduleId,omitempty"`
// The role assignment schedule instance id being updated
TargetRoleAssignmentScheduleInstanceID *string `json:"targetRoleAssignmentScheduleInstanceId,omitempty"`
// Ticket Info of the role assignment
TicketInfo *RoleAssignmentScheduleRequestPropertiesTicketInfo `json:"ticketInfo,omitempty"`
// READ-ONLY; The approvalId of the role assignment schedule request.
ApprovalID *string `json:"approvalId,omitempty" azure:"ro"`
// READ-ONLY; DateTime when role assignment schedule request was created
CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"`
// READ-ONLY; Additional properties of principal, scope and role definition
ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty" azure:"ro"`
// READ-ONLY; The principal type of the assigned principal ID.
PrincipalType *PrincipalType `json:"principalType,omitempty" azure:"ro"`
// READ-ONLY; Id of the user who created this request
RequestorID *string `json:"requestorId,omitempty" azure:"ro"`
// READ-ONLY; The role assignment schedule request scope.
Scope *string `json:"scope,omitempty" azure:"ro"`
// READ-ONLY; The status of the role assignment schedule request.
Status *Status `json:"status,omitempty" azure:"ro"`
}
RoleAssignmentScheduleRequestProperties - Role assignment schedule request properties with scope.
func (RoleAssignmentScheduleRequestProperties) MarshalJSON ¶
func (r RoleAssignmentScheduleRequestProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleAssignmentScheduleRequestProperties.
func (*RoleAssignmentScheduleRequestProperties) UnmarshalJSON ¶
func (r *RoleAssignmentScheduleRequestProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentScheduleRequestProperties.
type RoleAssignmentScheduleRequestPropertiesScheduleInfo ¶
type RoleAssignmentScheduleRequestPropertiesScheduleInfo struct {
// Expiration of the role assignment schedule
Expiration *RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration `json:"expiration,omitempty"`
// Start DateTime of the role assignment schedule.
StartDateTime *time.Time `json:"startDateTime,omitempty"`
}
RoleAssignmentScheduleRequestPropertiesScheduleInfo - Schedule info of the role assignment schedule
func (RoleAssignmentScheduleRequestPropertiesScheduleInfo) MarshalJSON ¶
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 `json:"duration,omitempty"`
// End DateTime of the role assignment schedule.
EndDateTime *time.Time `json:"endDateTime,omitempty"`
// Type of the role assignment schedule expiration
Type *Type `json:"type,omitempty"`
}
RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration - Expiration of the role assignment schedule
func (RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration) MarshalJSON ¶
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 `json:"ticketNumber,omitempty"`
// Ticket system name for the role assignment
TicketSystem *string `json:"ticketSystem,omitempty"`
}
RoleAssignmentScheduleRequestPropertiesTicketInfo - Ticket Info of the role assignment
type RoleAssignmentScheduleRequestsClient ¶
type RoleAssignmentScheduleRequestsClient struct {
// contains filtered or unexported fields
}
RoleAssignmentScheduleRequestsClient contains the methods for the RoleAssignmentScheduleRequests group. Don't use this type directly, use NewRoleAssignmentScheduleRequestsClient() instead.
func NewRoleAssignmentScheduleRequestsClient ¶
func NewRoleAssignmentScheduleRequestsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentScheduleRequestsClient, error)
NewRoleAssignmentScheduleRequestsClient creates a new instance of RoleAssignmentScheduleRequestsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleAssignmentScheduleRequestsClient) Cancel ¶
func (client *RoleAssignmentScheduleRequestsClient) Cancel(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, options *RoleAssignmentScheduleRequestsClientCancelOptions) (RoleAssignmentScheduleRequestsClientCancelResponse, error)
Cancel - Cancels a pending role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment request to cancel. roleAssignmentScheduleRequestName - The name of the role assignment request to cancel. options - RoleAssignmentScheduleRequestsClientCancelOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Cancel method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/CancelRoleAssignmentScheduleRequestByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Cancel(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"fea7a502-9a96-4806-a26f-eee560e52045",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleAssignmentScheduleRequestsClient) Create ¶
func (client *RoleAssignmentScheduleRequestsClient) Create(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, parameters RoleAssignmentScheduleRequest, options *RoleAssignmentScheduleRequestsClientCreateOptions) (RoleAssignmentScheduleRequestsClientCreateResponse, error)
Create - Creates a role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment schedule request to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource. roleAssignmentScheduleRequestName - A GUID for the role assignment to create. The name must be unique and different for each role assignment. parameters - Parameters for the role assignment schedule request. options - RoleAssignmentScheduleRequestsClientCreateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PutRoleAssignmentScheduleRequest.json
package main
import (
"context"
"log"
"time"
"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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Create(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"fea7a502-9a96-4806-a26f-eee560e52045",
armauthorization.RoleAssignmentScheduleRequest{
Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{
Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
ConditionVersion: to.Ptr("1.0"),
LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
RequestType: to.Ptr(armauthorization.RequestTypeSelfActivate),
RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
ScheduleInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesScheduleInfo{
Expiration: &armauthorization.RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration{
Type: to.Ptr(armauthorization.TypeAfterDuration),
Duration: to.Ptr("PT8H"),
},
StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t }()),
},
},
},
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleAssignmentScheduleRequestsClient) Get ¶
func (client *RoleAssignmentScheduleRequestsClient) Get(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, options *RoleAssignmentScheduleRequestsClientGetOptions) (RoleAssignmentScheduleRequestsClientGetResponse, error)
Get - Get the specified role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment schedule request. roleAssignmentScheduleRequestName - The name (guid) of the role assignment schedule request to get. options - RoleAssignmentScheduleRequestsClientGetOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleRequestByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"fea7a502-9a96-4806-a26f-eee560e52045",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleAssignmentScheduleRequestsClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleAssignmentScheduleRequestsClient) NewListForScopePager(scope string, options *RoleAssignmentScheduleRequestsClientListForScopeOptions) *runtime.Pager[RoleAssignmentScheduleRequestsClientListForScopeResponse]
NewListForScopePager - Gets role assignment schedule requests for a scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignments schedule requests. options - RoleAssignmentScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleRequestByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
&armauthorization.RoleAssignmentScheduleRequestsClientListForScopeOptions{Filter: to.Ptr("assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')")})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
func (*RoleAssignmentScheduleRequestsClient) Validate ¶ added in v1.0.0
func (client *RoleAssignmentScheduleRequestsClient) Validate(ctx context.Context, scope string, roleAssignmentScheduleRequestName string, parameters RoleAssignmentScheduleRequest, options *RoleAssignmentScheduleRequestsClientValidateOptions) (RoleAssignmentScheduleRequestsClientValidateResponse, error)
Validate - Validates a new role assignment schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment request to validate. roleAssignmentScheduleRequestName - The name of the role assignment request to validate. parameters - Parameters for the role assignment schedule request. options - RoleAssignmentScheduleRequestsClientValidateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Validate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/ValidateRoleAssignmentScheduleRequestByName.json
package main
import (
"context"
"log"
"time"
"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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Validate(ctx,
"subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"fea7a502-9a96-4806-a26f-eee560e52045",
armauthorization.RoleAssignmentScheduleRequest{
Properties: &armauthorization.RoleAssignmentScheduleRequestProperties{
Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
ConditionVersion: to.Ptr("1.0"),
LinkedRoleEligibilityScheduleID: to.Ptr("b1477448-2cc6-4ceb-93b4-54a202a89413"),
PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
RequestType: to.Ptr(armauthorization.RequestTypeSelfActivate),
RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
ScheduleInfo: &armauthorization.RoleAssignmentScheduleRequestPropertiesScheduleInfo{
Expiration: &armauthorization.RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration{
Type: to.Ptr(armauthorization.TypeAfterDuration),
Duration: to.Ptr("PT8H"),
},
StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:35:27.91Z"); return t }()),
},
},
},
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
type RoleAssignmentScheduleRequestsClientCancelOptions ¶ added in v0.3.0
type RoleAssignmentScheduleRequestsClientCancelOptions struct {
}
RoleAssignmentScheduleRequestsClientCancelOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Cancel method.
type RoleAssignmentScheduleRequestsClientCancelResponse ¶ added in v0.3.0
type RoleAssignmentScheduleRequestsClientCancelResponse struct {
}
RoleAssignmentScheduleRequestsClientCancelResponse contains the response from method RoleAssignmentScheduleRequestsClient.Cancel.
type RoleAssignmentScheduleRequestsClientCreateOptions ¶ added in v0.3.0
type RoleAssignmentScheduleRequestsClientCreateOptions struct {
}
RoleAssignmentScheduleRequestsClientCreateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Create method.
type RoleAssignmentScheduleRequestsClientCreateResponse ¶ added in v0.3.0
type RoleAssignmentScheduleRequestsClientCreateResponse struct {
RoleAssignmentScheduleRequest
}
RoleAssignmentScheduleRequestsClientCreateResponse contains the response from method RoleAssignmentScheduleRequestsClient.Create.
type RoleAssignmentScheduleRequestsClientGetOptions ¶ added in v0.3.0
type RoleAssignmentScheduleRequestsClientGetOptions struct {
}
RoleAssignmentScheduleRequestsClientGetOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Get method.
type RoleAssignmentScheduleRequestsClientGetResponse ¶ added in v0.3.0
type RoleAssignmentScheduleRequestsClientGetResponse struct {
RoleAssignmentScheduleRequest
}
RoleAssignmentScheduleRequestsClientGetResponse contains the response from method RoleAssignmentScheduleRequestsClient.Get.
type RoleAssignmentScheduleRequestsClientListForScopeOptions ¶ added in v0.3.0
type RoleAssignmentScheduleRequestsClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above
// the scope. Use $filter=principalId eq {id} to return all role assignment
// schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role
// assignment schedule requests requested by the current user. Use
// $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover()
// to return all role assignment schedule requests where the current user is an
// approver.
Filter *string
}
RoleAssignmentScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.ListForScope method.
type RoleAssignmentScheduleRequestsClientListForScopeResponse ¶ added in v0.3.0
type RoleAssignmentScheduleRequestsClientListForScopeResponse struct {
RoleAssignmentScheduleRequestListResult
}
RoleAssignmentScheduleRequestsClientListForScopeResponse contains the response from method RoleAssignmentScheduleRequestsClient.ListForScope.
type RoleAssignmentScheduleRequestsClientValidateOptions ¶ added in v1.0.0
type RoleAssignmentScheduleRequestsClientValidateOptions struct {
}
RoleAssignmentScheduleRequestsClientValidateOptions contains the optional parameters for the RoleAssignmentScheduleRequestsClient.Validate method.
type RoleAssignmentScheduleRequestsClientValidateResponse ¶ added in v1.0.0
type RoleAssignmentScheduleRequestsClientValidateResponse struct {
RoleAssignmentScheduleRequest
}
RoleAssignmentScheduleRequestsClientValidateResponse contains the response from method RoleAssignmentScheduleRequestsClient.Validate.
type RoleAssignmentSchedulesClient ¶
type RoleAssignmentSchedulesClient struct {
// contains filtered or unexported fields
}
RoleAssignmentSchedulesClient contains the methods for the RoleAssignmentSchedules group. Don't use this type directly, use NewRoleAssignmentSchedulesClient() instead.
func NewRoleAssignmentSchedulesClient ¶
func NewRoleAssignmentSchedulesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentSchedulesClient, error)
NewRoleAssignmentSchedulesClient creates a new instance of RoleAssignmentSchedulesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleAssignmentSchedulesClient) Get ¶
func (client *RoleAssignmentSchedulesClient) Get(ctx context.Context, scope string, roleAssignmentScheduleName string, options *RoleAssignmentSchedulesClientGetOptions) (RoleAssignmentSchedulesClientGetResponse, error)
Get - Get the specified role assignment schedule for a resource scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignment schedule. roleAssignmentScheduleName - The name (guid) of the role assignment schedule to get. options - RoleAssignmentSchedulesClientGetOptions contains the optional parameters for the RoleAssignmentSchedulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentScheduleByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentSchedulesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"c9e264ff-3133-4776-a81a-ebc7c33c8ec6",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleAssignmentSchedulesClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleAssignmentSchedulesClient) NewListForScopePager(scope string, options *RoleAssignmentSchedulesClientListForScopeOptions) *runtime.Pager[RoleAssignmentSchedulesClientListForScopeResponse]
NewListForScopePager - Gets role assignment schedules for a resource scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role assignments schedules. options - RoleAssignmentSchedulesClientListForScopeOptions contains the optional parameters for the RoleAssignmentSchedulesClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleAssignmentSchedulesByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentSchedulesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
&armauthorization.RoleAssignmentSchedulesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type RoleAssignmentSchedulesClientGetOptions ¶ added in v0.3.0
type RoleAssignmentSchedulesClientGetOptions struct {
}
RoleAssignmentSchedulesClientGetOptions contains the optional parameters for the RoleAssignmentSchedulesClient.Get method.
type RoleAssignmentSchedulesClientGetResponse ¶ added in v0.3.0
type RoleAssignmentSchedulesClientGetResponse struct {
RoleAssignmentSchedule
}
RoleAssignmentSchedulesClientGetResponse contains the response from method RoleAssignmentSchedulesClient.Get.
type RoleAssignmentSchedulesClientListForScopeOptions ¶ added in v0.3.0
type RoleAssignmentSchedulesClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope.
// Use $filter=principalId eq {id} to return all role assignment schedules at,
// above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment
// schedules for the current user. Use $filter=asTarget() to return all role
// assignment schedules created for the current user.
Filter *string
}
RoleAssignmentSchedulesClientListForScopeOptions contains the optional parameters for the RoleAssignmentSchedulesClient.ListForScope method.
type RoleAssignmentSchedulesClientListForScopeResponse ¶ added in v0.3.0
type RoleAssignmentSchedulesClientListForScopeResponse struct {
RoleAssignmentScheduleListResult
}
RoleAssignmentSchedulesClientListForScopeResponse contains the response from method RoleAssignmentSchedulesClient.ListForScope.
type RoleAssignmentsClient ¶
type RoleAssignmentsClient struct {
// contains filtered or unexported fields
}
RoleAssignmentsClient contains the methods for the RoleAssignments group. Don't use this type directly, use NewRoleAssignmentsClient() instead.
func NewRoleAssignmentsClient ¶
func NewRoleAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentsClient, error)
NewRoleAssignmentsClient creates a new instance of RoleAssignmentsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleAssignmentsClient) Create ¶
func (client *RoleAssignmentsClient) Create(ctx context.Context, scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters, options *RoleAssignmentsClientCreateOptions) (RoleAssignmentsClientCreateResponse, error)
Create - Creates a role assignment. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 scope - The scope of the role assignment to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource. roleAssignmentName - A GUID for the role assignment to create. The name must be unique and different for each role assignment. parameters - Parameters for the role assignment. options - RoleAssignmentsClientCreateOptions contains the optional parameters for the RoleAssignmentsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/PutRoleAssignment.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Create(ctx,
"scope",
"roleAssignmentName",
armauthorization.RoleAssignmentCreateParameters{
Properties: &armauthorization.RoleAssignmentProperties{
PrincipalID: to.Ptr("d93a38bc-d029-4160-bfb0-fbda779ac214"),
RoleDefinitionID: to.Ptr("/subscriptions/4004a9fd-d58e-48dc-aeb2-4a4aec58606f/providers/Microsoft.Authorization/roleDefinitions/de139f84-1756-47ae-9be6-808fbbe84772"),
},
},
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleAssignmentsClient) CreateByID ¶
func (client *RoleAssignmentsClient) CreateByID(ctx context.Context, roleAssignmentID string, parameters RoleAssignmentCreateParameters, options *RoleAssignmentsClientCreateByIDOptions) (RoleAssignmentsClientCreateByIDResponse, error)
CreateByID - Creates a role assignment by ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 roleAssignmentID - The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. parameters - Parameters for the role assignment. options - RoleAssignmentsClientCreateByIDOptions contains the optional parameters for the RoleAssignmentsClient.CreateByID method.
func (*RoleAssignmentsClient) Delete ¶
func (client *RoleAssignmentsClient) Delete(ctx context.Context, scope string, roleAssignmentName string, options *RoleAssignmentsClientDeleteOptions) (RoleAssignmentsClientDeleteResponse, error)
Delete - Deletes a role assignment. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 scope - The scope of the role assignment to delete. roleAssignmentName - The name of the role assignment to delete. options - RoleAssignmentsClientDeleteOptions contains the optional parameters for the RoleAssignmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/DeleteRoleAssignmentByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Delete(ctx,
"scope",
"roleAssignmentName",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleAssignmentsClient) DeleteByID ¶
func (client *RoleAssignmentsClient) DeleteByID(ctx context.Context, roleAssignmentID string, options *RoleAssignmentsClientDeleteByIDOptions) (RoleAssignmentsClientDeleteByIDResponse, error)
DeleteByID - Deletes a role assignment. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 roleAssignmentID - The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. options - RoleAssignmentsClientDeleteByIDOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByID method.
func (*RoleAssignmentsClient) Get ¶
func (client *RoleAssignmentsClient) Get(ctx context.Context, scope string, roleAssignmentName string, options *RoleAssignmentsClientGetOptions) (RoleAssignmentsClientGetResponse, error)
Get - Get the specified role assignment. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 scope - The scope of the role assignment. roleAssignmentName - The name of the role assignment to get. options - RoleAssignmentsClientGetOptions contains the optional parameters for the RoleAssignmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetRoleAssignmentByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"scope",
"roleAssignmentName",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleAssignmentsClient) GetByID ¶
func (client *RoleAssignmentsClient) GetByID(ctx context.Context, roleAssignmentID string, options *RoleAssignmentsClientGetByIDOptions) (RoleAssignmentsClientGetByIDResponse, error)
GetByID - Gets a role assignment by ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 roleAssignmentID - The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. options - RoleAssignmentsClientGetByIDOptions contains the optional parameters for the RoleAssignmentsClient.GetByID method.
func (*RoleAssignmentsClient) NewListForResourceGroupPager ¶ added in v1.0.0
func (client *RoleAssignmentsClient) NewListForResourceGroupPager(resourceGroupName string, options *RoleAssignmentsClientListForResourceGroupOptions) *runtime.Pager[RoleAssignmentsClientListForResourceGroupResponse]
NewListForResourceGroupPager - Gets role assignments for a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 resourceGroupName - The name of the resource group. The name is case insensitive. options - RoleAssignmentsClientListForResourceGroupOptions contains the optional parameters for the RoleAssignmentsClient.ListForResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetRoleAssignmentsForResourceGroup.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("subId", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourceGroupPager("rgname",
&armauthorization.RoleAssignmentsClientListForResourceGroupOptions{Filter: nil})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
func (*RoleAssignmentsClient) NewListForResourcePager ¶ added in v1.0.0
func (client *RoleAssignmentsClient) NewListForResourcePager(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, options *RoleAssignmentsClientListForResourceOptions) *runtime.Pager[RoleAssignmentsClientListForResourceResponse]
NewListForResourcePager - Gets role assignments for a resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceProviderNamespace - The namespace of the resource provider. parentResourcePath - The parent resource identity. resourceType - The resource type of the resource. resourceName - The name of the resource to get role assignments for. options - RoleAssignmentsClientListForResourceOptions contains the optional parameters for the RoleAssignmentsClient.ListForResource method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetRoleAssignmentsForResource.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("subId", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForResourcePager("rgname",
"resourceProviderNamespace",
"parentResourcePath",
"resourceType",
"resourceName",
&armauthorization.RoleAssignmentsClientListForResourceOptions{Filter: nil})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
func (*RoleAssignmentsClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleAssignmentsClient) NewListForScopePager(scope string, options *RoleAssignmentsClientListForScopeOptions) *runtime.Pager[RoleAssignmentsClientListForScopeResponse]
NewListForScopePager - Gets role assignments for a scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 scope - The scope of the role assignments. options - RoleAssignmentsClientListForScopeOptions contains the optional parameters for the RoleAssignmentsClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetRoleAssignmentByScope.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("scope",
&armauthorization.RoleAssignmentsClientListForScopeOptions{Filter: nil})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
func (*RoleAssignmentsClient) NewListPager ¶ added in v1.0.0
func (client *RoleAssignmentsClient) NewListPager(options *RoleAssignmentsClientListOptions) *runtime.Pager[RoleAssignmentsClientListResponse]
NewListPager - Gets all role assignments for the subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 options - RoleAssignmentsClientListOptions contains the optional parameters for the RoleAssignmentsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetAllRoleAssignments.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleAssignmentsClient("subId", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(&armauthorization.RoleAssignmentsClientListOptions{Filter: nil})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type RoleAssignmentsClientCreateByIDOptions ¶ added in v0.3.0
type RoleAssignmentsClientCreateByIDOptions struct {
}
RoleAssignmentsClientCreateByIDOptions contains the optional parameters for the RoleAssignmentsClient.CreateByID method.
type RoleAssignmentsClientCreateByIDResponse ¶ added in v0.3.0
type RoleAssignmentsClientCreateByIDResponse struct {
RoleAssignment
}
RoleAssignmentsClientCreateByIDResponse contains the response from method RoleAssignmentsClient.CreateByID.
type RoleAssignmentsClientCreateOptions ¶ added in v0.3.0
type RoleAssignmentsClientCreateOptions struct {
}
RoleAssignmentsClientCreateOptions contains the optional parameters for the RoleAssignmentsClient.Create method.
type RoleAssignmentsClientCreateResponse ¶ added in v0.3.0
type RoleAssignmentsClientCreateResponse struct {
RoleAssignment
}
RoleAssignmentsClientCreateResponse contains the response from method RoleAssignmentsClient.Create.
type RoleAssignmentsClientDeleteByIDOptions ¶ added in v0.3.0
type RoleAssignmentsClientDeleteByIDOptions struct {
}
RoleAssignmentsClientDeleteByIDOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByID method.
type RoleAssignmentsClientDeleteByIDResponse ¶ added in v0.3.0
type RoleAssignmentsClientDeleteByIDResponse struct {
RoleAssignment
}
RoleAssignmentsClientDeleteByIDResponse contains the response from method RoleAssignmentsClient.DeleteByID.
type RoleAssignmentsClientDeleteOptions ¶ added in v0.3.0
type RoleAssignmentsClientDeleteOptions struct {
}
RoleAssignmentsClientDeleteOptions contains the optional parameters for the RoleAssignmentsClient.Delete method.
type RoleAssignmentsClientDeleteResponse ¶ added in v0.3.0
type RoleAssignmentsClientDeleteResponse struct {
RoleAssignment
}
RoleAssignmentsClientDeleteResponse contains the response from method RoleAssignmentsClient.Delete.
type RoleAssignmentsClientGetByIDOptions ¶ added in v0.3.0
type RoleAssignmentsClientGetByIDOptions struct {
}
RoleAssignmentsClientGetByIDOptions contains the optional parameters for the RoleAssignmentsClient.GetByID method.
type RoleAssignmentsClientGetByIDResponse ¶ added in v0.3.0
type RoleAssignmentsClientGetByIDResponse struct {
RoleAssignment
}
RoleAssignmentsClientGetByIDResponse contains the response from method RoleAssignmentsClient.GetByID.
type RoleAssignmentsClientGetOptions ¶ added in v0.3.0
type RoleAssignmentsClientGetOptions struct {
}
RoleAssignmentsClientGetOptions contains the optional parameters for the RoleAssignmentsClient.Get method.
type RoleAssignmentsClientGetResponse ¶ added in v0.3.0
type RoleAssignmentsClientGetResponse struct {
RoleAssignment
}
RoleAssignmentsClientGetResponse contains the response from method RoleAssignmentsClient.Get.
type RoleAssignmentsClientListForResourceGroupOptions ¶ added in v0.3.0
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
}
RoleAssignmentsClientListForResourceGroupOptions contains the optional parameters for the RoleAssignmentsClient.ListForResourceGroup method.
type RoleAssignmentsClientListForResourceGroupResponse ¶ added in v0.3.0
type RoleAssignmentsClientListForResourceGroupResponse struct {
RoleAssignmentListResult
}
RoleAssignmentsClientListForResourceGroupResponse contains the response from method RoleAssignmentsClient.ListForResourceGroup.
type RoleAssignmentsClientListForResourceOptions ¶ added in v0.3.0
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
}
RoleAssignmentsClientListForResourceOptions contains the optional parameters for the RoleAssignmentsClient.ListForResource method.
type RoleAssignmentsClientListForResourceResponse ¶ added in v0.3.0
type RoleAssignmentsClientListForResourceResponse struct {
RoleAssignmentListResult
}
RoleAssignmentsClientListForResourceResponse contains the response from method RoleAssignmentsClient.ListForResource.
type RoleAssignmentsClientListForScopeOptions ¶ added in v0.3.0
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
}
RoleAssignmentsClientListForScopeOptions contains the optional parameters for the RoleAssignmentsClient.ListForScope method.
type RoleAssignmentsClientListForScopeResponse ¶ added in v0.3.0
type RoleAssignmentsClientListForScopeResponse struct {
RoleAssignmentListResult
}
RoleAssignmentsClientListForScopeResponse contains the response from method RoleAssignmentsClient.ListForScope.
type RoleAssignmentsClientListOptions ¶ added in v1.0.0
type RoleAssignmentsClientListOptions 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
}
RoleAssignmentsClientListOptions contains the optional parameters for the RoleAssignmentsClient.List method.
type RoleAssignmentsClientListResponse ¶ added in v1.0.0
type RoleAssignmentsClientListResponse struct {
RoleAssignmentListResult
}
RoleAssignmentsClientListResponse contains the response from method RoleAssignmentsClient.List.
type RoleDefinition ¶
type RoleDefinition struct {
// Role definition properties.
Properties *RoleDefinitionProperties `json:"properties,omitempty"`
// READ-ONLY; The role definition ID.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role definition name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role definition type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleDefinition - Role definition.
type RoleDefinitionFilter ¶
type RoleDefinitionFilter struct {
// Returns role definition with the specific name.
RoleName *string `json:"roleName,omitempty"`
}
RoleDefinitionFilter - Role Definitions filter
type RoleDefinitionListResult ¶
type RoleDefinitionListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role definition list.
Value []*RoleDefinition `json:"value,omitempty"`
}
RoleDefinitionListResult - Role definition list operation result.
type RoleDefinitionProperties ¶
type RoleDefinitionProperties struct {
// Role definition assignable scopes.
AssignableScopes []*string `json:"assignableScopes,omitempty"`
// The role definition description.
Description *string `json:"description,omitempty"`
// Role definition permissions.
Permissions []*Permission `json:"permissions,omitempty"`
// The role name.
RoleName *string `json:"roleName,omitempty"`
// The role type.
RoleType *string `json:"type,omitempty"`
}
RoleDefinitionProperties - Role definition properties.
func (RoleDefinitionProperties) MarshalJSON ¶
func (r RoleDefinitionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleDefinitionProperties.
type RoleDefinitionsClient ¶
type RoleDefinitionsClient struct {
// contains filtered or unexported fields
}
RoleDefinitionsClient contains the methods for the RoleDefinitions group. Don't use this type directly, use NewRoleDefinitionsClient() instead.
func NewRoleDefinitionsClient ¶
func NewRoleDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleDefinitionsClient, error)
NewRoleDefinitionsClient creates a new instance of RoleDefinitionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleDefinitionsClient) CreateOrUpdate ¶
func (client *RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, scope string, roleDefinitionID string, roleDefinition RoleDefinition, options *RoleDefinitionsClientCreateOrUpdateOptions) (RoleDefinitionsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a role definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 scope - The scope of the role definition. roleDefinitionID - The ID of the role definition. roleDefinition - The values for the role definition. options - RoleDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the RoleDefinitionsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/PutRoleDefinition.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.CreateOrUpdate(ctx,
"scope",
"roleDefinitionId",
armauthorization.RoleDefinition{},
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleDefinitionsClient) Delete ¶
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 2015-07-01 scope - The scope of the role definition. roleDefinitionID - The ID of the role definition to delete. options - RoleDefinitionsClientDeleteOptions contains the optional parameters for the RoleDefinitionsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/DeleteRoleDefinition.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Delete(ctx,
"scope",
"roleDefinitionId",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleDefinitionsClient) Get ¶
func (client *RoleDefinitionsClient) Get(ctx context.Context, scope string, roleDefinitionID string, options *RoleDefinitionsClientGetOptions) (RoleDefinitionsClientGetResponse, error)
Get - Get role definition by name (GUID). If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 scope - The scope of the role definition. roleDefinitionID - The ID of the role definition. options - RoleDefinitionsClientGetOptions contains the optional parameters for the RoleDefinitionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetRoleDefinitionByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"scope",
"roleDefinitionId",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleDefinitionsClient) GetByID ¶
func (client *RoleDefinitionsClient) GetByID(ctx context.Context, roleDefinitionID 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 2015-07-01 roleDefinitionID - 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.
func (*RoleDefinitionsClient) NewListPager ¶ added in v1.0.0
func (client *RoleDefinitionsClient) NewListPager(scope string, options *RoleDefinitionsClientListOptions) *runtime.Pager[RoleDefinitionsClientListResponse]
NewListPager - Get all role definitions that are applicable at scope and above. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-07-01 scope - The scope of the role definition. options - RoleDefinitionsClientListOptions contains the optional parameters for the RoleDefinitionsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2015-07-01/examples/GetRoleDefinitionAtScope.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleDefinitionsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("scope",
&armauthorization.RoleDefinitionsClientListOptions{Filter: nil})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type RoleDefinitionsClientCreateOrUpdateOptions ¶ added in v0.3.0
type RoleDefinitionsClientCreateOrUpdateOptions struct {
}
RoleDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the RoleDefinitionsClient.CreateOrUpdate method.
type RoleDefinitionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type RoleDefinitionsClientCreateOrUpdateResponse struct {
RoleDefinition
}
RoleDefinitionsClientCreateOrUpdateResponse contains the response from method RoleDefinitionsClient.CreateOrUpdate.
type RoleDefinitionsClientDeleteOptions ¶ added in v0.3.0
type RoleDefinitionsClientDeleteOptions struct {
}
RoleDefinitionsClientDeleteOptions contains the optional parameters for the RoleDefinitionsClient.Delete method.
type RoleDefinitionsClientDeleteResponse ¶ added in v0.3.0
type RoleDefinitionsClientDeleteResponse struct {
RoleDefinition
}
RoleDefinitionsClientDeleteResponse contains the response from method RoleDefinitionsClient.Delete.
type RoleDefinitionsClientGetByIDOptions ¶ added in v0.3.0
type RoleDefinitionsClientGetByIDOptions struct {
}
RoleDefinitionsClientGetByIDOptions contains the optional parameters for the RoleDefinitionsClient.GetByID method.
type RoleDefinitionsClientGetByIDResponse ¶ added in v0.3.0
type RoleDefinitionsClientGetByIDResponse struct {
RoleDefinition
}
RoleDefinitionsClientGetByIDResponse contains the response from method RoleDefinitionsClient.GetByID.
type RoleDefinitionsClientGetOptions ¶ added in v0.3.0
type RoleDefinitionsClientGetOptions struct {
}
RoleDefinitionsClientGetOptions contains the optional parameters for the RoleDefinitionsClient.Get method.
type RoleDefinitionsClientGetResponse ¶ added in v0.3.0
type RoleDefinitionsClientGetResponse struct {
RoleDefinition
}
RoleDefinitionsClientGetResponse contains the response from method RoleDefinitionsClient.Get.
type RoleDefinitionsClientListOptions ¶ added in v0.3.0
type RoleDefinitionsClientListOptions struct {
// The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well.
Filter *string
}
RoleDefinitionsClientListOptions contains the optional parameters for the RoleDefinitionsClient.List method.
type RoleDefinitionsClientListResponse ¶ added in v0.3.0
type RoleDefinitionsClientListResponse struct {
RoleDefinitionListResult
}
RoleDefinitionsClientListResponse contains the response from method RoleDefinitionsClient.List.
type RoleEligibilitySchedule ¶
type RoleEligibilitySchedule struct {
// role eligibility schedule properties.
Properties *RoleEligibilityScheduleProperties `json:"properties,omitempty"`
// READ-ONLY; The role eligibility schedule Id.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role eligibility schedule name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role eligibility schedule type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleEligibilitySchedule - Role eligibility schedule
type RoleEligibilityScheduleFilter ¶
type RoleEligibilityScheduleFilter struct {
// Returns role eligibility schedule of the specific principal.
PrincipalID *string `json:"principalId,omitempty"`
// Returns role eligibility schedule of the specific role definition.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// Returns role eligibility schedule of the specific status.
Status *string `json:"status,omitempty"`
}
RoleEligibilityScheduleFilter - Role eligibility schedule filter
type RoleEligibilityScheduleInstance ¶
type RoleEligibilityScheduleInstance struct {
// Role eligibility schedule instance properties.
Properties *RoleEligibilityScheduleInstanceProperties `json:"properties,omitempty"`
// READ-ONLY; The role eligibility schedule instance ID.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role eligibility schedule instance name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role eligibility schedule instance type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleEligibilityScheduleInstance - Information about current or upcoming role eligibility schedule instance
type RoleEligibilityScheduleInstanceFilter ¶
type RoleEligibilityScheduleInstanceFilter struct {
// Returns role eligibility schedule instances of the specific principal.
PrincipalID *string `json:"principalId,omitempty"`
// Returns role eligibility schedule instances of the specific role definition.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// Returns role eligibility schedule instances belonging to a specific role eligibility schedule.
RoleEligibilityScheduleID *string `json:"roleEligibilityScheduleId,omitempty"`
// Returns role eligibility schedule instances of the specific status.
Status *string `json:"status,omitempty"`
}
RoleEligibilityScheduleInstanceFilter - Role eligibility schedule instance filter
type RoleEligibilityScheduleInstanceListResult ¶
type RoleEligibilityScheduleInstanceListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role eligibility schedule instance list.
Value []*RoleEligibilityScheduleInstance `json:"value,omitempty"`
}
RoleEligibilityScheduleInstanceListResult - Role eligibility schedule instance list operation result.
type RoleEligibilityScheduleInstanceProperties ¶
type RoleEligibilityScheduleInstanceProperties struct {
// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
// StringEqualsIgnoreCase
// 'foostoragecontainer'
Condition *string `json:"condition,omitempty"`
// Version of the condition. Currently accepted value is '2.0'
ConditionVersion *string `json:"conditionVersion,omitempty"`
// DateTime when role eligibility schedule was created
CreatedOn *time.Time `json:"createdOn,omitempty"`
// The endDateTime of the role eligibility schedule instance
EndDateTime *time.Time `json:"endDateTime,omitempty"`
// Additional properties of principal, scope and role definition
ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty"`
// Membership type of the role eligibility schedule
MemberType *MemberType `json:"memberType,omitempty"`
// The principal ID.
PrincipalID *string `json:"principalId,omitempty"`
// The principal type of the assigned principal ID.
PrincipalType *PrincipalType `json:"principalType,omitempty"`
// The role definition ID.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// Id of the master role eligibility schedule
RoleEligibilityScheduleID *string `json:"roleEligibilityScheduleId,omitempty"`
// The role eligibility schedule scope.
Scope *string `json:"scope,omitempty"`
// The startDateTime of the role eligibility schedule instance
StartDateTime *time.Time `json:"startDateTime,omitempty"`
// The status of the role eligibility schedule instance
Status *Status `json:"status,omitempty"`
}
RoleEligibilityScheduleInstanceProperties - Role eligibility schedule properties with scope.
func (*RoleEligibilityScheduleInstanceProperties) UnmarshalJSON ¶
func (r *RoleEligibilityScheduleInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleInstanceProperties.
type RoleEligibilityScheduleInstancesClient ¶
type RoleEligibilityScheduleInstancesClient struct {
// contains filtered or unexported fields
}
RoleEligibilityScheduleInstancesClient contains the methods for the RoleEligibilityScheduleInstances group. Don't use this type directly, use NewRoleEligibilityScheduleInstancesClient() instead.
func NewRoleEligibilityScheduleInstancesClient ¶
func NewRoleEligibilityScheduleInstancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleEligibilityScheduleInstancesClient, error)
NewRoleEligibilityScheduleInstancesClient creates a new instance of RoleEligibilityScheduleInstancesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleEligibilityScheduleInstancesClient) Get ¶
func (client *RoleEligibilityScheduleInstancesClient) Get(ctx context.Context, scope string, roleEligibilityScheduleInstanceName string, options *RoleEligibilityScheduleInstancesClientGetOptions) (RoleEligibilityScheduleInstancesClientGetResponse, error)
Get - Gets the specified role eligibility schedule instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedules. roleEligibilityScheduleInstanceName - The name (hash of schedule name + time) of the role eligibility schedule to get. options - RoleEligibilityScheduleInstancesClientGetOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleInstanceByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleInstancesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"21e4b59a-0499-4fe0-a3c3-43a3055b773a",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleEligibilityScheduleInstancesClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleEligibilityScheduleInstancesClient) NewListForScopePager(scope string, options *RoleEligibilityScheduleInstancesClientListForScopeOptions) *runtime.Pager[RoleEligibilityScheduleInstancesClientListForScopeResponse]
NewListForScopePager - Gets role eligibility schedule instances of a role eligibility schedule. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule. options - RoleEligibilityScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleInstancesByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleInstancesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
&armauthorization.RoleEligibilityScheduleInstancesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type RoleEligibilityScheduleInstancesClientGetOptions ¶ added in v0.3.0
type RoleEligibilityScheduleInstancesClientGetOptions struct {
}
RoleEligibilityScheduleInstancesClientGetOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.Get method.
type RoleEligibilityScheduleInstancesClientGetResponse ¶ added in v0.3.0
type RoleEligibilityScheduleInstancesClientGetResponse struct {
RoleEligibilityScheduleInstance
}
RoleEligibilityScheduleInstancesClientGetResponse contains the response from method RoleEligibilityScheduleInstancesClient.Get.
type RoleEligibilityScheduleInstancesClientListForScopeOptions ¶ added in v0.3.0
type RoleEligibilityScheduleInstancesClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope.
// Use $filter=principalId eq {id} to return all role assignment schedules at,
// above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility
// schedules for the user. Use $filter=asTarget() to return all role eligibility
// schedules created for the current user.
Filter *string
}
RoleEligibilityScheduleInstancesClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleInstancesClient.ListForScope method.
type RoleEligibilityScheduleInstancesClientListForScopeResponse ¶ added in v0.3.0
type RoleEligibilityScheduleInstancesClientListForScopeResponse struct {
RoleEligibilityScheduleInstanceListResult
}
RoleEligibilityScheduleInstancesClientListForScopeResponse contains the response from method RoleEligibilityScheduleInstancesClient.ListForScope.
type RoleEligibilityScheduleListResult ¶
type RoleEligibilityScheduleListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// role eligibility schedule list.
Value []*RoleEligibilitySchedule `json:"value,omitempty"`
}
RoleEligibilityScheduleListResult - role eligibility schedule list operation result.
type RoleEligibilityScheduleProperties ¶
type RoleEligibilityScheduleProperties struct {
// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
// StringEqualsIgnoreCase
// 'foostoragecontainer'
Condition *string `json:"condition,omitempty"`
// Version of the condition. Currently accepted value is '2.0'
ConditionVersion *string `json:"conditionVersion,omitempty"`
// DateTime when role eligibility schedule was created
CreatedOn *time.Time `json:"createdOn,omitempty"`
// End DateTime when role eligibility schedule
EndDateTime *time.Time `json:"endDateTime,omitempty"`
// Additional properties of principal, scope and role definition
ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty"`
// Membership type of the role eligibility schedule
MemberType *MemberType `json:"memberType,omitempty"`
// The principal ID.
PrincipalID *string `json:"principalId,omitempty"`
// The principal type of the assigned principal ID.
PrincipalType *PrincipalType `json:"principalType,omitempty"`
// The role definition ID.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// The id of roleEligibilityScheduleRequest used to create this roleAssignmentSchedule
RoleEligibilityScheduleRequestID *string `json:"roleEligibilityScheduleRequestId,omitempty"`
// The role eligibility schedule scope.
Scope *string `json:"scope,omitempty"`
// Start DateTime when role eligibility schedule
StartDateTime *time.Time `json:"startDateTime,omitempty"`
// The status of the role eligibility schedule.
Status *Status `json:"status,omitempty"`
// DateTime when role eligibility schedule was modified
UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}
RoleEligibilityScheduleProperties - Role eligibility schedule properties with scope.
func (*RoleEligibilityScheduleProperties) UnmarshalJSON ¶
func (r *RoleEligibilityScheduleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleEligibilityScheduleProperties.
type RoleEligibilityScheduleRequest ¶
type RoleEligibilityScheduleRequest struct {
// Role eligibility schedule request properties.
Properties *RoleEligibilityScheduleRequestProperties `json:"properties,omitempty"`
// READ-ONLY; The role eligibility schedule request ID.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role eligibility schedule request name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role eligibility schedule request type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleEligibilityScheduleRequest - Role Eligibility schedule request
type RoleEligibilityScheduleRequestFilter ¶
type RoleEligibilityScheduleRequestFilter struct {
// Returns role eligibility requests of the specific principal.
PrincipalID *string `json:"principalId,omitempty"`
// Returns role eligibility requests created by specific principal.
RequestorID *string `json:"requestorId,omitempty"`
// Returns role eligibility requests of the specific role definition.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// Returns role eligibility requests of specific status.
Status *string `json:"status,omitempty"`
}
RoleEligibilityScheduleRequestFilter - Role eligibility schedule request filter
type RoleEligibilityScheduleRequestListResult ¶
type RoleEligibilityScheduleRequestListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role eligibility schedule request list.
Value []*RoleEligibilityScheduleRequest `json:"value,omitempty"`
}
RoleEligibilityScheduleRequestListResult - Role eligibility schedule request list operation result.
type RoleEligibilityScheduleRequestProperties ¶
type RoleEligibilityScheduleRequestProperties struct {
// REQUIRED; The principal ID.
PrincipalID *string `json:"principalId,omitempty"`
// REQUIRED; The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc
RequestType *RequestType `json:"requestType,omitempty"`
// REQUIRED; The role definition ID.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName]
// StringEqualsIgnoreCase
// 'foostoragecontainer'
Condition *string `json:"condition,omitempty"`
// Version of the condition. Currently accepted value is '2.0'
ConditionVersion *string `json:"conditionVersion,omitempty"`
// Justification for the role eligibility
Justification *string `json:"justification,omitempty"`
// Schedule info of the role eligibility schedule
ScheduleInfo *RoleEligibilityScheduleRequestPropertiesScheduleInfo `json:"scheduleInfo,omitempty"`
// The resultant role eligibility schedule id or the role eligibility schedule id being updated
TargetRoleEligibilityScheduleID *string `json:"targetRoleEligibilityScheduleId,omitempty"`
// The role eligibility schedule instance id being updated
TargetRoleEligibilityScheduleInstanceID *string `json:"targetRoleEligibilityScheduleInstanceId,omitempty"`
// Ticket Info of the role eligibility
TicketInfo *RoleEligibilityScheduleRequestPropertiesTicketInfo `json:"ticketInfo,omitempty"`
// READ-ONLY; The approvalId of the role eligibility schedule request.
ApprovalID *string `json:"approvalId,omitempty" azure:"ro"`
// READ-ONLY; DateTime when role eligibility schedule request was created
CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"`
// READ-ONLY; Additional properties of principal, scope and role definition
ExpandedProperties *ExpandedProperties `json:"expandedProperties,omitempty" azure:"ro"`
// READ-ONLY; The principal type of the assigned principal ID.
PrincipalType *PrincipalType `json:"principalType,omitempty" azure:"ro"`
// READ-ONLY; Id of the user who created this request
RequestorID *string `json:"requestorId,omitempty" azure:"ro"`
// READ-ONLY; The role eligibility schedule request scope.
Scope *string `json:"scope,omitempty" azure:"ro"`
// READ-ONLY; The status of the role eligibility schedule request.
Status *Status `json:"status,omitempty" azure:"ro"`
}
RoleEligibilityScheduleRequestProperties - Role eligibility schedule request properties with scope.
func (RoleEligibilityScheduleRequestProperties) MarshalJSON ¶
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 `json:"expiration,omitempty"`
// Start DateTime of the role eligibility schedule.
StartDateTime *time.Time `json:"startDateTime,omitempty"`
}
RoleEligibilityScheduleRequestPropertiesScheduleInfo - Schedule info of the role eligibility schedule
func (RoleEligibilityScheduleRequestPropertiesScheduleInfo) MarshalJSON ¶
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 `json:"duration,omitempty"`
// End DateTime of the role eligibility schedule.
EndDateTime *time.Time `json:"endDateTime,omitempty"`
// Type of the role eligibility schedule expiration
Type *Type `json:"type,omitempty"`
}
RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration - Expiration of the role eligibility schedule
func (RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration) MarshalJSON ¶
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 `json:"ticketNumber,omitempty"`
// Ticket system name for the role eligibility
TicketSystem *string `json:"ticketSystem,omitempty"`
}
RoleEligibilityScheduleRequestPropertiesTicketInfo - Ticket Info of the role eligibility
type RoleEligibilityScheduleRequestsClient ¶
type RoleEligibilityScheduleRequestsClient struct {
// contains filtered or unexported fields
}
RoleEligibilityScheduleRequestsClient contains the methods for the RoleEligibilityScheduleRequests group. Don't use this type directly, use NewRoleEligibilityScheduleRequestsClient() instead.
func NewRoleEligibilityScheduleRequestsClient ¶
func NewRoleEligibilityScheduleRequestsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleEligibilityScheduleRequestsClient, error)
NewRoleEligibilityScheduleRequestsClient creates a new instance of RoleEligibilityScheduleRequestsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleEligibilityScheduleRequestsClient) Cancel ¶
func (client *RoleEligibilityScheduleRequestsClient) Cancel(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, options *RoleEligibilityScheduleRequestsClientCancelOptions) (RoleEligibilityScheduleRequestsClientCancelResponse, error)
Cancel - Cancels a pending role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility request to cancel. roleEligibilityScheduleRequestName - The name of the role eligibility request to cancel. options - RoleEligibilityScheduleRequestsClientCancelOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Cancel method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/CancelRoleEligibilityScheduleRequestByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Cancel(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"64caffb6-55c0-4deb-a585-68e948ea1ad6",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleEligibilityScheduleRequestsClient) Create ¶
func (client *RoleEligibilityScheduleRequestsClient) Create(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, parameters RoleEligibilityScheduleRequest, options *RoleEligibilityScheduleRequestsClientCreateOptions) (RoleEligibilityScheduleRequestsClientCreateResponse, error)
Create - Creates a role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule request to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource. roleEligibilityScheduleRequestName - The name of the role eligibility to create. It can be any valid GUID. parameters - Parameters for the role eligibility schedule request. options - RoleEligibilityScheduleRequestsClientCreateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PutRoleEligibilityScheduleRequest.json
package main
import (
"context"
"log"
"time"
"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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Create(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"64caffb6-55c0-4deb-a585-68e948ea1ad6",
armauthorization.RoleEligibilityScheduleRequest{
Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{
Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
ConditionVersion: to.Ptr("1.0"),
PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
RequestType: to.Ptr(armauthorization.RequestTypeAdminAssign),
RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
ScheduleInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesScheduleInfo{
Expiration: &armauthorization.RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration{
Type: to.Ptr(armauthorization.TypeAfterDuration),
Duration: to.Ptr("P365D"),
},
StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:31:27.91Z"); return t }()),
},
},
},
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleEligibilityScheduleRequestsClient) Get ¶
func (client *RoleEligibilityScheduleRequestsClient) Get(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, options *RoleEligibilityScheduleRequestsClientGetOptions) (RoleEligibilityScheduleRequestsClientGetResponse, error)
Get - Get the specified role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule request. roleEligibilityScheduleRequestName - The name (guid) of the role eligibility schedule request to get. options - RoleEligibilityScheduleRequestsClientGetOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleRequestByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"64caffb6-55c0-4deb-a585-68e948ea1ad6",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleEligibilityScheduleRequestsClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleEligibilityScheduleRequestsClient) NewListForScopePager(scope string, options *RoleEligibilityScheduleRequestsClientListForScopeOptions) *runtime.Pager[RoleEligibilityScheduleRequestsClientListForScopeResponse]
NewListForScopePager - Gets role eligibility schedule requests for a scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule requests. options - RoleEligibilityScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleRequestByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
&armauthorization.RoleEligibilityScheduleRequestsClientListForScopeOptions{Filter: to.Ptr("assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')")})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
func (*RoleEligibilityScheduleRequestsClient) Validate ¶ added in v1.0.0
func (client *RoleEligibilityScheduleRequestsClient) Validate(ctx context.Context, scope string, roleEligibilityScheduleRequestName string, parameters RoleEligibilityScheduleRequest, options *RoleEligibilityScheduleRequestsClientValidateOptions) (RoleEligibilityScheduleRequestsClientValidateResponse, error)
Validate - Validates a new role eligibility schedule request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility request to validate. roleEligibilityScheduleRequestName - The name of the role eligibility request to validate. parameters - Parameters for the role eligibility schedule request. options - RoleEligibilityScheduleRequestsClientValidateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Validate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/ValidateRoleEligibilityScheduleRequestByName.json
package main
import (
"context"
"log"
"time"
"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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilityScheduleRequestsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Validate(ctx,
"subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"64caffb6-55c0-4deb-a585-68e948ea1ad6",
armauthorization.RoleEligibilityScheduleRequest{
Properties: &armauthorization.RoleEligibilityScheduleRequestProperties{
Condition: to.Ptr("@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"),
ConditionVersion: to.Ptr("1.0"),
PrincipalID: to.Ptr("a3bb8764-cb92-4276-9d2a-ca1e895e55ea"),
RequestType: to.Ptr(armauthorization.RequestTypeAdminAssign),
RoleDefinitionID: to.Ptr("/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608"),
ScheduleInfo: &armauthorization.RoleEligibilityScheduleRequestPropertiesScheduleInfo{
Expiration: &armauthorization.RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration{
Type: to.Ptr(armauthorization.TypeAfterDuration),
Duration: to.Ptr("P365D"),
},
StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-09T21:31:27.91Z"); return t }()),
},
},
},
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
type RoleEligibilityScheduleRequestsClientCancelOptions ¶ added in v0.3.0
type RoleEligibilityScheduleRequestsClientCancelOptions struct {
}
RoleEligibilityScheduleRequestsClientCancelOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Cancel method.
type RoleEligibilityScheduleRequestsClientCancelResponse ¶ added in v0.3.0
type RoleEligibilityScheduleRequestsClientCancelResponse struct {
}
RoleEligibilityScheduleRequestsClientCancelResponse contains the response from method RoleEligibilityScheduleRequestsClient.Cancel.
type RoleEligibilityScheduleRequestsClientCreateOptions ¶ added in v0.3.0
type RoleEligibilityScheduleRequestsClientCreateOptions struct {
}
RoleEligibilityScheduleRequestsClientCreateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Create method.
type RoleEligibilityScheduleRequestsClientCreateResponse ¶ added in v0.3.0
type RoleEligibilityScheduleRequestsClientCreateResponse struct {
RoleEligibilityScheduleRequest
}
RoleEligibilityScheduleRequestsClientCreateResponse contains the response from method RoleEligibilityScheduleRequestsClient.Create.
type RoleEligibilityScheduleRequestsClientGetOptions ¶ added in v0.3.0
type RoleEligibilityScheduleRequestsClientGetOptions struct {
}
RoleEligibilityScheduleRequestsClientGetOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Get method.
type RoleEligibilityScheduleRequestsClientGetResponse ¶ added in v0.3.0
type RoleEligibilityScheduleRequestsClientGetResponse struct {
RoleEligibilityScheduleRequest
}
RoleEligibilityScheduleRequestsClientGetResponse contains the response from method RoleEligibilityScheduleRequestsClient.Get.
type RoleEligibilityScheduleRequestsClientListForScopeOptions ¶ added in v0.3.0
type RoleEligibilityScheduleRequestsClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above
// the scope. Use $filter=principalId eq {id} to return all role eligibility
// schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role
// eligibility schedule requests requested by the current user. Use
// $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover()
// to return all role eligibility schedule requests where the current user is an
// approver.
Filter *string
}
RoleEligibilityScheduleRequestsClientListForScopeOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.ListForScope method.
type RoleEligibilityScheduleRequestsClientListForScopeResponse ¶ added in v0.3.0
type RoleEligibilityScheduleRequestsClientListForScopeResponse struct {
RoleEligibilityScheduleRequestListResult
}
RoleEligibilityScheduleRequestsClientListForScopeResponse contains the response from method RoleEligibilityScheduleRequestsClient.ListForScope.
type RoleEligibilityScheduleRequestsClientValidateOptions ¶ added in v1.0.0
type RoleEligibilityScheduleRequestsClientValidateOptions struct {
}
RoleEligibilityScheduleRequestsClientValidateOptions contains the optional parameters for the RoleEligibilityScheduleRequestsClient.Validate method.
type RoleEligibilityScheduleRequestsClientValidateResponse ¶ added in v1.0.0
type RoleEligibilityScheduleRequestsClientValidateResponse struct {
RoleEligibilityScheduleRequest
}
RoleEligibilityScheduleRequestsClientValidateResponse contains the response from method RoleEligibilityScheduleRequestsClient.Validate.
type RoleEligibilitySchedulesClient ¶
type RoleEligibilitySchedulesClient struct {
// contains filtered or unexported fields
}
RoleEligibilitySchedulesClient contains the methods for the RoleEligibilitySchedules group. Don't use this type directly, use NewRoleEligibilitySchedulesClient() instead.
func NewRoleEligibilitySchedulesClient ¶
func NewRoleEligibilitySchedulesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleEligibilitySchedulesClient, error)
NewRoleEligibilitySchedulesClient creates a new instance of RoleEligibilitySchedulesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleEligibilitySchedulesClient) Get ¶
func (client *RoleEligibilitySchedulesClient) Get(ctx context.Context, scope string, roleEligibilityScheduleName string, options *RoleEligibilitySchedulesClientGetOptions) (RoleEligibilitySchedulesClientGetResponse, error)
Get - Get the specified role eligibility schedule for a resource scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedule. roleEligibilityScheduleName - The name (guid) of the role eligibility schedule to get. options - RoleEligibilitySchedulesClientGetOptions contains the optional parameters for the RoleEligibilitySchedulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilityScheduleByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilitySchedulesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
"b1477448-2cc6-4ceb-93b4-54a202a89413",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleEligibilitySchedulesClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleEligibilitySchedulesClient) NewListForScopePager(scope string, options *RoleEligibilitySchedulesClientListForScopeOptions) *runtime.Pager[RoleEligibilitySchedulesClientListForScopeResponse]
NewListForScopePager - Gets role eligibility schedules for a resource scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role eligibility schedules. options - RoleEligibilitySchedulesClientListForScopeOptions contains the optional parameters for the RoleEligibilitySchedulesClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleEligibilitySchedulesByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleEligibilitySchedulesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f",
&armauthorization.RoleEligibilitySchedulesClientListForScopeOptions{Filter: to.Ptr("assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')")})
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type RoleEligibilitySchedulesClientGetOptions ¶ added in v0.3.0
type RoleEligibilitySchedulesClientGetOptions struct {
}
RoleEligibilitySchedulesClientGetOptions contains the optional parameters for the RoleEligibilitySchedulesClient.Get method.
type RoleEligibilitySchedulesClientGetResponse ¶ added in v0.3.0
type RoleEligibilitySchedulesClientGetResponse struct {
RoleEligibilitySchedule
}
RoleEligibilitySchedulesClientGetResponse contains the response from method RoleEligibilitySchedulesClient.Get.
type RoleEligibilitySchedulesClientListForScopeOptions ¶ added in v0.3.0
type RoleEligibilitySchedulesClientListForScopeOptions struct {
// The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope.
// Use $filter=principalId eq {id} to return all role eligibility schedules at,
// above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility
// schedules for the user. Use $filter=asTarget() to return all role eligibility
// schedules created for the current user.
Filter *string
}
RoleEligibilitySchedulesClientListForScopeOptions contains the optional parameters for the RoleEligibilitySchedulesClient.ListForScope method.
type RoleEligibilitySchedulesClientListForScopeResponse ¶ added in v0.3.0
type RoleEligibilitySchedulesClientListForScopeResponse struct {
RoleEligibilityScheduleListResult
}
RoleEligibilitySchedulesClientListForScopeResponse contains the response from method RoleEligibilitySchedulesClient.ListForScope.
type RoleManagementPoliciesClient ¶
type RoleManagementPoliciesClient struct {
// contains filtered or unexported fields
}
RoleManagementPoliciesClient contains the methods for the RoleManagementPolicies group. Don't use this type directly, use NewRoleManagementPoliciesClient() instead.
func NewRoleManagementPoliciesClient ¶
func NewRoleManagementPoliciesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleManagementPoliciesClient, error)
NewRoleManagementPoliciesClient creates a new instance of RoleManagementPoliciesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleManagementPoliciesClient) Delete ¶
func (client *RoleManagementPoliciesClient) Delete(ctx context.Context, scope string, roleManagementPolicyName string, options *RoleManagementPoliciesClientDeleteOptions) (RoleManagementPoliciesClientDeleteResponse, error)
Delete - Delete a role management policy If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy to upsert. roleManagementPolicyName - The name (guid) of the role management policy to upsert. options - RoleManagementPoliciesClientDeleteOptions contains the optional parameters for the RoleManagementPoliciesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/DeleteRoleManagementPolicy.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx,
"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"570c3619-7688-4b34-b290-2b8bb3ccab2a",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleManagementPoliciesClient) Get ¶
func (client *RoleManagementPoliciesClient) Get(ctx context.Context, scope string, roleManagementPolicyName string, options *RoleManagementPoliciesClientGetOptions) (RoleManagementPoliciesClientGetResponse, error)
Get - Get the specified role management policy for a resource scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. roleManagementPolicyName - The name (guid) of the role management policy to get. options - RoleManagementPoliciesClientGetOptions contains the optional parameters for the RoleManagementPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleManagementPolicyByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"570c3619-7688-4b34-b290-2b8bb3ccab2a",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleManagementPoliciesClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleManagementPoliciesClient) NewListForScopePager(scope string, options *RoleManagementPoliciesClientListForScopeOptions) *runtime.Pager[RoleManagementPoliciesClientListForScopeResponse]
NewListForScopePager - Gets role management policies for a resource scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. options - RoleManagementPoliciesClientListForScopeOptions contains the optional parameters for the RoleManagementPoliciesClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleManagementPolicyByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
nil)
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
func (*RoleManagementPoliciesClient) Update ¶
func (client *RoleManagementPoliciesClient) Update(ctx context.Context, scope string, roleManagementPolicyName string, parameters RoleManagementPolicy, options *RoleManagementPoliciesClientUpdateOptions) (RoleManagementPoliciesClientUpdateResponse, error)
Update - Update a role management policy If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy to upsert. roleManagementPolicyName - The name (guid) of the role management policy to upsert. parameters - Parameters for the role management policy. options - RoleManagementPoliciesClientUpdateOptions contains the optional parameters for the RoleManagementPoliciesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PatchPartialRoleManagementPolicy.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPoliciesClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Update(ctx,
"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"570c3619-7688-4b34-b290-2b8bb3ccab2a",
armauthorization.RoleManagementPolicy{
Properties: &armauthorization.RoleManagementPolicyProperties{
Rules: []armauthorization.RoleManagementPolicyRuleClassification{
&armauthorization.RoleManagementPolicyExpirationRule{
ID: to.Ptr("Expiration_Admin_Eligibility"),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Eligibility"),
Operations: []*string{
to.Ptr("All")},
},
IsExpirationRequired: to.Ptr(false),
MaximumDuration: to.Ptr("P180D"),
},
&armauthorization.RoleManagementPolicyNotificationRule{
ID: to.Ptr("Notification_Admin_Admin_Eligibility"),
RuleType: to.Ptr(armauthorization.RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule),
Target: &armauthorization.RoleManagementPolicyRuleTarget{
Caller: to.Ptr("Admin"),
Level: to.Ptr("Eligibility"),
Operations: []*string{
to.Ptr("All")},
},
IsDefaultRecipientsEnabled: to.Ptr(false),
NotificationLevel: to.Ptr(armauthorization.NotificationLevelCritical),
NotificationRecipients: []*string{
to.Ptr("admin_admin_eligible@test.com")},
NotificationType: to.Ptr(armauthorization.NotificationDeliveryMechanismEmail),
RecipientType: to.Ptr(armauthorization.RecipientTypeAdmin),
}},
},
},
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
type RoleManagementPoliciesClientDeleteOptions ¶ added in v0.3.0
type RoleManagementPoliciesClientDeleteOptions struct {
}
RoleManagementPoliciesClientDeleteOptions contains the optional parameters for the RoleManagementPoliciesClient.Delete method.
type RoleManagementPoliciesClientDeleteResponse ¶ added in v0.3.0
type RoleManagementPoliciesClientDeleteResponse struct {
}
RoleManagementPoliciesClientDeleteResponse contains the response from method RoleManagementPoliciesClient.Delete.
type RoleManagementPoliciesClientGetOptions ¶ added in v0.3.0
type RoleManagementPoliciesClientGetOptions struct {
}
RoleManagementPoliciesClientGetOptions contains the optional parameters for the RoleManagementPoliciesClient.Get method.
type RoleManagementPoliciesClientGetResponse ¶ added in v0.3.0
type RoleManagementPoliciesClientGetResponse struct {
RoleManagementPolicy
}
RoleManagementPoliciesClientGetResponse contains the response from method RoleManagementPoliciesClient.Get.
type RoleManagementPoliciesClientListForScopeOptions ¶ added in v0.3.0
type RoleManagementPoliciesClientListForScopeOptions struct {
}
RoleManagementPoliciesClientListForScopeOptions contains the optional parameters for the RoleManagementPoliciesClient.ListForScope method.
type RoleManagementPoliciesClientListForScopeResponse ¶ added in v0.3.0
type RoleManagementPoliciesClientListForScopeResponse struct {
RoleManagementPolicyListResult
}
RoleManagementPoliciesClientListForScopeResponse contains the response from method RoleManagementPoliciesClient.ListForScope.
type RoleManagementPoliciesClientUpdateOptions ¶ added in v0.3.0
type RoleManagementPoliciesClientUpdateOptions struct {
}
RoleManagementPoliciesClientUpdateOptions contains the optional parameters for the RoleManagementPoliciesClient.Update method.
type RoleManagementPoliciesClientUpdateResponse ¶ added in v0.3.0
type RoleManagementPoliciesClientUpdateResponse struct {
RoleManagementPolicy
}
RoleManagementPoliciesClientUpdateResponse contains the response from method RoleManagementPoliciesClient.Update.
type RoleManagementPolicy ¶
type RoleManagementPolicy struct {
// Role management policy properties.
Properties *RoleManagementPolicyProperties `json:"properties,omitempty"`
// READ-ONLY; The role management policy Id.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role management policy name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role management policy type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleManagementPolicy - Role management policy
func (RoleManagementPolicy) MarshalJSON ¶
func (r RoleManagementPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicy.
type RoleManagementPolicyApprovalRule ¶
type RoleManagementPolicyApprovalRule struct {
// REQUIRED; The type of rule
RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`
// The id of the rule.
ID *string `json:"id,omitempty"`
// The approval setting
Setting *ApprovalSettings `json:"setting,omitempty"`
// The target of the current rule.
Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}
RoleManagementPolicyApprovalRule - The role management policy approval rule.
func (*RoleManagementPolicyApprovalRule) GetRoleManagementPolicyRule ¶ added in v0.3.0
func (r *RoleManagementPolicyApprovalRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule
GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyApprovalRule.
func (RoleManagementPolicyApprovalRule) MarshalJSON ¶
func (r RoleManagementPolicyApprovalRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyApprovalRule.
func (*RoleManagementPolicyApprovalRule) UnmarshalJSON ¶
func (r *RoleManagementPolicyApprovalRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyApprovalRule.
type RoleManagementPolicyAssignment ¶
type RoleManagementPolicyAssignment struct {
// Role management policy properties.
Properties *RoleManagementPolicyAssignmentProperties `json:"properties,omitempty"`
// READ-ONLY; The role management policy Id.
ID *string `json:"id,omitempty" azure:"ro"`
// READ-ONLY; The role management policy name.
Name *string `json:"name,omitempty" azure:"ro"`
// READ-ONLY; The role management policy type.
Type *string `json:"type,omitempty" azure:"ro"`
}
RoleManagementPolicyAssignment - Role management policy
type RoleManagementPolicyAssignmentListResult ¶
type RoleManagementPolicyAssignmentListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role management policy assignment list.
Value []*RoleManagementPolicyAssignment `json:"value,omitempty"`
}
RoleManagementPolicyAssignmentListResult - Role management policy assignment list operation result.
type RoleManagementPolicyAssignmentProperties ¶
type RoleManagementPolicyAssignmentProperties struct {
// The policy id role management policy assignment.
PolicyID *string `json:"policyId,omitempty"`
// The role definition of management policy assignment.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// The role management policy scope.
Scope *string `json:"scope,omitempty"`
// READ-ONLY; The readonly computed rule applied to the policy.
EffectiveRules []RoleManagementPolicyRuleClassification `json:"effectiveRules,omitempty" azure:"ro"`
// READ-ONLY; Additional properties of scope, role definition and policy
PolicyAssignmentProperties *PolicyAssignmentProperties `json:"policyAssignmentProperties,omitempty" azure:"ro"`
}
RoleManagementPolicyAssignmentProperties - Role management policy assignment properties with scope.
func (RoleManagementPolicyAssignmentProperties) MarshalJSON ¶ added in v1.0.0
func (r RoleManagementPolicyAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyAssignmentProperties.
func (*RoleManagementPolicyAssignmentProperties) UnmarshalJSON ¶ added in v1.0.0
func (r *RoleManagementPolicyAssignmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyAssignmentProperties.
type RoleManagementPolicyAssignmentsClient ¶
type RoleManagementPolicyAssignmentsClient struct {
// contains filtered or unexported fields
}
RoleManagementPolicyAssignmentsClient contains the methods for the RoleManagementPolicyAssignments group. Don't use this type directly, use NewRoleManagementPolicyAssignmentsClient() instead.
func NewRoleManagementPolicyAssignmentsClient ¶
func NewRoleManagementPolicyAssignmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleManagementPolicyAssignmentsClient, error)
NewRoleManagementPolicyAssignmentsClient creates a new instance of RoleManagementPolicyAssignmentsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleManagementPolicyAssignmentsClient) Create ¶
func (client *RoleManagementPolicyAssignmentsClient) Create(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, parameters RoleManagementPolicyAssignment, options *RoleManagementPolicyAssignmentsClientCreateOptions) (RoleManagementPolicyAssignmentsClientCreateResponse, error)
Create - Create a role management policy assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy assignment to upsert. roleManagementPolicyAssignmentName - The name of format {guid_guid} the role management policy assignment to upsert. parameters - Parameters for the role management policy assignment. options - RoleManagementPolicyAssignmentsClientCreateOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/PutRoleManagementPolicyAssignment.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPolicyAssignmentsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Create(ctx,
"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
armauthorization.RoleManagementPolicyAssignment{
Properties: &armauthorization.RoleManagementPolicyAssignmentProperties{
PolicyID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9"),
RoleDefinitionID: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24"),
Scope: to.Ptr("/subscriptions/129ff972-28f8-46b8-a726-e497be039368"),
},
},
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleManagementPolicyAssignmentsClient) Delete ¶
func (client *RoleManagementPolicyAssignmentsClient) Delete(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, options *RoleManagementPolicyAssignmentsClientDeleteOptions) (RoleManagementPolicyAssignmentsClientDeleteResponse, error)
Delete - Delete a role management policy assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy assignment to delete. roleManagementPolicyAssignmentName - The name of format {guid_guid} the role management policy assignment to delete. options - RoleManagementPolicyAssignmentsClientDeleteOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/DeleteRoleManagementPolicyAssignment.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPolicyAssignmentsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = client.Delete(ctx,
"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
Output:
func (*RoleManagementPolicyAssignmentsClient) Get ¶
func (client *RoleManagementPolicyAssignmentsClient) Get(ctx context.Context, scope string, roleManagementPolicyAssignmentName string, options *RoleManagementPolicyAssignmentsClientGetOptions) (RoleManagementPolicyAssignmentsClientGetResponse, error)
Get - Get the specified role management policy assignment for a resource scope If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. roleManagementPolicyAssignmentName - The name of format {guid_guid} the role management policy assignment to get. options - RoleManagementPolicyAssignmentsClientGetOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleManagementPolicyAssignmentByName.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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPolicyAssignmentsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
"b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Output:
func (*RoleManagementPolicyAssignmentsClient) NewListForScopePager ¶ added in v1.0.0
func (client *RoleManagementPolicyAssignmentsClient) NewListForScopePager(scope string, options *RoleManagementPolicyAssignmentsClientListForScopeOptions) *runtime.Pager[RoleManagementPolicyAssignmentsClientListForScopeResponse]
NewListForScopePager - Gets role management assignment policies for a resource scope. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-01 scope - The scope of the role management policy. options - RoleManagementPolicyAssignmentsClientListForScopeOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.ListForScope method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/stable/2020-10-01/examples/GetRoleManagementPolicyAssignmentByScope.json
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"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armauthorization.NewRoleManagementPolicyAssignmentsClient(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListForScopePager("providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368",
nil)
for pager.More() {
nextResult, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range nextResult.Value {
// TODO: use page item
_ = v
}
}
}
Output:
type RoleManagementPolicyAssignmentsClientCreateOptions ¶ added in v0.3.0
type RoleManagementPolicyAssignmentsClientCreateOptions struct {
}
RoleManagementPolicyAssignmentsClientCreateOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Create method.
type RoleManagementPolicyAssignmentsClientCreateResponse ¶ added in v0.3.0
type RoleManagementPolicyAssignmentsClientCreateResponse struct {
RoleManagementPolicyAssignment
}
RoleManagementPolicyAssignmentsClientCreateResponse contains the response from method RoleManagementPolicyAssignmentsClient.Create.
type RoleManagementPolicyAssignmentsClientDeleteOptions ¶ added in v0.3.0
type RoleManagementPolicyAssignmentsClientDeleteOptions struct {
}
RoleManagementPolicyAssignmentsClientDeleteOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Delete method.
type RoleManagementPolicyAssignmentsClientDeleteResponse ¶ added in v0.3.0
type RoleManagementPolicyAssignmentsClientDeleteResponse struct {
}
RoleManagementPolicyAssignmentsClientDeleteResponse contains the response from method RoleManagementPolicyAssignmentsClient.Delete.
type RoleManagementPolicyAssignmentsClientGetOptions ¶ added in v0.3.0
type RoleManagementPolicyAssignmentsClientGetOptions struct {
}
RoleManagementPolicyAssignmentsClientGetOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.Get method.
type RoleManagementPolicyAssignmentsClientGetResponse ¶ added in v0.3.0
type RoleManagementPolicyAssignmentsClientGetResponse struct {
RoleManagementPolicyAssignment
}
RoleManagementPolicyAssignmentsClientGetResponse contains the response from method RoleManagementPolicyAssignmentsClient.Get.
type RoleManagementPolicyAssignmentsClientListForScopeOptions ¶ added in v0.3.0
type RoleManagementPolicyAssignmentsClientListForScopeOptions struct {
}
RoleManagementPolicyAssignmentsClientListForScopeOptions contains the optional parameters for the RoleManagementPolicyAssignmentsClient.ListForScope method.
type RoleManagementPolicyAssignmentsClientListForScopeResponse ¶ added in v0.3.0
type RoleManagementPolicyAssignmentsClientListForScopeResponse struct {
RoleManagementPolicyAssignmentListResult
}
RoleManagementPolicyAssignmentsClientListForScopeResponse contains the response from method RoleManagementPolicyAssignmentsClient.ListForScope.
type RoleManagementPolicyAuthenticationContextRule ¶
type RoleManagementPolicyAuthenticationContextRule struct {
// REQUIRED; The type of rule
RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`
// The claim value.
ClaimValue *string `json:"claimValue,omitempty"`
// The id of the rule.
ID *string `json:"id,omitempty"`
// The value indicating if rule is enabled.
IsEnabled *bool `json:"isEnabled,omitempty"`
// The target of the current rule.
Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}
RoleManagementPolicyAuthenticationContextRule - The role management policy authentication context rule.
func (*RoleManagementPolicyAuthenticationContextRule) GetRoleManagementPolicyRule ¶ added in v0.3.0
func (r *RoleManagementPolicyAuthenticationContextRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule
GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyAuthenticationContextRule.
func (RoleManagementPolicyAuthenticationContextRule) MarshalJSON ¶
func (r RoleManagementPolicyAuthenticationContextRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyAuthenticationContextRule.
func (*RoleManagementPolicyAuthenticationContextRule) UnmarshalJSON ¶
func (r *RoleManagementPolicyAuthenticationContextRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyAuthenticationContextRule.
type RoleManagementPolicyEnablementRule ¶
type RoleManagementPolicyEnablementRule struct {
// REQUIRED; The type of rule
RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`
// The list of enabled rules.
EnabledRules []*EnablementRules `json:"enabledRules,omitempty"`
// The id of the rule.
ID *string `json:"id,omitempty"`
// The target of the current rule.
Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}
RoleManagementPolicyEnablementRule - The role management policy enablement rule.
func (*RoleManagementPolicyEnablementRule) GetRoleManagementPolicyRule ¶ added in v0.3.0
func (r *RoleManagementPolicyEnablementRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule
GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyEnablementRule.
func (RoleManagementPolicyEnablementRule) MarshalJSON ¶
func (r RoleManagementPolicyEnablementRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyEnablementRule.
func (*RoleManagementPolicyEnablementRule) UnmarshalJSON ¶
func (r *RoleManagementPolicyEnablementRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyEnablementRule.
type RoleManagementPolicyExpirationRule ¶
type RoleManagementPolicyExpirationRule struct {
// REQUIRED; The type of rule
RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`
// The id of the rule.
ID *string `json:"id,omitempty"`
// The value indicating whether expiration is required.
IsExpirationRequired *bool `json:"isExpirationRequired,omitempty"`
// The maximum duration of expiration in timespan.
MaximumDuration *string `json:"maximumDuration,omitempty"`
// The target of the current rule.
Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}
RoleManagementPolicyExpirationRule - The role management policy expiration rule.
func (*RoleManagementPolicyExpirationRule) GetRoleManagementPolicyRule ¶ added in v0.3.0
func (r *RoleManagementPolicyExpirationRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule
GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyExpirationRule.
func (RoleManagementPolicyExpirationRule) MarshalJSON ¶
func (r RoleManagementPolicyExpirationRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyExpirationRule.
func (*RoleManagementPolicyExpirationRule) UnmarshalJSON ¶
func (r *RoleManagementPolicyExpirationRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyExpirationRule.
type RoleManagementPolicyListResult ¶
type RoleManagementPolicyListResult struct {
// The URL to use for getting the next set of results.
NextLink *string `json:"nextLink,omitempty"`
// Role management policy list.
Value []*RoleManagementPolicy `json:"value,omitempty"`
}
RoleManagementPolicyListResult - Role management policy list operation result.
type RoleManagementPolicyNotificationRule ¶
type RoleManagementPolicyNotificationRule struct {
// REQUIRED; The type of rule
RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`
// The id of the rule.
ID *string `json:"id,omitempty"`
// Determines if the notification will be sent to the recipient type specified in the policy rule.
IsDefaultRecipientsEnabled *bool `json:"isDefaultRecipientsEnabled,omitempty"`
// The notification level.
NotificationLevel *NotificationLevel `json:"notificationLevel,omitempty"`
// The list of notification recipients.
NotificationRecipients []*string `json:"notificationRecipients,omitempty"`
// The type of notification.
NotificationType *NotificationDeliveryMechanism `json:"notificationType,omitempty"`
// The recipient type.
RecipientType *RecipientType `json:"recipientType,omitempty"`
// The target of the current rule.
Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}
RoleManagementPolicyNotificationRule - The role management policy notification rule.
func (*RoleManagementPolicyNotificationRule) GetRoleManagementPolicyRule ¶ added in v0.3.0
func (r *RoleManagementPolicyNotificationRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule
GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyNotificationRule.
func (RoleManagementPolicyNotificationRule) MarshalJSON ¶
func (r RoleManagementPolicyNotificationRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyNotificationRule.
func (*RoleManagementPolicyNotificationRule) UnmarshalJSON ¶
func (r *RoleManagementPolicyNotificationRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyNotificationRule.
type RoleManagementPolicyProperties ¶
type RoleManagementPolicyProperties struct {
// The role management policy description.
Description *string `json:"description,omitempty"`
// The role management policy display name.
DisplayName *string `json:"displayName,omitempty"`
// The role management policy is default policy.
IsOrganizationDefault *bool `json:"isOrganizationDefault,omitempty"`
// The rule applied to the policy.
Rules []RoleManagementPolicyRuleClassification `json:"rules,omitempty"`
// The role management policy scope.
Scope *string `json:"scope,omitempty"`
// READ-ONLY; The readonly computed rule applied to the policy.
EffectiveRules []RoleManagementPolicyRuleClassification `json:"effectiveRules,omitempty" azure:"ro"`
// READ-ONLY; The name of the entity last modified it
LastModifiedBy *Principal `json:"lastModifiedBy,omitempty" azure:"ro"`
// READ-ONLY; The last modified date time.
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty" azure:"ro"`
// READ-ONLY; Additional properties of scope
PolicyProperties *PolicyProperties `json:"policyProperties,omitempty" azure:"ro"`
}
RoleManagementPolicyProperties - Role management policy properties with scope.
func (RoleManagementPolicyProperties) MarshalJSON ¶
func (r RoleManagementPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyProperties.
func (*RoleManagementPolicyProperties) UnmarshalJSON ¶
func (r *RoleManagementPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoleManagementPolicyProperties.
type RoleManagementPolicyRule ¶
type RoleManagementPolicyRule struct {
// REQUIRED; The type of rule
RuleType *RoleManagementPolicyRuleType `json:"ruleType,omitempty"`
// The id of the rule.
ID *string `json:"id,omitempty"`
// The target of the current rule.
Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"`
}
RoleManagementPolicyRule - The role management policy rule.
func (*RoleManagementPolicyRule) GetRoleManagementPolicyRule ¶
func (r *RoleManagementPolicyRule) GetRoleManagementPolicyRule() *RoleManagementPolicyRule
GetRoleManagementPolicyRule implements the RoleManagementPolicyRuleClassification interface for type RoleManagementPolicyRule.
type RoleManagementPolicyRuleClassification ¶
type RoleManagementPolicyRuleClassification interface {
// GetRoleManagementPolicyRule returns the RoleManagementPolicyRule content of the underlying type.
GetRoleManagementPolicyRule() *RoleManagementPolicyRule
}
RoleManagementPolicyRuleClassification provides polymorphic access to related types. Call the interface's GetRoleManagementPolicyRule() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *RoleManagementPolicyApprovalRule, *RoleManagementPolicyAuthenticationContextRule, *RoleManagementPolicyEnablementRule, - *RoleManagementPolicyExpirationRule, *RoleManagementPolicyNotificationRule, *RoleManagementPolicyRule
type RoleManagementPolicyRuleTarget ¶
type RoleManagementPolicyRuleTarget struct {
// The caller of the setting.
Caller *string `json:"caller,omitempty"`
// The list of enforced settings.
EnforcedSettings []*string `json:"enforcedSettings,omitempty"`
// The list of inheritable settings.
InheritableSettings []*string `json:"inheritableSettings,omitempty"`
// The assignment level to which rule is applied.
Level *string `json:"level,omitempty"`
// The type of operation.
Operations []*string `json:"operations,omitempty"`
// The list of target objects.
TargetObjects []*string `json:"targetObjects,omitempty"`
}
RoleManagementPolicyRuleTarget - The role management policy rule target.
func (RoleManagementPolicyRuleTarget) MarshalJSON ¶
func (r RoleManagementPolicyRuleTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleManagementPolicyRuleTarget.
type RoleManagementPolicyRuleType ¶
type RoleManagementPolicyRuleType string
RoleManagementPolicyRuleType - The type of rule
const ( RoleManagementPolicyRuleTypeRoleManagementPolicyApprovalRule RoleManagementPolicyRuleType = "RoleManagementPolicyApprovalRule" RoleManagementPolicyRuleTypeRoleManagementPolicyAuthenticationContextRule RoleManagementPolicyRuleType = "RoleManagementPolicyAuthenticationContextRule" RoleManagementPolicyRuleTypeRoleManagementPolicyEnablementRule RoleManagementPolicyRuleType = "RoleManagementPolicyEnablementRule" RoleManagementPolicyRuleTypeRoleManagementPolicyExpirationRule RoleManagementPolicyRuleType = "RoleManagementPolicyExpirationRule" RoleManagementPolicyRuleTypeRoleManagementPolicyNotificationRule RoleManagementPolicyRuleType = "RoleManagementPolicyNotificationRule" )
func PossibleRoleManagementPolicyRuleTypeValues ¶
func PossibleRoleManagementPolicyRuleTypeValues() []RoleManagementPolicyRuleType
PossibleRoleManagementPolicyRuleTypeValues returns the possible values for the RoleManagementPolicyRuleType const type.
type Status ¶
type Status string
Status - The status of the role assignment schedule.
const ( StatusAccepted Status = "Accepted" StatusAdminApproved Status = "AdminApproved" StatusAdminDenied Status = "AdminDenied" StatusCanceled Status = "Canceled" StatusDenied Status = "Denied" StatusFailed Status = "Failed" StatusFailedAsResourceIsLocked Status = "FailedAsResourceIsLocked" StatusGranted Status = "Granted" StatusInvalid Status = "Invalid" StatusPendingAdminDecision Status = "PendingAdminDecision" StatusPendingApproval Status = "PendingApproval" StatusPendingApprovalProvisioning Status = "PendingApprovalProvisioning" StatusPendingEvaluation Status = "PendingEvaluation" StatusPendingExternalProvisioning Status = "PendingExternalProvisioning" StatusPendingProvisioning Status = "PendingProvisioning" StatusPendingRevocation Status = "PendingRevocation" StatusPendingScheduleCreation Status = "PendingScheduleCreation" StatusProvisioned Status = "Provisioned" StatusProvisioningStarted Status = "ProvisioningStarted" StatusRevoked Status = "Revoked" StatusScheduleCreated Status = "ScheduleCreated" StatusTimedOut Status = "TimedOut" )
func PossibleStatusValues ¶
func PossibleStatusValues() []Status
PossibleStatusValues returns the possible values for the Status const type.
type Type ¶
type Type string
Type - Type of the role assignment schedule expiration
func PossibleTypeValues ¶
func PossibleTypeValues() []Type
PossibleTypeValues returns the possible values for the Type const type.
type UserSet ¶
type UserSet struct {
// The description of the user.
Description *string `json:"description,omitempty"`
// The object id of the user.
ID *string `json:"id,omitempty"`
// The value indicating whether the user is a backup fallback approver
IsBackup *bool `json:"isBackup,omitempty"`
// The type of user.
UserType *UserType `json:"userType,omitempty"`
}
UserSet - The detail of a user.
Source Files
¶
- build.go
- zz_generated_classicadministrators_client.go
- zz_generated_constants.go
- zz_generated_eligiblechildresources_client.go
- zz_generated_globaladministrator_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_permissions_client.go
- zz_generated_polymorphic_helpers.go
- zz_generated_provideroperationsmetadata_client.go
- zz_generated_response_types.go
- zz_generated_roleassignments_client.go
- zz_generated_roleassignmentscheduleinstances_client.go
- zz_generated_roleassignmentschedulerequests_client.go
- zz_generated_roleassignmentschedules_client.go
- zz_generated_roledefinitions_client.go
- zz_generated_roleeligibilityscheduleinstances_client.go
- zz_generated_roleeligibilityschedulerequests_client.go
- zz_generated_roleeligibilityschedules_client.go
- zz_generated_rolemanagementpolicies_client.go
- zz_generated_rolemanagementpolicyassignments_client.go
- zz_generated_time_rfc3339.go