graphBetaConditionalAccessPolicy

package
v0.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Overview

REF: https://learn.microsoft.com/en-us/graph/api/resources/conditionalaccesspolicy?view=graph-rest-beta

Index

Constants

View Source
const (
	ResourceName  = "graph_beta_identity_and_access_conditional_access_policy"
	CreateTimeout = 180
	UpdateTimeout = 180
	ReadTimeout   = 180
	DeleteTimeout = 180
)

Variables

This section is empty.

Functions

func MapRemoteStateToTerraform

func MapRemoteStateToTerraform(ctx context.Context, data *ConditionalAccessPolicyResourceModel, remoteResource models.ConditionalAccessPolicyable)

MapRemoteStateToTerraform maps the remote state from the Graph API to the Terraform resource model for stating. It populates the ConditionalAccessPolicyResourceModel with data from the ConditionalAccessPolicy.

func NewConditionalAccessPolicyResource

func NewConditionalAccessPolicyResource() resource.Resource

Types

type ApplicationEnforcedRestrictionsSessionControlModel

type ApplicationEnforcedRestrictionsSessionControlModel struct {
	IsEnabled types.Bool `tfsdk:"is_enabled"`
}

type AuthenticationStrengthPolicyModel

type AuthenticationStrengthPolicyModel struct {
	ID                    types.String   `tfsdk:"id"`
	CreatedDateTime       types.String   `tfsdk:"created_date_time"`
	ModifiedDateTime      types.String   `tfsdk:"modified_date_time"`
	DisplayName           types.String   `tfsdk:"display_name"`
	Description           types.String   `tfsdk:"description"`
	PolicyType            types.String   `tfsdk:"policy_type"`
	RequirementsSatisfied types.String   `tfsdk:"requirements_satisfied"`
	AllowedCombinations   []types.String `tfsdk:"allowed_combinations"`
}

type CloudAppSecuritySessionControlModel

type CloudAppSecuritySessionControlModel struct {
	IsEnabled            types.Bool   `tfsdk:"is_enabled"`
	CloudAppSecurityType types.String `tfsdk:"cloud_app_security_type"`
}

type ConditionalAccessApplicationsModel

type ConditionalAccessApplicationsModel struct {
	IncludeApplications []types.String                `tfsdk:"include_applications"`
	ExcludeApplications []types.String                `tfsdk:"exclude_applications"`
	ApplicationFilter   *ConditionalAccessFilterModel `tfsdk:"application_filter"`
	IncludeUserActions  []types.String                `tfsdk:"include_user_actions"`
}

type ConditionalAccessAuthenticationFlowsModel

type ConditionalAccessAuthenticationFlowsModel struct {
	TransferMethods types.String `tfsdk:"transfer_methods"`
}

type ConditionalAccessClientApplicationsModel

type ConditionalAccessClientApplicationsModel struct {
	ExcludeServicePrincipals []types.String                `tfsdk:"exclude_service_principals"`
	IncludeServicePrincipals []types.String                `tfsdk:"include_service_principals"`
	ServicePrincipalFilter   *ConditionalAccessFilterModel `tfsdk:"service_principal_filter"`
}

type ConditionalAccessConditionsModel

type ConditionalAccessConditionsModel struct {
	Applications               *ConditionalAccessApplicationsModel        `tfsdk:"applications"`
	Users                      *ConditionalAccessUsersModel               `tfsdk:"users"`
	ClientApplications         *ConditionalAccessClientApplicationsModel  `tfsdk:"client_applications"`
	ClientAppTypes             []types.String                             `tfsdk:"client_app_types"`
	DeviceStates               *ConditionalAccessDeviceStatesModel        `tfsdk:"device_states"`
	Devices                    *ConditionalAccessDevicesModel             `tfsdk:"devices"`
	Locations                  *ConditionalAccessLocationsModel           `tfsdk:"locations"`
	Platforms                  *ConditionalAccessPlatformsModel           `tfsdk:"platforms"`
	ServicePrincipalRiskLevels []types.String                             `tfsdk:"service_principal_risk_levels"`
	SignInRiskLevels           []types.String                             `tfsdk:"sign_in_risk_levels"`
	UserRiskLevels             []types.String                             `tfsdk:"user_risk_levels"`
	AuthenticationFlows        *ConditionalAccessAuthenticationFlowsModel `tfsdk:"authentication_flows"`
	InsiderRiskLevels          types.String                               `tfsdk:"insider_risk_levels"`
}

