powerplatform

package
v0.6.0-preview Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/locations/unitedstates/environmentCurrencies?api-version=2023-06-01
	EnvironmentCurrencyCodes = []string{}/* 112 elements not displayed */

	//https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/locations?api-version=2023-06-01
	EnvironmentLocations = []string{"unitedstates",
		"europe", "asia", "australia", "india", "japan", "canada",
		"unitedkingdom", "southamerica", "france", "unitedarabemirates", "germany",
		"switzerland", "norway", "korea", "southafrica"}

	//https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/locations/unitedstates/environmentLanguages?api-version=2023-06-01
	EnvironmentLanguages = []int64{1033, 1025, 1026, 1069, 1027, 3076, 2052, 1028, 1050, 1029, 1030, 1043, 1061,
		1035, 1036, 1110, 1031, 1032, 1037, 1081, 1038, 1040, 1041, 1087, 1042, 1062,
		1063, 1044, 1045, 1046, 2070, 1048, 1049, 2074, 1051, 1060, 3082, 1053, 1054,
		1055, 1058, 1066, 3098, 1086, 1057}

	EnvironmentTypes = []string{"Sandbox", "Production", "Trial", "Developer"}
)

Functions

func NewEnvironmentResource

func NewEnvironmentResource() resource.Resource

func NewEnvironmentsDataSource

func NewEnvironmentsDataSource() datasource.DataSource

Types

type BillingPolicyDto

type BillingPolicyDto struct {
	Id string `json:"id"`
}

type EnvironmentClient

type EnvironmentClient struct {
	Api *api.ApiClient
	// contains filtered or unexported fields
}

func NewEnvironmentClient

func NewEnvironmentClient(api *api.ApiClient) EnvironmentClient

func (*EnvironmentClient) CreateEnvironment

func (client *EnvironmentClient) CreateEnvironment(ctx context.Context, environment EnvironmentCreateDto) (*EnvironmentDto, error)

func (*EnvironmentClient) DeleteEnvironment

func (client *EnvironmentClient) DeleteEnvironment(ctx context.Context, environmentId string) error

func (*EnvironmentClient) GetDefaultCurrencyForEnvironment

func (client *EnvironmentClient) GetDefaultCurrencyForEnvironment(ctx context.Context, environmentId string) (*TransactionCurrencyDto, error)

func (*EnvironmentClient) GetEnvironment

func (client *EnvironmentClient) GetEnvironment(ctx context.Context, environmentId string) (*EnvironmentDto, error)

func (*EnvironmentClient) GetEnvironmentUrlById

func (client *EnvironmentClient) GetEnvironmentUrlById(ctx context.Context, environmentId string) (string, error)

func (*EnvironmentClient) GetEnvironments

func (client *EnvironmentClient) GetEnvironments(ctx context.Context) ([]EnvironmentDto, error)

func (*EnvironmentClient) UpdateEnvironment

func (client *EnvironmentClient) UpdateEnvironment(ctx context.Context, environmentId string, environment EnvironmentDto) (*EnvironmentDto, error)

type EnvironmentCreateCurrency

type EnvironmentCreateCurrency struct {
	Code string `json:"code"`
}

type EnvironmentCreateDto

type EnvironmentCreateDto struct {
	Location   string                         `json:"location"`
	Properties EnvironmentCreatePropertiesDto `json:"properties"`
}

type EnvironmentCreateLinkEnvironmentMetadataDto

type EnvironmentCreateLinkEnvironmentMetadataDto struct {
	BaseLanguage     int                               `json:"baseLanguage"`
	DomainName       string                            `json:"domainName,omitempty"`
	Currency         EnvironmentCreateCurrency         `json:"currency"`
	SecurityGroupId  string                            `json:"securityGroupId,omitempty"`
	Templates        []string                          `json:"templates,omitempty"`
	TemplateMetadata EnvironmentCreateTemplateMetadata `json:"templateMetadata,omitempty"`
}

type EnvironmentCreateLinkedAppMetadataDto

type EnvironmentCreateLinkedAppMetadataDto struct {
	Id   string `json:"id"`
	Type string `json:"type"`
	Url  string `json:"url"`
}

type EnvironmentCreatePostProvisioningPackages

type EnvironmentCreatePostProvisioningPackages struct {
	ApplicationUniqueName string `json:"applicationUniqueName,omitempty"`
	Parameters            string `json:"parameters,omitempty"`
}

type EnvironmentCreatePropertiesDto

type EnvironmentCreatePropertiesDto struct {
	BillingPolicy             BillingPolicyDto                            `json:"billingPolicy,omitempty"`
	DataBaseType              string                                      `json:"databaseType,omitempty"`
	DisplayName               string                                      `json:"displayName"`
	EnvironmentSku            string                                      `json:"environmentSku"`
	LinkedEnvironmentMetadata EnvironmentCreateLinkEnvironmentMetadataDto `json:"linkedEnvironmentMetadata"`
}

