armauthorization

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 15 Imported by: 15

README

Azure Authorization Module for Go

PkgGoDev

The armauthorization module provides operations for working with Azure Authorization.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Authorization module:

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

Authorization

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

cred, err := azidentity.NewDefaultAzureCredential(nil)

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

Clients

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

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

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

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

More sample code

Provide Feedback

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

Contributing

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

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

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

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessRecommendationType

type AccessRecommendationType string

AccessRecommendationType - The feature- generated recommendation shown to the reviewer.

const (
	AccessRecommendationTypeApprove         AccessRecommendationType = "Approve"
	AccessRecommendationTypeDeny            AccessRecommendationType = "Deny"
	AccessRecommendationTypeNoInfoAvailable AccessRecommendationType = "NoInfoAvailable"
)

func PossibleAccessRecommendationTypeValues

func PossibleAccessRecommendationTypeValues() []AccessRecommendationType

PossibleAccessRecommendationTypeValues returns the possible values for the AccessRecommendationType const type.

type AccessReviewActorIdentity

type AccessReviewActorIdentity struct {
	// READ-ONLY; The identity id
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The identity display name
	PrincipalName *string `json:"principalName,omitempty" azure:"ro"`

	// READ-ONLY; The identity type : user/servicePrincipal
	PrincipalType *AccessReviewActorIdentityType `json:"principalType,omitempty" azure:"ro"`

	// READ-ONLY; The user principal name(if valid)
	UserPrincipalName *string `json:"userPrincipalName,omitempty" azure:"ro"`
}

AccessReviewActorIdentity - Details of the actor identity

type AccessReviewActorIdentityType

type AccessReviewActorIdentityType string

AccessReviewActorIdentityType - The identity type : user/servicePrincipal

const (
	AccessReviewActorIdentityTypeServicePrincipal AccessReviewActorIdentityType = "servicePrincipal"
	AccessReviewActorIdentityTypeUser             AccessReviewActorIdentityType = "user"
)

func PossibleAccessReviewActorIdentityTypeValues

func PossibleAccessReviewActorIdentityTypeValues() []AccessReviewActorIdentityType

PossibleAccessReviewActorIdentityTypeValues returns the possible values for the AccessReviewActorIdentityType const type.

type AccessReviewApplyResult

type AccessReviewApplyResult string

AccessReviewApplyResult - The outcome of applying the decision.

const (
	AccessReviewApplyResultAppliedSuccessfully                  AccessReviewApplyResult = "AppliedSuccessfully"
	AccessReviewApplyResultAppliedSuccessfullyButObjectNotFound AccessReviewApplyResult = "AppliedSuccessfullyButObjectNotFound"
	AccessReviewApplyResultAppliedWithUnknownFailure            AccessReviewApplyResult = "AppliedWithUnknownFailure"
	AccessReviewApplyResultApplyNotSupported                    AccessReviewApplyResult = "ApplyNotSupported"
	AccessReviewApplyResultApplying                             AccessReviewApplyResult = "Applying"
	AccessReviewApplyResultNew                                  AccessReviewApplyResult = "New"
)

func PossibleAccessReviewApplyResultValues

func PossibleAccessReviewApplyResultValues() []AccessReviewApplyResult

PossibleAccessReviewApplyResultValues returns the possible values for the AccessReviewApplyResult const type.

type AccessReviewContactedReviewer added in v0.4.0

type AccessReviewContactedReviewer struct {
	// Access Review Contacted Reviewer properties.
	Properties *AccessReviewContactedReviewerProperties `json:"properties,omitempty"`

	// READ-ONLY; The access review reviewer id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The access review reviewer id.
	Name *string `json:"name,omitempty" azure:"ro"`

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

AccessReviewContactedReviewer - Access Review Contacted Reviewer.

type AccessReviewContactedReviewerListResult added in v0.4.0

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

	// Access Review Contacted Reviewer.
	Value []*AccessReviewContactedReviewer `json:"value,omitempty"`
}

AccessReviewContactedReviewerListResult - List of access review contacted reviewers.

func (AccessReviewContactedReviewerListResult) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewContactedReviewerListResult.

type AccessReviewContactedReviewerProperties added in v0.4.0

type AccessReviewContactedReviewerProperties struct {
	// READ-ONLY; Date Time when the reviewer was contacted.
	CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the reviewer
	UserDisplayName *string `json:"userDisplayName,omitempty" azure:"ro"`

	// READ-ONLY; The user principal name of the reviewer
	UserPrincipalName *string `json:"userPrincipalName,omitempty" azure:"ro"`
}

AccessReviewContactedReviewerProperties - Properties of access review contacted reviewer.

func (AccessReviewContactedReviewerProperties) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewContactedReviewerProperties.

func (*AccessReviewContactedReviewerProperties) UnmarshalJSON added in v0.4.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewContactedReviewerProperties.

type AccessReviewDecision

type AccessReviewDecision struct {
	// Access Review Decision properties.
	Properties *AccessReviewDecisionProperties `json:"properties,omitempty"`

	// READ-ONLY; The access review decision id.
	ID *string `json:"id,omitempty" azure:"ro"`

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

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

AccessReviewDecision - Access Review.

type AccessReviewDecisionIdentity added in v0.4.0

type AccessReviewDecisionIdentity struct {
	// REQUIRED; The type of decision target : User/ServicePrincipal
	Type *DecisionTargetType `json:"type,omitempty"`

	// READ-ONLY; The display name of the user whose access was reviewed.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The id of principal whose access was reviewed.
	ID *string `json:"id,omitempty" azure:"ro"`
}

AccessReviewDecisionIdentity - Target of the decision.

func (*AccessReviewDecisionIdentity) GetAccessReviewDecisionIdentity added in v0.4.0

func (a *AccessReviewDecisionIdentity) GetAccessReviewDecisionIdentity() *AccessReviewDecisionIdentity

GetAccessReviewDecisionIdentity implements the AccessReviewDecisionIdentityClassification interface for type AccessReviewDecisionIdentity.

type AccessReviewDecisionIdentityClassification added in v0.4.0

type AccessReviewDecisionIdentityClassification interface {
	// GetAccessReviewDecisionIdentity returns the AccessReviewDecisionIdentity content of the underlying type.
	GetAccessReviewDecisionIdentity() *AccessReviewDecisionIdentity
}

AccessReviewDecisionIdentityClassification provides polymorphic access to related types. Call the interface's GetAccessReviewDecisionIdentity() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AccessReviewDecisionIdentity, *AccessReviewDecisionServicePrincipalIdentity, *AccessReviewDecisionUserIdentity

type AccessReviewDecisionListResult

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

	// Access Review Decision list.
	Value []*AccessReviewDecision `json:"value,omitempty"`
}

AccessReviewDecisionListResult - List of access review decisions.

