Documentation ¶
Index ¶
- Variables
- func NewEnvironmentResource() resource.Resource
- func NewEnvironmentsDataSource() datasource.DataSource
- type BillingPolicyDto
- type EnvironmentClient
- func (client *EnvironmentClient) CreateEnvironment(ctx context.Context, environment EnvironmentCreateDto) (*EnvironmentDto, error)
- func (client *EnvironmentClient) DeleteEnvironment(ctx context.Context, environmentId string) error
- func (client *EnvironmentClient) GetDefaultCurrencyForEnvironment(ctx context.Context, environmentId string) (*TransactionCurrencyDto, error)
- func (client *EnvironmentClient) GetEnvironment(ctx context.Context, environmentId string) (*EnvironmentDto, error)
- func (client *EnvironmentClient) GetEnvironmentUrlById(ctx context.Context, environmentId string) (string, error)
- func (client *EnvironmentClient) GetEnvironments(ctx context.Context) ([]EnvironmentDto, error)
- func (client *EnvironmentClient) UpdateEnvironment(ctx context.Context, environmentId string, environment EnvironmentDto) (*EnvironmentDto, error)
- type EnvironmentCreateCurrency
- type EnvironmentCreateDto
- type EnvironmentCreateLinkEnvironmentMetadataDto
- type EnvironmentCreateLinkedAppMetadataDto
- type EnvironmentCreatePostProvisioningPackages
- type EnvironmentCreatePropertiesDto
- type EnvironmentCreateTemplateMetadata
- type EnvironmentDataSourceModel
- type EnvironmentDeleteDto
- type EnvironmentDto
- type EnvironmentDtoArray
- type EnvironmentLifecycleCreatedDto
- type EnvironmentLifecycleCreatedPropertiesDto
- type EnvironmentPropertiesDto
- type EnvironmentResource
- func (r *EnvironmentResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *EnvironmentResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *EnvironmentResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *EnvironmentResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *EnvironmentResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *EnvironmentResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *EnvironmentResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *EnvironmentResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type EnvironmentResourceModel
- type EnvironmentsDataSource
- func (d *EnvironmentsDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *EnvironmentsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *EnvironmentsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *EnvironmentsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
- type EnvironmentsListDataSourceModel
- type ExtendedSettingsDto
- type GovernanceConfigurationDto
- type LinkedAppMetadataDto
- type LinkedEnvironmentMetadataDto
- type OrganizationSettingsArrayDto
- type OrganizationSettingsDto
- type SettingsDto
- type StatesEnvironmentDto
- type StatesManagementEnvironmentDto
- type TransactionCurrencyArrayDto
- type TransactionCurrencyDto
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 NewEnvironmentsDataSource ¶
func NewEnvironmentsDataSource() datasource.DataSource
Types ¶
type BillingPolicyDto ¶
type BillingPolicyDto struct {
Id string `json:"id"`
}
type EnvironmentClient ¶
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 (*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 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 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 (r *EnvironmentResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*EnvironmentResource) Create ¶
func (r *EnvironmentResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*EnvironmentResource) Delete ¶
func (r *EnvironmentResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*EnvironmentResource) ImportState ¶
func (r *EnvironmentResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*EnvironmentResource) Metadata ¶
func (r *EnvironmentResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*EnvironmentResource) Read ¶
func (r *EnvironmentResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*EnvironmentResource) Schema ¶
func (r *EnvironmentResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*EnvironmentResource) Update ¶
func (r *EnvironmentResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
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 (d *EnvironmentsDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*EnvironmentsDataSource) Metadata ¶
func (d *EnvironmentsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*EnvironmentsDataSource) Read ¶
func (d *EnvironmentsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*EnvironmentsDataSource) Schema ¶
func (d *EnvironmentsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 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 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"` }
Click to show internal directories.
Click to hide internal directories.