type EnvironmentCreateTemplateMetadata

type EnvironmentCreateTemplateMetadata struct {
	PostProvisioningPackages []EnvironmentCreatePostProvisioningPackages `json:"PostProvisioningPackages,omitempty"`
}

type EnvironmentDataSourceModel

type EnvironmentDataSourceModel struct {
	EnvironmentId   types.String `tfsdk:"id"`
	DisplayName     types.String `tfsdk:"display_name"`
	Url             types.String `tfsdk:"url"`
	Domain          types.String `tfsdk:"domain"`
	Location        types.String `tfsdk:"location"`
	EnvironmentType types.String `tfsdk:"environment_type"`
	OrganizationId  types.String `tfsdk:"organization_id"`
	SecurityGroupId types.String `tfsdk:"security_group_id"`
	LanguageName    types.Int64  `tfsdk:"language_code"`
	Version         types.String `tfsdk:"version"`
	LinkedAppType   types.String `tfsdk:"linked_app_type"`
	LinkedAppId     types.String `tfsdk:"linked_app_id"`
	LinkedAppURL    types.String `tfsdk:"linked_app_url"`
	CurrencyCode    types.String `tfsdk:"currency_code"`
	BillingPolicyId types.String `tfsdk:"billing_policy_id"`
}

func ConvertFromEnvironmentDto

func ConvertFromEnvironmentDto(environmentDto EnvironmentDto, currencyCode string) EnvironmentDataSourceModel

type EnvironmentDeleteDto

type EnvironmentDeleteDto struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type EnvironmentDto

type EnvironmentDto struct {
	Id         string                   `json:"id"`
	Type       string                   `json:"type"`
	Location   string                   `json:"location"`
	Name       string                   `json:"name"`
	Properties EnvironmentPropertiesDto `json:"properties"`
}

type EnvironmentDtoArray

type EnvironmentDtoArray struct {
	Value []EnvironmentDto `json:"value"`
}

type EnvironmentLifecycleCreatedDto

type EnvironmentLifecycleCreatedDto struct {
	Name       string                                   `json:"name"`
	Properties EnvironmentLifecycleCreatedPropertiesDto `json:"properties"`
}

type EnvironmentLifecycleCreatedPropertiesDto

type EnvironmentLifecycleCreatedPropertiesDto struct {
	ProvisioningState string `json:"provisioningState"`
}

type EnvironmentPropertiesDto

type EnvironmentPropertiesDto struct {
	DatabaseType              string                       `json:"databaseType"`
	DisplayName               string                       `json:"displayName"`
	EnvironmentSku            string                       `json:"environmentSku"`
	LinkedAppMetadata         *LinkedAppMetadataDto        `json:"linkedAppMetadata,omitempty"`
	LinkedEnvironmentMetadata LinkedEnvironmentMetadataDto `json:"linkedEnvironmentMetadata"`
	States                    StatesEnvironmentDto         `json:"states"`
	TenantID                  string                       `json:"tenantId"`
	GovernanceConfiguration   GovernanceConfigurationDto   `json:"governanceConfiguration"`
	BillingPolicy             BillingPolicyDto             `json:"billingPolicy,omitempty"`
}

type EnvironmentResource

type EnvironmentResource struct {
	EnvironmentClient EnvironmentClient
	LicensingClient   licensing.LicensingClient
	ProviderTypeName  string
	TypeName          string
}

func (*EnvironmentResource) Configure

func (*EnvironmentResource) Create

func (*EnvironmentResource) Delete

func (*EnvironmentResource) ImportState

func (*EnvironmentResource) Metadata

func (*EnvironmentResource) Read

func (*EnvironmentResource) Schema

func (*EnvironmentResource) Update

type EnvironmentResourceModel

type EnvironmentResourceModel struct {
	Id              types.String `tfsdk:"id"`
	DisplayName     types.String `tfsdk:"display_name"`
	Url             types.String `tfsdk:"url"`
	Domain          types.String `tfsdk:"domain"`
	Location        types.String `tfsdk:"location"`
	EnvironmentType types.String `tfsdk:"environment_type"`
	//CommonDataServiceDatabaseType types.String `tfsdk:"common_data_service_database_type"`
	OrganizationId  types.String `tfsdk:"organization_id"`
	SecurityGroupId types.String `tfsdk:"security_group_id"`
	LanguageName    types.Int64  `tfsdk:"language_code"`
	CurrencyCode    types.String `tfsdk:"currency_code"`
	//IsCustomControlInCanvasAppsEnabled types.Bool   `tfsdk:"is_custom_control_in_canvas_apps_enabled"`
	Version          types.String `tfsdk:"version"`
	Templates        []string     `tfsdk:"templates"`
	TemplateMetadata types.String `tfsdk:"template_metadata"`
	LinkedAppType    types.String `tfsdk:"linked_app_type"`
	LinkedAppId      types.String `tfsdk:"linked_app_id"`
	LinkedAppUrl     types.String `tfsdk:"linked_app_url"`
	BillingPolicyId  types.String `tfsdk:"billing_policy_id"`
}