type ConditionalAccessDeviceStatesModel

type ConditionalAccessDeviceStatesModel struct {
	IncludeStates []types.String `tfsdk:"include_states"`
	ExcludeStates []types.String `tfsdk:"exclude_states"`
}

type ConditionalAccessDevicesModel

type ConditionalAccessDevicesModel struct {
	IncludeDevices []types.String                `tfsdk:"include_devices"`
	ExcludeDevices []types.String                `tfsdk:"exclude_devices"`
	IncludeStates  []types.String                `tfsdk:"include_states"` // TODO - validate this. sdk different to msft docs
	ExcludeStates  []types.String                `tfsdk:"exclude_states"` // TODO - validate this. sdk different to msft docs
	DeviceFilter   *ConditionalAccessFilterModel `tfsdk:"device_filter"`
}

type ConditionalAccessExternalTenantsModel

type ConditionalAccessExternalTenantsModel struct {
	MembershipKind types.String `tfsdk:"membership_kind"`
}

type ConditionalAccessFilterModel

type ConditionalAccessFilterModel struct {
	Mode types.String `tfsdk:"mode"`
	Rule types.String `tfsdk:"rule"`
}

type ConditionalAccessGrantControlsModel

type ConditionalAccessGrantControlsModel struct {
	BuiltInControls             []types.String                     `tfsdk:"built_in_controls"`
	CustomAuthenticationFactors []types.String                     `tfsdk:"custom_authentication_factors"`
	Operator                    types.String                       `tfsdk:"operator"`
	TermsOfUse                  []types.String                     `tfsdk:"terms_of_use"`
	AuthenticationStrength      *AuthenticationStrengthPolicyModel `tfsdk:"authentication_strength"`
}

type ConditionalAccessGuestsOrExternalUsersModel

type ConditionalAccessGuestsOrExternalUsersModel struct {
	ExternalTenants          *ConditionalAccessExternalTenantsModel `tfsdk:"external_tenants"`
	GuestOrExternalUserTypes types.String                           `tfsdk:"guest_or_external_user_types"`
}

type ConditionalAccessLocationsModel

type ConditionalAccessLocationsModel struct {
	ExcludeLocations []types.String `tfsdk:"exclude_locations"`
	IncludeLocations []types.String `tfsdk:"include_locations"`
}

type ConditionalAccessPlatformsModel

type ConditionalAccessPlatformsModel struct {
	ExcludePlatforms []types.String `tfsdk:"exclude_platforms"`
	IncludePlatforms []types.String `tfsdk:"include_platforms"`
}

type ConditionalAccessPolicyResource

type ConditionalAccessPolicyResource struct {
	ProviderTypeName string
	TypeName         string
	ReadPermissions  []string
	WritePermissions []string
	// contains filtered or unexported fields
}

func (*ConditionalAccessPolicyResource) Configure

Configure sets the client for the resource.

func (*ConditionalAccessPolicyResource) Create

Create handles the Create operation.

func (*ConditionalAccessPolicyResource) Delete

Delete handles the Delete operation.

func (*ConditionalAccessPolicyResource) ImportState

ImportState imports the resource state.

func (*ConditionalAccessPolicyResource) Metadata

Metadata returns the resource type name.

func (*ConditionalAccessPolicyResource) ModifyPlan

ModifyPlan handles plan modification for diff suppression

func (*ConditionalAccessPolicyResource) Read

Read handles the Read operation.

func (*ConditionalAccessPolicyResource) Schema

Schema returns the schema for the resource.

func (*ConditionalAccessPolicyResource) Update

Update handles the Update operation.

type ConditionalAccessPolicyResourceModel