func (AccessReviewDecisionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionListResult.

type AccessReviewDecisionProperties

type AccessReviewDecisionProperties struct {
	// The decision on the approval step. This value is initially set to NotReviewed. Approvers can take action of Approve/Deny
	Decision *AccessReviewResult `json:"decision,omitempty"`

	// Justification provided by approvers for their action
	Justification *string `json:"justification,omitempty"`

	// READ-ONLY; Details of the approver.
	AppliedBy *AccessReviewActorIdentity `json:"appliedBy,omitempty" azure:"ro"`

	// READ-ONLY; The date and time when the review decision was applied.
	AppliedDateTime *time.Time `json:"appliedDateTime,omitempty" azure:"ro"`

	// READ-ONLY; The outcome of applying the decision.
	ApplyResult *AccessReviewApplyResult `json:"applyResult,omitempty" azure:"ro"`

	// READ-ONLY; Principal associated with the decision record. Can be AccessReviewDecisionUserIdentity or AccessReviewDecisionServicePrincipalIdentity
	Principal AccessReviewDecisionIdentityClassification `json:"principal,omitempty" azure:"ro"`

	// READ-ONLY; The feature- generated recommendation shown to the reviewer.
	Recommendation *AccessRecommendationType `json:"recommendation,omitempty" azure:"ro"`

	// READ-ONLY; Resource associated with this decision record.
	Resource AccessReviewDecisionResourceClassification `json:"resource,omitempty" azure:"ro"`

	// READ-ONLY; Details of the approver.
	ReviewedBy *AccessReviewActorIdentity `json:"reviewedBy,omitempty" azure:"ro"`

	// READ-ONLY; Date Time when a decision was taken.
	ReviewedDateTime *time.Time `json:"reviewedDateTime,omitempty" azure:"ro"`
}

AccessReviewDecisionProperties - Approval Step.

func (AccessReviewDecisionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionProperties.

func (*AccessReviewDecisionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionProperties.

type AccessReviewDecisionResource added in v0.4.0

type AccessReviewDecisionResource struct {
	// REQUIRED; The type of resource: azureRole
	Type *DecisionResourceType `json:"type,omitempty"`

	// READ-ONLY; The display name of resource associated with a decision record.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The id of resource associated with a decision record.
	ID *string `json:"id,omitempty" azure:"ro"`
}

AccessReviewDecisionResource - Target of the decision.

func (*AccessReviewDecisionResource) GetAccessReviewDecisionResource added in v0.4.0

func (a *AccessReviewDecisionResource) GetAccessReviewDecisionResource() *AccessReviewDecisionResource

GetAccessReviewDecisionResource implements the AccessReviewDecisionResourceClassification interface for type AccessReviewDecisionResource.

type AccessReviewDecisionResourceAzureRole added in v0.4.0

type AccessReviewDecisionResourceAzureRole struct {
	// REQUIRED; The type of resource: azureRole
	Type *DecisionResourceType `json:"type,omitempty"`

	// READ-ONLY; The display name of resource associated with a decision record.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The id of resource associated with a decision record.
	ID *string `json:"id,omitempty" azure:"ro"`
}

AccessReviewDecisionResourceAzureRole - Target of the decision.

func (*AccessReviewDecisionResourceAzureRole) GetAccessReviewDecisionResource added in v0.4.0

func (a *AccessReviewDecisionResourceAzureRole) GetAccessReviewDecisionResource() *AccessReviewDecisionResource

GetAccessReviewDecisionResource implements the AccessReviewDecisionResourceClassification interface for type AccessReviewDecisionResourceAzureRole.

func (AccessReviewDecisionResourceAzureRole) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionResourceAzureRole.

func (*AccessReviewDecisionResourceAzureRole) UnmarshalJSON added in v0.4.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionResourceAzureRole.

type AccessReviewDecisionResourceClassification added in v0.4.0

type AccessReviewDecisionResourceClassification interface {
	// GetAccessReviewDecisionResource returns the AccessReviewDecisionResource content of the underlying type.
	GetAccessReviewDecisionResource() *AccessReviewDecisionResource
}

AccessReviewDecisionResourceClassification provides polymorphic access to related types. Call the interface's GetAccessReviewDecisionResource() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AccessReviewDecisionResource, *AccessReviewDecisionResourceAzureRole

type AccessReviewDecisionServicePrincipalIdentity added in v0.4.0

type AccessReviewDecisionServicePrincipalIdentity struct {
	// REQUIRED; The type of decision target : User/ServicePrincipal
	Type *DecisionTargetType `json:"type,omitempty"`

	// READ-ONLY; The appId for the service principal entity being reviewed
	AppID *string `json:"appId,omitempty" azure:"ro"`

	// READ-ONLY; The display name of the user whose access was reviewed.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The id of principal whose access was reviewed.
	ID *string `json:"id,omitempty" azure:"ro"`
}

AccessReviewDecisionServicePrincipalIdentity - Service Principal Decision Target

func (*AccessReviewDecisionServicePrincipalIdentity) GetAccessReviewDecisionIdentity added in v0.4.0

func (a *AccessReviewDecisionServicePrincipalIdentity) GetAccessReviewDecisionIdentity() *AccessReviewDecisionIdentity

GetAccessReviewDecisionIdentity implements the AccessReviewDecisionIdentityClassification interface for type AccessReviewDecisionServicePrincipalIdentity.

func (AccessReviewDecisionServicePrincipalIdentity) MarshalJSON added in v0.4.0

MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionServicePrincipalIdentity.

func (*AccessReviewDecisionServicePrincipalIdentity) UnmarshalJSON added in v0.4.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionServicePrincipalIdentity.

type AccessReviewDecisionUserIdentity added in v0.4.0

type AccessReviewDecisionUserIdentity struct {
	// REQUIRED; The type of decision target : User/ServicePrincipal
	Type *DecisionTargetType `json:"type,omitempty"`

	// READ-ONLY; The display name of the user whose access was reviewed.
	DisplayName *string `json:"displayName,omitempty" azure:"ro"`

	// READ-ONLY; The id of principal whose access was reviewed.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The user principal name of the user whose access was reviewed.
	UserPrincipalName *string `json:"userPrincipalName,omitempty" azure:"ro"`
}

AccessReviewDecisionUserIdentity - User Decision Target

func (*AccessReviewDecisionUserIdentity) GetAccessReviewDecisionIdentity added in v0.4.0

func (a *AccessReviewDecisionUserIdentity) GetAccessReviewDecisionIdentity() *AccessReviewDecisionIdentity

GetAccessReviewDecisionIdentity implements the AccessReviewDecisionIdentityClassification interface for type AccessReviewDecisionUserIdentity.

func (AccessReviewDecisionUserIdentity) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewDecisionUserIdentity.

func (*AccessReviewDecisionUserIdentity) UnmarshalJSON added in v0.4.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewDecisionUserIdentity.

type AccessReviewDefaultSettings

type AccessReviewDefaultSettings struct {
	// Access Review properties.
	Properties *AccessReviewScheduleSettings `json:"properties,omitempty"`

	// READ-ONLY; The access review default settings id. This is only going to be default
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The access review default settings name. This is always going to be Access Review Default Settings
	Name *string `json:"name,omitempty" azure:"ro"`

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

AccessReviewDefaultSettings - Access Review Default Settings.

type AccessReviewDefaultSettingsClient

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

AccessReviewDefaultSettingsClient contains the methods for the AccessReviewDefaultSettings group. Don't use this type directly, use NewAccessReviewDefaultSettingsClient() instead.

func NewAccessReviewDefaultSettingsClient

func NewAccessReviewDefaultSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewDefaultSettingsClient, error)

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

func (*AccessReviewDefaultSettingsClient) Get

Get - Get access review default settings for the subscription If the operation fails it returns an *azcore.ResponseError type. options - AccessReviewDefaultSettingsClientGetOptions contains the optional parameters for the AccessReviewDefaultSettingsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewDefaultSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

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

func (*AccessReviewDefaultSettingsClient) Put

Put - Get access review default settings for the subscription If the operation fails it returns an *azcore.ResponseError type. properties - Access review schedule settings. options - AccessReviewDefaultSettingsClientPutOptions contains the optional parameters for the AccessReviewDefaultSettingsClient.Put method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/PutAccessReviewDefaultSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewDefaultSettingsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Put(ctx,
		armauthorization.AccessReviewScheduleSettings{},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

type AccessReviewDefaultSettingsClientGetOptions added in v0.3.0

type AccessReviewDefaultSettingsClientGetOptions struct {
}

AccessReviewDefaultSettingsClientGetOptions contains the optional parameters for the AccessReviewDefaultSettingsClient.Get method.

type AccessReviewDefaultSettingsClientGetResponse added in v0.3.0

type AccessReviewDefaultSettingsClientGetResponse struct {
	AccessReviewDefaultSettings
}

AccessReviewDefaultSettingsClientGetResponse contains the response from method AccessReviewDefaultSettingsClient.Get.

type AccessReviewDefaultSettingsClientPutOptions added in v0.3.0

type AccessReviewDefaultSettingsClientPutOptions struct {
}

AccessReviewDefaultSettingsClientPutOptions contains the optional parameters for the AccessReviewDefaultSettingsClient.Put method.

type AccessReviewDefaultSettingsClientPutResponse added in v0.3.0

type AccessReviewDefaultSettingsClientPutResponse struct {
	AccessReviewDefaultSettings
}

AccessReviewDefaultSettingsClientPutResponse contains the response from method AccessReviewDefaultSettingsClient.Put.

type AccessReviewHistoryDefinition added in v0.4.0

type AccessReviewHistoryDefinition struct {
	// Access Review History Definition properties.
	Properties *AccessReviewHistoryDefinitionProperties `json:"properties,omitempty"`

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

	// READ-ONLY; The access review history definition unique id.
	Name *string `json:"name,omitempty" azure:"ro"`

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

AccessReviewHistoryDefinition - Access Review History Definition.

type AccessReviewHistoryDefinitionClient added in v0.4.0

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

AccessReviewHistoryDefinitionClient contains the methods for the AccessReviewHistoryDefinition group. Don't use this type directly, use NewAccessReviewHistoryDefinitionClient() instead.

func NewAccessReviewHistoryDefinitionClient added in v0.4.0

func NewAccessReviewHistoryDefinitionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewHistoryDefinitionClient, error)

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

func (*AccessReviewHistoryDefinitionClient) Create added in v0.4.0

Create - Create a scheduled or one-time Access Review History Definition If the operation fails it returns an *azcore.ResponseError type. historyDefinitionID - The id of the access review history definition. properties - Access review history definition properties. options - AccessReviewHistoryDefinitionClientCreateOptions contains the optional parameters for the AccessReviewHistoryDefinitionClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/PutAccessReviewHistoryDefinition.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewHistoryDefinitionClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Create(ctx,
		"<history-definition-id>",
		armauthorization.AccessReviewHistoryDefinitionProperties{},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccessReviewHistoryDefinitionClient) DeleteByID added in v0.4.0

DeleteByID - Delete an access review history definition If the operation fails it returns an *azcore.ResponseError type. historyDefinitionID - The id of the access review history definition. options - AccessReviewHistoryDefinitionClientDeleteByIDOptions contains the optional parameters for the AccessReviewHistoryDefinitionClient.DeleteByID method.

type AccessReviewHistoryDefinitionClientCreateOptions added in v0.4.0

type AccessReviewHistoryDefinitionClientCreateOptions struct {
}

AccessReviewHistoryDefinitionClientCreateOptions contains the optional parameters for the AccessReviewHistoryDefinitionClient.Create method.

type AccessReviewHistoryDefinitionClientCreateResponse added in v0.4.0

type AccessReviewHistoryDefinitionClientCreateResponse struct {
	AccessReviewHistoryDefinition
}

AccessReviewHistoryDefinitionClientCreateResponse contains the response from method AccessReviewHistoryDefinitionClient.Create.

type AccessReviewHistoryDefinitionClientDeleteByIDOptions added in v0.4.0

type AccessReviewHistoryDefinitionClientDeleteByIDOptions struct {
}

AccessReviewHistoryDefinitionClientDeleteByIDOptions contains the optional parameters for the AccessReviewHistoryDefinitionClient.DeleteByID method.

type AccessReviewHistoryDefinitionClientDeleteByIDResponse added in v0.4.0

type AccessReviewHistoryDefinitionClientDeleteByIDResponse struct {
}

AccessReviewHistoryDefinitionClientDeleteByIDResponse contains the response from method AccessReviewHistoryDefinitionClient.DeleteByID.

type AccessReviewHistoryDefinitionInstanceClient added in v0.4.0

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

AccessReviewHistoryDefinitionInstanceClient contains the methods for the AccessReviewHistoryDefinitionInstance group. Don't use this type directly, use NewAccessReviewHistoryDefinitionInstanceClient() instead.

func NewAccessReviewHistoryDefinitionInstanceClient added in v0.4.0

func NewAccessReviewHistoryDefinitionInstanceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewHistoryDefinitionInstanceClient, error)

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

func (*AccessReviewHistoryDefinitionInstanceClient) GenerateDownloadURI added in v0.4.0

GenerateDownloadURI - Generates a uri which can be used to retrieve review history data. This URI has a TTL of 1 day and can be retrieved by fetching the accessReviewHistoryDefinition object. If the operation fails it returns an *azcore.ResponseError type. historyDefinitionID - The id of the access review history definition. instanceID - The id of the access review history definition instance to generate a URI for. options - AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions contains the optional parameters for the AccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI method.

type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions added in v0.4.0

type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions struct {
}

AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIOptions contains the optional parameters for the AccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI method.

type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse added in v0.4.0

type AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse struct {
	AccessReviewHistoryInstance
}

AccessReviewHistoryDefinitionInstanceClientGenerateDownloadURIResponse contains the response from method AccessReviewHistoryDefinitionInstanceClient.GenerateDownloadURI.

type AccessReviewHistoryDefinitionInstanceListResult added in v0.4.0

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

	// Access Review History Definition's Instance list.
	Value []*AccessReviewHistoryInstance `json:"value,omitempty"`
}

AccessReviewHistoryDefinitionInstanceListResult - List of Access Review History Instances.

func (AccessReviewHistoryDefinitionInstanceListResult) MarshalJSON added in v0.4.0

MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryDefinitionInstanceListResult.

type AccessReviewHistoryDefinitionInstancesClient added in v0.4.0

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

AccessReviewHistoryDefinitionInstancesClient contains the methods for the AccessReviewHistoryDefinitionInstances group. Don't use this type directly, use NewAccessReviewHistoryDefinitionInstancesClient() instead.

func NewAccessReviewHistoryDefinitionInstancesClient added in v0.4.0

func NewAccessReviewHistoryDefinitionInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewHistoryDefinitionInstancesClient, error)

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

func (*AccessReviewHistoryDefinitionInstancesClient) NewListPager added in v0.5.0

NewListPager - Get access review history definition instances by definition Id If the operation fails it returns an *azcore.ResponseError type. historyDefinitionID - The id of the access review history definition. options - AccessReviewHistoryDefinitionInstancesClientListOptions contains the optional parameters for the AccessReviewHistoryDefinitionInstancesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewHistoryDefinitionInstances.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewHistoryDefinitionInstancesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<history-definition-id>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AccessReviewHistoryDefinitionInstancesClientListOptions added in v0.4.0

type AccessReviewHistoryDefinitionInstancesClientListOptions struct {
}

AccessReviewHistoryDefinitionInstancesClientListOptions contains the optional parameters for the AccessReviewHistoryDefinitionInstancesClient.List method.

type AccessReviewHistoryDefinitionInstancesClientListResponse added in v0.4.0

type AccessReviewHistoryDefinitionInstancesClientListResponse struct {
	AccessReviewHistoryDefinitionInstanceListResult
}

AccessReviewHistoryDefinitionInstancesClientListResponse contains the response from method AccessReviewHistoryDefinitionInstancesClient.List.

type AccessReviewHistoryDefinitionListResult added in v0.4.0

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

	// Access Review History Definition list.
	Value []*AccessReviewHistoryDefinition `json:"value,omitempty"`
}