type EnvironmentsDataSource

type EnvironmentsDataSource struct {
	EnvironmentClient EnvironmentClient
	ProviderTypeName  string
	TypeName          string
}

func (*EnvironmentsDataSource) Configure

func (*EnvironmentsDataSource) Metadata

func (*EnvironmentsDataSource) Read

func (*EnvironmentsDataSource) Schema

type EnvironmentsListDataSourceModel

type EnvironmentsListDataSourceModel struct {
	Environments []EnvironmentDataSourceModel `tfsdk:"environments"`
	Id           types.Int64                  `tfsdk:"id"`
}

type ExtendedSettingsDto

type ExtendedSettingsDto struct {
	ExcludeEnvironmentFromAnalysis string `json:"excludeEnvironmentFromAnalysis"`
	IsGroupSharingDisabled         string `json:"isGroupSharingDisabled"`
	MaxLimitUserSharing            string `json:"maxLimitUserSharing"`
	DisableAiGeneratedDescriptions string `json:"disableAiGeneratedDescriptions"`
	IncludeOnHomepageInsights      string `json:"includeOnHomepageInsights"`
	LimitSharingMode               string `json:"limitSharingMode"`
	SolutionCheckerMode            string `json:"solutionCheckerMode"`
	SuppressValidationEmails       string `json:"suppressValidationEmails"`
	SolutionCheckerRuleOverrides   string `json:"solutionCheckerRuleOverrides"`
	MakerOnboardingUrl             string `json:"makerOnboardingUrl"`
	//MakerOnboardingTimestamp       time.Time `json:"makerOnboardingTimestamp"`
	MakerOnboardingMarkdown string `json:"makerOnboardingMarkdown"`
}

Following is the properties for Managed Environments

type GovernanceConfigurationDto

type GovernanceConfigurationDto struct {
	ProtectionLevel string       `json:"protectionLevel"`
	Settings        *SettingsDto `json:"settings,omitempty"`
}

type LinkedAppMetadataDto

type LinkedAppMetadataDto struct {
	Id   string `json:"id"`
	Type string `json:"type"`
	Url  string `json:"url"`
}

type LinkedEnvironmentMetadataDto

type LinkedEnvironmentMetadataDto struct {
	DomainName       string                            `json:"domainName,omitempty"`
	InstanceURL      string                            `json:"instanceUrl"`
	BaseLanguage     int                               `json:"baseLanguage"`
	SecurityGroupId  string                            `json:"securityGroupId"`
	ResourceId       string                            `json:"resourceId"`
	Version          string                            `json:"version"`
	Templates        []string                          `json:"template,omitempty"`
	TemplateMetadata EnvironmentCreateTemplateMetadata `json:"templateMetadata,omitempty"`
}

type OrganizationSettingsArrayDto

type OrganizationSettingsArrayDto struct {
	Value []OrganizationSettingsDto `json:"value"`
}

type OrganizationSettingsDto

type OrganizationSettingsDto struct {
	ODataEtag      string    `json:"@odata.etag"`
	CreatedOn      time.Time `json:"createdon"`
	BaseCurrencyId string    `json:"_basecurrencyid_value"`
}

type SettingsDto

type SettingsDto struct {
	ExtendedSettings ExtendedSettingsDto `json:"extendedSettings"`
}

type StatesEnvironmentDto

type StatesEnvironmentDto struct {
	Management StatesManagementEnvironmentDto `json:"management"`
}

type StatesManagementEnvironmentDto

type StatesManagementEnvironmentDto struct {
	Id string `json:"id"`
}

type TransactionCurrencyArrayDto

type TransactionCurrencyArrayDto struct {
	Value []TransactionCurrencyDto `json:"value"`
}

type TransactionCurrencyDto

type TransactionCurrencyDto struct {
	OrganizationValue     string  `json:"_organizationid_value"`
	CurrencyName          string  `json:"currencyname"`
	CurrencySymbol        string  `json:"currencysymbol"`
	IsoCurrencyCode       string  `json:"isocurrencycode"`
	CreatedOn             string  `json:"createdon"`
	CurrencyPrecision     int     `json:"currencyprecision"`
	ExchangeRate          float32 `json:"exchangerate"`
	TransactionCurrencyId string  `json:"transactioncurrencyid"`
}

Jump to

Keyboard shortcuts

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