type ConditionalAccessPolicyResourceModel struct {
	ID               types.String                           `tfsdk:"id"`
	Description      types.String                           `tfsdk:"description"`
	DisplayName      types.String                           `tfsdk:"display_name"`
	CreatedDateTime  types.String                           `tfsdk:"created_date_time"`
	ModifiedDateTime types.String                           `tfsdk:"modified_date_time"`
	State            types.String                           `tfsdk:"state"`
	Conditions       *ConditionalAccessConditionsModel      `tfsdk:"conditions"`
	GrantControls    *ConditionalAccessGrantControlsModel   `tfsdk:"grant_controls"`
	SessionControls  *ConditionalAccessSessionControlsModel `tfsdk:"session_controls"`
	Timeouts         timeouts.Value                         `tfsdk:"timeouts"`
}

type ConditionalAccessSessionControlsModel

type ConditionalAccessSessionControlsModel struct {
	ApplicationEnforcedRestrictions *ApplicationEnforcedRestrictionsSessionControlModel `tfsdk:"application_enforced_restrictions"`
	CloudAppSecurity                *CloudAppSecuritySessionControlModel                `tfsdk:"cloud_app_security"`
	ContinuousAccessEvaluation      *ContinuousAccessEvaluationSessionControlModel      `tfsdk:"continuous_access_evaluation"`
	PersistentBrowser               *PersistentBrowserSessionControlModel               `tfsdk:"persistent_browser"`
	SignInFrequency                 *SignInFrequencySessionControlModel                 `tfsdk:"sign_in_frequency"`
	DisableResilienceDefaults       types.Bool                                          `tfsdk:"disable_resilience_defaults"`
	SecureSignInSession             *SecureSignInSessionControlModel                    `tfsdk:"secure_sign_in_session"`
}

Ref: https://learn.microsoft.com/en-us/graph/api/resources/conditionalaccesssessioncontrols?view=graph-rest-beta

type ConditionalAccessUsersModel

type ConditionalAccessUsersModel struct {
	ExcludeGroups                []types.String                               `tfsdk:"exclude_groups"`
	ExcludeGuestsOrExternalUsers *ConditionalAccessGuestsOrExternalUsersModel `tfsdk:"exclude_guests_or_external_users"`
	ExcludeRoles                 []types.String                               `tfsdk:"exclude_roles"`
	ExcludeUsers                 []types.String                               `tfsdk:"exclude_users"`
	IncludeGroups                []types.String                               `tfsdk:"include_groups"`
	IncludeGuestsOrExternalUsers *ConditionalAccessGuestsOrExternalUsersModel `tfsdk:"include_guests_or_external_users"`
	IncludeRoles                 []types.String                               `tfsdk:"include_roles"`
	IncludeUsers                 []types.String                               `tfsdk:"include_users"`
}

type ContinuousAccessEvaluationSessionControlModel

type ContinuousAccessEvaluationSessionControlModel struct {
	Mode types.String `tfsdk:"mode"`
}

type PersistentBrowserSessionControlModel

type PersistentBrowserSessionControlModel struct {
	IsEnabled types.Bool   `tfsdk:"is_enabled"`
	Mode      types.String `tfsdk:"mode"`
}

type SecureSignInSessionControlModel

type SecureSignInSessionControlModel struct {
	IsEnabled          types.Bool   `tfsdk:"is_enabled"`
	Type               types.String `tfsdk:"type"`
	Value              types.Int64  `tfsdk:"value"`
	AuthenticationType types.String `tfsdk:"authentication_type"`
	FrequencyInterval  types.String `tfsdk:"frequency_interval"`
}

type SignInFrequencySessionControlModel

type SignInFrequencySessionControlModel struct {
	IsEnabled          types.Bool   `tfsdk:"is_enabled"`
	Type               types.String `tfsdk:"type"`
	Value              types.Int64  `tfsdk:"value"`
	AuthenticationType types.String `tfsdk:"authentication_type"`
	FrequencyInterval  types.String `tfsdk:"frequency_interval"`
}

Jump to

Keyboard shortcuts

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