AccessReviewHistoryDefinitionListResult - List of Access Review History Definitions.

func (AccessReviewHistoryDefinitionListResult) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryDefinitionListResult.

type AccessReviewHistoryDefinitionProperties added in v0.4.0

type AccessReviewHistoryDefinitionProperties struct {
	// Collection of review decisions which the history data should be filtered on. For example if Approve and Deny are supplied
	// the data will only contain review results in which the decision maker approved
	// or denied a review request.
	Decisions []*AccessReviewResult `json:"decisions,omitempty"`

	// The display name for the history definition.
	DisplayName *string `json:"displayName,omitempty"`

	// Set of access review history instances for this history definition.
	Instances []*AccessReviewHistoryInstance `json:"instances,omitempty"`

	// A collection of scopes used when selecting review history data
	Scopes []*AccessReviewScope `json:"scopes,omitempty"`

	// Recurrence settings for recurring history reports, skip for one-time reports.
	Settings *AccessReviewHistoryScheduleSettings `json:"settings,omitempty"`

	// READ-ONLY; The user or other identity who created this history definition.
	CreatedBy *AccessReviewActorIdentity `json:"createdBy,omitempty" azure:"ro"`

	// READ-ONLY; Date time when history definition was created
	CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"`

	// READ-ONLY; Date time used when selecting review data, all reviews included in data end on or before this date. For use
	// only with one-time/non-recurring reports.
	ReviewHistoryPeriodEndDateTime *time.Time `json:"reviewHistoryPeriodEndDateTime,omitempty" azure:"ro"`

	// READ-ONLY; Date time used when selecting review data, all reviews included in data start on or after this date. For use
	// only with one-time/non-recurring reports.
	ReviewHistoryPeriodStartDateTime *time.Time `json:"reviewHistoryPeriodStartDateTime,omitempty" azure:"ro"`

	// READ-ONLY; This read-only field specifies the of the requested review history data. This is either requested, in-progress,
	// done or error.
	Status *AccessReviewHistoryDefinitionStatus `json:"status,omitempty" azure:"ro"`
}

AccessReviewHistoryDefinitionProperties - Access Review History Instances.

func (AccessReviewHistoryDefinitionProperties) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryDefinitionProperties.

func (*AccessReviewHistoryDefinitionProperties) UnmarshalJSON added in v0.4.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryDefinitionProperties.

type AccessReviewHistoryDefinitionStatus added in v0.4.0

type AccessReviewHistoryDefinitionStatus string

AccessReviewHistoryDefinitionStatus - This read-only field specifies the of the requested review history data. This is either requested, in-progress, done or error.

const (
	AccessReviewHistoryDefinitionStatusDone       AccessReviewHistoryDefinitionStatus = "Done"
	AccessReviewHistoryDefinitionStatusError      AccessReviewHistoryDefinitionStatus = "Error"
	AccessReviewHistoryDefinitionStatusInProgress AccessReviewHistoryDefinitionStatus = "InProgress"
	AccessReviewHistoryDefinitionStatusRequested  AccessReviewHistoryDefinitionStatus = "Requested"
)

func PossibleAccessReviewHistoryDefinitionStatusValues added in v0.4.0

func PossibleAccessReviewHistoryDefinitionStatusValues() []AccessReviewHistoryDefinitionStatus

PossibleAccessReviewHistoryDefinitionStatusValues returns the possible values for the AccessReviewHistoryDefinitionStatus const type.

type AccessReviewHistoryDefinitionsClient added in v0.4.0

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

AccessReviewHistoryDefinitionsClient contains the methods for the AccessReviewHistoryDefinitions group. Don't use this type directly, use NewAccessReviewHistoryDefinitionsClient() instead.

func NewAccessReviewHistoryDefinitionsClient added in v0.4.0

func NewAccessReviewHistoryDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewHistoryDefinitionsClient, error)

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

func (*AccessReviewHistoryDefinitionsClient) GetByID added in v0.4.0

GetByID - Get access review history definition by definition Id If the operation fails it returns an *azcore.ResponseError type. historyDefinitionID - The id of the access review history definition. options - AccessReviewHistoryDefinitionsClientGetByIDOptions contains the optional parameters for the AccessReviewHistoryDefinitionsClient.GetByID method.

func (*AccessReviewHistoryDefinitionsClient) NewListPager added in v0.5.0

NewListPager - Lists the accessReviewHistoryDefinitions available from this provider, definition instances are only available for 30 days after creation. If the operation fails it returns an *azcore.ResponseError type. options - AccessReviewHistoryDefinitionsClientListOptions contains the optional parameters for the AccessReviewHistoryDefinitionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewHistoryDefinitions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

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

type AccessReviewHistoryDefinitionsClientGetByIDOptions added in v0.4.0

type AccessReviewHistoryDefinitionsClientGetByIDOptions struct {
}

AccessReviewHistoryDefinitionsClientGetByIDOptions contains the optional parameters for the AccessReviewHistoryDefinitionsClient.GetByID method.

type AccessReviewHistoryDefinitionsClientGetByIDResponse added in v0.4.0

type AccessReviewHistoryDefinitionsClientGetByIDResponse struct {
	AccessReviewHistoryDefinition
}

AccessReviewHistoryDefinitionsClientGetByIDResponse contains the response from method AccessReviewHistoryDefinitionsClient.GetByID.

type AccessReviewHistoryDefinitionsClientListOptions added in v0.4.0

type AccessReviewHistoryDefinitionsClientListOptions struct {
	// The filter to apply on the operation. Only standard filters on definition name and created date are supported
	Filter *string
}

AccessReviewHistoryDefinitionsClientListOptions contains the optional parameters for the AccessReviewHistoryDefinitionsClient.List method.

type AccessReviewHistoryDefinitionsClientListResponse added in v0.4.0

type AccessReviewHistoryDefinitionsClientListResponse struct {
	AccessReviewHistoryDefinitionListResult
}

AccessReviewHistoryDefinitionsClientListResponse contains the response from method AccessReviewHistoryDefinitionsClient.List.

type AccessReviewHistoryInstance added in v0.4.0

type AccessReviewHistoryInstance struct {
	// Access Review History Definition Instance properties.
	Properties *AccessReviewHistoryInstanceProperties `json:"properties,omitempty"`

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

	// READ-ONLY; The access review history definition instance unique id.
	Name *string `json:"name,omitempty" azure:"ro"`

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

AccessReviewHistoryInstance - Access Review History Definition Instance.

type AccessReviewHistoryInstanceProperties added in v0.4.0

type AccessReviewHistoryInstanceProperties struct {
	// The display name for the parent history definition.
	DisplayName *string `json:"displayName,omitempty"`

	// Date time when history data report expires and the associated data is deleted.
	Expiration *time.Time `json:"expiration,omitempty"`

	// Date time when the history data report is scheduled to be generated.
	FulfilledDateTime *time.Time `json:"fulfilledDateTime,omitempty"`

	// Date time used when selecting review data, all reviews included in data end on or before this date. For use only with one-time/non-recurring
	// reports.
	ReviewHistoryPeriodEndDateTime *time.Time `json:"reviewHistoryPeriodEndDateTime,omitempty"`

	// Date time used when selecting review data, all reviews included in data start on or after this date. For use only with
	// one-time/non-recurring reports.
	ReviewHistoryPeriodStartDateTime *time.Time `json:"reviewHistoryPeriodStartDateTime,omitempty"`

	// Date time when the history data report is scheduled to be generated.
	RunDateTime *time.Time `json:"runDateTime,omitempty"`

	// READ-ONLY; Uri which can be used to retrieve review history data. To generate this Uri, generateDownloadUri() must be called
	// for a specific accessReviewHistoryDefinitionInstance. The link expires after a 24 hour
	// period. Callers can see the expiration date time by looking at the 'se' parameter in the generated uri.
	DownloadURI *string `json:"downloadUri,omitempty" azure:"ro"`

	// READ-ONLY; Status of the requested review history instance data. This is either requested, in-progress, done or error.
	// The state transitions are as follows - Requested -> InProgress -> Done -> Expired
	Status *AccessReviewHistoryDefinitionStatus `json:"status,omitempty" azure:"ro"`
}

AccessReviewHistoryInstanceProperties - Access Review History Definition Instance properties.

func (AccessReviewHistoryInstanceProperties) MarshalJSON added in v0.4.0

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewHistoryInstanceProperties.

func (*AccessReviewHistoryInstanceProperties) UnmarshalJSON added in v0.4.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewHistoryInstanceProperties.

type AccessReviewHistoryScheduleSettings added in v0.4.0

type AccessReviewHistoryScheduleSettings struct {
	// Access Review History Definition recurrence settings.
	Pattern *AccessReviewRecurrencePattern `json:"pattern,omitempty"`

	// Access Review History Definition recurrence settings.
	Range *AccessReviewRecurrenceRange `json:"range,omitempty"`
}

AccessReviewHistoryScheduleSettings - Recurrence settings of an Access Review History Definition.

type AccessReviewInstance

type AccessReviewInstance struct {
	// Access Review properties.
	Properties *AccessReviewInstanceProperties `json:"properties,omitempty"`

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

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

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

AccessReviewInstance - Access Review Instance.

type AccessReviewInstanceClient

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

AccessReviewInstanceClient contains the methods for the AccessReviewInstance group. Don't use this type directly, use NewAccessReviewInstanceClient() instead.

func NewAccessReviewInstanceClient

func NewAccessReviewInstanceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstanceClient, error)

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

func (*AccessReviewInstanceClient) AcceptRecommendations

AcceptRecommendations - An action to accept recommendations for decision in an access review instance. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstanceClientAcceptRecommendationsOptions contains the optional parameters for the AccessReviewInstanceClient.AcceptRecommendations method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/AccessReviewInstanceAcceptRecommendations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstanceClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.AcceptRecommendations(ctx,
		"<schedule-definition-id>",
		"<id>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

func (*AccessReviewInstanceClient) ApplyDecisions

ApplyDecisions - An action to apply all decisions for an access review instance. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstanceClientApplyDecisionsOptions contains the optional parameters for the AccessReviewInstanceClient.ApplyDecisions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/AccessReviewInstanceApplyDecisions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstanceClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.ApplyDecisions(ctx,
		"<schedule-definition-id>",
		"<id>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

func (*AccessReviewInstanceClient) ResetDecisions

ResetDecisions - An action to reset all decisions for an access review instance. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstanceClientResetDecisionsOptions contains the optional parameters for the AccessReviewInstanceClient.ResetDecisions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/AccessReviewInstanceResetDecisions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstanceClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.ResetDecisions(ctx,
		"<schedule-definition-id>",
		"<id>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

func (*AccessReviewInstanceClient) SendReminders

SendReminders - An action to send reminders for an access review instance. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstanceClientSendRemindersOptions contains the optional parameters for the AccessReviewInstanceClient.SendReminders method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/AccessReviewInstanceSendReminders.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstanceClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.SendReminders(ctx,
		"<schedule-definition-id>",
		"<id>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

func (*AccessReviewInstanceClient) Stop

Stop - An action to stop an access review instance. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstanceClientStopOptions contains the optional parameters for the AccessReviewInstanceClient.Stop method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/StopAccessReviewInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstanceClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.Stop(ctx,
		"<schedule-definition-id>",
		"<id>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

type AccessReviewInstanceClientAcceptRecommendationsOptions added in v0.3.0

type AccessReviewInstanceClientAcceptRecommendationsOptions struct {
}

AccessReviewInstanceClientAcceptRecommendationsOptions contains the optional parameters for the AccessReviewInstanceClient.AcceptRecommendations method.

type AccessReviewInstanceClientAcceptRecommendationsResponse added in v0.3.0

type AccessReviewInstanceClientAcceptRecommendationsResponse struct {
}

AccessReviewInstanceClientAcceptRecommendationsResponse contains the response from method AccessReviewInstanceClient.AcceptRecommendations.

type AccessReviewInstanceClientApplyDecisionsOptions added in v0.3.0

type AccessReviewInstanceClientApplyDecisionsOptions struct {
}

AccessReviewInstanceClientApplyDecisionsOptions contains the optional parameters for the AccessReviewInstanceClient.ApplyDecisions method.

type AccessReviewInstanceClientApplyDecisionsResponse added in v0.3.0

type AccessReviewInstanceClientApplyDecisionsResponse struct {
}

AccessReviewInstanceClientApplyDecisionsResponse contains the response from method AccessReviewInstanceClient.ApplyDecisions.

type AccessReviewInstanceClientResetDecisionsOptions added in v0.3.0

type AccessReviewInstanceClientResetDecisionsOptions struct {
}

AccessReviewInstanceClientResetDecisionsOptions contains the optional parameters for the AccessReviewInstanceClient.ResetDecisions method.

type AccessReviewInstanceClientResetDecisionsResponse added in v0.3.0

type AccessReviewInstanceClientResetDecisionsResponse struct {
}

AccessReviewInstanceClientResetDecisionsResponse contains the response from method AccessReviewInstanceClient.ResetDecisions.

type AccessReviewInstanceClientSendRemindersOptions added in v0.3.0

type AccessReviewInstanceClientSendRemindersOptions struct {
}

AccessReviewInstanceClientSendRemindersOptions contains the optional parameters for the AccessReviewInstanceClient.SendReminders method.

type AccessReviewInstanceClientSendRemindersResponse added in v0.3.0

type AccessReviewInstanceClientSendRemindersResponse struct {
}

AccessReviewInstanceClientSendRemindersResponse contains the response from method AccessReviewInstanceClient.SendReminders.

type AccessReviewInstanceClientStopOptions added in v0.3.0

type AccessReviewInstanceClientStopOptions struct {
}

AccessReviewInstanceClientStopOptions contains the optional parameters for the AccessReviewInstanceClient.Stop method.

type AccessReviewInstanceClientStopResponse added in v0.3.0

type AccessReviewInstanceClientStopResponse struct {
}

AccessReviewInstanceClientStopResponse contains the response from method AccessReviewInstanceClient.Stop.

type AccessReviewInstanceContactedReviewersClient added in v0.4.0

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

AccessReviewInstanceContactedReviewersClient contains the methods for the AccessReviewInstanceContactedReviewers group. Don't use this type directly, use NewAccessReviewInstanceContactedReviewersClient() instead.

func NewAccessReviewInstanceContactedReviewersClient added in v0.4.0

func NewAccessReviewInstanceContactedReviewersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstanceContactedReviewersClient, error)

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

func (*AccessReviewInstanceContactedReviewersClient) NewListPager added in v0.5.0

NewListPager - Get access review instance contacted reviewers If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the AccessReviewInstanceContactedReviewersClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewInstanceContactedReviewers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstanceContactedReviewersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<schedule-definition-id>",
		"<id>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AccessReviewInstanceContactedReviewersClientListOptions added in v0.4.0

type AccessReviewInstanceContactedReviewersClientListOptions struct {
}

AccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the AccessReviewInstanceContactedReviewersClient.List method.

type AccessReviewInstanceContactedReviewersClientListResponse added in v0.4.0

type AccessReviewInstanceContactedReviewersClientListResponse struct {
	AccessReviewContactedReviewerListResult
}

AccessReviewInstanceContactedReviewersClientListResponse contains the response from method AccessReviewInstanceContactedReviewersClient.List.

type AccessReviewInstanceDecisionsClient

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

AccessReviewInstanceDecisionsClient contains the methods for the AccessReviewInstanceDecisions group. Don't use this type directly, use NewAccessReviewInstanceDecisionsClient() instead.

func NewAccessReviewInstanceDecisionsClient

func NewAccessReviewInstanceDecisionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstanceDecisionsClient, error)

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

func (*AccessReviewInstanceDecisionsClient) NewListPager added in v0.5.0

NewListPager - Get access review instance decisions If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstanceDecisionsClientListOptions contains the optional parameters for the AccessReviewInstanceDecisionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewInstanceDecisions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

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

type AccessReviewInstanceDecisionsClientListOptions added in v0.3.0

type AccessReviewInstanceDecisionsClientListOptions struct {
	// The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'.
	// When one specified $filter=assignedToMeToReview(), only items that
	// are assigned to the calling user to review are returned
	Filter *string
}

AccessReviewInstanceDecisionsClientListOptions contains the optional parameters for the AccessReviewInstanceDecisionsClient.List method.

type AccessReviewInstanceDecisionsClientListResponse added in v0.3.0

type AccessReviewInstanceDecisionsClientListResponse struct {
	AccessReviewDecisionListResult
}

AccessReviewInstanceDecisionsClientListResponse contains the response from method AccessReviewInstanceDecisionsClient.List.

type AccessReviewInstanceListResult

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

	// Access Review Instance list.
	Value []*AccessReviewInstance `json:"value,omitempty"`
}

AccessReviewInstanceListResult - List of Access Review Instances.

func (AccessReviewInstanceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewInstanceListResult.

type AccessReviewInstanceMyDecisionsClient

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

AccessReviewInstanceMyDecisionsClient contains the methods for the AccessReviewInstanceMyDecisions group. Don't use this type directly, use NewAccessReviewInstanceMyDecisionsClient() instead.

func NewAccessReviewInstanceMyDecisionsClient

func NewAccessReviewInstanceMyDecisionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstanceMyDecisionsClient, error)

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

func (*AccessReviewInstanceMyDecisionsClient) GetByID

GetByID - Get my single access review instance decision. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. decisionID - The id of the decision record. options - AccessReviewInstanceMyDecisionsClientGetByIDOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.GetByID method.

func (*AccessReviewInstanceMyDecisionsClient) NewListPager added in v0.5.0

NewListPager - Get my access review instance decisions. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstanceMyDecisionsClientListOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewInstanceMyDecisions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstanceMyDecisionsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<schedule-definition-id>",
		"<id>",
		&armauthorization.AccessReviewInstanceMyDecisionsClientListOptions{Filter: nil})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AccessReviewInstanceMyDecisionsClient) Patch

Patch - Record a decision. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. decisionID - The id of the decision record. properties - Access review decision properties to patch. options - AccessReviewInstanceMyDecisionsClientPatchOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.Patch method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/PatchAccessReviewInstanceMyDecisionById.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstanceMyDecisionsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Patch(ctx,
		"<schedule-definition-id>",
		"<id>",
		"<decision-id>",
		armauthorization.AccessReviewDecisionProperties{},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

type AccessReviewInstanceMyDecisionsClientGetByIDOptions added in v0.3.0

type AccessReviewInstanceMyDecisionsClientGetByIDOptions struct {
}

AccessReviewInstanceMyDecisionsClientGetByIDOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.GetByID method.

type AccessReviewInstanceMyDecisionsClientGetByIDResponse added in v0.3.0

type AccessReviewInstanceMyDecisionsClientGetByIDResponse struct {
	AccessReviewDecision
}

AccessReviewInstanceMyDecisionsClientGetByIDResponse contains the response from method AccessReviewInstanceMyDecisionsClient.GetByID.

type AccessReviewInstanceMyDecisionsClientListOptions added in v0.3.0

type AccessReviewInstanceMyDecisionsClientListOptions struct {
	// The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'.
	// When one specified $filter=assignedToMeToReview(), only items that
	// are assigned to the calling user to review are returned
	Filter *string
}

AccessReviewInstanceMyDecisionsClientListOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.List method.

type AccessReviewInstanceMyDecisionsClientListResponse added in v0.3.0

type AccessReviewInstanceMyDecisionsClientListResponse struct {
	AccessReviewDecisionListResult
}

AccessReviewInstanceMyDecisionsClientListResponse contains the response from method AccessReviewInstanceMyDecisionsClient.List.

type AccessReviewInstanceMyDecisionsClientPatchOptions added in v0.3.0

type AccessReviewInstanceMyDecisionsClientPatchOptions struct {
}

AccessReviewInstanceMyDecisionsClientPatchOptions contains the optional parameters for the AccessReviewInstanceMyDecisionsClient.Patch method.

type AccessReviewInstanceMyDecisionsClientPatchResponse added in v0.3.0

type AccessReviewInstanceMyDecisionsClientPatchResponse struct {
	AccessReviewDecision
}

AccessReviewInstanceMyDecisionsClientPatchResponse contains the response from method AccessReviewInstanceMyDecisionsClient.Patch.

type AccessReviewInstanceProperties

type AccessReviewInstanceProperties struct {
	// This is the collection of backup reviewers.
	BackupReviewers []*AccessReviewReviewer `json:"backupReviewers,omitempty"`

	// The DateTime when the review instance is scheduled to end.
	EndDateTime *time.Time `json:"endDateTime,omitempty"`

	// This is the collection of reviewers.
	Reviewers []*AccessReviewReviewer `json:"reviewers,omitempty"`

	// The DateTime when the review instance is scheduled to be start.
	StartDateTime *time.Time `json:"startDateTime,omitempty"`

	// READ-ONLY; This field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned.
	// However, in some cases, the reviewers may not be assigned and instead be chosen
	// dynamically. For example managers review or self review.
	ReviewersType *AccessReviewInstanceReviewersType `json:"reviewersType,omitempty" azure:"ro"`

	// READ-ONLY; This read-only field specifies the status of an access review instance.
	Status *AccessReviewInstanceStatus `json:"status,omitempty" azure:"ro"`
}

AccessReviewInstanceProperties - Access Review Instance properties.

func (AccessReviewInstanceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewInstanceProperties.

func (*AccessReviewInstanceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewInstanceProperties.

type AccessReviewInstanceReviewersType added in v0.4.0

type AccessReviewInstanceReviewersType string

AccessReviewInstanceReviewersType - This field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned. However, in some cases, the reviewers may not be assigned and instead be chosen dynamically. For example managers review or self review.

const (
	AccessReviewInstanceReviewersTypeAssigned AccessReviewInstanceReviewersType = "Assigned"
	AccessReviewInstanceReviewersTypeManagers AccessReviewInstanceReviewersType = "Managers"
	AccessReviewInstanceReviewersTypeSelf     AccessReviewInstanceReviewersType = "Self"
)

func PossibleAccessReviewInstanceReviewersTypeValues added in v0.4.0

func PossibleAccessReviewInstanceReviewersTypeValues() []AccessReviewInstanceReviewersType

PossibleAccessReviewInstanceReviewersTypeValues returns the possible values for the AccessReviewInstanceReviewersType const type.

type AccessReviewInstanceStatus

type AccessReviewInstanceStatus string

AccessReviewInstanceStatus - This read-only field specifies the status of an access review instance.

const (
	AccessReviewInstanceStatusApplied       AccessReviewInstanceStatus = "Applied"
	AccessReviewInstanceStatusApplying      AccessReviewInstanceStatus = "Applying"
	AccessReviewInstanceStatusAutoReviewed  AccessReviewInstanceStatus = "AutoReviewed"
	AccessReviewInstanceStatusAutoReviewing AccessReviewInstanceStatus = "AutoReviewing"
	AccessReviewInstanceStatusCompleted     AccessReviewInstanceStatus = "Completed"
	AccessReviewInstanceStatusCompleting    AccessReviewInstanceStatus = "Completing"
	AccessReviewInstanceStatusInProgress    AccessReviewInstanceStatus = "InProgress"
	AccessReviewInstanceStatusInitializing  AccessReviewInstanceStatus = "Initializing"
	AccessReviewInstanceStatusNotStarted    AccessReviewInstanceStatus = "NotStarted"
	AccessReviewInstanceStatusScheduled     AccessReviewInstanceStatus = "Scheduled"
	AccessReviewInstanceStatusStarting      AccessReviewInstanceStatus = "Starting"
)

func PossibleAccessReviewInstanceStatusValues

func PossibleAccessReviewInstanceStatusValues() []AccessReviewInstanceStatus

PossibleAccessReviewInstanceStatusValues returns the possible values for the AccessReviewInstanceStatus const type.

type AccessReviewInstancesAssignedForMyApprovalClient

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

AccessReviewInstancesAssignedForMyApprovalClient contains the methods for the AccessReviewInstancesAssignedForMyApproval group. Don't use this type directly, use NewAccessReviewInstancesAssignedForMyApprovalClient() instead.

func NewAccessReviewInstancesAssignedForMyApprovalClient

func NewAccessReviewInstancesAssignedForMyApprovalClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstancesAssignedForMyApprovalClient, error)

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

func (*AccessReviewInstancesAssignedForMyApprovalClient) GetByID

GetByID - Get single access review instance assigned for my approval. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions contains the optional parameters for the AccessReviewInstancesAssignedForMyApprovalClient.GetByID method.

func (*AccessReviewInstancesAssignedForMyApprovalClient) NewListPager added in v0.5.0

NewListPager - Get access review instances assigned for my approval. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. options - AccessReviewInstancesAssignedForMyApprovalClientListOptions contains the optional parameters for the AccessReviewInstancesAssignedForMyApprovalClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewInstancesAssignedForMyApproval.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstancesAssignedForMyApprovalClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<schedule-definition-id>",
		&armauthorization.AccessReviewInstancesAssignedForMyApprovalClientListOptions{Filter: to.Ptr("<filter>")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions added in v0.3.0

type AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions struct {
}

AccessReviewInstancesAssignedForMyApprovalClientGetByIDOptions contains the optional parameters for the AccessReviewInstancesAssignedForMyApprovalClient.GetByID method.

type AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse added in v0.3.0

type AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse struct {
	AccessReviewInstance
}

AccessReviewInstancesAssignedForMyApprovalClientGetByIDResponse contains the response from method AccessReviewInstancesAssignedForMyApprovalClient.GetByID.

type AccessReviewInstancesAssignedForMyApprovalClientListOptions added in v0.3.0

type AccessReviewInstancesAssignedForMyApprovalClientListOptions struct {
	// The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'.
	// When one specified $filter=assignedToMeToReview(), only items that
	// are assigned to the calling user to review are returned
	Filter *string
}

AccessReviewInstancesAssignedForMyApprovalClientListOptions contains the optional parameters for the AccessReviewInstancesAssignedForMyApprovalClient.List method.

type AccessReviewInstancesAssignedForMyApprovalClientListResponse added in v0.3.0

type AccessReviewInstancesAssignedForMyApprovalClientListResponse struct {
	AccessReviewInstanceListResult
}

AccessReviewInstancesAssignedForMyApprovalClientListResponse contains the response from method AccessReviewInstancesAssignedForMyApprovalClient.List.

type AccessReviewInstancesClient

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

AccessReviewInstancesClient contains the methods for the AccessReviewInstances group. Don't use this type directly, use NewAccessReviewInstancesClient() instead.

func NewAccessReviewInstancesClient

func NewAccessReviewInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewInstancesClient, error)

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

func (*AccessReviewInstancesClient) Create added in v0.4.0

Create - Update access review instance. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. properties - Access review instance properties. options - AccessReviewInstancesClientCreateOptions contains the optional parameters for the AccessReviewInstancesClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/PutAccessReviewInstance.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewInstancesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Create(ctx,
		"<schedule-definition-id>",
		"<id>",
		armauthorization.AccessReviewInstanceProperties{},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccessReviewInstancesClient) GetByID

GetByID - Get access review instances If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - AccessReviewInstancesClientGetByIDOptions contains the optional parameters for the AccessReviewInstancesClient.GetByID method.

func (*AccessReviewInstancesClient) NewListPager added in v0.5.0

NewListPager - Get access review instances If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. options - AccessReviewInstancesClientListOptions contains the optional parameters for the AccessReviewInstancesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewInstances.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

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

type AccessReviewInstancesClientCreateOptions added in v0.4.0

type AccessReviewInstancesClientCreateOptions struct {
}

AccessReviewInstancesClientCreateOptions contains the optional parameters for the AccessReviewInstancesClient.Create method.

type AccessReviewInstancesClientCreateResponse added in v0.4.0

type AccessReviewInstancesClientCreateResponse struct {
	AccessReviewInstance
}

AccessReviewInstancesClientCreateResponse contains the response from method AccessReviewInstancesClient.Create.

type AccessReviewInstancesClientGetByIDOptions added in v0.3.0

type AccessReviewInstancesClientGetByIDOptions struct {
}

AccessReviewInstancesClientGetByIDOptions contains the optional parameters for the AccessReviewInstancesClient.GetByID method.

type AccessReviewInstancesClientGetByIDResponse added in v0.3.0

type AccessReviewInstancesClientGetByIDResponse struct {
	AccessReviewInstance
}

AccessReviewInstancesClientGetByIDResponse contains the response from method AccessReviewInstancesClient.GetByID.

type AccessReviewInstancesClientListOptions added in v0.3.0

type AccessReviewInstancesClientListOptions struct {
	// The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'.
	// When one specified $filter=assignedToMeToReview(), only items that
	// are assigned to the calling user to review are returned
	Filter *string
}

AccessReviewInstancesClientListOptions contains the optional parameters for the AccessReviewInstancesClient.List method.

type AccessReviewInstancesClientListResponse added in v0.3.0

type AccessReviewInstancesClientListResponse struct {
	AccessReviewInstanceListResult
}

AccessReviewInstancesClientListResponse contains the response from method AccessReviewInstancesClient.List.

type AccessReviewRecurrencePattern

type AccessReviewRecurrencePattern struct {
	// The interval for recurrence. For a quarterly review, the interval is 3 for type : absoluteMonthly.
	Interval *int32 `json:"interval,omitempty"`

	// The recurrence type : weekly, monthly, etc.
	Type *AccessReviewRecurrencePatternType `json:"type,omitempty"`
}

AccessReviewRecurrencePattern - Recurrence Pattern of an Access Review Schedule Definition.

type AccessReviewRecurrencePatternType

type AccessReviewRecurrencePatternType string

AccessReviewRecurrencePatternType - The recurrence type : weekly, monthly, etc.

const (
	AccessReviewRecurrencePatternTypeAbsoluteMonthly AccessReviewRecurrencePatternType = "absoluteMonthly"
	AccessReviewRecurrencePatternTypeWeekly          AccessReviewRecurrencePatternType = "weekly"
)

func PossibleAccessReviewRecurrencePatternTypeValues

func PossibleAccessReviewRecurrencePatternTypeValues() []AccessReviewRecurrencePatternType

PossibleAccessReviewRecurrencePatternTypeValues returns the possible values for the AccessReviewRecurrencePatternType const type.

type AccessReviewRecurrenceRange

type AccessReviewRecurrenceRange struct {
	// The DateTime when the review is scheduled to end. Required if type is endDate
	EndDate *time.Time `json:"endDate,omitempty"`

	// The number of times to repeat the access review. Required and must be positive if type is numbered.
	NumberOfOccurrences *int32 `json:"numberOfOccurrences,omitempty"`

	// The DateTime when the review is scheduled to be start. This could be a date in the future. Required on create.
	StartDate *time.Time `json:"startDate,omitempty"`

	// The recurrence range type. The possible values are: endDate, noEnd, numbered.
	Type *AccessReviewRecurrenceRangeType `json:"type,omitempty"`
}

AccessReviewRecurrenceRange - Recurrence Range of an Access Review Schedule Definition.

func (AccessReviewRecurrenceRange) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessReviewRecurrenceRange.

func (*AccessReviewRecurrenceRange) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessReviewRecurrenceRange.

type AccessReviewRecurrenceRangeType

type AccessReviewRecurrenceRangeType string

AccessReviewRecurrenceRangeType - The recurrence range type. The possible values are: endDate, noEnd, numbered.

const (
	AccessReviewRecurrenceRangeTypeEndDate  AccessReviewRecurrenceRangeType = "endDate"
	AccessReviewRecurrenceRangeTypeNoEnd    AccessReviewRecurrenceRangeType = "noEnd"
	AccessReviewRecurrenceRangeTypeNumbered AccessReviewRecurrenceRangeType = "numbered"
)

func PossibleAccessReviewRecurrenceRangeTypeValues

func PossibleAccessReviewRecurrenceRangeTypeValues() []AccessReviewRecurrenceRangeType

PossibleAccessReviewRecurrenceRangeTypeValues returns the possible values for the AccessReviewRecurrenceRangeType const type.

type AccessReviewRecurrenceSettings

type AccessReviewRecurrenceSettings struct {
	// Access Review schedule definition recurrence pattern.
	Pattern *AccessReviewRecurrencePattern `json:"pattern,omitempty"`

	// Access Review schedule definition recurrence range.
	Range *AccessReviewRecurrenceRange `json:"range,omitempty"`
}

AccessReviewRecurrenceSettings - Recurrence Settings of an Access Review Schedule Definition.

type AccessReviewResult

type AccessReviewResult string

AccessReviewResult - Represents a reviewer's decision for a given review

const (
	AccessReviewResultApprove     AccessReviewResult = "Approve"
	AccessReviewResultDeny        AccessReviewResult = "Deny"
	AccessReviewResultDontKnow    AccessReviewResult = "DontKnow"
	AccessReviewResultNotNotified AccessReviewResult = "NotNotified"
	AccessReviewResultNotReviewed AccessReviewResult = "NotReviewed"
)

func PossibleAccessReviewResultValues

func PossibleAccessReviewResultValues() []AccessReviewResult

PossibleAccessReviewResultValues returns the possible values for the AccessReviewResult const type.

type AccessReviewReviewer

type AccessReviewReviewer struct {
	// The id of the reviewer(user/servicePrincipal)
	PrincipalID *string `json:"principalId,omitempty"`

	// READ-ONLY; The identity type : user/servicePrincipal
	PrincipalType *AccessReviewReviewerType `json:"principalType,omitempty" azure:"ro"`
}

AccessReviewReviewer - Descriptor for what needs to be reviewed

type AccessReviewReviewerType

type AccessReviewReviewerType string

AccessReviewReviewerType - The identity type : user/servicePrincipal

const (
	AccessReviewReviewerTypeServicePrincipal AccessReviewReviewerType = "servicePrincipal"
	AccessReviewReviewerTypeUser             AccessReviewReviewerType = "user"
)

func PossibleAccessReviewReviewerTypeValues

func PossibleAccessReviewReviewerTypeValues() []AccessReviewReviewerType

PossibleAccessReviewReviewerTypeValues returns the possible values for the AccessReviewReviewerType const type.

type AccessReviewScheduleDefinition

type AccessReviewScheduleDefinition struct {
	// Access Review properties.
	Properties *AccessReviewScheduleDefinitionProperties `json:"properties,omitempty"`

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

	// READ-ONLY; The access review schedule definition unique id.
	Name *string `json:"name,omitempty" azure:"ro"`

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

AccessReviewScheduleDefinition - Access Review Schedule Definition.

type AccessReviewScheduleDefinitionListResult

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

	// Access Review Schedule Definition list.
	Value []*AccessReviewScheduleDefinition `json:"value,omitempty"`
}

AccessReviewScheduleDefinitionListResult - List of Access Review Schedule Definitions.

func (AccessReviewScheduleDefinitionListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AccessReviewScheduleDefinitionListResult.

type AccessReviewScheduleDefinitionProperties

type AccessReviewScheduleDefinitionProperties struct {
	// This is the collection of backup reviewers.
	BackupReviewers []*AccessReviewReviewer `json:"backupReviewers,omitempty"`

	// The description provided by the access review creator and visible to admins.
	DescriptionForAdmins *string `json:"descriptionForAdmins,omitempty"`

	// The description provided by the access review creator to be shown to reviewers.
	DescriptionForReviewers *string `json:"descriptionForReviewers,omitempty"`

	// The display name for the schedule definition.
	DisplayName *string `json:"displayName,omitempty"`

	// This is the collection of instances returned when one does an expand on it.
	Instances []*AccessReviewInstance `json:"instances,omitempty"`

	// This is the collection of reviewers.
	Reviewers []*AccessReviewReviewer `json:"reviewers,omitempty"`

	// Access Review Settings.
	Settings *AccessReviewScheduleSettings `json:"settings,omitempty"`

	// READ-ONLY; The user or other identity who created this review.
	CreatedBy *AccessReviewActorIdentity `json:"createdBy,omitempty" azure:"ro"`

	// READ-ONLY; This field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned.
	// However, in some cases, the reviewers may not be assigned and instead be chosen
	// dynamically. For example managers review or self review.
	ReviewersType *AccessReviewScheduleDefinitionReviewersType `json:"reviewersType,omitempty" azure:"ro"`

	// READ-ONLY; This is used to define what to include in scope of the review. The scope definition includes the resourceId
	// and roleDefinitionId.
	Scope *AccessReviewScope `json:"scope,omitempty" azure:"ro"`

	// READ-ONLY; This read-only field specifies the status of an accessReview.
	Status *AccessReviewScheduleDefinitionStatus `json:"status,omitempty" azure:"ro"`
}

AccessReviewScheduleDefinitionProperties - Access Review.

func (AccessReviewScheduleDefinitionProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AccessReviewScheduleDefinitionProperties.

type AccessReviewScheduleDefinitionReviewersType

type AccessReviewScheduleDefinitionReviewersType string

AccessReviewScheduleDefinitionReviewersType - This field specifies the type of reviewers for a review. Usually for a review, reviewers are explicitly assigned. However, in some cases, the reviewers may not be assigned and instead be chosen dynamically. For example managers review or self review.

const (
	AccessReviewScheduleDefinitionReviewersTypeAssigned AccessReviewScheduleDefinitionReviewersType = "Assigned"
	AccessReviewScheduleDefinitionReviewersTypeManagers AccessReviewScheduleDefinitionReviewersType = "Managers"
	AccessReviewScheduleDefinitionReviewersTypeSelf     AccessReviewScheduleDefinitionReviewersType = "Self"
)

func PossibleAccessReviewScheduleDefinitionReviewersTypeValues

func PossibleAccessReviewScheduleDefinitionReviewersTypeValues() []AccessReviewScheduleDefinitionReviewersType

PossibleAccessReviewScheduleDefinitionReviewersTypeValues returns the possible values for the AccessReviewScheduleDefinitionReviewersType const type.

type AccessReviewScheduleDefinitionStatus

type AccessReviewScheduleDefinitionStatus string

AccessReviewScheduleDefinitionStatus - This read-only field specifies the status of an accessReview.

const (
	AccessReviewScheduleDefinitionStatusApplied       AccessReviewScheduleDefinitionStatus = "Applied"
	AccessReviewScheduleDefinitionStatusApplying      AccessReviewScheduleDefinitionStatus = "Applying"
	AccessReviewScheduleDefinitionStatusAutoReviewed  AccessReviewScheduleDefinitionStatus = "AutoReviewed"
	AccessReviewScheduleDefinitionStatusAutoReviewing AccessReviewScheduleDefinitionStatus = "AutoReviewing"
	AccessReviewScheduleDefinitionStatusCompleted     AccessReviewScheduleDefinitionStatus = "Completed"
	AccessReviewScheduleDefinitionStatusCompleting    AccessReviewScheduleDefinitionStatus = "Completing"
	AccessReviewScheduleDefinitionStatusInProgress    AccessReviewScheduleDefinitionStatus = "InProgress"
	AccessReviewScheduleDefinitionStatusInitializing  AccessReviewScheduleDefinitionStatus = "Initializing"
	AccessReviewScheduleDefinitionStatusNotStarted    AccessReviewScheduleDefinitionStatus = "NotStarted"
	AccessReviewScheduleDefinitionStatusScheduled     AccessReviewScheduleDefinitionStatus = "Scheduled"
	AccessReviewScheduleDefinitionStatusStarting      AccessReviewScheduleDefinitionStatus = "Starting"
)

func PossibleAccessReviewScheduleDefinitionStatusValues

func PossibleAccessReviewScheduleDefinitionStatusValues() []AccessReviewScheduleDefinitionStatus

PossibleAccessReviewScheduleDefinitionStatusValues returns the possible values for the AccessReviewScheduleDefinitionStatus const type.

type AccessReviewScheduleDefinitionsAssignedForMyApprovalClient

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

AccessReviewScheduleDefinitionsAssignedForMyApprovalClient contains the methods for the AccessReviewScheduleDefinitionsAssignedForMyApproval group. Don't use this type directly, use NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient() instead.

func NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient

func NewAccessReviewScheduleDefinitionsAssignedForMyApprovalClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewScheduleDefinitionsAssignedForMyApprovalClient, error)

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

func (*AccessReviewScheduleDefinitionsAssignedForMyApprovalClient) NewListPager added in v0.5.0

NewListPager - Get access review instances assigned for my approval. If the operation fails it returns an *azcore.ResponseError type. options - AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions contains the optional parameters for the AccessReviewScheduleDefinitionsAssignedForMyApprovalClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewScheduleDefinitionsAssignedForMyApproval.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

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

type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions added in v0.3.0

type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions struct {
	// The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'.
	// When one specified $filter=assignedToMeToReview(), only items that
	// are assigned to the calling user to review are returned
	Filter *string
}

AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListOptions contains the optional parameters for the AccessReviewScheduleDefinitionsAssignedForMyApprovalClient.List method.

type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListResponse added in v0.3.0

type AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListResponse struct {
	AccessReviewScheduleDefinitionListResult
}

AccessReviewScheduleDefinitionsAssignedForMyApprovalClientListResponse contains the response from method AccessReviewScheduleDefinitionsAssignedForMyApprovalClient.List.

type AccessReviewScheduleDefinitionsClient

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

AccessReviewScheduleDefinitionsClient contains the methods for the AccessReviewScheduleDefinitions group. Don't use this type directly, use NewAccessReviewScheduleDefinitionsClient() instead.

func NewAccessReviewScheduleDefinitionsClient

func NewAccessReviewScheduleDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccessReviewScheduleDefinitionsClient, error)

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

func (*AccessReviewScheduleDefinitionsClient) CreateOrUpdateByID

CreateOrUpdateByID - Create or Update access review schedule definition. If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. properties - Access review schedule definition properties. options - AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.CreateOrUpdateByID method.

func (*AccessReviewScheduleDefinitionsClient) DeleteByID

DeleteByID - Delete access review schedule definition If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. options - AccessReviewScheduleDefinitionsClientDeleteByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.DeleteByID method.

func (*AccessReviewScheduleDefinitionsClient) GetByID

GetByID - Get single access review definition If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. options - AccessReviewScheduleDefinitionsClientGetByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.GetByID method.

func (*AccessReviewScheduleDefinitionsClient) NewListPager added in v0.5.0

NewListPager - Get access review schedule definitions If the operation fails it returns an *azcore.ResponseError type. options - AccessReviewScheduleDefinitionsClientListOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/GetAccessReviewScheduleDefinitions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

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

func (*AccessReviewScheduleDefinitionsClient) Stop

Stop - Stop access review definition If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. options - AccessReviewScheduleDefinitionsClientStopOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.Stop method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/StopAccessReviewScheduleDefinition.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewAccessReviewScheduleDefinitionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.Stop(ctx,
		"<schedule-definition-id>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions added in v0.3.0

type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions struct {
}

AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.CreateOrUpdateByID method.

type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse added in v0.3.0

type AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse struct {
	AccessReviewScheduleDefinition
}

AccessReviewScheduleDefinitionsClientCreateOrUpdateByIDResponse contains the response from method AccessReviewScheduleDefinitionsClient.CreateOrUpdateByID.

type AccessReviewScheduleDefinitionsClientDeleteByIDOptions added in v0.3.0

type AccessReviewScheduleDefinitionsClientDeleteByIDOptions struct {
}

AccessReviewScheduleDefinitionsClientDeleteByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.DeleteByID method.

type AccessReviewScheduleDefinitionsClientDeleteByIDResponse added in v0.3.0

type AccessReviewScheduleDefinitionsClientDeleteByIDResponse struct {
}

AccessReviewScheduleDefinitionsClientDeleteByIDResponse contains the response from method AccessReviewScheduleDefinitionsClient.DeleteByID.

type AccessReviewScheduleDefinitionsClientGetByIDOptions added in v0.3.0

type AccessReviewScheduleDefinitionsClientGetByIDOptions struct {
}

AccessReviewScheduleDefinitionsClientGetByIDOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.GetByID method.

type AccessReviewScheduleDefinitionsClientGetByIDResponse added in v0.3.0

type AccessReviewScheduleDefinitionsClientGetByIDResponse struct {
	AccessReviewScheduleDefinition
}

AccessReviewScheduleDefinitionsClientGetByIDResponse contains the response from method AccessReviewScheduleDefinitionsClient.GetByID.

type AccessReviewScheduleDefinitionsClientListOptions added in v0.3.0

type AccessReviewScheduleDefinitionsClientListOptions struct {
	// The filter to apply on the operation. Other than standard filters, one custom filter option is supported : 'assignedToMeToReview()'.
	// When one specified $filter=assignedToMeToReview(), only items that
	// are assigned to the calling user to review are returned
	Filter *string
}

AccessReviewScheduleDefinitionsClientListOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.List method.

type AccessReviewScheduleDefinitionsClientListResponse added in v0.3.0

type AccessReviewScheduleDefinitionsClientListResponse struct {
	AccessReviewScheduleDefinitionListResult
}

AccessReviewScheduleDefinitionsClientListResponse contains the response from method AccessReviewScheduleDefinitionsClient.List.

type AccessReviewScheduleDefinitionsClientStopOptions added in v0.3.0

type AccessReviewScheduleDefinitionsClientStopOptions struct {
}

AccessReviewScheduleDefinitionsClientStopOptions contains the optional parameters for the AccessReviewScheduleDefinitionsClient.Stop method.

type AccessReviewScheduleDefinitionsClientStopResponse added in v0.3.0

type AccessReviewScheduleDefinitionsClientStopResponse struct {
}

AccessReviewScheduleDefinitionsClientStopResponse contains the response from method AccessReviewScheduleDefinitionsClient.Stop.

type AccessReviewScheduleSettings

type AccessReviewScheduleSettings struct {
	// Flag to indicate whether auto-apply capability, to automatically change the target object access resource, is enabled.
	// If not enabled, a user must, after the review completes, apply the access review.
	AutoApplyDecisionsEnabled *bool `json:"autoApplyDecisionsEnabled,omitempty"`

	// This specifies the behavior for the autoReview feature when an access review completes.
	DefaultDecision *DefaultDecisionType `json:"defaultDecision,omitempty"`

	// Flag to indicate whether reviewers are required to provide a justification when reviewing access.
	DefaultDecisionEnabled *bool `json:"defaultDecisionEnabled,omitempty"`

	// The duration in days for an instance.
	InstanceDurationInDays *int32 `json:"instanceDurationInDays,omitempty"`

	// Flag to indicate whether the reviewer is required to pass justification when recording a decision.
	JustificationRequiredOnApproval *bool `json:"justificationRequiredOnApproval,omitempty"`

	// Flag to indicate whether sending mails to reviewers and the review creator is enabled.
	MailNotificationsEnabled *bool `json:"mailNotificationsEnabled,omitempty"`

	// Recommendations for access reviews are calculated by looking back at 30 days of data(w.r.t the start date of the review)
	// by default. However, in some scenarios, customers want to change how far back
	// to look at and want to configure 60 days, 90 days, etc. instead. This setting allows customers to configure this duration.
	// The value should be in ISO 8601 format
	// (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string:
	// XmlConvert.ToString(new TimeSpan(hours, minutes, seconds))
	RecommendationLookBackDuration *string `json:"recommendationLookBackDuration,omitempty"`

	// Flag to indicate whether showing recommendations to reviewers is enabled.
	RecommendationsEnabled *bool `json:"recommendationsEnabled,omitempty"`

	// Access Review Settings.
	Recurrence *AccessReviewRecurrenceSettings `json:"recurrence,omitempty"`

	// Flag to indicate whether sending reminder emails to reviewers are enabled.
	ReminderNotificationsEnabled *bool `json:"reminderNotificationsEnabled,omitempty"`
}

AccessReviewScheduleSettings - Settings of an Access Review.

type AccessReviewScope

type AccessReviewScope struct {
	// Flag to indicate whether to expand nested memberships or not.
	ExpandNestedMemberships *bool `json:"expandNestedMemberships,omitempty"`

	// Duration users are inactive for. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This
	// code can be used to convert TimeSpan to a valid interval string:
	// XmlConvert.ToString(new TimeSpan(hours, minutes, seconds))
	InactiveDuration *string `json:"inactiveDuration,omitempty"`

	// READ-ONLY; The role assignment state eligible/active to review
	AssignmentState *AccessReviewScopeAssignmentState `json:"assignmentState,omitempty" azure:"ro"`

	// READ-ONLY; The identity type user/servicePrincipal to review
	PrincipalType *AccessReviewScopePrincipalType `json:"principalType,omitempty" azure:"ro"`

	// READ-ONLY; ResourceId in which this review is getting created
	ResourceID *string `json:"resourceId,omitempty" azure:"ro"`

	// READ-ONLY; This is used to indicate the role being reviewed
	RoleDefinitionID *string `json:"roleDefinitionId,omitempty" azure:"ro"`
}

AccessReviewScope - Descriptor for what needs to be reviewed

type AccessReviewScopeAssignmentState added in v0.4.0

type AccessReviewScopeAssignmentState string

AccessReviewScopeAssignmentState - The role assignment state eligible/active to review

const (
	AccessReviewScopeAssignmentStateActive   AccessReviewScopeAssignmentState = "active"
	AccessReviewScopeAssignmentStateEligible AccessReviewScopeAssignmentState = "eligible"
)

func PossibleAccessReviewScopeAssignmentStateValues added in v0.4.0

func PossibleAccessReviewScopeAssignmentStateValues() []AccessReviewScopeAssignmentState

PossibleAccessReviewScopeAssignmentStateValues returns the possible values for the AccessReviewScopeAssignmentState const type.

type AccessReviewScopePrincipalType

type AccessReviewScopePrincipalType string

AccessReviewScopePrincipalType - The identity type user/servicePrincipal to review

const (
	AccessReviewScopePrincipalTypeGuestUser         AccessReviewScopePrincipalType = "guestUser"
	AccessReviewScopePrincipalTypeRedeemedGuestUser AccessReviewScopePrincipalType = "redeemedGuestUser"
	AccessReviewScopePrincipalTypeServicePrincipal  AccessReviewScopePrincipalType = "servicePrincipal"
	AccessReviewScopePrincipalTypeUser              AccessReviewScopePrincipalType = "user"
	AccessReviewScopePrincipalTypeUserGroup         AccessReviewScopePrincipalType = "user,group"
)

func PossibleAccessReviewScopePrincipalTypeValues

func PossibleAccessReviewScopePrincipalTypeValues() []AccessReviewScopePrincipalType

PossibleAccessReviewScopePrincipalTypeValues returns the possible values for the AccessReviewScopePrincipalType const type.

type DecisionResourceType added in v0.4.0

type DecisionResourceType string

DecisionResourceType - The type of resource: azureRole

const (
	DecisionResourceTypeAzureRole DecisionResourceType = "azureRole"
)

func PossibleDecisionResourceTypeValues added in v0.4.0

func PossibleDecisionResourceTypeValues() []DecisionResourceType

PossibleDecisionResourceTypeValues returns the possible values for the DecisionResourceType const type.

type DecisionTargetType

type DecisionTargetType string

DecisionTargetType - The type of decision target : User/ServicePrincipal

const (
	DecisionTargetTypeServicePrincipal DecisionTargetType = "servicePrincipal"
	DecisionTargetTypeUser             DecisionTargetType = "user"
)

func PossibleDecisionTargetTypeValues

func PossibleDecisionTargetTypeValues() []DecisionTargetType

PossibleDecisionTargetTypeValues returns the possible values for the DecisionTargetType const type.

type DefaultDecisionType

type DefaultDecisionType string

DefaultDecisionType - This specifies the behavior for the autoReview feature when an access review completes.

const (
	DefaultDecisionTypeApprove        DefaultDecisionType = "Approve"
	DefaultDecisionTypeDeny           DefaultDecisionType = "Deny"
	DefaultDecisionTypeRecommendation DefaultDecisionType = "Recommendation"
)

func PossibleDefaultDecisionTypeValues

func PossibleDefaultDecisionTypeValues() []DefaultDecisionType

PossibleDefaultDecisionTypeValues returns the possible values for the DefaultDecisionType const type.

type ErrorDefinition

type ErrorDefinition struct {
	// Error of the list gateway status.
	Error *ErrorDefinitionProperties `json:"error,omitempty"`
}

ErrorDefinition - Error description and code explaining why an operation failed.

type ErrorDefinitionProperties

type ErrorDefinitionProperties struct {
	// Error code of list gateway.
	Code *string `json:"code,omitempty"`

	// READ-ONLY; Description of the error.
	Message *string `json:"message,omitempty" azure:"ro"`
}

ErrorDefinitionProperties - Error description and code explaining why an operation failed.

type Operation

type Operation struct {
	// Display of the operation
	Display *OperationDisplay `json:"display,omitempty"`

	// Indicates whether the operation is a data action
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Name of the operation
	Name *string `json:"name,omitempty"`

	// Origin of the operation
	Origin *string `json:"origin,omitempty"`
}

Operation - The definition of a Microsoft.Authorization operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The description for the operation.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The operation that users can perform.
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; The resource provider name: Microsoft.Authorization.
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; The resource on which the operation is performed.
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

OperationDisplay - The display information for a Microsoft.Authorization operation.

type OperationListResult

type OperationListResult struct {
	// The URI that can be used to request the next set of paged results.
	NextLink *string `json:"nextLink,omitempty"`

	// The collection value.
	Value []*Operation `json:"value,omitempty"`
}

OperationListResult - The result of a request to list Microsoft.Authorization operations.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

type OperationsClient

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

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

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

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Lists the operations available from this provider. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type TenantLevelAccessReviewInstanceContactedReviewersClient added in v0.4.0

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

TenantLevelAccessReviewInstanceContactedReviewersClient contains the methods for the TenantLevelAccessReviewInstanceContactedReviewers group. Don't use this type directly, use NewTenantLevelAccessReviewInstanceContactedReviewersClient() instead.

func NewTenantLevelAccessReviewInstanceContactedReviewersClient added in v0.4.0

func NewTenantLevelAccessReviewInstanceContactedReviewersClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantLevelAccessReviewInstanceContactedReviewersClient, error)

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

func (*TenantLevelAccessReviewInstanceContactedReviewersClient) NewListPager added in v0.5.0

NewListPager - Get access review instance contacted reviewers If the operation fails it returns an *azcore.ResponseError type. scheduleDefinitionID - The id of the access review schedule definition. id - The id of the access review instance. options - TenantLevelAccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the TenantLevelAccessReviewInstanceContactedReviewersClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/authorization/resource-manager/Microsoft.Authorization/preview/2021-11-16-preview/examples/TenantLevelGetAccessReviewInstanceContactedReviewers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armauthorization.NewTenantLevelAccessReviewInstanceContactedReviewersClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<schedule-definition-id>",
		"<id>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type TenantLevelAccessReviewInstanceContactedReviewersClientListOptions added in v0.4.0

type TenantLevelAccessReviewInstanceContactedReviewersClientListOptions struct {
}

TenantLevelAccessReviewInstanceContactedReviewersClientListOptions contains the optional parameters for the TenantLevelAccessReviewInstanceContactedReviewersClient.List method.

type TenantLevelAccessReviewInstanceContactedReviewersClientListResponse added in v0.4.0

type TenantLevelAccessReviewInstanceContactedReviewersClientListResponse struct {
	AccessReviewContactedReviewerListResult
}

TenantLevelAccessReviewInstanceContactedReviewersClientListResponse contains the response from method TenantLevelAccessReviewInstanceContactedReviewersClient.List.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL